# Cloud Translation V3 Client - Class RomanizeTextRequest (2.3.0)

2.3.0 (latest) 2.2.0 2.1.2 2.0.3 1.21.0 1.20.2 1.19.0 1.18.1 1.17.7 1.16.0 1.15.4 1.14.3 1.13.3 1.12.12 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` | `string[]` 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](https://cloud.google.com/translate/docs/languages#roman). 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** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### 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](https://cloud.google.com/translate/docs/languages#roman). 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](https://cloud.google.com/translate/docs/languages#roman). 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** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-translate/latest/V3.RomanizeTextRequest` |   |