Class TextClassificationConfig.Builder (0.137.0)

public static final class TextClassificationConfig.Builder extends GeneratedMessageV3.Builder<TextClassificationConfig.Builder> implements TextClassificationConfigOrBuilder

Config for text classification human labeling task.

Protobuf type google.cloud.datalabeling.v1beta1.TextClassificationConfig

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public TextClassificationConfig build()
Returns
TypeDescription
TextClassificationConfig

buildPartial()

public TextClassificationConfig buildPartial()
Returns
TypeDescription
TextClassificationConfig

clear()

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

clearAllowMultiLabel()

public TextClassificationConfig.Builder clearAllowMultiLabel()

Optional. If allow_multi_label is true, contributors are able to choose multiple labels for one text segment.

bool allow_multi_label = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
TextClassificationConfig.Builder

This builder for chaining.

clearAnnotationSpecSet()

public TextClassificationConfig.Builder clearAnnotationSpecSet()

Required. Annotation spec set resource name.

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

Returns
TypeDescription
TextClassificationConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSentimentConfig()

public TextClassificationConfig.Builder clearSentimentConfig()

Optional. Configs for sentiment selection.

.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
TextClassificationConfig.Builder

clone()

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

getAllowMultiLabel()

public boolean getAllowMultiLabel()

Optional. If allow_multi_label is true, contributors are able to choose multiple labels for one text segment.

bool allow_multi_label = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The allowMultiLabel.

getAnnotationSpecSet()

public String getAnnotationSpecSet()

Required. Annotation spec set resource name.

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

Returns
TypeDescription
String

The annotationSpecSet.

getAnnotationSpecSetBytes()

public ByteString getAnnotationSpecSetBytes()

Required. Annotation spec set resource name.

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

Returns
TypeDescription
ByteString

The bytes for annotationSpecSet.

getDefaultInstanceForType()

public TextClassificationConfig getDefaultInstanceForType()
Returns
TypeDescription
TextClassificationConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getSentimentConfig()

public SentimentConfig getSentimentConfig()

Optional. Configs for sentiment selection.

.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
SentimentConfig

The sentimentConfig.

getSentimentConfigBuilder()

public SentimentConfig.Builder getSentimentConfigBuilder()

Optional. Configs for sentiment selection.

.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
SentimentConfig.Builder

getSentimentConfigOrBuilder()

public SentimentConfigOrBuilder getSentimentConfigOrBuilder()

Optional. Configs for sentiment selection.

.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
SentimentConfigOrBuilder

hasSentimentConfig()

public boolean hasSentimentConfig()

Optional. Configs for sentiment selection.

.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the sentimentConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TextClassificationConfig other)

public TextClassificationConfig.Builder mergeFrom(TextClassificationConfig other)
Parameter
NameDescription
otherTextClassificationConfig
Returns
TypeDescription
TextClassificationConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeSentimentConfig(SentimentConfig value)

public TextClassificationConfig.Builder mergeSentimentConfig(SentimentConfig value)

Optional. Configs for sentiment selection.

.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueSentimentConfig
Returns
TypeDescription
TextClassificationConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAllowMultiLabel(boolean value)

public TextClassificationConfig.Builder setAllowMultiLabel(boolean value)

Optional. If allow_multi_label is true, contributors are able to choose multiple labels for one text segment.

bool allow_multi_label = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueboolean

The allowMultiLabel to set.

Returns
TypeDescription
TextClassificationConfig.Builder

This builder for chaining.

setAnnotationSpecSet(String value)

public TextClassificationConfig.Builder setAnnotationSpecSet(String value)

Required. Annotation spec set resource name.

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

Parameter
NameDescription
valueString

The annotationSpecSet to set.

Returns
TypeDescription
TextClassificationConfig.Builder

This builder for chaining.

setAnnotationSpecSetBytes(ByteString value)

public TextClassificationConfig.Builder setAnnotationSpecSetBytes(ByteString value)

Required. Annotation spec set resource name.

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

Parameter
NameDescription
valueByteString

The bytes for annotationSpecSet to set.

Returns
TypeDescription
TextClassificationConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSentimentConfig(SentimentConfig value)

public TextClassificationConfig.Builder setSentimentConfig(SentimentConfig value)

Optional. Configs for sentiment selection.

.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueSentimentConfig
Returns
TypeDescription
TextClassificationConfig.Builder

setSentimentConfig(SentimentConfig.Builder builderForValue)

public TextClassificationConfig.Builder setSentimentConfig(SentimentConfig.Builder builderForValue)

Optional. Configs for sentiment selection.

.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueSentimentConfig.Builder
Returns
TypeDescription
TextClassificationConfig.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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