Class: Google::Apis::PagespeedonlineV2::Image
- Inherits:
-
Object
- Object
- Google::Apis::PagespeedonlineV2::Image
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/pagespeedonline_v2/classes.rb,
generated/google/apis/pagespeedonline_v2/representations.rb,
generated/google/apis/pagespeedonline_v2/representations.rb
Defined Under Namespace
Classes: PageRect
Instance Attribute Summary collapse
-
#data ⇒ String
Image data base64 encoded.
-
#height ⇒ Fixnum
Height of screenshot in pixels.
-
#key ⇒ String
Unique string key, if any, identifying this image.
-
#mime_type ⇒ String
Mime type of image data (e.g. "image/jpeg").
-
#page_rect ⇒ Google::Apis::PagespeedonlineV2::Image::PageRect
The region of the page that is captured by this image, with dimensions measured in CSS pixels.
-
#width ⇒ Fixnum
Width of screenshot in pixels.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Image
constructor
A new instance of Image.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Image
Returns a new instance of Image.
210 211 212 |
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 210 def initialize(**args) update!(**args) end |
Instance Attribute Details
#data ⇒ String
Image data base64 encoded.
Corresponds to the JSON property data
182 183 184 |
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 182 def data @data end |
#height ⇒ Fixnum
Height of screenshot in pixels.
Corresponds to the JSON property height
187 188 189 |
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 187 def height @height end |
#key ⇒ String
Unique string key, if any, identifying this image.
Corresponds to the JSON property key
192 193 194 |
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 192 def key @key end |
#mime_type ⇒ String
Mime type of image data (e.g. "image/jpeg").
Corresponds to the JSON property mime_type
197 198 199 |
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 197 def mime_type @mime_type end |
#page_rect ⇒ Google::Apis::PagespeedonlineV2::Image::PageRect
The region of the page that is captured by this image, with dimensions
measured in CSS pixels.
Corresponds to the JSON property page_rect
203 204 205 |
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 203 def page_rect @page_rect end |
#width ⇒ Fixnum
Width of screenshot in pixels.
Corresponds to the JSON property width
208 209 210 |
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 208 def width @width end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
215 216 217 218 219 220 221 222 |
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 215 def update!(**args) @data = args[:data] if args.key?(:data) @height = args[:height] if args.key?(:height) @key = args[:key] if args.key?(:key) @mime_type = args[:mime_type] if args.key?(:mime_type) @page_rect = args[:page_rect] if args.key?(:page_rect) @width = args[:width] if args.key?(:width) end |