Class: Google::Apis::ChatV1::GoogleAppsCardV1Widgets

Inherits:
Object
  • Object
show all
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

The supported widgets that you can include in a column.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1Widgets

Returns a new instance of GoogleAppsCardV1Widgets.



2800
2801
2802
# File 'lib/google/apis/chat_v1/classes.rb', line 2800

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#button_listGoogle::Apis::ChatV1::GoogleAppsCardV1ButtonList

A list of buttons layed out horizontally. Corresponds to the JSON property buttonList



2747
2748
2749
# File 'lib/google/apis/chat_v1/classes.rb', line 2747

def button_list
  @button_list
end

#date_time_pickerGoogle::Apis::ChatV1::GoogleAppsCardV1DateTimePicker

Lets users input a date, a time, or both a date and a time. Users can input text or use the picker to select dates and times. If users input an invalid date or time, the picker shows an error that prompts users to input the information correctly. Corresponds to the JSON property dateTimePicker



2755
2756
2757
# File 'lib/google/apis/chat_v1/classes.rb', line 2755

def date_time_picker
  @date_time_picker
end

#decorated_textGoogle::Apis::ChatV1::GoogleAppsCardV1DecoratedText

A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget, or a button after the text. Corresponds to the JSON property decoratedText



2762
2763
2764
# File 'lib/google/apis/chat_v1/classes.rb', line 2762

def decorated_text
  @decorated_text
end

#imageGoogle::Apis::ChatV1::GoogleAppsCardV1Image

An image that is specified by a URL and can have an onClick action. Corresponds to the JSON property image



2767
2768
2769
# File 'lib/google/apis/chat_v1/classes.rb', line 2767

def image
  @image
end

#selection_inputGoogle::Apis::ChatV1::GoogleAppsCardV1SelectionInput

A widget that creates one or more UI items that users can select. For example, a dropdown menu or checkboxes. You can use this widget to collect data that can be predicted or enumerated. Chat apps can process the value of items that users select or input. For details about working with form inputs, see Receive form data. To collect undefined or abstract data from users, use the TextInput widget. Corresponds to the JSON property selectionInput



2778
2779
2780
# File 'lib/google/apis/chat_v1/classes.rb', line 2778

def selection_input
  @selection_input
end

#text_inputGoogle::Apis::ChatV1::GoogleAppsCardV1TextInput

A field in which users can enter text. Supports suggestions and on-change actions. Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see Receive form data. When you need to collect undefined or abstract data from users, use a text input. To collect defined or enumerated data from users, use the SelectionInput widget. Corresponds to the JSON property textInput



2789
2790
2791
# File 'lib/google/apis/chat_v1/classes.rb', line 2789

def text_input
  @text_input
end

#text_paragraphGoogle::Apis::ChatV1::GoogleAppsCardV1TextParagraph

A paragraph of text that supports formatting. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons. Corresponds to the JSON property textParagraph



2798
2799
2800
# File 'lib/google/apis/chat_v1/classes.rb', line 2798

def text_paragraph
  @text_paragraph
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2805
2806
2807
2808
2809
2810
2811
2812
2813
# File 'lib/google/apis/chat_v1/classes.rb', line 2805

def update!(**args)
  @button_list = args[:button_list] if args.key?(:button_list)
  @date_time_picker = args[:date_time_picker] if args.key?(:date_time_picker)
  @decorated_text = args[:decorated_text] if args.key?(:decorated_text)
  @image = args[:image] if args.key?(:image)
  @selection_input = args[:selection_input] if args.key?(:selection_input)
  @text_input = args[:text_input] if args.key?(:text_input)
  @text_paragraph = args[:text_paragraph] if args.key?(:text_paragraph)
end