Class: Google::Apis::CloudsearchV1::Image

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Image

Returns a new instance of Image.



11341
11342
11343
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 11341

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

Instance Attribute Details

#alt_textString

The alternative text of this image which will be used for accessibility. Corresponds to the JSON property altText

Returns:

  • (String)


11323
11324
11325
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 11323

def alt_text
  @alt_text
end

#aspect_ratioFloat

The aspect ratio of this image (width/height). Corresponds to the JSON property aspectRatio

Returns:

  • (Float)


11328
11329
11330
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 11328

def aspect_ratio
  @aspect_ratio
end

#image_urlString

Image url specified by developers. Server side, we will wrap with FIFE so client apps can configure size/cropping/etc. Corresponds to the JSON property imageUrl

Returns:

  • (String)


11334
11335
11336
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 11334

def image_url
  @image_url
end

#on_clickGoogle::Apis::CloudsearchV1::OnClick

Corresponds to the JSON property onClick



11339
11340
11341
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 11339

def on_click
  @on_click
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11346
11347
11348
11349
11350
11351
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 11346

def update!(**args)
  @alt_text = args[:alt_text] if args.key?(:alt_text)
  @aspect_ratio = args[:aspect_ratio] if args.key?(:aspect_ratio)
  @image_url = args[:image_url] if args.key?(:image_url)
  @on_click = args[:on_click] if args.key?(:on_click)
end