Class HumanAnnotationConfig.Builder (0.169.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
Type Description
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
Name Description
values Iterable<String>

The contributorEmails to add.

Returns
Type Description
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
Name Description
value String

The contributorEmails to add.

Returns
Type Description
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
Name Description
value ByteString

The bytes of the contributorEmails to add.

Returns
Type Description
HumanAnnotationConfig.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public HumanAnnotationConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HumanAnnotationConfig.Builder
Overrides

build()

public HumanAnnotationConfig build()
Returns
Type Description
HumanAnnotationConfig

buildPartial()

public HumanAnnotationConfig buildPartial()
Returns
Type Description
HumanAnnotationConfig

clear()

public HumanAnnotationConfig.Builder clear()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
HumanAnnotationConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public HumanAnnotationConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
HumanAnnotationConfig.Builder
Overrides

clearInstruction()

public HumanAnnotationConfig.Builder clearInstruction()

Required. Instruction resource name.

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

Returns
Type Description
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
Type Description
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
Type Description
HumanAnnotationConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public HumanAnnotationConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
HumanAnnotationConfig.Builder

This builder for chaining.

clone()

public HumanAnnotationConfig.Builder clone()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
ProtocolStringList

A list containing the contributorEmails.

getDefaultInstanceForType()

public HumanAnnotationConfig getDefaultInstanceForType()
Returns
Type Description
HumanAnnotationConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getInstruction()

public String getInstruction()

Required. Instruction resource name.

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

Returns
Type Description
String

The instruction.

getInstructionBytes()

public ByteString getInstructionBytes()

Required. Instruction resource name.

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

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the questionDuration field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(HumanAnnotationConfig other)

public HumanAnnotationConfig.Builder mergeFrom(HumanAnnotationConfig other)
Parameter
Name Description
other HumanAnnotationConfig
Returns
Type Description
HumanAnnotationConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public HumanAnnotationConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HumanAnnotationConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public HumanAnnotationConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value Duration
Returns
Type Description
HumanAnnotationConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final HumanAnnotationConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value String

The annotatedDatasetDescription to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for annotatedDatasetDescription to set.

Returns
Type Description
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
Name Description
value String

The annotatedDatasetDisplayName to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for annotatedDatasetDisplayName to set.

Returns
Type Description
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
Name Description
index int

The index to set the value at.

value String

The contributorEmails to set.

Returns
Type Description
HumanAnnotationConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public HumanAnnotationConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value String

The instruction to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for instruction to set.

Returns
Type Description
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
Name Description
value String

The labelGroup to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for labelGroup to set.

Returns
Type Description
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
Name Description
value String

The languageCode to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for languageCode to set.

Returns
Type Description
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
Name Description
value Duration
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
HumanAnnotationConfig.Builder

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

public HumanAnnotationConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
Name Description
value int

The replicaCount to set.

Returns
Type Description
HumanAnnotationConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final HumanAnnotationConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value String

The userEmailAddress to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for userEmailAddress to set.

Returns
Type Description
HumanAnnotationConfig.Builder

This builder for chaining.