Class InputConfig (3.15.4)

InputConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Input configuration for BatchTranslateText request.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

Name Description
mime_type str
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.
gcs_source google.cloud.translate_v3.types.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. This field is a member of oneof_ source.