Class: Google::Apis::DatalabelingV1beta1::GoogleCloudDatalabelingV1beta1Example

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/datalabeling_v1beta1/classes.rb,
generated/google/apis/datalabeling_v1beta1/representations.rb,
generated/google/apis/datalabeling_v1beta1/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDatalabelingV1beta1Example

Returns a new instance of GoogleCloudDatalabelingV1beta1Example.



2087
2088
2089
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 2087

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#annotationsArray<Google::Apis::DatalabelingV1beta1::GoogleCloudDatalabelingV1beta1Annotation>

Output only. Annotations for the piece of data in Example. One piece of data can have multiple annotations. Corresponds to the JSON property annotations



2064
2065
2066
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 2064

def annotations
  @annotations
end

#image_payloadGoogle::Apis::DatalabelingV1beta1::GoogleCloudDatalabelingV1beta1ImagePayload

Container of information about an image. Corresponds to the JSON property imagePayload



2069
2070
2071
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 2069

def image_payload
  @image_payload
end

#nameString

Output only. Name of the example, in format of: projects/project_id/datasets/ dataset_id/annotatedDatasets/ annotated_dataset_id/examples/example_id Corresponds to the JSON property name

Returns:

  • (String)


2075
2076
2077
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 2075

def name
  @name
end

#text_payloadGoogle::Apis::DatalabelingV1beta1::GoogleCloudDatalabelingV1beta1TextPayload

Container of information about a piece of text. Corresponds to the JSON property textPayload



2080
2081
2082
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 2080

def text_payload
  @text_payload
end

#video_payloadGoogle::Apis::DatalabelingV1beta1::GoogleCloudDatalabelingV1beta1VideoPayload

Container of information of a video. Corresponds to the JSON property videoPayload



2085
2086
2087
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 2085

def video_payload
  @video_payload
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2092
2093
2094
2095
2096
2097
2098
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 2092

def update!(**args)
  @annotations = args[:annotations] if args.key?(:annotations)
  @image_payload = args[:image_payload] if args.key?(:image_payload)
  @name = args[:name] if args.key?(:name)
  @text_payload = args[:text_payload] if args.key?(:text_payload)
  @video_payload = args[:video_payload] if args.key?(:video_payload)
end