Class: Google::Apis::ChatV1::GoogleAppsCardV1Icon

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 icon displayed in a widget on a card. Supports built-in and custom icons.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1Icon

Returns a new instance of GoogleAppsCardV1Icon.



1904
1905
1906
# File 'lib/google/apis/chat_v1/classes.rb', line 1904

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

Instance Attribute Details

#alt_textString

Optional. A description of the icon used for accessibility. If unspecified, the default value Button is provided. As a best practice, you should set a helpful description for what the icon displays, and if applicable, what it does. For example, A user's account portrait, or Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers. google.com/chat. If the icon is set in a Button, the altText appears as helper text when the user hovers over the button. However, if the button also sets text, the icon's altText is ignored. Corresponds to the JSON property altText

Returns:

  • (String)


1881
1882
1883
# File 'lib/google/apis/chat_v1/classes.rb', line 1881

def alt_text
  @alt_text
end

#icon_urlString

Display a custom icon hosted at an HTTPS URL. For example: "iconUrl": " https://developers.google.com/chat/images/quickstart-app-avatar.png" Supported file types include .png and .jpg. Corresponds to the JSON property iconUrl

Returns:

  • (String)


1888
1889
1890
# File 'lib/google/apis/chat_v1/classes.rb', line 1888

def icon_url
  @icon_url
end

#image_typeString

The crop style applied to the image. In some cases, applying a CIRCLE crop causes the image to be drawn larger than a built-in icon. Corresponds to the JSON property imageType

Returns:

  • (String)


1894
1895
1896
# File 'lib/google/apis/chat_v1/classes.rb', line 1894

def image_type
  @image_type
end

#known_iconString

Display one of the built-in icons provided by Google Workspace. For example, to display an airplane icon, specify AIRPLANE. For a bus, specify BUS. For a full list of supported icons, see built-in icons. Corresponds to the JSON property knownIcon

Returns:

  • (String)


1902
1903
1904
# File 'lib/google/apis/chat_v1/classes.rb', line 1902

def known_icon
  @known_icon
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1909
1910
1911
1912
1913
1914
# File 'lib/google/apis/chat_v1/classes.rb', line 1909

def update!(**args)
  @alt_text = args[:alt_text] if args.key?(:alt_text)
  @icon_url = args[:icon_url] if args.key?(:icon_url)
  @image_type = args[:image_type] if args.key?(:image_type)
  @known_icon = args[:known_icon] if args.key?(:known_icon)
end