Class: Google::Apis::VisionV1::Image

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

Overview

Client image to perform Google Cloud Vision API tasks over.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Image

Returns a new instance of Image.

[View source]

8534
8535
8536
# File 'lib/google/apis/vision_v1/classes.rb', line 8534

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

Instance Attribute Details

#contentString

Image 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 BatchAnnotateImages requests. It does not work for AsyncBatchAnnotateImages requests. Corresponds to the JSON property content NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)

8527
8528
8529
# File 'lib/google/apis/vision_v1/classes.rb', line 8527

def content
  @content
end

#sourceGoogle::Apis::VisionV1::ImageSource

External image source (Google Cloud Storage or web URL image location). Corresponds to the JSON property source


8532
8533
8534
# File 'lib/google/apis/vision_v1/classes.rb', line 8532

def source
  @source
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object

[View source]

8539
8540
8541
8542
# File 'lib/google/apis/vision_v1/classes.rb', line 8539

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