Class: Google::Apps::Card::V1::Icon
- Inherits:
-
Object
- Object
- Google::Apps::Card::V1::Icon
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/apps/card/v1/card.rb
Overview
An icon displayed in a widget on a card. For an example in Google Chat apps, see Add an icon.
Instance Attribute Summary collapse
-
#alt_text ⇒ ::String
Optional.
-
#icon_url ⇒ ::String
Display a custom icon hosted at an HTTPS URL.
-
#image_type ⇒ ::Google::Apps::Card::V1::Widget::ImageType
The crop style applied to the image.
-
#known_icon ⇒ ::String
Display one of the built-in icons provided by Google Workspace.
-
#material_icon ⇒ ::Google::Apps::Card::V1::MaterialIcon
Display one of the Google Material Icons.
Instance Attribute Details
#alt_text ⇒ ::String
Returns 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.
1697 1698 1699 1700 |
# File 'proto_docs/google/apps/card/v1/card.rb', line 1697 class Icon include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#icon_url ⇒ ::String
Returns 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.
Note: The following fields are mutually exclusive: icon_url, known_icon, material_icon. If a field in that set is populated, all other fields in the set will automatically be cleared.
1697 1698 1699 1700 |
# File 'proto_docs/google/apps/card/v1/card.rb', line 1697 class Icon include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#image_type ⇒ ::Google::Apps::Card::V1::Widget::ImageType
Returns 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.
1697 1698 1699 1700 |
# File 'proto_docs/google/apps/card/v1/card.rb', line 1697 class Icon include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#known_icon ⇒ ::String
Returns 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.
Note: The following fields are mutually exclusive: known_icon, icon_url, material_icon. If a field in that set is populated, all other fields in the set will automatically be cleared.
1697 1698 1699 1700 |
# File 'proto_docs/google/apps/card/v1/card.rb', line 1697 class Icon include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#material_icon ⇒ ::Google::Apps::Card::V1::MaterialIcon
Returns Display one of the Google Material Icons.
For example, to display a checkbox icon, use
"material_icon": {
"name": "check_box"
}
Note: The following fields are mutually exclusive: material_icon, known_icon, icon_url. If a field in that set is populated, all other fields in the set will automatically be cleared.
1697 1698 1699 1700 |
# File 'proto_docs/google/apps/card/v1/card.rb', line 1697 class Icon include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |