Class AnalyzeSentimentRequest.Builder (2.43.0)

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

The sentiment analysis request message.

Protobuf type google.cloud.language.v1.AnalyzeSentimentRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AnalyzeSentimentRequest build()
Returns
Type Description
AnalyzeSentimentRequest

buildPartial()

public AnalyzeSentimentRequest buildPartial()
Returns
Type Description
AnalyzeSentimentRequest

clear()

public AnalyzeSentimentRequest.Builder clear()
Returns
Type Description
AnalyzeSentimentRequest.Builder
Overrides

clearDocument()

public AnalyzeSentimentRequest.Builder clearDocument()

Required. Input document.

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

Returns
Type Description
AnalyzeSentimentRequest.Builder

clearEncodingType()

public AnalyzeSentimentRequest.Builder clearEncodingType()

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

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

Returns
Type Description
AnalyzeSentimentRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public AnalyzeSentimentRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AnalyzeSentimentRequest.Builder
Overrides

clone()

public AnalyzeSentimentRequest.Builder clone()
Returns
Type Description
AnalyzeSentimentRequest.Builder
Overrides

getDefaultInstanceForType()

public AnalyzeSentimentRequest getDefaultInstanceForType()
Returns
Type Description
AnalyzeSentimentRequest

getDescriptorForType()

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

getDocument()

public Document getDocument()

Required. Input document.

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

Returns
Type Description
Document

The document.

getDocumentBuilder()

public Document.Builder getDocumentBuilder()

Required. Input document.

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

Returns
Type Description
Document.Builder

getDocumentOrBuilder()

public DocumentOrBuilder getDocumentOrBuilder()

Required. Input document.

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

Returns
Type Description
DocumentOrBuilder

getEncodingType()

public EncodingType getEncodingType()

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

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

Returns
Type Description
EncodingType

The encodingType.

getEncodingTypeValue()

public int getEncodingTypeValue()

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

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

Returns
Type Description
int

The enum numeric value on the wire for encodingType.

hasDocument()

public boolean hasDocument()

Required. Input document.

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

Returns
Type Description
boolean

Whether the document field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDocument(Document value)

public AnalyzeSentimentRequest.Builder mergeDocument(Document value)

Required. Input document.

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

Parameter
Name Description
value Document
Returns
Type Description
AnalyzeSentimentRequest.Builder

mergeFrom(AnalyzeSentimentRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public AnalyzeSentimentRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AnalyzeSentimentRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AnalyzeSentimentRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AnalyzeSentimentRequest.Builder
Overrides

setDocument(Document value)

public AnalyzeSentimentRequest.Builder setDocument(Document value)

Required. Input document.

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

Parameter
Name Description
value Document
Returns
Type Description
AnalyzeSentimentRequest.Builder

setDocument(Document.Builder builderForValue)

public AnalyzeSentimentRequest.Builder setDocument(Document.Builder builderForValue)

Required. Input document.

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

Parameter
Name Description
builderForValue Document.Builder
Returns
Type Description
AnalyzeSentimentRequest.Builder

setEncodingType(EncodingType value)

public AnalyzeSentimentRequest.Builder setEncodingType(EncodingType value)

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

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

Parameter
Name Description
value EncodingType

The encodingType to set.

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

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

Parameter
Name Description
value int

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

Returns
Type Description
AnalyzeSentimentRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public AnalyzeSentimentRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AnalyzeSentimentRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final AnalyzeSentimentRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AnalyzeSentimentRequest.Builder
Overrides