Class AnnotateTextRequest.Features.Builder (2.18.0)

public static final class AnnotateTextRequest.Features.Builder extends GeneratedMessageV3.Builder<AnnotateTextRequest.Features.Builder> implements AnnotateTextRequest.FeaturesOrBuilder

All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input.

Protobuf type google.cloud.language.v1.AnnotateTextRequest.Features

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AnnotateTextRequest.Features build()
Returns
TypeDescription
AnnotateTextRequest.Features

buildPartial()

public AnnotateTextRequest.Features buildPartial()
Returns
TypeDescription
AnnotateTextRequest.Features

clear()

public AnnotateTextRequest.Features.Builder clear()
Returns
TypeDescription
AnnotateTextRequest.Features.Builder
Overrides

clearClassificationModelOptions()

public AnnotateTextRequest.Features.Builder clearClassificationModelOptions()

The model options to use for classification. Defaults to v1 options if not specified. Only used if classify_text is set to true.

.google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10;

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

clearClassifyText()

public AnnotateTextRequest.Features.Builder clearClassifyText()

Classify the full document into categories.

bool classify_text = 6;

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

clearExtractDocumentSentiment()

public AnnotateTextRequest.Features.Builder clearExtractDocumentSentiment()

Extract document-level sentiment.

bool extract_document_sentiment = 3;

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

clearExtractEntities()

public AnnotateTextRequest.Features.Builder clearExtractEntities()

Extract entities.

bool extract_entities = 2;

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

clearExtractEntitySentiment()

public AnnotateTextRequest.Features.Builder clearExtractEntitySentiment()

Extract entities and their associated sentiment.

bool extract_entity_sentiment = 4;

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

clearExtractSyntax()

public AnnotateTextRequest.Features.Builder clearExtractSyntax()

Extract syntax information.

bool extract_syntax = 1;

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public AnnotateTextRequest.Features.Builder clone()
Returns
TypeDescription
AnnotateTextRequest.Features.Builder
Overrides

getClassificationModelOptions()

public ClassificationModelOptions getClassificationModelOptions()

The model options to use for classification. Defaults to v1 options if not specified. Only used if classify_text is set to true.

.google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10;

Returns
TypeDescription
ClassificationModelOptions

The classificationModelOptions.

getClassificationModelOptionsBuilder()

public ClassificationModelOptions.Builder getClassificationModelOptionsBuilder()

The model options to use for classification. Defaults to v1 options if not specified. Only used if classify_text is set to true.

.google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10;

Returns
TypeDescription
ClassificationModelOptions.Builder

getClassificationModelOptionsOrBuilder()

public ClassificationModelOptionsOrBuilder getClassificationModelOptionsOrBuilder()

The model options to use for classification. Defaults to v1 options if not specified. Only used if classify_text is set to true.

.google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10;

Returns
TypeDescription
ClassificationModelOptionsOrBuilder

getClassifyText()

public boolean getClassifyText()

Classify the full document into categories.

bool classify_text = 6;

Returns
TypeDescription
boolean

The classifyText.

getDefaultInstanceForType()

public AnnotateTextRequest.Features getDefaultInstanceForType()
Returns
TypeDescription
AnnotateTextRequest.Features

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getExtractDocumentSentiment()

public boolean getExtractDocumentSentiment()

Extract document-level sentiment.

bool extract_document_sentiment = 3;

Returns
TypeDescription
boolean

The extractDocumentSentiment.

getExtractEntities()

public boolean getExtractEntities()

Extract entities.

bool extract_entities = 2;

Returns
TypeDescription
boolean

The extractEntities.

getExtractEntitySentiment()

public boolean getExtractEntitySentiment()

Extract entities and their associated sentiment.

bool extract_entity_sentiment = 4;

Returns
TypeDescription
boolean

The extractEntitySentiment.

getExtractSyntax()

public boolean getExtractSyntax()

Extract syntax information.

bool extract_syntax = 1;

Returns
TypeDescription
boolean

The extractSyntax.

hasClassificationModelOptions()

public boolean hasClassificationModelOptions()

The model options to use for classification. Defaults to v1 options if not specified. Only used if classify_text is set to true.

.google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10;

Returns
TypeDescription
boolean

Whether the classificationModelOptions field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeClassificationModelOptions(ClassificationModelOptions value)

public AnnotateTextRequest.Features.Builder mergeClassificationModelOptions(ClassificationModelOptions value)

The model options to use for classification. Defaults to v1 options if not specified. Only used if classify_text is set to true.

.google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10;

Parameter
NameDescription
valueClassificationModelOptions
Returns
TypeDescription
AnnotateTextRequest.Features.Builder

mergeFrom(AnnotateTextRequest.Features other)

public AnnotateTextRequest.Features.Builder mergeFrom(AnnotateTextRequest.Features other)
Parameter
NameDescription
otherAnnotateTextRequest.Features
Returns
TypeDescription
AnnotateTextRequest.Features.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setClassificationModelOptions(ClassificationModelOptions value)

public AnnotateTextRequest.Features.Builder setClassificationModelOptions(ClassificationModelOptions value)

The model options to use for classification. Defaults to v1 options if not specified. Only used if classify_text is set to true.

.google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10;

Parameter
NameDescription
valueClassificationModelOptions
Returns
TypeDescription
AnnotateTextRequest.Features.Builder

setClassificationModelOptions(ClassificationModelOptions.Builder builderForValue)

public AnnotateTextRequest.Features.Builder setClassificationModelOptions(ClassificationModelOptions.Builder builderForValue)

The model options to use for classification. Defaults to v1 options if not specified. Only used if classify_text is set to true.

.google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10;

Parameter
NameDescription
builderForValueClassificationModelOptions.Builder
Returns
TypeDescription
AnnotateTextRequest.Features.Builder

setClassifyText(boolean value)

public AnnotateTextRequest.Features.Builder setClassifyText(boolean value)

Classify the full document into categories.

bool classify_text = 6;

Parameter
NameDescription
valueboolean

The classifyText to set.

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

setExtractDocumentSentiment(boolean value)

public AnnotateTextRequest.Features.Builder setExtractDocumentSentiment(boolean value)

Extract document-level sentiment.

bool extract_document_sentiment = 3;

Parameter
NameDescription
valueboolean

The extractDocumentSentiment to set.

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

setExtractEntities(boolean value)

public AnnotateTextRequest.Features.Builder setExtractEntities(boolean value)

Extract entities.

bool extract_entities = 2;

Parameter
NameDescription
valueboolean

The extractEntities to set.

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

setExtractEntitySentiment(boolean value)

public AnnotateTextRequest.Features.Builder setExtractEntitySentiment(boolean value)

Extract entities and their associated sentiment.

bool extract_entity_sentiment = 4;

Parameter
NameDescription
valueboolean

The extractEntitySentiment to set.

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

setExtractSyntax(boolean value)

public AnnotateTextRequest.Features.Builder setExtractSyntax(boolean value)

Extract syntax information.

bool extract_syntax = 1;

Parameter
NameDescription
valueboolean

The extractSyntax to set.

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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