Class PacketHeader (0.12.0)

public final class PacketHeader extends GeneratedMessageV3 implements PacketHeaderOrBuilder

The message that represents packet header.

Protobuf type google.cloud.visionai.v1.PacketHeader

Static Fields

CAPTURE_TIME_FIELD_NUMBER

public static final int CAPTURE_TIME_FIELD_NUMBER
Field Value
Type Description
int

FLAGS_FIELD_NUMBER

public static final int FLAGS_FIELD_NUMBER
Field Value
Type Description
int

METADATA_FIELD_NUMBER

public static final int METADATA_FIELD_NUMBER
Field Value
Type Description
int

SERIES_METADATA_FIELD_NUMBER

public static final int SERIES_METADATA_FIELD_NUMBER
Field Value
Type Description
int

SERVER_METADATA_FIELD_NUMBER

public static final int SERVER_METADATA_FIELD_NUMBER
Field Value
Type Description
int

TRACE_CONTEXT_FIELD_NUMBER

public static final int TRACE_CONTEXT_FIELD_NUMBER
Field Value
Type Description
int

TYPE_FIELD_NUMBER

public static final int TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static PacketHeader getDefaultInstance()
Returns
Type Description
PacketHeader

getDescriptor()

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

newBuilder()

public static PacketHeader.Builder newBuilder()
Returns
Type Description
PacketHeader.Builder

newBuilder(PacketHeader prototype)

public static PacketHeader.Builder newBuilder(PacketHeader prototype)
Parameter
Name Description
prototype PacketHeader
Returns
Type Description
PacketHeader.Builder

parseDelimitedFrom(InputStream input)

public static PacketHeader parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PacketHeader
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PacketHeader parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PacketHeader
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static PacketHeader parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
PacketHeader
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static PacketHeader parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PacketHeader
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static PacketHeader parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
PacketHeader
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static PacketHeader parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PacketHeader
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static PacketHeader parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
PacketHeader
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static PacketHeader parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PacketHeader
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static PacketHeader parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PacketHeader
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PacketHeader parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PacketHeader
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static PacketHeader parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
PacketHeader
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static PacketHeader parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PacketHeader
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<PacketHeader> parser()
Returns
Type Description
Parser<PacketHeader>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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.

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

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.

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

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

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.

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.

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public PacketHeader.Builder newBuilderForType()
Returns
Type Description
PacketHeader.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected PacketHeader.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
PacketHeader.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public PacketHeader.Builder toBuilder()
Returns
Type Description
PacketHeader.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException