Class: Google::Apis::CustomsearchV1::Promotion::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 promotion.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Image

Returns a new instance of Image.



131
132
133
# File 'generated/google/apis/customsearch_v1/classes.rb', line 131

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

Instance Attribute Details

#heightFixnum

Image height in pixels. Corresponds to the JSON property height

Returns:

  • (Fixnum)


119
120
121
# File 'generated/google/apis/customsearch_v1/classes.rb', line 119

def height
  @height
end

#sourceString

URL of the image for this promotion link. Corresponds to the JSON property source

Returns:

  • (String)


124
125
126
# File 'generated/google/apis/customsearch_v1/classes.rb', line 124

def source
  @source
end

#widthFixnum

Image width in pixels. Corresponds to the JSON property width

Returns:

  • (Fixnum)


129
130
131
# File 'generated/google/apis/customsearch_v1/classes.rb', line 129

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



136
137
138
139
140
# File 'generated/google/apis/customsearch_v1/classes.rb', line 136

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