Class AnnotateTextRequest (2.17.0)

public final class AnnotateTextRequest extends GeneratedMessageV3 implements AnnotateTextRequestOrBuilder

The request message for the text annotation API, which can perform multiple analysis types (sentiment, entities, and syntax) in one call.

Protobuf type google.cloud.language.v1beta2.AnnotateTextRequest

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

FEATURES_FIELD_NUMBER

public static final int FEATURES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AnnotateTextRequest getDefaultInstance()
Returns
TypeDescription
AnnotateTextRequest

getDescriptor()

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

newBuilder()

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

newBuilder(AnnotateTextRequest prototype)

public static AnnotateTextRequest.Builder newBuilder(AnnotateTextRequest prototype)
Parameter
NameDescription
prototypeAnnotateTextRequest
Returns
TypeDescription
AnnotateTextRequest.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public AnnotateTextRequest getDefaultInstanceForType()
Returns
TypeDescription
AnnotateTextRequest

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 offsets.

.google.cloud.language.v1beta2.EncodingType encoding_type = 3;

Returns
TypeDescription
EncodingType

The encodingType.

getEncodingTypeValue()

public int getEncodingTypeValue()

The encoding type used by the API to calculate offsets.

.google.cloud.language.v1beta2.EncodingType encoding_type = 3;

Returns
TypeDescription
int

The enum numeric value on the wire for encodingType.

getFeatures()

public AnnotateTextRequest.Features getFeatures()

Required. The enabled features.

.google.cloud.language.v1beta2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
AnnotateTextRequest.Features

The features.

getFeaturesOrBuilder()

public AnnotateTextRequest.FeaturesOrBuilder getFeaturesOrBuilder()

Required. The enabled features.

.google.cloud.language.v1beta2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
AnnotateTextRequest.FeaturesOrBuilder

getParserForType()

public Parser<AnnotateTextRequest> getParserForType()
Returns
TypeDescription
Parser<AnnotateTextRequest>
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.

hasFeatures()

public boolean hasFeatures()

Required. The enabled features.

.google.cloud.language.v1beta2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the features 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 AnnotateTextRequest.Builder newBuilderForType()
Returns
TypeDescription
AnnotateTextRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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