Class: Google::Apis::ChatV1::GoogleAppsCardV1Image

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

Overview

An image that is specified by a URL and can have an onClick action. For an example, see Image.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1Image

Returns a new instance of GoogleAppsCardV1Image.



2020
2021
2022
# File 'lib/google/apis/chat_v1/classes.rb', line 2020

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

Instance Attribute Details

#alt_textString

The alternative text of this image that's used for accessibility. Corresponds to the JSON property altText

Returns:

  • (String)


2006
2007
2008
# File 'lib/google/apis/chat_v1/classes.rb', line 2006

def alt_text
  @alt_text
end

#image_urlString

The HTTPS URL that hosts the image. For example: https://developers.google. com/chat/images/quickstart-app-avatar.png Corresponds to the JSON property imageUrl

Returns:

  • (String)


2012
2013
2014
# File 'lib/google/apis/chat_v1/classes.rb', line 2012

def image_url
  @image_url
end

#on_clickGoogle::Apis::ChatV1::GoogleAppsCardV1OnClick

Represents how to respond when users click an interactive element on a card, such as a button. Corresponds to the JSON property onClick



2018
2019
2020
# File 'lib/google/apis/chat_v1/classes.rb', line 2018

def on_click
  @on_click
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2025
2026
2027
2028
2029
# File 'lib/google/apis/chat_v1/classes.rb', line 2025

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