Class: Google::Apis::TranslateV3beta1::DocumentInputConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/translate_v3beta1/classes.rb,
lib/google/apis/translate_v3beta1/representations.rb,
lib/google/apis/translate_v3beta1/representations.rb

Overview

A document translation request input config.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DocumentInputConfig

Returns a new instance of DocumentInputConfig.



374
375
376
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 374

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#contentString

Document's content represented as a stream of bytes. Corresponds to the JSON property content NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


356
357
358
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 356

def content
  @content
end

#gcs_sourceGoogle::Apis::TranslateV3beta1::GcsSource

The Google Cloud Storage location for the input content. Corresponds to the JSON property gcsSource



361
362
363
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 361

def gcs_source
  @gcs_source
end

#mime_typeString

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 Corresponds to the JSON property mimeType

Returns:

  • (String)


372
373
374
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 372

def mime_type
  @mime_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



379
380
381
382
383
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 379

def update!(**args)
  @content = args[:content] if args.key?(:content)
  @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
  @mime_type = args[:mime_type] if args.key?(:mime_type)
end