(::Google::Cloud::Translate::V3::GcsSource) — Required. Google Cloud Storage location for the source input.
This can be a single file (for example,
gs://translation-test/input.tsv) or a wildcard (for example,
gs://translation-test/*). If a file extension is .tsv, it can
contain either one or two columns. The first column (optional) is the id
of the text request. If the first column is missing, we use the row
number (0-based) from the input file as the ID in the output file. The
second column is the actual text to be
translated. We recommend each row be <= 10K Unicode codepoints,
otherwise an error might be returned.
Note that the input tsv must be RFC 4180 compliant.
You could use https://github.com/Clever/csvlint to check potential
formatting errors in your tsv file.
csvlint --delimiter='\t' your_input_file.tsv
The other supported file extensions are .txt or .html, which is
treated as a single large chunk of text.
value (::Google::Cloud::Translate::V3::GcsSource) — Required. Google Cloud Storage location for the source input.
This can be a single file (for example,
gs://translation-test/input.tsv) or a wildcard (for example,
gs://translation-test/*). If a file extension is .tsv, it can
contain either one or two columns. The first column (optional) is the id
of the text request. If the first column is missing, we use the row
number (0-based) from the input file as the ID in the output file. The
second column is the actual text to be
translated. We recommend each row be <= 10K Unicode codepoints,
otherwise an error might be returned.
Note that the input tsv must be RFC 4180 compliant.
You could use https://github.com/Clever/csvlint to check potential
formatting errors in your tsv file.
csvlint --delimiter='\t' your_input_file.tsv
The other supported file extensions are .txt or .html, which is
treated as a single large chunk of text.
Returns
(::Google::Cloud::Translate::V3::GcsSource) — Required. Google Cloud Storage location for the source input.
This can be a single file (for example,
gs://translation-test/input.tsv) or a wildcard (for example,
gs://translation-test/*). If a file extension is .tsv, it can
contain either one or two columns. The first column (optional) is the id
of the text request. If the first column is missing, we use the row
number (0-based) from the input file as the ID in the output file. The
second column is the actual text to be
translated. We recommend each row be <= 10K Unicode codepoints,
otherwise an error might be returned.
Note that the input tsv must be RFC 4180 compliant.
You could use https://github.com/Clever/csvlint to check potential
formatting errors in your tsv file.
csvlint --delimiter='\t' your_input_file.tsv
The other supported file extensions are .txt or .html, which is
treated as a single large chunk of text.
#mime_type
defmime_type()->::String
Returns
(::String) — Optional. Can be "text/plain" or "text/html".
For .tsv, "text/html" is used if mime_type is missing.
For .html, this field must be "text/html" or empty.
For .txt, this field must be "text/plain" or empty.
#mime_type=
defmime_type=(value)->::String
Parameter
value (::String) — Optional. Can be "text/plain" or "text/html".
For .tsv, "text/html" is used if mime_type is missing.
For .html, this field must be "text/html" or empty.
For .txt, this field must be "text/plain" or empty.
Returns
(::String) — Optional. Can be "text/plain" or "text/html".
For .tsv, "text/html" is used if mime_type is missing.
For .html, this field must be "text/html" or empty.
For .txt, this field must be "text/plain" or empty.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud Translation V3 API - Class Google::Cloud::Translate::V3::InputConfig (v1.5.2)\n\nVersion latestkeyboard_arrow_down\n\n- [1.5.2 (latest)](/ruby/docs/reference/google-cloud-translate-v3/latest/Google-Cloud-Translate-V3-InputConfig)\n- [1.5.1](/ruby/docs/reference/google-cloud-translate-v3/1.5.1/Google-Cloud-Translate-V3-InputConfig)\n- [1.4.1](/ruby/docs/reference/google-cloud-translate-v3/1.4.1/Google-Cloud-Translate-V3-InputConfig)\n- [1.3.0](/ruby/docs/reference/google-cloud-translate-v3/1.3.0/Google-Cloud-Translate-V3-InputConfig)\n- [1.2.0](/ruby/docs/reference/google-cloud-translate-v3/1.2.0/Google-Cloud-Translate-V3-InputConfig)\n- [1.1.1](/ruby/docs/reference/google-cloud-translate-v3/1.1.1/Google-Cloud-Translate-V3-InputConfig)\n- [1.0.0](/ruby/docs/reference/google-cloud-translate-v3/1.0.0/Google-Cloud-Translate-V3-InputConfig)\n- [0.12.0](/ruby/docs/reference/google-cloud-translate-v3/0.12.0/Google-Cloud-Translate-V3-InputConfig)\n- [0.11.2](/ruby/docs/reference/google-cloud-translate-v3/0.11.2/Google-Cloud-Translate-V3-InputConfig)\n- [0.10.0](/ruby/docs/reference/google-cloud-translate-v3/0.10.0/Google-Cloud-Translate-V3-InputConfig)\n- [0.9.0](/ruby/docs/reference/google-cloud-translate-v3/0.9.0/Google-Cloud-Translate-V3-InputConfig)\n- [0.8.0](/ruby/docs/reference/google-cloud-translate-v3/0.8.0/Google-Cloud-Translate-V3-InputConfig)\n- [0.7.3](/ruby/docs/reference/google-cloud-translate-v3/0.7.3/Google-Cloud-Translate-V3-InputConfig)\n- [0.6.0](/ruby/docs/reference/google-cloud-translate-v3/0.6.0/Google-Cloud-Translate-V3-InputConfig)\n- [0.5.2](/ruby/docs/reference/google-cloud-translate-v3/0.5.2/Google-Cloud-Translate-V3-InputConfig)\n- [0.4.2](/ruby/docs/reference/google-cloud-translate-v3/0.4.2/Google-Cloud-Translate-V3-InputConfig) \nReference documentation and code samples for the Cloud Translation V3 API class Google::Cloud::Translate::V3::InputConfig.\n\nInput configuration for BatchTranslateText request. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #gcs_source\n\n def gcs_source() -\u003e ::Google::Cloud::Translate::V3::GcsSource\n\n**Returns**\n\n- ([::Google::Cloud::Translate::V3::GcsSource](./Google-Cloud-Translate-V3-GcsSource)) --- Required. Google Cloud Storage location for the source input. This can be a single file (for example, `gs://translation-test/input.tsv`) or a wildcard (for example, `gs://translation-test/*`). If a file extension is `.tsv`, it can contain either one or two columns. The first column (optional) is the id of the text request. If the first column is missing, we use the row number (0-based) from the input file as the ID in the output file. The second column is the actual text to be translated. We recommend each row be \\\u003c= 10K Unicode codepoints, otherwise an error might be returned. Note that the input tsv must be RFC 4180 compliant.\n\n\n You could use https://github.com/Clever/csvlint to check potential\n formatting errors in your tsv file.\n csvlint --delimiter='\\\\t' your_input_file.tsv\n\n The other supported file extensions are `.txt` or `.html`, which is\n treated as a single large chunk of text.\n\n### #gcs_source=\n\n def gcs_source=(value) -\u003e ::Google::Cloud::Translate::V3::GcsSource\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Translate::V3::GcsSource](./Google-Cloud-Translate-V3-GcsSource)) --- Required. Google Cloud Storage location for the source input. This can be a single file (for example, `gs://translation-test/input.tsv`) or a wildcard (for example, `gs://translation-test/*`). If a file extension is `.tsv`, it can contain either one or two columns. The first column (optional) is the id of the text request. If the first column is missing, we use the row number (0-based) from the input file as the ID in the output file. The second column is the actual text to be translated. We recommend each row be \\\u003c= 10K Unicode codepoints, otherwise an error might be returned. Note that the input tsv must be RFC 4180 compliant.\n\n\n You could use https://github.com/Clever/csvlint to check potential\n formatting errors in your tsv file.\n csvlint --delimiter='\\\\t' your_input_file.tsv\n\n The other supported file extensions are `.txt` or `.html`, which is\ntreated as a single large chunk of text. \n**Returns**\n\n- ([::Google::Cloud::Translate::V3::GcsSource](./Google-Cloud-Translate-V3-GcsSource)) --- Required. Google Cloud Storage location for the source input. This can be a single file (for example, `gs://translation-test/input.tsv`) or a wildcard (for example, `gs://translation-test/*`). If a file extension is `.tsv`, it can contain either one or two columns. The first column (optional) is the id of the text request. If the first column is missing, we use the row number (0-based) from the input file as the ID in the output file. The second column is the actual text to be translated. We recommend each row be \\\u003c= 10K Unicode codepoints, otherwise an error might be returned. Note that the input tsv must be RFC 4180 compliant.\n\n\n You could use https://github.com/Clever/csvlint to check potential\n formatting errors in your tsv file.\n csvlint --delimiter='\\\\t' your_input_file.tsv\n\n The other supported file extensions are `.txt` or `.html`, which is\n treated as a single large chunk of text.\n\n### #mime_type\n\n def mime_type() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. Can be \"text/plain\" or \"text/html\". For `.tsv`, \"text/html\" is used if mime_type is missing. For `.html`, this field must be \"text/html\" or empty. For `.txt`, this field must be \"text/plain\" or empty.\n\n### #mime_type=\n\n def mime_type=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. Can be \"text/plain\" or \"text/html\". For `.tsv`, \"text/html\" is used if mime_type is missing. For `.html`, this field must be \"text/html\" or empty. For `.txt`, this field must be \"text/plain\" or empty. \n**Returns**\n\n- (::String) --- Optional. Can be \"text/plain\" or \"text/html\". For `.tsv`, \"text/html\" is used if mime_type is missing. For `.html`, this field must be \"text/html\" or empty. For `.txt`, this field must be \"text/plain\" or empty."]]