Class RomanizeTextRequest.Builder (2.51.0)

public static final class RomanizeTextRequest.Builder extends GeneratedMessageV3.Builder<RomanizeTextRequest.Builder> implements RomanizeTextRequestOrBuilder

The request message for synchronous romanization.

Protobuf type google.cloud.translation.v3.RomanizeTextRequest

Static Methods

getDescriptor()

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

Methods

addAllContents(Iterable<String> values)

public RomanizeTextRequest.Builder addAllContents(Iterable<String> values)

Required. The content of the input in string format.

repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<String>

The contents to add.

Returns
Type Description
RomanizeTextRequest.Builder

This builder for chaining.

addContents(String value)

public RomanizeTextRequest.Builder addContents(String value)

Required. The content of the input in string format.

repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The contents to add.

Returns
Type Description
RomanizeTextRequest.Builder

This builder for chaining.

addContentsBytes(ByteString value)

public RomanizeTextRequest.Builder addContentsBytes(ByteString value)

Required. The content of the input in string format.

repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes of the contents to add.

Returns
Type Description
RomanizeTextRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public RomanizeTextRequest build()
Returns
Type Description
RomanizeTextRequest

buildPartial()

public RomanizeTextRequest buildPartial()
Returns
Type Description
RomanizeTextRequest

clear()

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

clearContents()

public RomanizeTextRequest.Builder clearContents()

Required. The content of the input in string format.

repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RomanizeTextRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearParent()

public RomanizeTextRequest.Builder clearParent()

Required. Project or location to make a call. Must refer to a caller's project.

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

For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.

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

Returns
Type Description
RomanizeTextRequest.Builder

This builder for chaining.

clearSourceLanguageCode()

public RomanizeTextRequest.Builder clearSourceLanguageCode()

Optional. The ISO-639 language code of the input text if known, for example, "hi" or "zh". If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language for each content in the response.

string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
RomanizeTextRequest.Builder

This builder for chaining.

clone()

public RomanizeTextRequest.Builder clone()
Returns
Type Description
RomanizeTextRequest.Builder
Overrides

getContents(int index)

public String getContents(int index)

Required. The content of the input in string format.

repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The contents at the given index.

getContentsBytes(int index)

public ByteString getContentsBytes(int index)

Required. The content of the input in string format.

repeated string contents = 1 [(.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 contents at the given index.

getContentsCount()

public int getContentsCount()

Required. The content of the input in string format.

repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of contents.

getContentsList()

public ProtocolStringList getContentsList()

Required. The content of the input in string format.

repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProtocolStringList

A list containing the contents.

getDefaultInstanceForType()

public RomanizeTextRequest getDefaultInstanceForType()
Returns
Type Description
RomanizeTextRequest

getDescriptorForType()

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

getParent()

public String getParent()

Required. Project or location to make a call. Must refer to a caller's project.

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

For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.

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

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. Project or location to make a call. Must refer to a caller's project.

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

For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.

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

Returns
Type Description
ByteString

The bytes for parent.

getSourceLanguageCode()

public String getSourceLanguageCode()

Optional. The ISO-639 language code of the input text if known, for example, "hi" or "zh". If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language for each content in the response.

string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The sourceLanguageCode.

getSourceLanguageCodeBytes()

public ByteString getSourceLanguageCodeBytes()

Optional. The ISO-639 language code of the input text if known, for example, "hi" or "zh". If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language for each content in the response.

string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for sourceLanguageCode.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(RomanizeTextRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setContents(int index, String value)

public RomanizeTextRequest.Builder setContents(int index, String value)

Required. The content of the input in string format.

repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value String

The contents to set.

Returns
Type Description
RomanizeTextRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setParent(String value)

public RomanizeTextRequest.Builder setParent(String value)

Required. Project or location to make a call. Must refer to a caller's project.

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

For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.

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

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
RomanizeTextRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public RomanizeTextRequest.Builder setParentBytes(ByteString value)

Required. Project or location to make a call. Must refer to a caller's project.

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

For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.

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

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
RomanizeTextRequest.Builder

This builder for chaining.

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

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

setSourceLanguageCode(String value)

public RomanizeTextRequest.Builder setSourceLanguageCode(String value)

Optional. The ISO-639 language code of the input text if known, for example, "hi" or "zh". If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language for each content in the response.

string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The sourceLanguageCode to set.

Returns
Type Description
RomanizeTextRequest.Builder

This builder for chaining.

setSourceLanguageCodeBytes(ByteString value)

public RomanizeTextRequest.Builder setSourceLanguageCodeBytes(ByteString value)

Optional. The ISO-639 language code of the input text if known, for example, "hi" or "zh". If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language for each content in the response.

string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for sourceLanguageCode to set.

Returns
Type Description
RomanizeTextRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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