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.
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.
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
defname()->::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=
defname=(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}
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.
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.
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.
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.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# AI Platform Data Labeling Service V1beta1 API - Class Google::Cloud::DataLabeling::V1beta1::Example (v0.11.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.11.1 (latest)](/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest/Google-Cloud-DataLabeling-V1beta1-Example)\n- [0.11.0](/ruby/docs/reference/google-cloud-data_labeling-v1beta1/0.11.0/Google-Cloud-DataLabeling-V1beta1-Example)\n- [0.10.1](/ruby/docs/reference/google-cloud-data_labeling-v1beta1/0.10.1/Google-Cloud-DataLabeling-V1beta1-Example)\n- [0.9.0](/ruby/docs/reference/google-cloud-data_labeling-v1beta1/0.9.0/Google-Cloud-DataLabeling-V1beta1-Example)\n- [0.8.1](/ruby/docs/reference/google-cloud-data_labeling-v1beta1/0.8.1/Google-Cloud-DataLabeling-V1beta1-Example)\n- [0.7.2](/ruby/docs/reference/google-cloud-data_labeling-v1beta1/0.7.2/Google-Cloud-DataLabeling-V1beta1-Example)\n- [0.6.0](/ruby/docs/reference/google-cloud-data_labeling-v1beta1/0.6.0/Google-Cloud-DataLabeling-V1beta1-Example)\n- [0.5.0](/ruby/docs/reference/google-cloud-data_labeling-v1beta1/0.5.0/Google-Cloud-DataLabeling-V1beta1-Example)\n- [0.4.0](/ruby/docs/reference/google-cloud-data_labeling-v1beta1/0.4.0/Google-Cloud-DataLabeling-V1beta1-Example)\n- [0.3.5](/ruby/docs/reference/google-cloud-data_labeling-v1beta1/0.3.5/Google-Cloud-DataLabeling-V1beta1-Example) \nReference documentation and code samples for the AI Platform Data Labeling Service V1beta1 API class Google::Cloud::DataLabeling::V1beta1::Example.\n\nAn Example is a piece of data and its annotation. For example, an image with\nlabel \"house\". \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #annotations\n\n def annotations() -\u003e ::Array\u003c::Google::Cloud::DataLabeling::V1beta1::Annotation\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::DataLabeling::V1beta1::Annotation](./Google-Cloud-DataLabeling-V1beta1-Annotation)\\\u003e) --- Output only. Annotations for the piece of data in Example. One piece of data can have multiple annotations.\n\n### #annotations=\n\n def annotations=(value) -\u003e ::Array\u003c::Google::Cloud::DataLabeling::V1beta1::Annotation\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::DataLabeling::V1beta1::Annotation](./Google-Cloud-DataLabeling-V1beta1-Annotation)\\\u003e) --- Output only. Annotations for the piece of data in Example. One piece of data can have multiple annotations. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::DataLabeling::V1beta1::Annotation](./Google-Cloud-DataLabeling-V1beta1-Annotation)\\\u003e) --- Output only. Annotations for the piece of data in Example. One piece of data can have multiple annotations.\n\n### #image_payload\n\n def image_payload() -\u003e ::Google::Cloud::DataLabeling::V1beta1::ImagePayload\n\n**Returns**\n\n- ([::Google::Cloud::DataLabeling::V1beta1::ImagePayload](./Google-Cloud-DataLabeling-V1beta1-ImagePayload)) --- The image payload, a container of the image bytes/uri.\n\n\n 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.\n\n### #image_payload=\n\n def image_payload=(value) -\u003e ::Google::Cloud::DataLabeling::V1beta1::ImagePayload\n\n**Parameter**\n\n- **value** ([::Google::Cloud::DataLabeling::V1beta1::ImagePayload](./Google-Cloud-DataLabeling-V1beta1-ImagePayload)) --- The image payload, a container of the image bytes/uri.\n\n\nNote: 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. \n**Returns**\n\n- ([::Google::Cloud::DataLabeling::V1beta1::ImagePayload](./Google-Cloud-DataLabeling-V1beta1-ImagePayload)) --- The image payload, a container of the image bytes/uri.\n\n\n 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.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. Name of the example, in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}/examples/{example_id}\n\n### #name=\n\n def name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Output only. Name of the example, in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}/examples/{example_id} \n**Returns**\n\n- (::String) --- Output only. Name of the example, in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}/examples/{example_id}\n\n### #text_payload\n\n def text_payload() -\u003e ::Google::Cloud::DataLabeling::V1beta1::TextPayload\n\n**Returns**\n\n- ([::Google::Cloud::DataLabeling::V1beta1::TextPayload](./Google-Cloud-DataLabeling-V1beta1-TextPayload)) --- The text payload, a container of the text content.\n\n\n 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.\n\n### #text_payload=\n\n def text_payload=(value) -\u003e ::Google::Cloud::DataLabeling::V1beta1::TextPayload\n\n**Parameter**\n\n- **value** ([::Google::Cloud::DataLabeling::V1beta1::TextPayload](./Google-Cloud-DataLabeling-V1beta1-TextPayload)) --- The text payload, a container of the text content.\n\n\nNote: 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. \n**Returns**\n\n- ([::Google::Cloud::DataLabeling::V1beta1::TextPayload](./Google-Cloud-DataLabeling-V1beta1-TextPayload)) --- The text payload, a container of the text content.\n\n\n 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.\n\n### #video_payload\n\n def video_payload() -\u003e ::Google::Cloud::DataLabeling::V1beta1::VideoPayload\n\n**Returns**\n\n- ([::Google::Cloud::DataLabeling::V1beta1::VideoPayload](./Google-Cloud-DataLabeling-V1beta1-VideoPayload)) --- The video payload, a container of the video uri.\n\n\n 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.\n\n### #video_payload=\n\n def video_payload=(value) -\u003e ::Google::Cloud::DataLabeling::V1beta1::VideoPayload\n\n**Parameter**\n\n- **value** ([::Google::Cloud::DataLabeling::V1beta1::VideoPayload](./Google-Cloud-DataLabeling-V1beta1-VideoPayload)) --- The video payload, a container of the video uri.\n\n\nNote: 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. \n**Returns**\n\n- ([::Google::Cloud::DataLabeling::V1beta1::VideoPayload](./Google-Cloud-DataLabeling-V1beta1-VideoPayload)) --- The video payload, a container of the video uri.\n\n\n 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."]]