Class TextSentimentPredictionResult (3.46.0)

public final class TextSentimentPredictionResult extends GeneratedMessageV3 implements TextSentimentPredictionResultOrBuilder

Prediction output format for Text Sentiment

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

Static Fields

SENTIMENT_FIELD_NUMBER

public static final int SENTIMENT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static TextSentimentPredictionResult getDefaultInstance()
Returns
Type Description
TextSentimentPredictionResult

getDescriptor()

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

newBuilder()

public static TextSentimentPredictionResult.Builder newBuilder()
Returns
Type Description
TextSentimentPredictionResult.Builder

newBuilder(TextSentimentPredictionResult prototype)

public static TextSentimentPredictionResult.Builder newBuilder(TextSentimentPredictionResult prototype)
Parameter
Name Description
prototype TextSentimentPredictionResult
Returns
Type Description
TextSentimentPredictionResult.Builder

parseDelimitedFrom(InputStream input)

public static TextSentimentPredictionResult parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
TextSentimentPredictionResult
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TextSentimentPredictionResult parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextSentimentPredictionResult
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static TextSentimentPredictionResult parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
TextSentimentPredictionResult
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TextSentimentPredictionResult parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextSentimentPredictionResult
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TextSentimentPredictionResult parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
TextSentimentPredictionResult
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TextSentimentPredictionResult parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextSentimentPredictionResult
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TextSentimentPredictionResult parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
TextSentimentPredictionResult
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TextSentimentPredictionResult parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextSentimentPredictionResult
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static TextSentimentPredictionResult parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
TextSentimentPredictionResult
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TextSentimentPredictionResult parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextSentimentPredictionResult
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static TextSentimentPredictionResult parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
TextSentimentPredictionResult
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TextSentimentPredictionResult parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextSentimentPredictionResult
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<TextSentimentPredictionResult> parser()
Returns
Type Description
Parser<TextSentimentPredictionResult>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public TextSentimentPredictionResult getDefaultInstanceForType()
Returns
Type Description
TextSentimentPredictionResult

getParserForType()

public Parser<TextSentimentPredictionResult> getParserForType()
Returns
Type Description
Parser<TextSentimentPredictionResult>
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
Type Description
int

The sentiment.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public TextSentimentPredictionResult.Builder newBuilderForType()
Returns
Type Description
TextSentimentPredictionResult.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TextSentimentPredictionResult.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
TextSentimentPredictionResult.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public TextSentimentPredictionResult.Builder toBuilder()
Returns
Type Description
TextSentimentPredictionResult.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException