Class OperatorMetadata.Builder (0.151.0)

public static final class OperatorMetadata.Builder extends GeneratedMessageV3.Builder<OperatorMetadata.Builder> implements OperatorMetadataOrBuilder

General information useful for labels coming from contributors.

Protobuf type google.cloud.datalabeling.v1beta1.OperatorMetadata

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllComments(Iterable<String> values)

public OperatorMetadata.Builder addAllComments(Iterable<String> values)

Comments from contributors.

repeated string comments = 4;

Parameter
NameDescription
valuesIterable<String>

The comments to add.

Returns
TypeDescription
OperatorMetadata.Builder

This builder for chaining.

addComments(String value)

public OperatorMetadata.Builder addComments(String value)

Comments from contributors.

repeated string comments = 4;

Parameter
NameDescription
valueString

The comments to add.

Returns
TypeDescription
OperatorMetadata.Builder

This builder for chaining.

addCommentsBytes(ByteString value)

public OperatorMetadata.Builder addCommentsBytes(ByteString value)

Comments from contributors.

repeated string comments = 4;

Parameter
NameDescription
valueByteString

The bytes of the comments to add.

Returns
TypeDescription
OperatorMetadata.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public OperatorMetadata.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
OperatorMetadata.Builder
Overrides

build()

public OperatorMetadata build()
Returns
TypeDescription
OperatorMetadata

buildPartial()

public OperatorMetadata buildPartial()
Returns
TypeDescription
OperatorMetadata

clear()

public OperatorMetadata.Builder clear()
Returns
TypeDescription
OperatorMetadata.Builder
Overrides

clearComments()

public OperatorMetadata.Builder clearComments()

Comments from contributors.

repeated string comments = 4;

Returns
TypeDescription
OperatorMetadata.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public OperatorMetadata.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
OperatorMetadata.Builder
Overrides

clearLabelVotes()

public OperatorMetadata.Builder clearLabelVotes()

The total number of contributors that choose this label.

int32 label_votes = 3;

Returns
TypeDescription
OperatorMetadata.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public OperatorMetadata.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
OperatorMetadata.Builder
Overrides

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
TypeDescription
OperatorMetadata.Builder

This builder for chaining.

clearTotalVotes()

public OperatorMetadata.Builder clearTotalVotes()

The total number of contributors that answer this question.

int32 total_votes = 2;

Returns
TypeDescription
OperatorMetadata.Builder

This builder for chaining.

clone()

public OperatorMetadata.Builder clone()
Returns
TypeDescription
OperatorMetadata.Builder
Overrides

getComments(int index)

public String getComments(int index)

Comments from contributors.

repeated string comments = 4;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The comments at the given index.

getCommentsBytes(int index)

public ByteString getCommentsBytes(int index)

Comments from contributors.

repeated string comments = 4;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the comments at the given index.

getCommentsCount()

public int getCommentsCount()

Comments from contributors.

repeated string comments = 4;

Returns
TypeDescription
int

The count of comments.

getCommentsList()

public ProtocolStringList getCommentsList()

Comments from contributors.

repeated string comments = 4;

Returns
TypeDescription
ProtocolStringList

A list containing the comments.

getDefaultInstanceForType()

public OperatorMetadata getDefaultInstanceForType()
Returns
TypeDescription
OperatorMetadata

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLabelVotes()

public int getLabelVotes()

The total number of contributors that choose this label.

int32 label_votes = 3;

Returns
TypeDescription
int

The labelVotes.

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;

Returns
TypeDescription
float

The score.

getTotalVotes()

public int getTotalVotes()

The total number of contributors that answer this question.

int32 total_votes = 2;

Returns
TypeDescription
int

The totalVotes.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(OperatorMetadata other)

public OperatorMetadata.Builder mergeFrom(OperatorMetadata other)
Parameter
NameDescription
otherOperatorMetadata
Returns
TypeDescription
OperatorMetadata.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public OperatorMetadata.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OperatorMetadata.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public OperatorMetadata.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
OperatorMetadata.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final OperatorMetadata.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
OperatorMetadata.Builder
Overrides

setComments(int index, String value)

public OperatorMetadata.Builder setComments(int index, String value)

Comments from contributors.

repeated string comments = 4;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The comments to set.

Returns
TypeDescription
OperatorMetadata.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public OperatorMetadata.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
OperatorMetadata.Builder
Overrides

setLabelVotes(int value)

public OperatorMetadata.Builder setLabelVotes(int value)

The total number of contributors that choose this label.

int32 label_votes = 3;

Parameter
NameDescription
valueint

The labelVotes to set.

Returns
TypeDescription
OperatorMetadata.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public OperatorMetadata.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
OperatorMetadata.Builder
Overrides

setScore(float value)

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;

Parameter
NameDescription
valuefloat

The score to set.

Returns
TypeDescription
OperatorMetadata.Builder

This builder for chaining.

setTotalVotes(int value)

public OperatorMetadata.Builder setTotalVotes(int value)

The total number of contributors that answer this question.

int32 total_votes = 2;

Parameter
NameDescription
valueint

The totalVotes to set.

Returns
TypeDescription
OperatorMetadata.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final OperatorMetadata.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
OperatorMetadata.Builder
Overrides