Class TranslateDocumentResponse (2.17.0)

public final class TranslateDocumentResponse extends GeneratedMessageV3 implements TranslateDocumentResponseOrBuilder

A translated document response message.

Protobuf type google.cloud.translation.v3beta1.TranslateDocumentResponse

Static Fields

DOCUMENT_TRANSLATION_FIELD_NUMBER

public static final int DOCUMENT_TRANSLATION_FIELD_NUMBER
Field Value
TypeDescription
int

GLOSSARY_CONFIG_FIELD_NUMBER

public static final int GLOSSARY_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

GLOSSARY_DOCUMENT_TRANSLATION_FIELD_NUMBER

public static final int GLOSSARY_DOCUMENT_TRANSLATION_FIELD_NUMBER
Field Value
TypeDescription
int

MODEL_FIELD_NUMBER

public static final int MODEL_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static TranslateDocumentResponse getDefaultInstance()
Returns
TypeDescription
TranslateDocumentResponse

getDescriptor()

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

newBuilder()

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

newBuilder(TranslateDocumentResponse prototype)

public static TranslateDocumentResponse.Builder newBuilder(TranslateDocumentResponse prototype)
Parameter
NameDescription
prototypeTranslateDocumentResponse
Returns
TypeDescription
TranslateDocumentResponse.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public TranslateDocumentResponse getDefaultInstanceForType()
Returns
TypeDescription
TranslateDocumentResponse

getDocumentTranslation()

public DocumentTranslation getDocumentTranslation()

Translated document.

.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;

Returns
TypeDescription
DocumentTranslation

The documentTranslation.

getDocumentTranslationOrBuilder()

public DocumentTranslationOrBuilder getDocumentTranslationOrBuilder()

Translated document.

.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;

Returns
TypeDescription
DocumentTranslationOrBuilder

getGlossaryConfig()

public TranslateTextGlossaryConfig getGlossaryConfig()

The glossary_config used for this translation.

.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;

Returns
TypeDescription
TranslateTextGlossaryConfig

The glossaryConfig.

getGlossaryConfigOrBuilder()

public TranslateTextGlossaryConfigOrBuilder getGlossaryConfigOrBuilder()

The glossary_config used for this translation.

.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;

Returns
TypeDescription
TranslateTextGlossaryConfigOrBuilder

getGlossaryDocumentTranslation()

public DocumentTranslation getGlossaryDocumentTranslation()

The document's translation output if a glossary is provided in the request. This can be the same as [TranslateDocumentResponse.document_translation] if no glossary terms apply.

.google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;

Returns
TypeDescription
DocumentTranslation

The glossaryDocumentTranslation.

getGlossaryDocumentTranslationOrBuilder()

public DocumentTranslationOrBuilder getGlossaryDocumentTranslationOrBuilder()

The document's translation output if a glossary is provided in the request. This can be the same as [TranslateDocumentResponse.document_translation] if no glossary terms apply.

.google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;

Returns
TypeDescription
DocumentTranslationOrBuilder

getModel()

public String getModel()

Only present when 'model' is present in the request. 'model' is normalized to have a project number. For example: If the 'model' field in TranslateDocumentRequest is: projects/{project-id}/locations/{location-id}/models/general/nmt then model here would be normalized to projects/{project-number}/locations/{location-id}/models/general/nmt.

string model = 3;

Returns
TypeDescription
String

The model.

getModelBytes()

public ByteString getModelBytes()

Only present when 'model' is present in the request. 'model' is normalized to have a project number. For example: If the 'model' field in TranslateDocumentRequest is: projects/{project-id}/locations/{location-id}/models/general/nmt then model here would be normalized to projects/{project-number}/locations/{location-id}/models/general/nmt.

string model = 3;

Returns
TypeDescription
ByteString

The bytes for model.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasDocumentTranslation()

public boolean hasDocumentTranslation()

Translated document.

.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;

Returns
TypeDescription
boolean

Whether the documentTranslation field is set.

hasGlossaryConfig()

public boolean hasGlossaryConfig()

The glossary_config used for this translation.

.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;

Returns
TypeDescription
boolean

Whether the glossaryConfig field is set.

hasGlossaryDocumentTranslation()

public boolean hasGlossaryDocumentTranslation()

The document's translation output if a glossary is provided in the request. This can be the same as [TranslateDocumentResponse.document_translation] if no glossary terms apply.

.google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;

Returns
TypeDescription
boolean

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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