Class: Google::Apps::Chat::V1::WidgetMarkup
- Inherits:
-
Object
- Object
- Google::Apps::Chat::V1::WidgetMarkup
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/chat/v1/widgets.rb
Overview
A widget is a UI element that presents text and images.
Defined Under Namespace
Modules: Icon Classes: Button, FormAction, Image, ImageButton, KeyValue, OnClick, OpenLink, TextButton, TextParagraph
Instance Attribute Summary collapse
-
#buttons ⇒ ::Array<::Google::Apps::Chat::V1::WidgetMarkup::Button>
A list of buttons.
-
#image ⇒ ::Google::Apps::Chat::V1::WidgetMarkup::Image
Display an image in this widget.
-
#key_value ⇒ ::Google::Apps::Chat::V1::WidgetMarkup::KeyValue
Display a key value item in this widget.
-
#text_paragraph ⇒ ::Google::Apps::Chat::V1::WidgetMarkup::TextParagraph
Display a text paragraph in this widget.
Instance Attribute Details
#buttons ⇒ ::Array<::Google::Apps::Chat::V1::WidgetMarkup::Button>
Returns A list of buttons. Buttons is also oneof data
and only one of these
fields should be set.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'proto_docs/google/chat/v1/widgets.rb', line 38 class WidgetMarkup include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A paragraph of text. Formatted text supported. For more information # about formatting text, see # [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] text # @return [::String] class TextParagraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A button. Can be a text button or an image button. # @!attribute [rw] text_button # @return [::Google::Apps::Chat::V1::WidgetMarkup::TextButton] # A button with text and `onclick` action. # @!attribute [rw] image_button # @return [::Google::Apps::Chat::V1::WidgetMarkup::ImageButton] # A button with image and `onclick` action. class Button include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A button with text and `onclick` action. # @!attribute [rw] text # @return [::String] # The text of the button. # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action of the button. class TextButton include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A UI element contains a key (label) and a value (content). This # element can also contain some actions such as `onclick` button. # @!attribute [rw] icon # @return [::Google::Apps::Chat::V1::WidgetMarkup::Icon] # An enum value that's replaced by the Chat API with the # corresponding icon image. # @!attribute [rw] icon_url # @return [::String] # The icon specified by a URL. # @!attribute [rw] top_label # @return [::String] # The text of the top label. Formatted text supported. For more information # about formatting text, see # [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] content # @return [::String] # The text of the content. Formatted text supported and always required. # For more information # about formatting text, see # [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] content_multiline # @return [::Boolean] # If the content should be multiline. # @!attribute [rw] bottom_label # @return [::String] # The text of the bottom label. Formatted text supported. For more # information about formatting text, see [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action. Only the top label, bottom label, and content # region are clickable. # @!attribute [rw] button # @return [::Google::Apps::Chat::V1::WidgetMarkup::Button] # A button that can be clicked to trigger an action. class KeyValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An image that's specified by a URL and can have an `onclick` action. # @!attribute [rw] image_url # @return [::String] # The URL of the image. # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action. # @!attribute [rw] aspect_ratio # @return [::Float] # The aspect ratio of this image (width and height). This field lets you # reserve the right height for the image while waiting for it to load. # It's not meant to override the built-in aspect ratio of the image. # If unset, the server fills it by prefetching the image. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An image button with an `onclick` action. # @!attribute [rw] icon # @return [::Google::Apps::Chat::V1::WidgetMarkup::Icon] # The icon specified by an `enum` that indices to an icon provided by # Chat API. # @!attribute [rw] icon_url # @return [::String] # The icon specified by a URL. # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action. # @!attribute [rw] name # @return [::String] # The name of this `image_button` that's used for accessibility. # Default value is provided if this name isn't specified. class ImageButton include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An `onclick` action (for example, open a link). # @!attribute [rw] action # @return [::Google::Apps::Chat::V1::WidgetMarkup::FormAction] # A form action is triggered by this `onclick` action if specified. # @!attribute [rw] open_link # @return [::Google::Apps::Chat::V1::WidgetMarkup::OpenLink] # This `onclick` action triggers an open link action if specified. class OnClick include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A link that opens a new window. # @!attribute [rw] url # @return [::String] # The URL to open. class OpenLink include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A form action describes the behavior when the form is submitted. # For example, you can invoke Apps Script to handle the form. # @!attribute [rw] action_method_name # @return [::String] # The method name is used to identify which part of the form triggered the # form submission. This information is echoed back to the Chat app as part # of the card click event. You can use the same method name for several # elements that trigger a common behavior. # @!attribute [rw] parameters # @return [::Array<::Google::Apps::Chat::V1::WidgetMarkup::FormAction::ActionParameter>] # List of action parameters. class FormAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # List of string parameters to supply when the action method is invoked. # For example, consider three snooze buttons: snooze now, snooze one day, # snooze next week. You might use `action method = snooze()`, passing the # snooze type and snooze time in the list of string parameters. # @!attribute [rw] key # @return [::String] # The name of the parameter for the action script. # @!attribute [rw] value # @return [::String] # The value of the parameter. class ActionParameter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # The set of supported icons. module Icon ICON_UNSPECIFIED = 0 AIRPLANE = 1 BOOKMARK = 26 BUS = 25 CAR = 9 CLOCK = 2 CONFIRMATION_NUMBER_ICON = 12 DOLLAR = 14 DESCRIPTION = 27 EMAIL = 10 EVENT_PERFORMER = 20 EVENT_SEAT = 21 FLIGHT_ARRIVAL = 16 FLIGHT_DEPARTURE = 15 HOTEL = 6 HOTEL_ROOM_TYPE = 17 INVITE = 19 MAP_PIN = 3 MEMBERSHIP = 24 MULTIPLE_PEOPLE = 18 OFFER = 30 PERSON = 11 PHONE = 13 RESTAURANT_ICON = 7 SHOPPING_CART = 8 STAR = 5 STORE = 22 TICKET = 4 TRAIN = 23 VIDEO_CAMERA = 28 VIDEO_PLAY = 29 end end |
#image ⇒ ::Google::Apps::Chat::V1::WidgetMarkup::Image
Returns Display an image in this widget.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'proto_docs/google/chat/v1/widgets.rb', line 38 class WidgetMarkup include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A paragraph of text. Formatted text supported. For more information # about formatting text, see # [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] text # @return [::String] class TextParagraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A button. Can be a text button or an image button. # @!attribute [rw] text_button # @return [::Google::Apps::Chat::V1::WidgetMarkup::TextButton] # A button with text and `onclick` action. # @!attribute [rw] image_button # @return [::Google::Apps::Chat::V1::WidgetMarkup::ImageButton] # A button with image and `onclick` action. class Button include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A button with text and `onclick` action. # @!attribute [rw] text # @return [::String] # The text of the button. # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action of the button. class TextButton include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A UI element contains a key (label) and a value (content). This # element can also contain some actions such as `onclick` button. # @!attribute [rw] icon # @return [::Google::Apps::Chat::V1::WidgetMarkup::Icon] # An enum value that's replaced by the Chat API with the # corresponding icon image. # @!attribute [rw] icon_url # @return [::String] # The icon specified by a URL. # @!attribute [rw] top_label # @return [::String] # The text of the top label. Formatted text supported. For more information # about formatting text, see # [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] content # @return [::String] # The text of the content. Formatted text supported and always required. # For more information # about formatting text, see # [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] content_multiline # @return [::Boolean] # If the content should be multiline. # @!attribute [rw] bottom_label # @return [::String] # The text of the bottom label. Formatted text supported. For more # information about formatting text, see [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action. Only the top label, bottom label, and content # region are clickable. # @!attribute [rw] button # @return [::Google::Apps::Chat::V1::WidgetMarkup::Button] # A button that can be clicked to trigger an action. class KeyValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An image that's specified by a URL and can have an `onclick` action. # @!attribute [rw] image_url # @return [::String] # The URL of the image. # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action. # @!attribute [rw] aspect_ratio # @return [::Float] # The aspect ratio of this image (width and height). This field lets you # reserve the right height for the image while waiting for it to load. # It's not meant to override the built-in aspect ratio of the image. # If unset, the server fills it by prefetching the image. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An image button with an `onclick` action. # @!attribute [rw] icon # @return [::Google::Apps::Chat::V1::WidgetMarkup::Icon] # The icon specified by an `enum` that indices to an icon provided by # Chat API. # @!attribute [rw] icon_url # @return [::String] # The icon specified by a URL. # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action. # @!attribute [rw] name # @return [::String] # The name of this `image_button` that's used for accessibility. # Default value is provided if this name isn't specified. class ImageButton include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An `onclick` action (for example, open a link). # @!attribute [rw] action # @return [::Google::Apps::Chat::V1::WidgetMarkup::FormAction] # A form action is triggered by this `onclick` action if specified. # @!attribute [rw] open_link # @return [::Google::Apps::Chat::V1::WidgetMarkup::OpenLink] # This `onclick` action triggers an open link action if specified. class OnClick include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A link that opens a new window. # @!attribute [rw] url # @return [::String] # The URL to open. class OpenLink include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A form action describes the behavior when the form is submitted. # For example, you can invoke Apps Script to handle the form. # @!attribute [rw] action_method_name # @return [::String] # The method name is used to identify which part of the form triggered the # form submission. This information is echoed back to the Chat app as part # of the card click event. You can use the same method name for several # elements that trigger a common behavior. # @!attribute [rw] parameters # @return [::Array<::Google::Apps::Chat::V1::WidgetMarkup::FormAction::ActionParameter>] # List of action parameters. class FormAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # List of string parameters to supply when the action method is invoked. # For example, consider three snooze buttons: snooze now, snooze one day, # snooze next week. You might use `action method = snooze()`, passing the # snooze type and snooze time in the list of string parameters. # @!attribute [rw] key # @return [::String] # The name of the parameter for the action script. # @!attribute [rw] value # @return [::String] # The value of the parameter. class ActionParameter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # The set of supported icons. module Icon ICON_UNSPECIFIED = 0 AIRPLANE = 1 BOOKMARK = 26 BUS = 25 CAR = 9 CLOCK = 2 CONFIRMATION_NUMBER_ICON = 12 DOLLAR = 14 DESCRIPTION = 27 EMAIL = 10 EVENT_PERFORMER = 20 EVENT_SEAT = 21 FLIGHT_ARRIVAL = 16 FLIGHT_DEPARTURE = 15 HOTEL = 6 HOTEL_ROOM_TYPE = 17 INVITE = 19 MAP_PIN = 3 MEMBERSHIP = 24 MULTIPLE_PEOPLE = 18 OFFER = 30 PERSON = 11 PHONE = 13 RESTAURANT_ICON = 7 SHOPPING_CART = 8 STAR = 5 STORE = 22 TICKET = 4 TRAIN = 23 VIDEO_CAMERA = 28 VIDEO_PLAY = 29 end end |
#key_value ⇒ ::Google::Apps::Chat::V1::WidgetMarkup::KeyValue
Returns Display a key value item in this widget.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'proto_docs/google/chat/v1/widgets.rb', line 38 class WidgetMarkup include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A paragraph of text. Formatted text supported. For more information # about formatting text, see # [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] text # @return [::String] class TextParagraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A button. Can be a text button or an image button. # @!attribute [rw] text_button # @return [::Google::Apps::Chat::V1::WidgetMarkup::TextButton] # A button with text and `onclick` action. # @!attribute [rw] image_button # @return [::Google::Apps::Chat::V1::WidgetMarkup::ImageButton] # A button with image and `onclick` action. class Button include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A button with text and `onclick` action. # @!attribute [rw] text # @return [::String] # The text of the button. # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action of the button. class TextButton include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A UI element contains a key (label) and a value (content). This # element can also contain some actions such as `onclick` button. # @!attribute [rw] icon # @return [::Google::Apps::Chat::V1::WidgetMarkup::Icon] # An enum value that's replaced by the Chat API with the # corresponding icon image. # @!attribute [rw] icon_url # @return [::String] # The icon specified by a URL. # @!attribute [rw] top_label # @return [::String] # The text of the top label. Formatted text supported. For more information # about formatting text, see # [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] content # @return [::String] # The text of the content. Formatted text supported and always required. # For more information # about formatting text, see # [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] content_multiline # @return [::Boolean] # If the content should be multiline. # @!attribute [rw] bottom_label # @return [::String] # The text of the bottom label. Formatted text supported. For more # information about formatting text, see [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action. Only the top label, bottom label, and content # region are clickable. # @!attribute [rw] button # @return [::Google::Apps::Chat::V1::WidgetMarkup::Button] # A button that can be clicked to trigger an action. class KeyValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An image that's specified by a URL and can have an `onclick` action. # @!attribute [rw] image_url # @return [::String] # The URL of the image. # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action. # @!attribute [rw] aspect_ratio # @return [::Float] # The aspect ratio of this image (width and height). This field lets you # reserve the right height for the image while waiting for it to load. # It's not meant to override the built-in aspect ratio of the image. # If unset, the server fills it by prefetching the image. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An image button with an `onclick` action. # @!attribute [rw] icon # @return [::Google::Apps::Chat::V1::WidgetMarkup::Icon] # The icon specified by an `enum` that indices to an icon provided by # Chat API. # @!attribute [rw] icon_url # @return [::String] # The icon specified by a URL. # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action. # @!attribute [rw] name # @return [::String] # The name of this `image_button` that's used for accessibility. # Default value is provided if this name isn't specified. class ImageButton include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An `onclick` action (for example, open a link). # @!attribute [rw] action # @return [::Google::Apps::Chat::V1::WidgetMarkup::FormAction] # A form action is triggered by this `onclick` action if specified. # @!attribute [rw] open_link # @return [::Google::Apps::Chat::V1::WidgetMarkup::OpenLink] # This `onclick` action triggers an open link action if specified. class OnClick include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A link that opens a new window. # @!attribute [rw] url # @return [::String] # The URL to open. class OpenLink include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A form action describes the behavior when the form is submitted. # For example, you can invoke Apps Script to handle the form. # @!attribute [rw] action_method_name # @return [::String] # The method name is used to identify which part of the form triggered the # form submission. This information is echoed back to the Chat app as part # of the card click event. You can use the same method name for several # elements that trigger a common behavior. # @!attribute [rw] parameters # @return [::Array<::Google::Apps::Chat::V1::WidgetMarkup::FormAction::ActionParameter>] # List of action parameters. class FormAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # List of string parameters to supply when the action method is invoked. # For example, consider three snooze buttons: snooze now, snooze one day, # snooze next week. You might use `action method = snooze()`, passing the # snooze type and snooze time in the list of string parameters. # @!attribute [rw] key # @return [::String] # The name of the parameter for the action script. # @!attribute [rw] value # @return [::String] # The value of the parameter. class ActionParameter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # The set of supported icons. module Icon ICON_UNSPECIFIED = 0 AIRPLANE = 1 BOOKMARK = 26 BUS = 25 CAR = 9 CLOCK = 2 CONFIRMATION_NUMBER_ICON = 12 DOLLAR = 14 DESCRIPTION = 27 EMAIL = 10 EVENT_PERFORMER = 20 EVENT_SEAT = 21 FLIGHT_ARRIVAL = 16 FLIGHT_DEPARTURE = 15 HOTEL = 6 HOTEL_ROOM_TYPE = 17 INVITE = 19 MAP_PIN = 3 MEMBERSHIP = 24 MULTIPLE_PEOPLE = 18 OFFER = 30 PERSON = 11 PHONE = 13 RESTAURANT_ICON = 7 SHOPPING_CART = 8 STAR = 5 STORE = 22 TICKET = 4 TRAIN = 23 VIDEO_CAMERA = 28 VIDEO_PLAY = 29 end end |
#text_paragraph ⇒ ::Google::Apps::Chat::V1::WidgetMarkup::TextParagraph
Returns Display a text paragraph in this widget.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'proto_docs/google/chat/v1/widgets.rb', line 38 class WidgetMarkup include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A paragraph of text. Formatted text supported. For more information # about formatting text, see # [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] text # @return [::String] class TextParagraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A button. Can be a text button or an image button. # @!attribute [rw] text_button # @return [::Google::Apps::Chat::V1::WidgetMarkup::TextButton] # A button with text and `onclick` action. # @!attribute [rw] image_button # @return [::Google::Apps::Chat::V1::WidgetMarkup::ImageButton] # A button with image and `onclick` action. class Button include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A button with text and `onclick` action. # @!attribute [rw] text # @return [::String] # The text of the button. # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action of the button. class TextButton include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A UI element contains a key (label) and a value (content). This # element can also contain some actions such as `onclick` button. # @!attribute [rw] icon # @return [::Google::Apps::Chat::V1::WidgetMarkup::Icon] # An enum value that's replaced by the Chat API with the # corresponding icon image. # @!attribute [rw] icon_url # @return [::String] # The icon specified by a URL. # @!attribute [rw] top_label # @return [::String] # The text of the top label. Formatted text supported. For more information # about formatting text, see # [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] content # @return [::String] # The text of the content. Formatted text supported and always required. # For more information # about formatting text, see # [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] content_multiline # @return [::Boolean] # If the content should be multiline. # @!attribute [rw] bottom_label # @return [::String] # The text of the bottom label. Formatted text supported. For more # information about formatting text, see [Formatting text in Google Chat # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) # and # [Formatting # text in Google Workspace # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action. Only the top label, bottom label, and content # region are clickable. # @!attribute [rw] button # @return [::Google::Apps::Chat::V1::WidgetMarkup::Button] # A button that can be clicked to trigger an action. class KeyValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An image that's specified by a URL and can have an `onclick` action. # @!attribute [rw] image_url # @return [::String] # The URL of the image. # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action. # @!attribute [rw] aspect_ratio # @return [::Float] # The aspect ratio of this image (width and height). This field lets you # reserve the right height for the image while waiting for it to load. # It's not meant to override the built-in aspect ratio of the image. # If unset, the server fills it by prefetching the image. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An image button with an `onclick` action. # @!attribute [rw] icon # @return [::Google::Apps::Chat::V1::WidgetMarkup::Icon] # The icon specified by an `enum` that indices to an icon provided by # Chat API. # @!attribute [rw] icon_url # @return [::String] # The icon specified by a URL. # @!attribute [rw] on_click # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick] # The `onclick` action. # @!attribute [rw] name # @return [::String] # The name of this `image_button` that's used for accessibility. # Default value is provided if this name isn't specified. class ImageButton include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An `onclick` action (for example, open a link). # @!attribute [rw] action # @return [::Google::Apps::Chat::V1::WidgetMarkup::FormAction] # A form action is triggered by this `onclick` action if specified. # @!attribute [rw] open_link # @return [::Google::Apps::Chat::V1::WidgetMarkup::OpenLink] # This `onclick` action triggers an open link action if specified. class OnClick include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A link that opens a new window. # @!attribute [rw] url # @return [::String] # The URL to open. class OpenLink include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A form action describes the behavior when the form is submitted. # For example, you can invoke Apps Script to handle the form. # @!attribute [rw] action_method_name # @return [::String] # The method name is used to identify which part of the form triggered the # form submission. This information is echoed back to the Chat app as part # of the card click event. You can use the same method name for several # elements that trigger a common behavior. # @!attribute [rw] parameters # @return [::Array<::Google::Apps::Chat::V1::WidgetMarkup::FormAction::ActionParameter>] # List of action parameters. class FormAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # List of string parameters to supply when the action method is invoked. # For example, consider three snooze buttons: snooze now, snooze one day, # snooze next week. You might use `action method = snooze()`, passing the # snooze type and snooze time in the list of string parameters. # @!attribute [rw] key # @return [::String] # The name of the parameter for the action script. # @!attribute [rw] value # @return [::String] # The value of the parameter. class ActionParameter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # The set of supported icons. module Icon ICON_UNSPECIFIED = 0 AIRPLANE = 1 BOOKMARK = 26 BUS = 25 CAR = 9 CLOCK = 2 CONFIRMATION_NUMBER_ICON = 12 DOLLAR = 14 DESCRIPTION = 27 EMAIL = 10 EVENT_PERFORMER = 20 EVENT_SEAT = 21 FLIGHT_ARRIVAL = 16 FLIGHT_DEPARTURE = 15 HOTEL = 6 HOTEL_ROOM_TYPE = 17 INVITE = 19 MAP_PIN = 3 MEMBERSHIP = 24 MULTIPLE_PEOPLE = 18 OFFER = 30 PERSON = 11 PHONE = 13 RESTAURANT_ICON = 7 SHOPPING_CART = 8 STAR = 5 STORE = 22 TICKET = 4 TRAIN = 23 VIDEO_CAMERA = 28 VIDEO_PLAY = 29 end end |