Class PacketHeader.Builder (0.12.0)

public static final class PacketHeader.Builder extends GeneratedMessageV3.Builder<PacketHeader.Builder> implements PacketHeaderOrBuilder

The message that represents packet header.

Protobuf type google.cloud.visionai.v1.PacketHeader

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PacketHeader.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
PacketHeader.Builder
Overrides

build()

public PacketHeader build()
Returns
Type Description
PacketHeader

buildPartial()

public PacketHeader buildPartial()
Returns
Type Description
PacketHeader

clear()

public PacketHeader.Builder clear()
Returns
Type Description
PacketHeader.Builder
Overrides

clearCaptureTime()

public PacketHeader.Builder clearCaptureTime()

Input only. The capture time of the packet.

.google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
PacketHeader.Builder

clearField(Descriptors.FieldDescriptor field)

public PacketHeader.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
PacketHeader.Builder
Overrides

clearFlags()

public PacketHeader.Builder clearFlags()

Immutable. Packet flag set. SDK will set the flag automatically.

int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
PacketHeader.Builder

This builder for chaining.

clearMetadata()

public PacketHeader.Builder clearMetadata()

Input only. This field is for users to attach user managed metadata.

.google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
PacketHeader.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public PacketHeader.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
PacketHeader.Builder
Overrides

clearSeriesMetadata()

public PacketHeader.Builder clearSeriesMetadata()

Input only. Immutable. Metadata that the server needs to know where to write the packets to. It's only required for the first packet.

.google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
PacketHeader.Builder

clearServerMetadata()

public PacketHeader.Builder clearServerMetadata()

Output only. Metadata that the server appends to each packet before sending it to receivers. You don't need to set a value for this field when sending packets.

.google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
PacketHeader.Builder

clearTraceContext()

public PacketHeader.Builder clearTraceContext()

Immutable. Header string for tracing across services. It should be set when the packet is first arrived in the stream server.

The input format is a lowercase hex string:

  • version_id: 1 byte, currently must be zero - hex encoded (2 characters)
  • trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
  • span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
  • trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 characters) Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01" v trace_id span_id options

string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
PacketHeader.Builder

This builder for chaining.

clearType()

public PacketHeader.Builder clearType()

Input only. Immutable. The type of the payload.

.google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
PacketHeader.Builder

clone()

public PacketHeader.Builder clone()
Returns
Type Description
PacketHeader.Builder
Overrides

getCaptureTime()

public Timestamp getCaptureTime()

Input only. The capture time of the packet.

.google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Timestamp

The captureTime.

getCaptureTimeBuilder()

public Timestamp.Builder getCaptureTimeBuilder()

Input only. The capture time of the packet.

.google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Builder

getCaptureTimeOrBuilder()

public TimestampOrBuilder getCaptureTimeOrBuilder()

Input only. The capture time of the packet.

.google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public PacketHeader getDefaultInstanceForType()
Returns
Type Description
PacketHeader

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFlags()

public int getFlags()

Immutable. Packet flag set. SDK will set the flag automatically.

int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
int

The flags.

getMetadata()

public Struct getMetadata()

Input only. This field is for users to attach user managed metadata.

.google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Struct

The metadata.

getMetadataBuilder()

public Struct.Builder getMetadataBuilder()

Input only. This field is for users to attach user managed metadata.

.google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Builder

getMetadataOrBuilder()

public StructOrBuilder getMetadataOrBuilder()

Input only. This field is for users to attach user managed metadata.

.google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
StructOrBuilder

getSeriesMetadata()

public SeriesMetadata getSeriesMetadata()

Input only. Immutable. Metadata that the server needs to know where to write the packets to. It's only required for the first packet.

.google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
SeriesMetadata

The seriesMetadata.

getSeriesMetadataBuilder()

public SeriesMetadata.Builder getSeriesMetadataBuilder()

Input only. Immutable. Metadata that the server needs to know where to write the packets to. It's only required for the first packet.

.google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
SeriesMetadata.Builder

getSeriesMetadataOrBuilder()

public SeriesMetadataOrBuilder getSeriesMetadataOrBuilder()

Input only. Immutable. Metadata that the server needs to know where to write the packets to. It's only required for the first packet.

