Class: Google::Apis::ChatV1::GoogleAppsCardV1Icon
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::GoogleAppsCardV1Icon
- 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. For an example in Google Chat apps, see Add an icon. Supports built-in and custom icons. Google Workspace add-ons and Chat apps:
Instance Attribute Summary collapse
-
#alt_text ⇒ String
Optional.
-
#icon_url ⇒ String
Display a custom icon hosted at an HTTPS URL.
-
#image_type ⇒ String
The crop style applied to the image.
-
#known_icon ⇒ String
Display one of the built-in icons provided by Google Workspace.
-
#material_icon ⇒ Google::Apis::ChatV1::GoogleAppsCardV1MaterialIcon
A Google Material Icon, which includes over 2500+ options.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleAppsCardV1Icon
constructor
A new instance of GoogleAppsCardV1Icon.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleAppsCardV1Icon
Returns a new instance of GoogleAppsCardV1Icon.
3006 3007 3008 |
# File 'lib/google/apis/chat_v1/classes.rb', line 3006 def initialize(**args) update!(**args) end |
Instance Attribute Details
#alt_text ⇒ String
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/workspace/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
2973 2974 2975 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2973 def alt_text @alt_text end |
#icon_url ⇒ String
Display a custom icon hosted at an HTTPS URL. For example: "iconUrl": "
https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png"
Supported file types include .png and .jpg.
Corresponds to the JSON property iconUrl
2980 2981 2982 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2980 def icon_url @icon_url end |
#image_type ⇒ String
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
2986 2987 2988 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2986 def image_type @image_type end |
#known_icon ⇒ String
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
2994 2995 2996 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2994 def known_icon @known_icon end |
#material_icon ⇒ Google::Apis::ChatV1::GoogleAppsCardV1MaterialIcon
A Google Material Icon, which includes over
2500+ options. For example, to display a checkbox icon with customized weight and grade, write the
following: ` "name": "check_box", "fill": true, "weight": 300, "grade": -
25 ` Google Chat apps:
Corresponds to the JSON property materialIcon
3004 3005 3006 |
# File 'lib/google/apis/chat_v1/classes.rb', line 3004 def material_icon @material_icon end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3011 3012 3013 3014 3015 3016 3017 |
# File 'lib/google/apis/chat_v1/classes.rb', line 3011 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) @material_icon = args[:material_icon] if args.key?(:material_icon) end |