Class AnalyzeSentimentRequest (2.3.4)

public final class AnalyzeSentimentRequest extends GeneratedMessageV3 implements AnalyzeSentimentRequestOrBuilder

The sentiment analysis request message.

Protobuf type google.cloud.language.v1beta2.AnalyzeSentimentRequest

Static Fields

DOCUMENT_FIELD_NUMBER

public static final int DOCUMENT_FIELD_NUMBER
Field Value
TypeDescription
int

ENCODING_TYPE_FIELD_NUMBER

public static final int ENCODING_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AnalyzeSentimentRequest getDefaultInstance()
Returns
TypeDescription
AnalyzeSentimentRequest

getDescriptor()

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

newBuilder()

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

newBuilder(AnalyzeSentimentRequest prototype)

public static AnalyzeSentimentRequest.Builder newBuilder(AnalyzeSentimentRequest prototype)
Parameter
NameDescription
prototypeAnalyzeSentimentRequest
Returns
TypeDescription
AnalyzeSentimentRequest.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public AnalyzeSentimentRequest getDefaultInstanceForType()
Returns
TypeDescription
AnalyzeSentimentRequest

getDocument()

public Document getDocument()

Required. Input document.

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

Returns
TypeDescription
Document

The document.

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.

getParserForType()

public Parser<AnalyzeSentimentRequest> getParserForType()
Returns
TypeDescription
Parser<AnalyzeSentimentRequest>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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.

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 AnalyzeSentimentRequest.Builder newBuilderForType()
Returns
TypeDescription
AnalyzeSentimentRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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