Class AdaptiveMtTranslateRequest.Builder (2.42.0)

public static final class AdaptiveMtTranslateRequest.Builder extends GeneratedMessageV3.Builder<AdaptiveMtTranslateRequest.Builder> implements AdaptiveMtTranslateRequestOrBuilder

The request for sending an AdaptiveMt translation query.

Protobuf type google.cloud.translation.v3.AdaptiveMtTranslateRequest

Static Methods

getDescriptor()

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

Methods

addAllContent(Iterable<String> values)

public AdaptiveMtTranslateRequest.Builder addAllContent(Iterable<String> values)

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
Name Description
values Iterable<String>

The content to add.

Returns
Type Description
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

addContent(String value)

public AdaptiveMtTranslateRequest.Builder addContent(String value)

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
Name Description
value String

The content to add.

Returns
Type Description
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

addContentBytes(ByteString value)

public AdaptiveMtTranslateRequest.Builder addContentBytes(ByteString value)

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
Name Description
value ByteString

The bytes of the content to add.

Returns
Type Description
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AdaptiveMtTranslateRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AdaptiveMtTranslateRequest.Builder
Overrides

build()

public AdaptiveMtTranslateRequest build()
Returns
Type Description
AdaptiveMtTranslateRequest

buildPartial()

public AdaptiveMtTranslateRequest buildPartial()
Returns
Type Description
AdaptiveMtTranslateRequest

clear()

public AdaptiveMtTranslateRequest.Builder clear()
Returns
Type Description
AdaptiveMtTranslateRequest.Builder
Overrides

clearContent()

public AdaptiveMtTranslateRequest.Builder clearContent()

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
Type Description
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

clearDataset()

public AdaptiveMtTranslateRequest.Builder clearDataset()

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
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public AdaptiveMtTranslateRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AdaptiveMtTranslateRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public AdaptiveMtTranslateRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AdaptiveMtTranslateRequest.Builder
Overrides

clearParent()

public AdaptiveMtTranslateRequest.Builder clearParent()

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
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

clone()

public AdaptiveMtTranslateRequest.Builder clone()
Returns
Type Description
AdaptiveMtTranslateRequest.Builder
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
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. For now only one sentence per request is supported.

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. For now only one sentence per request is supported.

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. For now only one sentence per request is supported.

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AdaptiveMtTranslateRequest other)

public AdaptiveMtTranslateRequest.Builder mergeFrom(AdaptiveMtTranslateRequest other)
Parameter
Name Description
other AdaptiveMtTranslateRequest
Returns
Type Description
AdaptiveMtTranslateRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AdaptiveMtTranslateRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdaptiveMtTranslateRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public AdaptiveMtTranslateRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AdaptiveMtTranslateRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AdaptiveMtTranslateRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AdaptiveMtTranslateRequest.Builder
Overrides

setContent(int index, String value)

public AdaptiveMtTranslateRequest.Builder setContent(int index, String value)

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];

Parameters
Name Description
index int

The index to set the value at.

value String

The content to set.

Returns
Type Description
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

setDataset(String value)

public AdaptiveMtTranslateRequest.Builder setDataset(String value)

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) = { ... }

Parameter
Name Description
value String

The dataset to set.

Returns
Type Description
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

setDatasetBytes(ByteString value)

public AdaptiveMtTranslateRequest.Builder setDatasetBytes(ByteString value)

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) = { ... }

Parameter
Name Description
value ByteString

The bytes for dataset to set.

Returns
Type Description
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public AdaptiveMtTranslateRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AdaptiveMtTranslateRequest.Builder
Overrides

setParent(String value)

public AdaptiveMtTranslateRequest.Builder setParent(String value)

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) = { ... }

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public AdaptiveMtTranslateRequest.Builder setParentBytes(ByteString value)

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) = { ... }

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AdaptiveMtTranslateRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AdaptiveMtTranslateRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final AdaptiveMtTranslateRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AdaptiveMtTranslateRequest.Builder
Overrides