Class Example.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Example.Builder>
com.google.cloud.datalabeling.v1beta1.Example.Builder
All Implemented Interfaces:
ExampleOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Example

public static final class Example.Builder extends com.google.protobuf.GeneratedMessage.Builder<Example.Builder> implements ExampleOrBuilder
 An Example is a piece of data and its annotation. For example, an image with
 label "house".
 
Protobuf type google.cloud.datalabeling.v1beta1.Example
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Example.Builder>
    • clear

      public Example.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Example.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Example.Builder>
    • getDefaultInstanceForType

      public Example getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Example build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Example buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Example.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Example.Builder>
    • mergeFrom

      public Example.Builder mergeFrom(Example other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Example.Builder>
    • mergeFrom

      public Example.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Example.Builder>
      Throws:
      IOException
    • getPayloadCase

      public Example.PayloadCase getPayloadCase()
      Specified by:
      getPayloadCase in interface ExampleOrBuilder
    • clearPayload

      public Example.Builder clearPayload()
    • hasImagePayload

      public boolean hasImagePayload()
       The image payload, a container of the image bytes/uri.
       
      .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2;
      Specified by:
      hasImagePayload in interface ExampleOrBuilder
      Returns:
      Whether the imagePayload field is set.
    • getImagePayload

      public ImagePayload getImagePayload()
       The image payload, a container of the image bytes/uri.
       
      .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2;
      Specified by:
      getImagePayload in interface ExampleOrBuilder
      Returns:
      The imagePayload.
    • setImagePayload

      public Example.Builder setImagePayload(ImagePayload value)
       The image payload, a container of the image bytes/uri.
       
      .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2;
    • setImagePayload

      public Example.Builder setImagePayload(ImagePayload.Builder builderForValue)
       The image payload, a container of the image bytes/uri.
       
      .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2;
    • mergeImagePayload

      public Example.Builder mergeImagePayload(ImagePayload value)
       The image payload, a container of the image bytes/uri.
       
      .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2;
    • clearImagePayload

      public Example.Builder clearImagePayload()
       The image payload, a container of the image bytes/uri.
       
      .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2;
    • getImagePayloadBuilder

      public ImagePayload.Builder getImagePayloadBuilder()
       The image payload, a container of the image bytes/uri.
       
      .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2;
    • getImagePayloadOrBuilder

      public ImagePayloadOrBuilder getImagePayloadOrBuilder()
       The image payload, a container of the image bytes/uri.
       
      .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2;
      Specified by:
      getImagePayloadOrBuilder in interface ExampleOrBuilder
    • hasTextPayload

      public boolean hasTextPayload()
       The text payload, a container of the text content.
       
      .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6;
      Specified by:
      hasTextPayload in interface ExampleOrBuilder
      Returns:
      Whether the textPayload field is set.
    • getTextPayload

      public TextPayload getTextPayload()
       The text payload, a container of the text content.
       
      .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6;
      Specified by:
      getTextPayload in interface ExampleOrBuilder
      Returns:
      The textPayload.
    • setTextPayload

      public Example.Builder setTextPayload(TextPayload value)
       The text payload, a container of the text content.
       
      .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6;
    • setTextPayload

      public Example.Builder setTextPayload(TextPayload.Builder builderForValue)
       The text payload, a container of the text content.
       
      .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6;
    • mergeTextPayload

      public Example.Builder mergeTextPayload(TextPayload value)
       The text payload, a container of the text content.
       
      .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6;
    • clearTextPayload

      public Example.Builder clearTextPayload()
       The text payload, a container of the text content.
       
      .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6;
    • getTextPayloadBuilder

      public TextPayload.Builder getTextPayloadBuilder()
       The text payload, a container of the text content.
       
      .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6;
    • getTextPayloadOrBuilder

      public TextPayloadOrBuilder getTextPayloadOrBuilder()
       The text payload, a container of the text content.
       
      .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6;
      Specified by:
      getTextPayloadOrBuilder in interface ExampleOrBuilder
    • hasVideoPayload

      public boolean hasVideoPayload()
       The video payload, a container of the video uri.
       
      .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7;
      Specified by:
      hasVideoPayload in interface ExampleOrBuilder
      Returns:
      Whether the videoPayload field is set.
    • getVideoPayload

      public VideoPayload getVideoPayload()
       The video payload, a container of the video uri.
       
      .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7;
      Specified by:
      getVideoPayload in interface ExampleOrBuilder
      Returns:
      The videoPayload.
    • setVideoPayload

      public Example.Builder setVideoPayload(VideoPayload value)
       The video payload, a container of the video uri.
       
      .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7;
    • setVideoPayload

      public Example.Builder setVideoPayload(VideoPayload.Builder builderForValue)
       The video payload, a container of the video uri.
       
      .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7;
    • mergeVideoPayload

      public Example.Builder mergeVideoPayload(VideoPayload value)
       The video payload, a container of the video uri.
       
      .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7;
    • clearVideoPayload

      public Example.Builder clearVideoPayload()
       The video payload, a container of the video uri.
       
      .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7;
    • getVideoPayloadBuilder

      public VideoPayload.Builder getVideoPayloadBuilder()
       The video payload, a container of the video uri.
       
      .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7;
    • getVideoPayloadOrBuilder

      public VideoPayloadOrBuilder getVideoPayloadOrBuilder()
       The video payload, a container of the video uri.
       
      .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7;
      Specified by:
      getVideoPayloadOrBuilder in interface ExampleOrBuilder
    • getName

      public String getName()
       Output only. Name of the example, in format of:
       projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
       {annotated_dataset_id}/examples/{example_id}
       
      string name = 1;
      Specified by:
      getName in interface ExampleOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Output only. Name of the example, in format of:
       projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
       {annotated_dataset_id}/examples/{example_id}
       
      string name = 1;
      Specified by:
      getNameBytes in interface ExampleOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Example.Builder setName(String value)
       Output only. Name of the example, in format of:
       projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
       {annotated_dataset_id}/examples/{example_id}
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Example.Builder clearName()
       Output only. Name of the example, in format of:
       projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
       {annotated_dataset_id}/examples/{example_id}
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Example.Builder setNameBytes(com.google.protobuf.ByteString value)
       Output only. Name of the example, in format of:
       projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
       {annotated_dataset_id}/examples/{example_id}
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getAnnotationsList

      public List<Annotation> getAnnotationsList()
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
      Specified by:
      getAnnotationsList in interface ExampleOrBuilder
    • getAnnotationsCount

      public int getAnnotationsCount()
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
      Specified by:
      getAnnotationsCount in interface ExampleOrBuilder
    • getAnnotations

      public Annotation getAnnotations(int index)
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
      Specified by:
      getAnnotations in interface ExampleOrBuilder
    • setAnnotations

      public Example.Builder setAnnotations(int index, Annotation value)
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
    • setAnnotations

      public Example.Builder setAnnotations(int index, Annotation.Builder builderForValue)
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
    • addAnnotations

      public Example.Builder addAnnotations(Annotation value)
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
    • addAnnotations

      public Example.Builder addAnnotations(int index, Annotation value)
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
    • addAnnotations

      public Example.Builder addAnnotations(Annotation.Builder builderForValue)
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
    • addAnnotations

      public Example.Builder addAnnotations(int index, Annotation.Builder builderForValue)
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
    • addAllAnnotations

      public Example.Builder addAllAnnotations(Iterable<? extends Annotation> values)
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
    • clearAnnotations

      public Example.Builder clearAnnotations()
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
    • removeAnnotations

      public Example.Builder removeAnnotations(int index)
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
    • getAnnotationsBuilder

      public Annotation.Builder getAnnotationsBuilder(int index)
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
    • getAnnotationsOrBuilder

      public AnnotationOrBuilder getAnnotationsOrBuilder(int index)
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
      Specified by:
      getAnnotationsOrBuilder in interface ExampleOrBuilder
    • getAnnotationsOrBuilderList

      public List<? extends AnnotationOrBuilder> getAnnotationsOrBuilderList()
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
      Specified by:
      getAnnotationsOrBuilderList in interface ExampleOrBuilder
    • addAnnotationsBuilder

      public Annotation.Builder addAnnotationsBuilder()
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
    • addAnnotationsBuilder

      public Annotation.Builder addAnnotationsBuilder(int index)
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;
    • getAnnotationsBuilderList

      public List<Annotation.Builder> getAnnotationsBuilderList()
       Output only. Annotations for the piece of data in Example.
       One piece of data can have multiple annotations.
       
      repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5;