Class AdaptiveMtTranslateRequest.Builder (2.33.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
TypeDescription
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
NameDescription
valuesIterable<String>

The content to add.

Returns
TypeDescription
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
NameDescription
valueString

The content to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the content to add.

Returns
TypeDescription
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AdaptiveMtTranslateRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AdaptiveMtTranslateRequest.Builder
Overrides

build()

public AdaptiveMtTranslateRequest build()
Returns
TypeDescription
AdaptiveMtTranslateRequest

buildPartial()

public AdaptiveMtTranslateRequest buildPartial()
Returns
TypeDescription
AdaptiveMtTranslateRequest

clear()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public AdaptiveMtTranslateRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
AdaptiveMtTranslateRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public AdaptiveMtTranslateRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

clone()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(AdaptiveMtTranslateRequest other)

public AdaptiveMtTranslateRequest.Builder mergeFrom(AdaptiveMtTranslateRequest other)
Parameter
NameDescription
otherAdaptiveMtTranslateRequest
Returns
TypeDescription
AdaptiveMtTranslateRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AdaptiveMtTranslateRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AdaptiveMtTranslateRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public AdaptiveMtTranslateRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
AdaptiveMtTranslateRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AdaptiveMtTranslateRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The content to set.

Returns
TypeDescription
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
NameDescription
valueString

The dataset to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for dataset to set.

Returns
TypeDescription
AdaptiveMtTranslateRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public AdaptiveMtTranslateRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The parent to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for parent to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
AdaptiveMtTranslateRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final AdaptiveMtTranslateRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AdaptiveMtTranslateRequest.Builder
Overrides