Class TextSentimentPredictionResult (3.36.0)

public final class TextSentimentPredictionResult extends GeneratedMessageV3 implements TextSentimentPredictionResultOrBuilder

Prediction output format for Text Sentiment

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

Static Fields

SENTIMENT_FIELD_NUMBER

public static final int SENTIMENT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static TextSentimentPredictionResult getDefaultInstance()
Returns
TypeDescription
TextSentimentPredictionResult

getDescriptor()

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

newBuilder()

public static TextSentimentPredictionResult.Builder newBuilder()
Returns
TypeDescription
TextSentimentPredictionResult.Builder

newBuilder(TextSentimentPredictionResult prototype)

public static TextSentimentPredictionResult.Builder newBuilder(TextSentimentPredictionResult prototype)
Parameter
NameDescription
prototypeTextSentimentPredictionResult
Returns
TypeDescription
TextSentimentPredictionResult.Builder

parseDelimitedFrom(InputStream input)

public static TextSentimentPredictionResult parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TextSentimentPredictionResult
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TextSentimentPredictionResult parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSentimentPredictionResult
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static TextSentimentPredictionResult parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
TextSentimentPredictionResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TextSentimentPredictionResult parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSentimentPredictionResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TextSentimentPredictionResult parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
TextSentimentPredictionResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TextSentimentPredictionResult parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSentimentPredictionResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TextSentimentPredictionResult parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
TextSentimentPredictionResult
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TextSentimentPredictionResult parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSentimentPredictionResult
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static TextSentimentPredictionResult parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TextSentimentPredictionResult
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TextSentimentPredictionResult parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSentimentPredictionResult
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static TextSentimentPredictionResult parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
TextSentimentPredictionResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TextSentimentPredictionResult parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSentimentPredictionResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<TextSentimentPredictionResult> parser()
Returns
TypeDescription
Parser<TextSentimentPredictionResult>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public TextSentimentPredictionResult getDefaultInstanceForType()
Returns
TypeDescription
TextSentimentPredictionResult

getParserForType()

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

The sentiment.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public TextSentimentPredictionResult.Builder newBuilderForType()
Returns
TypeDescription
TextSentimentPredictionResult.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TextSentimentPredictionResult.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
TextSentimentPredictionResult.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public TextSentimentPredictionResult.Builder toBuilder()
Returns
TypeDescription
TextSentimentPredictionResult.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException