Class: Google::Apis::VisionV1::InputConfig

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

Overview

The desired input location and metadata.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ InputConfig

Returns a new instance of InputConfig.



9297
9298
9299
# File 'generated/google/apis/vision_v1/classes.rb', line 9297

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

Instance Attribute Details

#contentString

File content, represented as a stream of bytes. Note: As with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests. Corresponds to the JSON property content NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


9284
9285
9286
# File 'generated/google/apis/vision_v1/classes.rb', line 9284

def content
  @content
end

#gcs_sourceGoogle::Apis::VisionV1::GcsSource

The Google Cloud Storage location where the input will be read from. Corresponds to the JSON property gcsSource



9289
9290
9291
# File 'generated/google/apis/vision_v1/classes.rb', line 9289

def gcs_source
  @gcs_source
end

#mime_typeString

The type of the file. Currently only "application/pdf", "image/tiff" and "image/gif" are supported. Wildcards are not supported. Corresponds to the JSON property mimeType

Returns:

  • (String)


9295
9296
9297
# File 'generated/google/apis/vision_v1/classes.rb', line 9295

def mime_type
  @mime_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9302
9303
9304
9305
9306
# File 'generated/google/apis/vision_v1/classes.rb', line 9302

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