Class OperatorMetadata.Builder

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

public static final class OperatorMetadata.Builder extends com.google.protobuf.GeneratedMessage.Builder<OperatorMetadata.Builder> implements OperatorMetadataOrBuilder
 General information useful for labels coming from contributors.
 
Protobuf type google.cloud.datalabeling.v1beta1.OperatorMetadata
  • 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<OperatorMetadata.Builder>
    • clear

      public OperatorMetadata.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<OperatorMetadata.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<OperatorMetadata.Builder>
    • getDefaultInstanceForType

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

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

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

      public OperatorMetadata.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<OperatorMetadata.Builder>
    • mergeFrom

      public OperatorMetadata.Builder mergeFrom(OperatorMetadata other)
    • isInitialized

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

      public OperatorMetadata.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<OperatorMetadata.Builder>
      Throws:
      IOException
    • getScore

      public float getScore()
       Confidence score corresponding to a label. For examle, if 3 contributors
       have answered the question and 2 of them agree on the final label, the
       confidence score will be 0.67 (2/3).
       
      float score = 1;
      Specified by:
      getScore in interface OperatorMetadataOrBuilder
      Returns:
      The score.
    • setScore

      public OperatorMetadata.Builder setScore(float value)
       Confidence score corresponding to a label. For examle, if 3 contributors
       have answered the question and 2 of them agree on the final label, the
       confidence score will be 0.67 (2/3).
       
      float score = 1;
      Parameters:
      value - The score to set.
      Returns:
      This builder for chaining.
    • clearScore

      public OperatorMetadata.Builder clearScore()
       Confidence score corresponding to a label. For examle, if 3 contributors
       have answered the question and 2 of them agree on the final label, the
       confidence score will be 0.67 (2/3).
       
      float score = 1;
      Returns:
      This builder for chaining.
    • getTotalVotes

      public int getTotalVotes()
       The total number of contributors that answer this question.
       
      int32 total_votes = 2;
      Specified by:
      getTotalVotes in interface OperatorMetadataOrBuilder
      Returns:
      The totalVotes.
    • setTotalVotes

      public OperatorMetadata.Builder setTotalVotes(int value)
       The total number of contributors that answer this question.
       
      int32 total_votes = 2;
      Parameters:
      value - The totalVotes to set.
      Returns:
      This builder for chaining.
    • clearTotalVotes

      public OperatorMetadata.Builder clearTotalVotes()
       The total number of contributors that answer this question.
       
      int32 total_votes = 2;
      Returns:
      This builder for chaining.
    • getLabelVotes

      public int getLabelVotes()
       The total number of contributors that choose this label.
       
      int32 label_votes = 3;
      Specified by:
      getLabelVotes in interface OperatorMetadataOrBuilder
      Returns:
      The labelVotes.
    • setLabelVotes

      public OperatorMetadata.Builder setLabelVotes(int value)
       The total number of contributors that choose this label.
       
      int32 label_votes = 3;
      Parameters:
      value - The labelVotes to set.
      Returns:
      This builder for chaining.
    • clearLabelVotes

      public OperatorMetadata.Builder clearLabelVotes()
       The total number of contributors that choose this label.
       
      int32 label_votes = 3;
      Returns:
      This builder for chaining.
    • getCommentsList

      public com.google.protobuf.ProtocolStringList getCommentsList()
       Comments from contributors.
       
      repeated string comments = 4;
      Specified by:
      getCommentsList in interface OperatorMetadataOrBuilder
      Returns:
      A list containing the comments.
    • getCommentsCount

      public int getCommentsCount()
       Comments from contributors.
       
      repeated string comments = 4;
      Specified by:
      getCommentsCount in interface OperatorMetadataOrBuilder
      Returns:
      The count of comments.
    • getComments

      public String getComments(int index)
       Comments from contributors.
       
      repeated string comments = 4;
      Specified by:
      getComments in interface OperatorMetadataOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The comments at the given index.
    • getCommentsBytes

      public com.google.protobuf.ByteString getCommentsBytes(int index)
       Comments from contributors.
       
      repeated string comments = 4;
      Specified by:
      getCommentsBytes in interface OperatorMetadataOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the comments at the given index.
    • setComments

      public OperatorMetadata.Builder setComments(int index, String value)
       Comments from contributors.
       
      repeated string comments = 4;
      Parameters:
      index - The index to set the value at.
      value - The comments to set.
      Returns:
      This builder for chaining.
    • addComments

      public OperatorMetadata.Builder addComments(String value)
       Comments from contributors.
       
      repeated string comments = 4;
      Parameters:
      value - The comments to add.
      Returns:
      This builder for chaining.
    • addAllComments

      public OperatorMetadata.Builder addAllComments(Iterable<String> values)
       Comments from contributors.
       
      repeated string comments = 4;
      Parameters:
      values - The comments to add.
      Returns:
      This builder for chaining.
    • clearComments

      public OperatorMetadata.Builder clearComments()
       Comments from contributors.
       
      repeated string comments = 4;
      Returns:
      This builder for chaining.
    • addCommentsBytes

      public OperatorMetadata.Builder addCommentsBytes(com.google.protobuf.ByteString value)
       Comments from contributors.
       
      repeated string comments = 4;
      Parameters:
      value - The bytes of the comments to add.
      Returns:
      This builder for chaining.