Class AdaptiveMtTranslateRequest (2.54.0)

public final class AdaptiveMtTranslateRequest extends GeneratedMessageV3 implements AdaptiveMtTranslateRequestOrBuilder

The request for sending an AdaptiveMt translation query.

Protobuf type google.cloud.translation.v3.AdaptiveMtTranslateRequest

Static Fields

CONTENT_FIELD_NUMBER

public static final int CONTENT_FIELD_NUMBER
Field Value
Type Description
int

DATASET_FIELD_NUMBER

public static final int DATASET_FIELD_NUMBER
Field Value
Type Description
int

GLOSSARY_CONFIG_FIELD_NUMBER

public static final int GLOSSARY_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

PARENT_FIELD_NUMBER

public static final int PARENT_FIELD_NUMBER
Field Value
Type Description
int

REFERENCE_SENTENCE_CONFIG_FIELD_NUMBER

public static final int REFERENCE_SENTENCE_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AdaptiveMtTranslateRequest getDefaultInstance()
Returns
Type Description
AdaptiveMtTranslateRequest

getDescriptor()

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

newBuilder()

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

newBuilder(AdaptiveMtTranslateRequest prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getContent(int index)

public String getContent(int index)

Required. The content of the input in string format.

repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The content at the given index.

getContentBytes(int index)

public ByteString getContentBytes(int index)

Required. The content of the input in string format.

repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the content at the given index.

getContentCount()

public int getContentCount()

Required. The content of the input in string format.

repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of content.

getContentList()

public ProtocolStringList getContentList()

Required. The content of the input in string format.

repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProtocolStringList

A list containing the content.

getDataset()

public String getDataset()

Required. The resource name for the dataset to use for adaptive MT. projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}

string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The dataset.

getDatasetBytes()

public ByteString getDatasetBytes()

Required. The resource name for the dataset to use for adaptive MT. projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}

string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for dataset.

getDefaultInstanceForType()

public AdaptiveMtTranslateRequest getDefaultInstanceForType()
Returns
Type Description
AdaptiveMtTranslateRequest

getGlossaryConfig()

public AdaptiveMtTranslateRequest.GlossaryConfig getGlossaryConfig()

Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.

optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AdaptiveMtTranslateRequest.GlossaryConfig

The glossaryConfig.

getGlossaryConfigOrBuilder()

public AdaptiveMtTranslateRequest.GlossaryConfigOrBuilder getGlossaryConfigOrBuilder()

Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.

optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AdaptiveMtTranslateRequest.GlossaryConfigOrBuilder

getParent()

public String getParent()

Required. Location to make a regional call.

Format: projects/{project-number-or-id}/locations/{location-id}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. Location to make a regional call.

Format: projects/{project-number-or-id}/locations/{location-id}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for parent.

getParserForType()

public Parser<AdaptiveMtTranslateRequest> getParserForType()
Returns
Type Description
Parser<AdaptiveMtTranslateRequest>
Overrides

getReferenceSentenceConfig()

public AdaptiveMtTranslateRequest.ReferenceSentenceConfig getReferenceSentenceConfig()

Configuration for caller provided reference sentences.

optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;

Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentenceConfig

The referenceSentenceConfig.

getReferenceSentenceConfigOrBuilder()

public AdaptiveMtTranslateRequest.ReferenceSentenceConfigOrBuilder getReferenceSentenceConfigOrBuilder()

Configuration for caller provided reference sentences.

optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;

Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentenceConfigOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasGlossaryConfig()

public boolean hasGlossaryConfig()

Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.

optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the glossaryConfig field is set.

hasReferenceSentenceConfig()

public boolean hasReferenceSentenceConfig()

Configuration for caller provided reference sentences.

optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;

Returns
Type Description
boolean

Whether the referenceSentenceConfig field is set.

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 AdaptiveMtTranslateRequest.Builder newBuilderForType()
Returns
Type Description
AdaptiveMtTranslateRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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