Class AdaptiveMtTranslateRequest (2.39.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
TypeDescription
int

DATASET_FIELD_NUMBER

public static final int DATASET_FIELD_NUMBER
Field Value
TypeDescription
int

PARENT_FIELD_NUMBER

public static final int PARENT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AdaptiveMtTranslateRequest getDefaultInstance()
Returns
TypeDescription
AdaptiveMtTranslateRequest

getDescriptor()

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

newBuilder()

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

newBuilder(AdaptiveMtTranslateRequest prototype)

public static AdaptiveMtTranslateRequest.Builder newBuilder(AdaptiveMtTranslateRequest prototype)
Parameter
NameDescription
prototypeAdaptiveMtTranslateRequest
Returns
TypeDescription
AdaptiveMtTranslateRequest.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getContent(int index)

public String getContent(int index)

Required. The content of the input in string format. For now only one sentence per request is supported.

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

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The content at the given index.

getContentBytes(int index)

public ByteString getContentBytes(int index)

Required. The content of the input in string format. For now only one sentence per request is supported.

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

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the content at the given index.

getContentCount()

public int getContentCount()

Required. The content of the input in string format. For now only one sentence per request is supported.

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

Returns
TypeDescription
int

The count of content.

getContentList()

public ProtocolStringList getContentList()

Required. The content of the input in string format. For now only one sentence per request is supported.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for dataset.

getDefaultInstanceForType()

public AdaptiveMtTranslateRequest getDefaultInstanceForType()
Returns
TypeDescription
AdaptiveMtTranslateRequest

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
TypeDescription
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
TypeDescription
ByteString

The bytes for parent.

getParserForType()

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

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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