Cloud Translation V3 API - Class Google::Cloud::Translate::V3::DocumentInputConfig (v1.4.0)

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

def content() -> ::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=

def content=(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.

#gcs_source

def gcs_source() -> ::Google::Cloud::Translate::V3::GcsSource
Returns
  • (::Google::Cloud::Translate::V3::GcsSource) — Google Cloud Storage location. This must be a single file. For example: gs://example_bucket/example_file.pdf

    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.

#gcs_source=

def gcs_source=(value) -> ::Google::Cloud::Translate::V3::GcsSource
Parameter
  • value (::Google::Cloud::Translate::V3::GcsSource) — Google Cloud Storage location. This must be a single file. For example: gs://example_bucket/example_file.pdf

    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.

Returns
  • (::Google::Cloud::Translate::V3::GcsSource) — Google Cloud Storage location. This must be a single file. For example: gs://example_bucket/example_file.pdf

    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

def mime_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:

    • application/pdf
    • application/vnd.openxmlformats-officedocument.wordprocessingml.document
    • application/vnd.openxmlformats-officedocument.presentationml.presentation
    • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

#mime_type=

def mime_type=(value) -> ::String
Parameter
  • value (::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:

    • application/pdf
    • application/vnd.openxmlformats-officedocument.wordprocessingml.document
    • application/vnd.openxmlformats-officedocument.presentationml.presentation
    • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
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:

    • application/pdf
    • application/vnd.openxmlformats-officedocument.wordprocessingml.document
    • application/vnd.openxmlformats-officedocument.presentationml.presentation
    • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet