Class TextSentimentPredictionResult.Builder (3.4.2)

public static final class TextSentimentPredictionResult.Builder extends GeneratedMessageV3.Builder<TextSentimentPredictionResult.Builder> implements TextSentimentPredictionResultOrBuilder

Prediction output format for Text Sentiment

Protobuf type google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public TextSentimentPredictionResult build()
Returns
TypeDescription
TextSentimentPredictionResult

buildPartial()

public TextSentimentPredictionResult buildPartial()
Returns
TypeDescription
TextSentimentPredictionResult

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSentiment()

public TextSentimentPredictionResult.Builder clearSentiment()

The integer sentiment labels between 0 (inclusive) and sentimentMax label (inclusive), while 0 maps to the least positive sentiment and sentimentMax maps to the most positive one. The higher the score is, the more positive the sentiment in the text snippet is. Note: sentimentMax is an integer value between 1 (inclusive) and 10 (inclusive).

int32 sentiment = 1;

Returns
TypeDescription
TextSentimentPredictionResult.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public TextSentimentPredictionResult getDefaultInstanceForType()
Returns
TypeDescription
TextSentimentPredictionResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getSentiment()

public int getSentiment()

The integer sentiment labels between 0 (inclusive) and sentimentMax label (inclusive), while 0 maps to the least positive sentiment and sentimentMax maps to the most positive one. The higher the score is, the more positive the sentiment in the text snippet is. Note: sentimentMax is an integer value between 1 (inclusive) and 10 (inclusive).

int32 sentiment = 1;

Returns
TypeDescription
int

The sentiment.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TextSentimentPredictionResult other)

public TextSentimentPredictionResult.Builder mergeFrom(TextSentimentPredictionResult other)
Parameter
NameDescription
otherTextSentimentPredictionResult
Returns
TypeDescription
TextSentimentPredictionResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSentiment(int value)

public TextSentimentPredictionResult.Builder setSentiment(int value)

The integer sentiment labels between 0 (inclusive) and sentimentMax label (inclusive), while 0 maps to the least positive sentiment and sentimentMax maps to the most positive one. The higher the score is, the more positive the sentiment in the text snippet is. Note: sentimentMax is an integer value between 1 (inclusive) and 10 (inclusive).

int32 sentiment = 1;

Parameter
NameDescription
valueint

The sentiment to set.

Returns
TypeDescription
TextSentimentPredictionResult.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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