Reference documentation and code samples for the Cloud Translation V3 API class Google::Cloud::Translate::V3::DocumentInputConfig.
A document translation request input config.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#content
defcontent()->::String
Returns
(::String) — Document's content represented as a stream of bytes.
Note: The following fields are mutually exclusive: content, gcs_source. If a field in that set is populated, all other fields in the set will automatically be cleared.
#content=
defcontent=(value)->::String
Parameter
value (::String) — Document's content represented as a stream of bytes.
Note: The following fields are mutually exclusive: content, gcs_source. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::String) — Document's content represented as a stream of bytes.
Note: The following fields are mutually exclusive: content, gcs_source. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: gcs_source, content. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: gcs_source, content. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: gcs_source, content. If a field in that set is populated, all other fields in the set will automatically be cleared.
#mime_type
defmime_type()->::String
Returns
(::String) —
Specifies the input document's mime_type.
If not specified it will be determined using the file extension for
gcs_source provided files. For a file provided through bytes content the
mime_type must be provided.
Currently supported mime types are:
If not specified it will be determined using the file extension for
gcs_source provided files. For a file provided through bytes content the
mime_type must be provided.
Currently supported mime types are:
If not specified it will be determined using the file extension for
gcs_source provided files. For a file provided through bytes content the
mime_type must be provided.
Currently supported mime types are:
[[["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::DocumentInputConfig (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-DocumentInputConfig)\n- [1.5.1](/ruby/docs/reference/google-cloud-translate-v3/1.5.1/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [1.4.1](/ruby/docs/reference/google-cloud-translate-v3/1.4.1/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [1.3.0](/ruby/docs/reference/google-cloud-translate-v3/1.3.0/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [1.2.0](/ruby/docs/reference/google-cloud-translate-v3/1.2.0/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [1.1.1](/ruby/docs/reference/google-cloud-translate-v3/1.1.1/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [1.0.0](/ruby/docs/reference/google-cloud-translate-v3/1.0.0/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [0.12.0](/ruby/docs/reference/google-cloud-translate-v3/0.12.0/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [0.11.2](/ruby/docs/reference/google-cloud-translate-v3/0.11.2/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [0.10.0](/ruby/docs/reference/google-cloud-translate-v3/0.10.0/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [0.9.0](/ruby/docs/reference/google-cloud-translate-v3/0.9.0/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [0.8.0](/ruby/docs/reference/google-cloud-translate-v3/0.8.0/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [0.7.3](/ruby/docs/reference/google-cloud-translate-v3/0.7.3/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [0.6.0](/ruby/docs/reference/google-cloud-translate-v3/0.6.0/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [0.5.2](/ruby/docs/reference/google-cloud-translate-v3/0.5.2/Google-Cloud-Translate-V3-DocumentInputConfig)\n- [0.4.2](/ruby/docs/reference/google-cloud-translate-v3/0.4.2/Google-Cloud-Translate-V3-DocumentInputConfig) \nReference documentation and code samples for the Cloud Translation V3 API class Google::Cloud::Translate::V3::DocumentInputConfig.\n\nA document translation request input config. \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### #content\n\n def content() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Document's content represented as a stream of bytes.\n\n Note: The following fields are mutually exclusive: `content`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #content=\n\n def content=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Document's content represented as a stream of bytes.\n\n\nNote: The following fields are mutually exclusive: `content`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::String) --- Document's content represented as a stream of bytes.\n\n Note: The following fields are mutually exclusive: `content`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.\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)) --- Google Cloud Storage location. This must be a single file. For example: gs://example_bucket/example_file.pdf\n\n\n Note: The following fields are mutually exclusive: `gcs_source`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared.\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)) --- Google Cloud Storage location. This must be a single file. For example: gs://example_bucket/example_file.pdf\n\n\nNote: The following fields are mutually exclusive: `gcs_source`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::Translate::V3::GcsSource](./Google-Cloud-Translate-V3-GcsSource)) --- Google Cloud Storage location. This must be a single file. For example: gs://example_bucket/example_file.pdf\n\n\n Note: The following fields are mutually exclusive: `gcs_source`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #mime_type\n\n def mime_type() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Specifies the input document's mime_type.\n\n If not specified it will be determined using the file extension for\n gcs_source provided files. For a file provided through bytes content the\n mime_type must be provided.\n Currently supported mime types are:\n - application/pdf\n - application/vnd.openxmlformats-officedocument.wordprocessingml.document\n - application/vnd.openxmlformats-officedocument.presentationml.presentation\n - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\n\n### #mime_type=\n\n def mime_type=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) ---\n\n Specifies the input document's mime_type.\n\n If not specified it will be determined using the file extension for\n gcs_source provided files. For a file provided through bytes content the\n mime_type must be provided.\n Currently supported mime types are:\n - application/pdf\n - application/vnd.openxmlformats-officedocument.wordprocessingml.document\n - application/vnd.openxmlformats-officedocument.presentationml.presentation\n- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet \n**Returns**\n\n- (::String) --- Specifies the input document's mime_type.\n\n If not specified it will be determined using the file extension for\n gcs_source provided files. For a file provided through bytes content the\n mime_type must be provided.\n Currently supported mime types are:\n - application/pdf\n - application/vnd.openxmlformats-officedocument.wordprocessingml.document\n - application/vnd.openxmlformats-officedocument.presentationml.presentation\n - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]]