Class: Google::Apis::ChatV1::GoogleAppsCardV1Widget

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

A widget is a UI element that presents texts, images, etc.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1Widget

Returns a new instance of GoogleAppsCardV1Widget.



1933
1934
1935
# File 'lib/google/apis/chat_v1/classes.rb', line 1933

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



1881
1882
1883
# File 'lib/google/apis/chat_v1/classes.rb', line 1881

def button_list
  @button_list
end

#date_time_pickerGoogle::Apis::ChatV1::GoogleAppsCardV1DateTimePicker

The widget that lets users to specify a date and time. Corresponds to the JSON property dateTimePicker



1886
1887
1888
# File 'lib/google/apis/chat_v1/classes.rb', line 1886

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



1893
1894
1895
# File 'lib/google/apis/chat_v1/classes.rb', line 1893

def decorated_text
  @decorated_text
end

#dividerGoogle::Apis::ChatV1::GoogleAppsCardV1Divider

A divider that appears in between widgets. Corresponds to the JSON property divider



1898
1899
1900
# File 'lib/google/apis/chat_v1/classes.rb', line 1898

def divider
  @divider
end

#gridGoogle::Apis::ChatV1::GoogleAppsCardV1Grid

Represents a Grid widget that displays items in a configurable grid layout. Corresponds to the JSON property grid



1903
1904
1905
# File 'lib/google/apis/chat_v1/classes.rb', line 1903

def grid
  @grid
end

#horizontal_alignmentString

The horizontal alignment of this widget. Corresponds to the JSON property horizontalAlignment

Returns:

  • (String)


1908
1909
1910
# File 'lib/google/apis/chat_v1/classes.rb', line 1908

def horizontal_alignment
  @horizontal_alignment
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



1913
1914
1915
# File 'lib/google/apis/chat_v1/classes.rb', line 1913

def image
  @image
end

#selection_inputGoogle::Apis::ChatV1::GoogleAppsCardV1SelectionInput

A widget that creates a UI item (for example, a drop-down list) with options for users to select. Corresponds to the JSON property selectionInput



1919
1920
1921
# File 'lib/google/apis/chat_v1/classes.rb', line 1919

def selection_input
  @selection_input
end

#text_inputGoogle::Apis::ChatV1::GoogleAppsCardV1TextInput

A text input is a UI item where users can input text. A text input can also have an onChange action and suggestions. Corresponds to the JSON property textInput



1925
1926
1927
# File 'lib/google/apis/chat_v1/classes.rb', line 1925

def text_input
  @text_input
end

#text_paragraphGoogle::Apis::ChatV1::GoogleAppsCardV1TextParagraph

A paragraph of text that supports formatting. See Text formatting for details. Corresponds to the JSON property textParagraph



1931
1932
1933
# File 'lib/google/apis/chat_v1/classes.rb', line 1931

def text_paragraph
  @text_paragraph
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
# File 'lib/google/apis/chat_v1/classes.rb', line 1938

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)
  @divider = args[:divider] if args.key?(:divider)
  @grid = args[:grid] if args.key?(:grid)
  @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment)
  @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