Class HumanAnnotationConfig.Builder (0.125.0)

public static final class HumanAnnotationConfig.Builder extends GeneratedMessageV3.Builder<HumanAnnotationConfig.Builder> implements HumanAnnotationConfigOrBuilder

Configuration for how human labeling task should be done.

Protobuf type google.cloud.datalabeling.v1beta1.HumanAnnotationConfig

Static Methods

getDescriptor()

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

Methods

addAllContributorEmails(Iterable<String> values)

public HumanAnnotationConfig.Builder addAllContributorEmails(Iterable<String> values)

Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/

repeated string contributor_emails = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<String>

The contributorEmails to add.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

addContributorEmails(String value)

public HumanAnnotationConfig.Builder addContributorEmails(String value)

Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/

repeated string contributor_emails = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The contributorEmails to add.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

addContributorEmailsBytes(ByteString value)

public HumanAnnotationConfig.Builder addContributorEmailsBytes(ByteString value)

Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/

repeated string contributor_emails = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes of the contributorEmails to add.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public HumanAnnotationConfig build()
Returns
TypeDescription
HumanAnnotationConfig

buildPartial()

public HumanAnnotationConfig buildPartial()
Returns
TypeDescription
HumanAnnotationConfig

clear()

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

clearAnnotatedDatasetDescription()

public HumanAnnotationConfig.Builder clearAnnotatedDatasetDescription()

Optional. A human-readable description for AnnotatedDataset. The description can be up to 10000 characters long.

string annotated_dataset_description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

clearAnnotatedDatasetDisplayName()

public HumanAnnotationConfig.Builder clearAnnotatedDatasetDisplayName()

Required. A human-readable name for AnnotatedDataset defined by users. Maximum of 64 characters .

string annotated_dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

clearContributorEmails()

public HumanAnnotationConfig.Builder clearContributorEmails()

Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/

repeated string contributor_emails = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearInstruction()

public HumanAnnotationConfig.Builder clearInstruction()

Required. Instruction resource name.

string instruction = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

clearLabelGroup()

public HumanAnnotationConfig.Builder clearLabelGroup()

Optional. A human-readable label used to logically group labeling tasks. This string must match the regular expression [a-zA-Z\\d_-]{0,128}.

string label_group = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

clearLanguageCode()

public HumanAnnotationConfig.Builder clearLanguageCode()

Optional. The Language of this question, as a BCP-47. Default value is en-US. Only need to set this when task is language related. For example, French text classification.

string language_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearQuestionDuration()

public HumanAnnotationConfig.Builder clearQuestionDuration()

Optional. Maximum duration for contributors to answer a question. Maximum is 3600 seconds. Default is 3600 seconds.

.google.protobuf.Duration question_duration = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
HumanAnnotationConfig.Builder

clearReplicaCount()

public HumanAnnotationConfig.Builder clearReplicaCount()

Optional. Replication of questions. Each question will be sent to up to this number of contributors to label. Aggregated answers will be returned. Default is set to 1. For image related labeling, valid values are 1, 3, 5.

int32 replica_count = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

clearUserEmailAddress()

public HumanAnnotationConfig.Builder clearUserEmailAddress()

Email of the user who started the labeling task and should be notified by email. If empty no notification will be sent.

string user_email_address = 10;

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

clone()

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

getAnnotatedDatasetDescription()

public String getAnnotatedDatasetDescription()

Optional. A human-readable description for AnnotatedDataset. The description can be up to 10000 characters long.

string annotated_dataset_description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The annotatedDatasetDescription.

getAnnotatedDatasetDescriptionBytes()

public ByteString getAnnotatedDatasetDescriptionBytes()

Optional. A human-readable description for AnnotatedDataset. The description can be up to 10000 characters long.

string annotated_dataset_description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for annotatedDatasetDescription.

getAnnotatedDatasetDisplayName()

public String getAnnotatedDatasetDisplayName()

Required. A human-readable name for AnnotatedDataset defined by users. Maximum of 64 characters .

string annotated_dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The annotatedDatasetDisplayName.

getAnnotatedDatasetDisplayNameBytes()

public ByteString getAnnotatedDatasetDisplayNameBytes()

Required. A human-readable name for AnnotatedDataset defined by users. Maximum of 64 characters .

string annotated_dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for annotatedDatasetDisplayName.

getContributorEmails(int index)

public String getContributorEmails(int index)

Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/

repeated string contributor_emails = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The contributorEmails at the given index.

getContributorEmailsBytes(int index)

public ByteString getContributorEmailsBytes(int index)

Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/

repeated string contributor_emails = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the contributorEmails at the given index.

getContributorEmailsCount()

public int getContributorEmailsCount()

Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/

repeated string contributor_emails = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of contributorEmails.

getContributorEmailsList()

public ProtocolStringList getContributorEmailsList()

Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/

repeated string contributor_emails = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the contributorEmails.

getDefaultInstanceForType()

public HumanAnnotationConfig getDefaultInstanceForType()
Returns
TypeDescription
HumanAnnotationConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getInstruction()

public String getInstruction()

Required. Instruction resource name.

string instruction = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The instruction.

getInstructionBytes()

public ByteString getInstructionBytes()

Required. Instruction resource name.

string instruction = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for instruction.

getLabelGroup()

public String getLabelGroup()

Optional. A human-readable label used to logically group labeling tasks. This string must match the regular expression [a-zA-Z\\d_-]{0,128}.

string label_group = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The labelGroup.

getLabelGroupBytes()

public ByteString getLabelGroupBytes()

Optional. A human-readable label used to logically group labeling tasks. This string must match the regular expression [a-zA-Z\\d_-]{0,128}.

string label_group = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for labelGroup.

getLanguageCode()

public String getLanguageCode()

Optional. The Language of this question, as a BCP-47. Default value is en-US. Only need to set this when task is language related. For example, French text classification.

string language_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The languageCode.

getLanguageCodeBytes()

public ByteString getLanguageCodeBytes()

Optional. The Language of this question, as a BCP-47. Default value is en-US. Only need to set this when task is language related. For example, French text classification.

string language_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for languageCode.

getQuestionDuration()

public Duration getQuestionDuration()

Optional. Maximum duration for contributors to answer a question. Maximum is 3600 seconds. Default is 3600 seconds.

.google.protobuf.Duration question_duration = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Duration

The questionDuration.

getQuestionDurationBuilder()

public Duration.Builder getQuestionDurationBuilder()

Optional. Maximum duration for contributors to answer a question. Maximum is 3600 seconds. Default is 3600 seconds.

.google.protobuf.Duration question_duration = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Builder

getQuestionDurationOrBuilder()

public DurationOrBuilder getQuestionDurationOrBuilder()

Optional. Maximum duration for contributors to answer a question. Maximum is 3600 seconds. Default is 3600 seconds.

.google.protobuf.Duration question_duration = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
DurationOrBuilder

getReplicaCount()

public int getReplicaCount()

Optional. Replication of questions. Each question will be sent to up to this number of contributors to label. Aggregated answers will be returned. Default is set to 1. For image related labeling, valid values are 1, 3, 5.

int32 replica_count = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The replicaCount.

getUserEmailAddress()

public String getUserEmailAddress()

Email of the user who started the labeling task and should be notified by email. If empty no notification will be sent.

string user_email_address = 10;

Returns
TypeDescription
String

The userEmailAddress.

getUserEmailAddressBytes()

public ByteString getUserEmailAddressBytes()

Email of the user who started the labeling task and should be notified by email. If empty no notification will be sent.

string user_email_address = 10;

Returns
TypeDescription
ByteString

The bytes for userEmailAddress.

hasQuestionDuration()

public boolean hasQuestionDuration()

Optional. Maximum duration for contributors to answer a question. Maximum is 3600 seconds. Default is 3600 seconds.

.google.protobuf.Duration question_duration = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the questionDuration field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(HumanAnnotationConfig other)

public HumanAnnotationConfig.Builder mergeFrom(HumanAnnotationConfig other)
Parameter
NameDescription
otherHumanAnnotationConfig
Returns
TypeDescription
HumanAnnotationConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeQuestionDuration(Duration value)

public HumanAnnotationConfig.Builder mergeQuestionDuration(Duration value)

Optional. Maximum duration for contributors to answer a question. Maximum is 3600 seconds. Default is 3600 seconds.

.google.protobuf.Duration question_duration = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueDuration
Returns
TypeDescription
HumanAnnotationConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAnnotatedDatasetDescription(String value)

public HumanAnnotationConfig.Builder setAnnotatedDatasetDescription(String value)

Optional. A human-readable description for AnnotatedDataset. The description can be up to 10000 characters long.

string annotated_dataset_description = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The annotatedDatasetDescription to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

setAnnotatedDatasetDescriptionBytes(ByteString value)

public HumanAnnotationConfig.Builder setAnnotatedDatasetDescriptionBytes(ByteString value)

Optional. A human-readable description for AnnotatedDataset. The description can be up to 10000 characters long.

string annotated_dataset_description = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for annotatedDatasetDescription to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

setAnnotatedDatasetDisplayName(String value)

public HumanAnnotationConfig.Builder setAnnotatedDatasetDisplayName(String value)

Required. A human-readable name for AnnotatedDataset defined by users. Maximum of 64 characters .

string annotated_dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The annotatedDatasetDisplayName to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

setAnnotatedDatasetDisplayNameBytes(ByteString value)

public HumanAnnotationConfig.Builder setAnnotatedDatasetDisplayNameBytes(ByteString value)

Required. A human-readable name for AnnotatedDataset defined by users. Maximum of 64 characters .

string annotated_dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes for annotatedDatasetDisplayName to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

setContributorEmails(int index, String value)

public HumanAnnotationConfig.Builder setContributorEmails(int index, String value)

Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/

repeated string contributor_emails = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The contributorEmails to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setInstruction(String value)

public HumanAnnotationConfig.Builder setInstruction(String value)

Required. Instruction resource name.

string instruction = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The instruction to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

setInstructionBytes(ByteString value)

public HumanAnnotationConfig.Builder setInstructionBytes(ByteString value)

Required. Instruction resource name.

string instruction = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes for instruction to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

setLabelGroup(String value)

public HumanAnnotationConfig.Builder setLabelGroup(String value)

Optional. A human-readable label used to logically group labeling tasks. This string must match the regular expression [a-zA-Z\\d_-]{0,128}.

string label_group = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The labelGroup to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

setLabelGroupBytes(ByteString value)

public HumanAnnotationConfig.Builder setLabelGroupBytes(ByteString value)

Optional. A human-readable label used to logically group labeling tasks. This string must match the regular expression [a-zA-Z\\d_-]{0,128}.

string label_group = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for labelGroup to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

setLanguageCode(String value)

public HumanAnnotationConfig.Builder setLanguageCode(String value)

Optional. The Language of this question, as a BCP-47. Default value is en-US. Only need to set this when task is language related. For example, French text classification.

string language_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The languageCode to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

setLanguageCodeBytes(ByteString value)

public HumanAnnotationConfig.Builder setLanguageCodeBytes(ByteString value)

Optional. The Language of this question, as a BCP-47. Default value is en-US. Only need to set this when task is language related. For example, French text classification.

string language_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for languageCode to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

setQuestionDuration(Duration value)

public HumanAnnotationConfig.Builder setQuestionDuration(Duration value)

Optional. Maximum duration for contributors to answer a question. Maximum is 3600 seconds. Default is 3600 seconds.

.google.protobuf.Duration question_duration = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueDuration
Returns
TypeDescription
HumanAnnotationConfig.Builder

setQuestionDuration(Duration.Builder builderForValue)

public HumanAnnotationConfig.Builder setQuestionDuration(Duration.Builder builderForValue)

Optional. Maximum duration for contributors to answer a question. Maximum is 3600 seconds. Default is 3600 seconds.

.google.protobuf.Duration question_duration = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
HumanAnnotationConfig.Builder

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

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

setReplicaCount(int value)

public HumanAnnotationConfig.Builder setReplicaCount(int value)

Optional. Replication of questions. Each question will be sent to up to this number of contributors to label. Aggregated answers will be returned. Default is set to 1. For image related labeling, valid values are 1, 3, 5.

int32 replica_count = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueint

The replicaCount to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUserEmailAddress(String value)

public HumanAnnotationConfig.Builder setUserEmailAddress(String value)

Email of the user who started the labeling task and should be notified by email. If empty no notification will be sent.

string user_email_address = 10;

Parameter
NameDescription
valueString

The userEmailAddress to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.

setUserEmailAddressBytes(ByteString value)

public HumanAnnotationConfig.Builder setUserEmailAddressBytes(ByteString value)

Email of the user who started the labeling task and should be notified by email. If empty no notification will be sent.

string user_email_address = 10;

Parameter
NameDescription
valueByteString

The bytes for userEmailAddress to set.

Returns
TypeDescription
HumanAnnotationConfig.Builder

This builder for chaining.