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

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

Overview

Client image to perform Vision tasks over.

Defined Under Namespace

Classes: Representation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Image

Returns a new instance of Image.



1070
1071
1072
# File 'lib/google/apis/vision_v1/classes.rb', line 1070

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

Instance Attribute Details

#contentString

Image content, represented as a stream of bytes. Corresponds to the JSON property ‘content`

Returns:

  • (String)


1068
1069
1070
# File 'lib/google/apis/vision_v1/classes.rb', line 1068

def content
  @content
end

#sourceGoogle::Apis::VisionV1::ImageSource

External image source (i.e. Google Cloud Storage image location). Corresponds to the JSON property ‘source`



1063
1064
1065
# File 'lib/google/apis/vision_v1/classes.rb', line 1063

def source
  @source
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1075
1076
1077
1078
# File 'lib/google/apis/vision_v1/classes.rb', line 1075

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