Class: Google::Apis::PagespeedonlineV2::Image

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Image

Returns a new instance of Image



211
212
213
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 211

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

Instance Attribute Details

#dataString

Image data base64 encoded. Corresponds to the JSON property data NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


183
184
185
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 183

def data
  @data
end

#heightFixnum

Height of screenshot in pixels. Corresponds to the JSON property height

Returns:

  • (Fixnum)


188
189
190
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 188

def height
  @height
end

#keyString

Unique string key, if any, identifying this image. Corresponds to the JSON property key

Returns:

  • (String)


193
194
195
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 193

def key
  @key
end

#mime_typeString

Mime type of image data (e.g. "image/jpeg"). Corresponds to the JSON property mime_type

Returns:

  • (String)


198
199
200
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 198

def mime_type
  @mime_type
end

#page_rectGoogle::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



204
205
206
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 204

def page_rect
  @page_rect
end

#widthFixnum

Width of screenshot in pixels. Corresponds to the JSON property width

Returns:

  • (Fixnum)


209
210
211
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 209

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



216
217
218
219
220
221
222
223
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 216

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