Class AnnotateTextRequest.Features.Builder (2.41.0)

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

All available features. Setting each one to true will enable that specific analysis for the input.

Protobuf type google.cloud.language.v2.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

clearClassifyText()

public AnnotateTextRequest.Features.Builder clearClassifyText()

Optional. Classify the full document into categories.

bool classify_text = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

clearExtractDocumentSentiment()

public AnnotateTextRequest.Features.Builder clearExtractDocumentSentiment()

Optional. Extract document-level sentiment.

bool extract_document_sentiment = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

clearExtractEntities()

public AnnotateTextRequest.Features.Builder clearExtractEntities()

Optional. Extract entities.

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

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

clearModerateText()

public AnnotateTextRequest.Features.Builder clearModerateText()

Optional. Moderate the document for harmful and sensitive categories.

bool moderate_text = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

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

getClassifyText()

public boolean getClassifyText()

Optional. Classify the full document into categories.

bool classify_text = 4 [(.google.api.field_behavior) = OPTIONAL];

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()

Optional. Extract document-level sentiment.

bool extract_document_sentiment = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The extractDocumentSentiment.

getExtractEntities()

public boolean getExtractEntities()

Optional. Extract entities.

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

Returns
TypeDescription
boolean

The extractEntities.

getModerateText()

public boolean getModerateText()

Optional. Moderate the document for harmful and sensitive categories.

bool moderate_text = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The moderateText.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

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

setClassifyText(boolean value)

public AnnotateTextRequest.Features.Builder setClassifyText(boolean value)

Optional. Classify the full document into categories.

bool classify_text = 4 [(.google.api.field_behavior) = OPTIONAL];

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)

Optional. Extract document-level sentiment.

bool extract_document_sentiment = 2 [(.google.api.field_behavior) = OPTIONAL];

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)

Optional. Extract entities.

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

Parameter
NameDescription
valueboolean

The extractEntities 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

setModerateText(boolean value)

public AnnotateTextRequest.Features.Builder setModerateText(boolean value)

Optional. Moderate the document for harmful and sensitive categories.

bool moderate_text = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueboolean

The moderateText to set.

Returns
TypeDescription
AnnotateTextRequest.Features.Builder

This builder for chaining.

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