Cloud Translation V3 Client - Class RomanizeTextRequest (2.0.2)

Reference documentation and code samples for the Cloud Translation V3 Client class RomanizeTextRequest.

The request message for synchronous romanization.

Generated from protobuf message google.cloud.translation.v3.RomanizeTextRequest

Namespace

Google \ Cloud \ Translate \ V3

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ parent
string

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} .

↳ contents
array

Required. The content of the input in string format.

↳ source_language_code
string

Optional. The ISO-639 language code of the input text if known, for example, "hi" or "zh". Supported language codes are listed in Language Support . 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.

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} .

Returns
Type
Description
string

setParent

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} .

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getContents

Required. The content of the input in string format.

Returns
Type
Description

setContents

Required. The content of the input in string format.

Parameter
Name
Description
var
string[]
Returns
Type
Description
$this

getSourceLanguageCode

Optional. The ISO-639 language code of the input text if known, for example, "hi" or "zh". Supported language codes are listed in Language Support . 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.

Returns
Type
Description
string

setSourceLanguageCode

Optional. The ISO-639 language code of the input text if known, for example, "hi" or "zh". Supported language codes are listed in Language Support . 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.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

static::build

Parameters
Name
Description
parent
string

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} . Please see TranslationServiceClient::locationName() for help formatting this field.

contents
string[]

Required. The content of the input in string format.

Returns
Type
Description
Create a Mobile Website
View Site in Mobile | Classic
Share by: