GoogleApi.Chat.V1.Model.GoogleAppsCardV1Widget (google_api_chat v0.27.0) View Source
A widget is a UI element that presents texts, images, etc.
Attributes
-
buttonList(type:GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList.t, default:nil) - A list of buttons. For example, the following JSON creates two buttons. The first is a filled text button and the second is an image button that opens a link:"buttonList": { "buttons": [ "button": { "text": "Edit", "Color": { "Red": 255 "Green": 255 "Blue": 255 } "disabled": true }, "button": { "icon": { "knownIcon": "INVITE" "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } }, ] } -
dateTimePicker(type:GoogleApi.Chat.V1.Model.GoogleAppsCardV1DateTimePicker.t, default:nil) - Displays a selection/input widget for date/time. For example, the following JSON creates a date/time picker for an appointment time:"date_time_picker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DateTimePickerType.DATE_AND_TIME", "valueMsEpoch": "796435200000" } -
decoratedText(type:GoogleApi.Chat.V1.Model.GoogleAppsCardV1DecoratedText.t, default:nil) - Displays a decorated text item in this widget. For example, the following JSON creates a decorated text widget showing email address:"decoratedText": { "icon": { "knownIcon": "EMAIL" }, "topLabel": "Email Address", "content": "heba.salam@example.com", "bottomLabel": "This is a new Email address!", "switchWidget": { "name": "has_send_welcome_email_to_heba_salam", "selected": false, "controlType": "ControlType.CHECKBOX" } } -
divider(type:GoogleApi.Chat.V1.Model.GoogleAppsCardV1Divider.t, default:nil) - Displays a divider. For example, the following JSON creates a divider:"divider": { } -
grid(type:GoogleApi.Chat.V1.Model.GoogleAppsCardV1Grid.t, default:nil) - Displays a grid with a collection of items. For example, the following JSON creates a 2 column grid with a single item:"grid": { "title": "A fine collection of items", "numColumns": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4.0 }, "items": [ "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" ], "onClick": { "openLink": { "url":"https://www.example.com" } } } -
horizontalAlignment(type:String.t, default:nil) - The horizontal alignment of this widget. -
image(type:GoogleApi.Chat.V1.Model.GoogleAppsCardV1Image.t, default:nil) - Displays an image in this widget. For example, the following JSON creates an image with alternative text:"image": { "imageUrl": "https://example.com/heba_salam.png" "altText": "Avatar for Heba Salam" } -
selectionInput(type:GoogleApi.Chat.V1.Model.GoogleAppsCardV1SelectionInput.t, default:nil) - Displays a switch control in this widget. For example, the following JSON creates a dropdown selection for size:"switchControl": { "name": "size", "label": "Size" "type": "SelectionType.DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } -
textInput(type:GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextInput.t, default:nil) - Displays a text input in this widget. For example, the following JSON creates a text input for mail address:"textInput": { "name": "mailing_address", "label": "Mailing Address" }As another example, the following JSON creates a text input for programming language with static suggestions:"textInput": { "name": "preferred_programing_language", "label": "Preferred Language", "initialSuggestions": { "items": [ { "text": "C++" }, { "text": "Java" }, { "text": "JavaScript" }, { "text": "Python" } ] } } -
textParagraph(type:GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextParagraph.t, default:nil) - Displays a text paragraph in this widget. For example, the following JSON creates a bolded text:"textParagraph": { "text": " *bold text*" }
Link to this section Summary
Functions
Unwrap a decoded JSON object into its complex fields.
Link to this section Types
Specs
t() :: %GoogleApi.Chat.V1.Model.GoogleAppsCardV1Widget{
buttonList: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList.t() | nil,
dateTimePicker:
GoogleApi.Chat.V1.Model.GoogleAppsCardV1DateTimePicker.t() | nil,
decoratedText:
GoogleApi.Chat.V1.Model.GoogleAppsCardV1DecoratedText.t() | nil,
divider: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Divider.t() | nil,
grid: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Grid.t() | nil,
horizontalAlignment: String.t() | nil,
image: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Image.t() | nil,
selectionInput:
GoogleApi.Chat.V1.Model.GoogleAppsCardV1SelectionInput.t() | nil,
textInput: GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextInput.t() | nil,
textParagraph: GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextParagraph.t() | nil
}
Link to this section Functions
Specs
Unwrap a decoded JSON object into its complex fields.