Class AnalyzeSentimentRequest.Builder (2.15.0)

public static final class AnalyzeSentimentRequest.Builder extends GeneratedMessageV3.Builder<AnalyzeSentimentRequest.Builder> implements AnalyzeSentimentRequestOrBuilder

The sentiment analysis request message.

Protobuf type google.cloud.language.v1beta2.AnalyzeSentimentRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AnalyzeSentimentRequest build()
Returns
TypeDescription
AnalyzeSentimentRequest

buildPartial()

public AnalyzeSentimentRequest buildPartial()
Returns
TypeDescription
AnalyzeSentimentRequest

clear()

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

clearDocument()

public AnalyzeSentimentRequest.Builder clearDocument()

Required. Input document.

.google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
AnalyzeSentimentRequest.Builder

clearEncodingType()

public AnalyzeSentimentRequest.Builder clearEncodingType()

The encoding type used by the API to calculate sentence offsets for the sentence sentiment.

.google.cloud.language.v1beta2.EncodingType encoding_type = 2;

Returns
TypeDescription
AnalyzeSentimentRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getDefaultInstanceForType()

public AnalyzeSentimentRequest getDefaultInstanceForType()
Returns
TypeDescription
AnalyzeSentimentRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDocument()

public Document getDocument()

Required. Input document.

.google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Document

The document.

getDocumentBuilder()

public Document.Builder getDocumentBuilder()

Required. Input document.

.google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Document.Builder

getDocumentOrBuilder()

public DocumentOrBuilder getDocumentOrBuilder()

Required. Input document.

.google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
DocumentOrBuilder

getEncodingType()

public EncodingType getEncodingType()

The encoding type used by the API to calculate sentence offsets for the sentence sentiment.

.google.cloud.language.v1beta2.EncodingType encoding_type = 2;

Returns
TypeDescription
EncodingType

The encodingType.

getEncodingTypeValue()

public int getEncodingTypeValue()

The encoding type used by the API to calculate sentence offsets for the sentence sentiment.

.google.cloud.language.v1beta2.EncodingType encoding_type = 2;

Returns
TypeDescription
int

The enum numeric value on the wire for encodingType.

hasDocument()

public boolean hasDocument()

Required. Input document.

.google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the document field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeDocument(Document value)

public AnalyzeSentimentRequest.Builder mergeDocument(Document value)

Required. Input document.

.google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueDocument
Returns
TypeDescription
AnalyzeSentimentRequest.Builder

mergeFrom(AnalyzeSentimentRequest other)

public AnalyzeSentimentRequest.Builder mergeFrom(AnalyzeSentimentRequest other)
Parameter
NameDescription
otherAnalyzeSentimentRequest
Returns
TypeDescription
AnalyzeSentimentRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setDocument(Document value)

public AnalyzeSentimentRequest.Builder setDocument(Document value)

Required. Input document.

.google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueDocument
Returns
TypeDescription
AnalyzeSentimentRequest.Builder

setDocument(Document.Builder builderForValue)

public AnalyzeSentimentRequest.Builder setDocument(Document.Builder builderForValue)

Required. Input document.

.google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueDocument.Builder
Returns
TypeDescription
AnalyzeSentimentRequest.Builder

setEncodingType(EncodingType value)

public AnalyzeSentimentRequest.Builder setEncodingType(EncodingType value)

The encoding type used by the API to calculate sentence offsets for the sentence sentiment.

.google.cloud.language.v1beta2.EncodingType encoding_type = 2;

Parameter
NameDescription
valueEncodingType

The encodingType to set.

Returns
TypeDescription
AnalyzeSentimentRequest.Builder

This builder for chaining.

setEncodingTypeValue(int value)

public AnalyzeSentimentRequest.Builder setEncodingTypeValue(int value)

The encoding type used by the API to calculate sentence offsets for the sentence sentiment.

.google.cloud.language.v1beta2.EncodingType encoding_type = 2;

Parameter
NameDescription
valueint

The enum numeric value on the wire for encodingType to set.

Returns
TypeDescription
AnalyzeSentimentRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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