Class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1Image

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

Overview

Client image to perform Google Cloud Vision API tasks over.

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) ⇒ GoogleCloudVisionV1p1beta1Image

Returns a new instance of GoogleCloudVisionV1p1beta1Image



920
921
922
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 920

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. Corresponds to the JSON property content NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


913
914
915
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 913

def content
  @content
end

#sourceGoogle::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1ImageSource

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



918
919
920
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 918

def source
  @source
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



925
926
927
928
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 925

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