class Google::Apis::ChatV1::GoogleAppsCardV1Card
A card is a UI element that can contain UI widgets such as text and images. For more information, see Cards . For example, the following JSON creates a card that has a header with the name, position, icons, and link for a contact, followed by a section with contact information like email and phone number. “` ` “header”: ` “title”: “Heba Salam”, “subtitle”: “Software Engineer”, “ imageStyle”: “ImageStyle.AVATAR”, “imageUrl”: “example.com/heba_salam. png”, “imageAltText”: “Avatar for Heba Salam” `, “sections” : [ ` “header”: “ Contact Info”, “widgets”: [ ` “decorated_text”: ` “icon”: ` “knownIcon”: “ EMAIL” `, “content”: “heba.salam@example.com” ` `, ` “decoratedText”: ` “icon”: ` “knownIcon”: “PERSON” `, “content”: “Online” ` `, ` “decoratedText”: ` “ icon”: ` “knownIcon”: “PHONE” `, “content”: “+1 (555) 555-1234” ` `, ` “ buttons”: [ ` “textButton”: ` “text”: “Share”, `, “onClick”: ` “openLink”: ` “ url”: “example.com/share” ` ` `, ` “textButton”: ` “text”: “Edit”, `, “ onClick”: ` “action”: ` “function”: “goToView”, “parameters”: [ ` “key”: “ viewType”, “value”: “EDIT” ` ], “loadIndicator”: “LoadIndicator.SPINNER” ` ` ` ] ` ], “collapsible”: true, “uncollapsibleWidgetsCount”: 3 ` ], “cardActions”: [ ` “actionLabel”: “Send Feedback”, “onClick”: ` “openLink”: ` “url”: “https:// example.com/feedback” ` ` ` ], “name”: “contact-card-K3wB6arF2H9L” ` “`
Attributes
The actions of this card. They are added to a card's generated toolbar menu. For example, the following JSON constructs a card action menu with Settings and Send Feedback options: “` “card_actions”: [ ` “actionLabel”: “Setting”, “ onClick”: ` “action”: ` “functionName”: “goToView”, “parameters”: [ ` “key”: “ viewType”, “value”: “SETTING” ` ], “loadIndicator”: “LoadIndicator.SPINNER” ` ` `, ` “actionLabel”: “Send Feedback”, “onClick”: ` “openLink”: ` “url”: “https: //example.com/feedback” ` ` ` ] “` Corresponds to the JSON property `cardActions` @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1CardAction>]
The display style for peekCardHeader. Corresponds to the JSON property `displayStyle` @return [String]
The header of the card. A header usually contains a title and an image. Corresponds to the JSON property `header` @return [Google::Apis::ChatV1::GoogleAppsCardV1CardHeader]
Name of the card, which is used as a identifier for the card in card navigation. Corresponds to the JSON property `name` @return [String]
When displaying contextual content, the peek card header acts as a placeholder so that the user can navigate forward between the homepage cards and the contextual cards. Corresponds to the JSON property `peekCardHeader` @return [Google::Apis::ChatV1::GoogleAppsCardV1CardHeader]
Sections are separated by a line divider. Corresponds to the JSON property `sections` @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1Section>]
Public Class Methods
# File lib/google/apis/chat_v1/classes.rb, line 1137 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File lib/google/apis/chat_v1/classes.rb, line 1142 def update!(**args) @card_actions = args[:card_actions] if args.key?(:card_actions) @display_style = args[:display_style] if args.key?(:display_style) @fixed_footer = args[:fixed_footer] if args.key?(:fixed_footer) @header = args[:header] if args.key?(:header) @name = args[:name] if args.key?(:name) @peek_card_header = args[:peek_card_header] if args.key?(:peek_card_header) @sections = args[:sections] if args.key?(:sections) end