targetId property

  1. @TagNumber(5)
int get targetId

The target ID that identifies the target on the stream. Must be a positive number and non-zero.

If target_id is 0 (or unspecified), the server will assign an ID for this target and return that in a TargetChange::ADD event. Once a target with target_id=0 is added, all subsequent targets must also have target_id=0. If an AddTarget request with target_id != 0 is sent to the server after a target with target_id=0 is added, the server will immediately send a response with a TargetChange::Remove event.

Note that if the client sends multiple AddTarget requests without an ID, the order of IDs returned in TargetChage.target_ids are undefined. Therefore, clients should provide a target ID instead of relying on the server to assign one.

If target_id is non-zero, there must not be an existing active target on this stream with the same ID.

Implementation

@$pb.TagNumber(5)
$core.int get targetId => $_getIZ(3);
  1. @TagNumber(5)
set targetId (int v)

Implementation

@$pb.TagNumber(5)
set targetId($core.int v) {
  $_setSignedInt32(3, v);
}