# AI Platform Data Labeling Service V1beta1 API - Class Google::Cloud::DataLabeling::V1beta1::Example (v0.15.0)

0.15.0 (latest) 0.14.0 0.13.1 0.12.0 0.11.1 0.10.1 0.9.0 0.8.1 0.7.2 0.6.0 0.5.0 0.4.0 0.3.5 Reference documentation and code samples for the AI Platform Data Labeling Service V1beta1 API class Google::Cloud::DataLabeling::V1beta1::Example.

An Example is a piece of data and its annotation. For example, an image with
label "house".

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #annotations

    def annotations() -> ::Array<::Google::Cloud::DataLabeling::V1beta1::Annotation>

**Returns**

- (::Array\<[::Google::Cloud::DataLabeling::V1beta1::Annotation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest/Google-Cloud-DataLabeling-V1beta1-Annotation)\>) --- Output only. Annotations for the piece of data in Example. One piece of data can have multiple annotations.

### #annotations=

    def annotations=(value) -> ::Array<::Google::Cloud::DataLabeling::V1beta1::Annotation>

**Parameter**

- **value** (::Array\<[::Google::Cloud::DataLabeling::V1beta1::Annotation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest/Google-Cloud-DataLabeling-V1beta1-Annotation)\>) --- Output only. Annotations for the piece of data in Example. One piece of data can have multiple annotations.
**Returns**

- (::Array\<[::Google::Cloud::DataLabeling::V1beta1::Annotation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest/Google-Cloud-DataLabeling-V1beta1-Annotation)\>) --- Output only. Annotations for the piece of data in Example. One piece of data can have multiple annotations.

### #image_payload

    def image_payload() -> ::Google::Cloud::DataLabeling::V1beta1::ImagePayload

**Returns**

- ([::Google::Cloud::DataLabeling::V1beta1::ImagePayload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest/Google-Cloud-DataLabeling-V1beta1-ImagePayload)) --- The image payload, a container of the image bytes/uri.


  Note: The following fields are mutually exclusive: `image_payload`, `text_payload`, `video_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #image_payload=

    def image_payload=(value) -> ::Google::Cloud::DataLabeling::V1beta1::ImagePayload

**Parameter**

- **value** ([::Google::Cloud::DataLabeling::V1beta1::ImagePayload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest/Google-Cloud-DataLabeling-V1beta1-ImagePayload)) --- The image payload, a container of the image bytes/uri.


  Note: The following fields are mutually exclusive: `image_payload`, `text_payload`, `video_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::DataLabeling::V1beta1::ImagePayload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest/Google-Cloud-DataLabeling-V1beta1-ImagePayload)) --- The image payload, a container of the image bytes/uri.


  Note: The following fields are mutually exclusive: `image_payload`, `text_payload`, `video_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Output only. Name of the example, in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}/examples/{example_id}

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. Name of the example, in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}/examples/{example_id}
**Returns**

- (::String) --- Output only. Name of the example, in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}/examples/{example_id}

### #text_payload

    def text_payload() -> ::Google::Cloud::DataLabeling::V1beta1::TextPayload

**Returns**

- ([::Google::Cloud::DataLabeling::V1beta1::TextPayload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest/Google-Cloud-DataLabeling-V1beta1-TextPayload)) --- The text payload, a container of the text content.


  Note: The following fields are mutually exclusive: `text_payload`, `image_payload`, `video_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #text_payload=

    def text_payload=(value) -> ::Google::Cloud::DataLabeling::V1beta1::TextPayload

**Parameter**

- **value** ([::Google::Cloud::DataLabeling::V1beta1::TextPayload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest/Google-Cloud-DataLabeling-V1beta1-TextPayload)) --- The text payload, a container of the text content.


  Note: The following fields are mutually exclusive: `text_payload`, `image_payload`, `video_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::DataLabeling::V1beta1::TextPayload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest/Google-Cloud-DataLabeling-V1beta1-TextPayload)) --- The text payload, a container of the text content.


  Note: The following fields are mutually exclusive: `text_payload`, `image_payload`, `video_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #video_payload

    def video_payload() -> ::Google::Cloud::DataLabeling::V1beta1::VideoPayload

**Returns**

- ([::Google::Cloud::DataLabeling::V1beta1::VideoPayload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest/Google-Cloud-DataLabeling-V1beta1-VideoPayload)) --- The video payload, a container of the video uri.


  Note: The following fields are mutually exclusive: `video_payload`, `image_payload`, `text_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #video_payload=

    def video_payload=(value) -> ::Google::Cloud::DataLabeling::V1beta1::VideoPayload

**Parameter**

- **value** ([::Google::Cloud::DataLabeling::V1beta1::VideoPayload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest/Google-Cloud-DataLabeling-V1beta1-VideoPayload)) --- The video payload, a container of the video uri.


  Note: The following fields are mutually exclusive: `video_payload`, `image_payload`, `text_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::DataLabeling::V1beta1::VideoPayload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest/Google-Cloud-DataLabeling-V1beta1-VideoPayload)) --- The video payload, a container of the video uri.


  Note: The following fields are mutually exclusive: `video_payload`, `image_payload`, `text_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared.