Class: Google::Apis::CustomsearchV1::Result::Image

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

Overview

Image belonging to a custom search result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Image

Returns a new instance of Image.



289
290
291
# File 'generated/google/apis/customsearch_v1/classes.rb', line 289

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

Instance Attribute Details

#byte_sizeFixnum

The size of the image, in pixels. Corresponds to the JSON property byteSize

Returns:

  • (Fixnum)


257
258
259
# File 'generated/google/apis/customsearch_v1/classes.rb', line 257

def byte_size
  @byte_size
end

A URL pointing to the webpage hosting the image. Corresponds to the JSON property contextLink

Returns:

  • (String)


262
263
264
# File 'generated/google/apis/customsearch_v1/classes.rb', line 262

def context_link
  @context_link
end

#heightFixnum

The height of the image, in pixels. Corresponds to the JSON property height

Returns:

  • (Fixnum)


267
268
269
# File 'generated/google/apis/customsearch_v1/classes.rb', line 267

def height
  @height
end

#thumbnail_heightFixnum

The height of the thumbnail image, in pixels. Corresponds to the JSON property thumbnailHeight

Returns:

  • (Fixnum)


272
273
274
# File 'generated/google/apis/customsearch_v1/classes.rb', line 272

def thumbnail_height
  @thumbnail_height
end

A URL to the thumbnail image. Corresponds to the JSON property thumbnailLink

Returns:

  • (String)


277
278
279
# File 'generated/google/apis/customsearch_v1/classes.rb', line 277

def thumbnail_link
  @thumbnail_link
end

#thumbnail_widthFixnum

The width of the thumbnail image, in pixels. Corresponds to the JSON property thumbnailWidth

Returns:

  • (Fixnum)


282
283
284
# File 'generated/google/apis/customsearch_v1/classes.rb', line 282

def thumbnail_width
  @thumbnail_width
end

#widthFixnum

The width of the image, in pixels. Corresponds to the JSON property width

Returns:

  • (Fixnum)


287
288
289
# File 'generated/google/apis/customsearch_v1/classes.rb', line 287

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



294
295
296
297
298
299
300
301
302
# File 'generated/google/apis/customsearch_v1/classes.rb', line 294

def update!(**args)
  @byte_size = args[:byte_size] if args.key?(:byte_size)
  @context_link = args[:context_link] if args.key?(:context_link)
  @height = args[:height] if args.key?(:height)
  @thumbnail_height = args[:thumbnail_height] if args.key?(:thumbnail_height)
  @thumbnail_link = args[:thumbnail_link] if args.key?(:thumbnail_link)
  @thumbnail_width = args[:thumbnail_width] if args.key?(:thumbnail_width)
  @width = args[:width] if args.key?(:width)
end