Class OperatorMetadata.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<OperatorMetadata.Builder> implements OperatorMetadataOrBuilder
General information useful for labels coming from contributors.
Protobuf typegoogle.cloud.datalabeling.v1beta1.OperatorMetadata
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OperatorMetadata.Builder
addAllComments(Iterable<String> values)
Comments from contributors.OperatorMetadata.Builder
addComments(String value)
Comments from contributors.OperatorMetadata.Builder
addCommentsBytes(com.google.protobuf.ByteString value)
Comments from contributors.OperatorMetadata.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
OperatorMetadata
build()
OperatorMetadata
buildPartial()
OperatorMetadata.Builder
clear()
OperatorMetadata.Builder
clearComments()
Comments from contributors.OperatorMetadata.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
OperatorMetadata.Builder
clearLabelVotes()
The total number of contributors that choose this label.OperatorMetadata.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
OperatorMetadata.Builder
clearScore()
Confidence score corresponding to a label.OperatorMetadata.Builder
clearTotalVotes()
The total number of contributors that answer this question.OperatorMetadata.Builder
clone()
String
getComments(int index)
Comments from contributors.com.google.protobuf.ByteString
getCommentsBytes(int index)
Comments from contributors.int
getCommentsCount()
Comments from contributors.com.google.protobuf.ProtocolStringList
getCommentsList()
Comments from contributors.OperatorMetadata
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
int
getLabelVotes()
The total number of contributors that choose this label.float
getScore()
Confidence score corresponding to a label.int
getTotalVotes()
The total number of contributors that answer this question.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
OperatorMetadata.Builder
mergeFrom(OperatorMetadata other)
OperatorMetadata.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
OperatorMetadata.Builder
mergeFrom(com.google.protobuf.Message other)
OperatorMetadata.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
OperatorMetadata.Builder
setComments(int index, String value)
Comments from contributors.OperatorMetadata.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
OperatorMetadata.Builder
setLabelVotes(int value)
The total number of contributors that choose this label.OperatorMetadata.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
OperatorMetadata.Builder
setScore(float value)
Confidence score corresponding to a label.OperatorMetadata.Builder
setTotalVotes(int value)
The total number of contributors that answer this question.OperatorMetadata.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<OperatorMetadata.Builder>
-
clear
public OperatorMetadata.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<OperatorMetadata.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<OperatorMetadata.Builder>
-
getDefaultInstanceForType
public OperatorMetadata getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public OperatorMetadata build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public OperatorMetadata buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public OperatorMetadata.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<OperatorMetadata.Builder>
-
setField
public OperatorMetadata.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OperatorMetadata.Builder>
-
clearField
public OperatorMetadata.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OperatorMetadata.Builder>
-
clearOneof
public OperatorMetadata.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<OperatorMetadata.Builder>
-
setRepeatedField
public OperatorMetadata.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OperatorMetadata.Builder>
-
addRepeatedField
public OperatorMetadata.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OperatorMetadata.Builder>
-
mergeFrom
public OperatorMetadata.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<OperatorMetadata.Builder>
-
mergeFrom
public OperatorMetadata.Builder mergeFrom(OperatorMetadata other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<OperatorMetadata.Builder>
-
mergeFrom
public OperatorMetadata.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.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 interfaceOperatorMetadataOrBuilder
- 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 interfaceOperatorMetadataOrBuilder
- 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 interfaceOperatorMetadataOrBuilder
- 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 interfaceOperatorMetadataOrBuilder
- Returns:
- A list containing the comments.
-
getCommentsCount
public int getCommentsCount()
Comments from contributors.
repeated string comments = 4;
- Specified by:
getCommentsCount
in interfaceOperatorMetadataOrBuilder
- Returns:
- The count of comments.
-
getComments
public String getComments(int index)
Comments from contributors.
repeated string comments = 4;
- Specified by:
getComments
in interfaceOperatorMetadataOrBuilder
- 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 interfaceOperatorMetadataOrBuilder
- 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.
-
setUnknownFields
public final OperatorMetadata.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<OperatorMetadata.Builder>
-
mergeUnknownFields
public final OperatorMetadata.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<OperatorMetadata.Builder>
-
-