.google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
SeriesMetadataOrBuilder

getServerMetadata()

public ServerMetadata getServerMetadata()

Output only. Metadata that the server appends to each packet before sending it to receivers. You don't need to set a value for this field when sending packets.

.google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ServerMetadata

The serverMetadata.

getServerMetadataBuilder()

public ServerMetadata.Builder getServerMetadataBuilder()

Output only. Metadata that the server appends to each packet before sending it to receivers. You don't need to set a value for this field when sending packets.

.google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ServerMetadata.Builder

getServerMetadataOrBuilder()

public ServerMetadataOrBuilder getServerMetadataOrBuilder()

Output only. Metadata that the server appends to each packet before sending it to receivers. You don't need to set a value for this field when sending packets.

.google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ServerMetadataOrBuilder

getTraceContext()

public String getTraceContext()

Immutable. Header string for tracing across services. It should be set when the packet is first arrived in the stream server.

The input format is a lowercase hex string:

  • version_id: 1 byte, currently must be zero - hex encoded (2 characters)
  • trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
  • span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
  • trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 characters) Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01" v trace_id span_id options

string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The traceContext.

getTraceContextBytes()

public ByteString getTraceContextBytes()

Immutable. Header string for tracing across services. It should be set when the packet is first arrived in the stream server.

The input format is a lowercase hex string:

  • version_id: 1 byte, currently must be zero - hex encoded (2 characters)
  • trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
  • span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
  • trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 characters) Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01" v trace_id span_id options

string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for traceContext.

getType()

public PacketType getType()

Input only. Immutable. The type of the payload.

.google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
PacketType

The type.

getTypeBuilder()

public PacketType.Builder getTypeBuilder()

Input only. Immutable. The type of the payload.

.google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
PacketType.Builder

getTypeOrBuilder()

public PacketTypeOrBuilder getTypeOrBuilder()

Input only. Immutable. The type of the payload.

.google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
PacketTypeOrBuilder

hasCaptureTime()

public boolean hasCaptureTime()

Input only. The capture time of the packet.

.google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
boolean

Whether the captureTime field is set.

hasMetadata()

public boolean hasMetadata()

Input only. This field is for users to attach user managed metadata.

.google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
boolean

Whether the metadata field is set.

hasSeriesMetadata()

public boolean hasSeriesMetadata()

Input only. Immutable. Metadata that the server needs to know where to write the packets to. It's only required for the first packet.

.google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
boolean

Whether the seriesMetadata field is set.

hasServerMetadata()

public boolean hasServerMetadata()

Output only. Metadata that the server appends to each packet before sending it to receivers. You don't need to set a value for this field when sending packets.

.google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the serverMetadata field is set.

hasType()

public boolean hasType()

Input only. Immutable. The type of the payload.

.google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
boolean

Whether the type field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCaptureTime(Timestamp value)

public PacketHeader.Builder mergeCaptureTime(Timestamp value)

Input only. The capture time of the packet.

.google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
PacketHeader.Builder

mergeFrom(PacketHeader other)

public PacketHeader.Builder mergeFrom(PacketHeader other)
Parameter
Name Description
other PacketHeader
Returns
Type Description
PacketHeader.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PacketHeader.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PacketHeader.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public PacketHeader.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
PacketHeader.Builder
Overrides

mergeMetadata(Struct value)

public PacketHeader.Builder mergeMetadata(Struct value)

Input only. This field is for users to attach user managed metadata.

.google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value Struct
Returns
Type Description
PacketHeader.Builder

mergeSeriesMetadata(SeriesMetadata value)

public PacketHeader.Builder mergeSeriesMetadata(SeriesMetadata value)

Input only. Immutable. Metadata that the server needs to know where to write the packets to. It's only required for the first packet.

.google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value SeriesMetadata
Returns
Type Description
PacketHeader.Builder

mergeServerMetadata(ServerMetadata value)

public PacketHeader.Builder mergeServerMetadata(ServerMetadata value)

Output only. Metadata that the server appends to each packet before sending it to receivers. You don't need to set a value for this field when sending packets.

.google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ServerMetadata
Returns
Type Description
PacketHeader.Builder

mergeType(PacketType value)

public PacketHeader.Builder mergeType(PacketType value)

Input only. Immutable. The type of the payload.

.google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value PacketType
Returns
Type Description
PacketHeader.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PacketHeader.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PacketHeader.Builder
Overrides

setCaptureTime(Timestamp value)

public PacketHeader.Builder setCaptureTime(Timestamp value)

Input only. The capture time of the packet.

.google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
PacketHeader.Builder

setCaptureTime(Timestamp.Builder builderForValue)

public PacketHeader.Builder setCaptureTime(Timestamp.Builder builderForValue)

Input only. The capture time of the packet.

.google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
PacketHeader.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public PacketHeader.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
PacketHeader.Builder
Overrides

setFlags(int value)

public PacketHeader.Builder setFlags(int value)

Immutable. Packet flag set. SDK will set the flag automatically.

int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value int

The flags to set.

Returns
Type Description
PacketHeader.Builder

This builder for chaining.

setMetadata(Struct value)

public PacketHeader.Builder setMetadata(Struct value)

Input only. This field is for users to attach user managed metadata.

.google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value Struct
Returns
Type Description
PacketHeader.Builder

setMetadata(Struct.Builder builderForValue)

public PacketHeader.Builder setMetadata(Struct.Builder builderForValue)

Input only. This field is for users to attach user managed metadata.

.google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
PacketHeader.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public PacketHeader.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
PacketHeader.Builder
Overrides

setSeriesMetadata(SeriesMetadata value)

public PacketHeader.Builder setSeriesMetadata(SeriesMetadata value)

Input only. Immutable. Metadata that the server needs to know where to write the packets to. It's only required for the first packet.

.google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value SeriesMetadata
Returns
Type Description
PacketHeader.Builder

setSeriesMetadata(SeriesMetadata.Builder builderForValue)

public PacketHeader.Builder setSeriesMetadata(SeriesMetadata.Builder builderForValue)

Input only. Immutable. Metadata that the server needs to know where to write the packets to. It's only required for the first packet.

.google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
builderForValue SeriesMetadata.Builder
Returns
Type Description
PacketHeader.Builder

setServerMetadata(ServerMetadata value)

public PacketHeader.Builder setServerMetadata(ServerMetadata value)

Output only. Metadata that the server appends to each packet before sending it to receivers. You don't need to set a value for this field when sending packets.

.google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ServerMetadata
Returns
Type Description
PacketHeader.Builder

setServerMetadata(ServerMetadata.Builder builderForValue)

public PacketHeader.Builder setServerMetadata(ServerMetadata.Builder builderForValue)

Output only. Metadata that the server appends to each packet before sending it to receivers. You don't need to set a value for this field when sending packets.

.google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue ServerMetadata.Builder
Returns
Type Description
PacketHeader.Builder

setTraceContext(String value)

public PacketHeader.Builder setTraceContext(String value)

Immutable. Header string for tracing across services. It should be set when the packet is first arrived in the stream server.

The input format is a lowercase hex string:

  • version_id: 1 byte, currently must be zero - hex encoded (2 characters)
  • trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
  • span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
  • trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 characters) Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01" v trace_id span_id options

string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The traceContext to set.

Returns
Type Description
PacketHeader.Builder

This builder for chaining.

setTraceContextBytes(ByteString value)

public PacketHeader.Builder setTraceContextBytes(ByteString value)

Immutable. Header string for tracing across services. It should be set when the packet is first arrived in the stream server.

The input format is a lowercase hex string:

  • version_id: 1 byte, currently must be zero - hex encoded (2 characters)
  • trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
  • span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
  • trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 characters) Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01" v trace_id span_id options

string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for traceContext to set.

Returns
Type Description
PacketHeader.Builder

This builder for chaining.

setType(PacketType value)

public PacketHeader.Builder setType(PacketType value)

Input only. Immutable. The type of the payload.

.google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value PacketType
Returns
Type Description
PacketHeader.Builder

setType(PacketType.Builder builderForValue)

public PacketHeader.Builder setType(PacketType.Builder builderForValue)

Input only. Immutable. The type of the payload.

.google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
builderForValue PacketType.Builder
Returns
Type Description
PacketHeader.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final PacketHeader.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PacketHeader.Builder
Overrides