# Vision AI V1 API - Class Google::Cloud::VisionAI::V1::PacketHeader (v1.5.0)

1.5.0 (latest) 1.4.1 1.3.1 1.2.0 1.1.1 1.0.1 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Vision AI V1 API class Google::Cloud::VisionAI::V1::PacketHeader.

The message that represents packet header.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #capture_time

    def capture_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Protobuf-Timestamp)) --- Input only. The capture time of the packet.

### #capture_time=

    def capture_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Protobuf-Timestamp)) --- Input only. The capture time of the packet.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Protobuf-Timestamp)) --- Input only. The capture time of the packet.

### #flags

    def flags() -> ::Integer

**Returns**

- (::Integer) --- Immutable. Packet flag set. SDK will set the flag automatically.

### #flags=

    def flags=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Immutable. Packet flag set. SDK will set the flag automatically.
**Returns**

- (::Integer) --- Immutable. Packet flag set. SDK will set the flag automatically.

### #metadata

    def metadata() -> ::Google::Protobuf::Struct

**Returns**

- ([::Google::Protobuf::Struct](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Protobuf-Struct)) --- Input only. This field is for users to attach user managed metadata.

### #metadata=

    def metadata=(value) -> ::Google::Protobuf::Struct

**Parameter**

- **value** ([::Google::Protobuf::Struct](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Protobuf-Struct)) --- Input only. This field is for users to attach user managed metadata.
**Returns**

- ([::Google::Protobuf::Struct](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Protobuf-Struct)) --- Input only. This field is for users to attach user managed metadata.

### #series_metadata

    def series_metadata() -> ::Google::Cloud::VisionAI::V1::SeriesMetadata

**Returns**

- ([::Google::Cloud::VisionAI::V1::SeriesMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-SeriesMetadata)) --- Input only. Immutable. Metadata that the server needs to know where to write the packets to. It's only required for the first packet.

### #series_metadata=

    def series_metadata=(value) -> ::Google::Cloud::VisionAI::V1::SeriesMetadata

**Parameter**

- **value** ([::Google::Cloud::VisionAI::V1::SeriesMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-SeriesMetadata)) --- Input only. Immutable. Metadata that the server needs to know where to write the packets to. It's only required for the first packet.
**Returns**

- ([::Google::Cloud::VisionAI::V1::SeriesMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-SeriesMetadata)) --- Input only. Immutable. Metadata that the server needs to know where to write the packets to. It's only required for the first packet.

### #server_metadata

    def server_metadata() -> ::Google::Cloud::VisionAI::V1::ServerMetadata

**Returns**

- ([::Google::Cloud::VisionAI::V1::ServerMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-ServerMetadata)) --- 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.

### #trace_context

    def trace_context() -> ::String

**Returns**

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

### #trace_context=

    def trace_context=(value) -> ::String

**Parameter**

- **value** (::String) ---

  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
**Returns**

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

### #type

    def type() -> ::Google::Cloud::VisionAI::V1::PacketType

**Returns**

- ([::Google::Cloud::VisionAI::V1::PacketType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-PacketType)) --- Input only. Immutable. The type of the payload.

### #type=

    def type=(value) -> ::Google::Cloud::VisionAI::V1::PacketType

**Parameter**

- **value** ([::Google::Cloud::VisionAI::V1::PacketType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-PacketType)) --- Input only. Immutable. The type of the payload.
**Returns**

- ([::Google::Cloud::VisionAI::V1::PacketType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-PacketType)) --- Input only. Immutable. The type of the payload.