Class PacketHeader (0.33.0)

publicfinalclass PacketHeaderextendsGeneratedMessageV3implementsPacketHeaderOrBuilder

The message that represents packet header.

Protobuf type google.cloud.visionai.v1.PacketHeader

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

CAPTURE_TIME_FIELD_NUMBER

publicstaticfinalintCAPTURE_TIME_FIELD_NUMBER
Field Value
Type Description
int

FLAGS_FIELD_NUMBER

publicstaticfinalintFLAGS_FIELD_NUMBER
Field Value
Type Description
int

METADATA_FIELD_NUMBER

publicstaticfinalintMETADATA_FIELD_NUMBER
Field Value
Type Description
int

SERIES_METADATA_FIELD_NUMBER

publicstaticfinalintSERIES_METADATA_FIELD_NUMBER
Field Value
Type Description
int

SERVER_METADATA_FIELD_NUMBER

publicstaticfinalintSERVER_METADATA_FIELD_NUMBER
Field Value
Type Description
int

TRACE_CONTEXT_FIELD_NUMBER

publicstaticfinalintTRACE_CONTEXT_FIELD_NUMBER
Field Value
Type Description
int

TYPE_FIELD_NUMBER

publicstaticfinalintTYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticPacketHeadergetDefaultInstance()
Returns
Type Description
PacketHeader

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticPacketHeader.BuildernewBuilder()
Returns
Type Description
PacketHeader.Builder

newBuilder(PacketHeader prototype)

publicstaticPacketHeader.BuildernewBuilder(PacketHeaderprototype)
Parameter
Name Description
prototype PacketHeader
Returns
Type Description
PacketHeader.Builder

parseDelimitedFrom(InputStream input)

publicstaticPacketHeaderparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
PacketHeader
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticPacketHeaderparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PacketHeader
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticPacketHeaderparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
PacketHeader
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticPacketHeaderparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PacketHeader
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticPacketHeaderparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
PacketHeader
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticPacketHeaderparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PacketHeader
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticPacketHeaderparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
PacketHeader
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticPacketHeaderparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PacketHeader
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticPacketHeaderparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
PacketHeader
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticPacketHeaderparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PacketHeader
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticPacketHeaderparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
PacketHeader
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticPacketHeaderparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PacketHeader
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<PacketHeader>parser()
Returns
Type Description
Parser<PacketHeader>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCaptureTime()

publicTimestampgetCaptureTime()

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.

getCaptureTimeOrBuilder()

publicTimestampOrBuildergetCaptureTimeOrBuilder()

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()

publicPacketHeadergetDefaultInstanceForType()
Returns
Type Description
PacketHeader

getFlags()

publicintgetFlags()

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()

publicStructgetMetadata()

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.

getMetadataOrBuilder()

publicStructOrBuildergetMetadataOrBuilder()

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

getParserForType()

publicParser<PacketHeader>getParserForType()
Returns
Type Description
Parser<PacketHeader>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getSeriesMetadata()

publicSeriesMetadatagetSeriesMetadata()

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.

getSeriesMetadataOrBuilder()

publicSeriesMetadataOrBuildergetSeriesMetadataOrBuilder()

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()

publicServerMetadatagetServerMetadata()

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.

getServerMetadataOrBuilder()

publicServerMetadataOrBuildergetServerMetadataOrBuilder()

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()

publicStringgetTraceContext()

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()

publicByteStringgetTraceContextBytes()

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()

publicPacketTypegetType()

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.

getTypeOrBuilder()

publicPacketTypeOrBuildergetTypeOrBuilder()

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()

publicbooleanhasCaptureTime()

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()

publicbooleanhasMetadata()

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()

publicbooleanhasSeriesMetadata()

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()

publicbooleanhasServerMetadata()

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()

publicbooleanhasType()

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.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicPacketHeader.BuildernewBuilderForType()
Returns
Type Description
PacketHeader.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedPacketHeader.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
PacketHeader.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicPacketHeader.BuildertoBuilder()
Returns
Type Description
PacketHeader.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.