Class: Google::Apis::ChatV1::GoogleAppsCardV1TextInput

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 text input is a UI item where users can input text. A text input can also have an onChange action and suggestions.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1TextInput

Returns a new instance of GoogleAppsCardV1TextInput.



2085
2086
2087
# File 'lib/google/apis/chat_v1/classes.rb', line 2085

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

Instance Attribute Details

#auto_complete_actionGoogle::Apis::ChatV1::GoogleAppsCardV1Action

An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. Corresponds to the JSON property autoCompleteAction



2046
2047
2048
# File 'lib/google/apis/chat_v1/classes.rb', line 2046

def auto_complete_action
  @auto_complete_action
end

#hint_textString

The hint text. Corresponds to the JSON property hintText

Returns:

  • (String)


2051
2052
2053
# File 'lib/google/apis/chat_v1/classes.rb', line 2051

def hint_text
  @hint_text
end

#initial_suggestionsGoogle::Apis::ChatV1::GoogleAppsCardV1Suggestions

A container wrapping elements necessary for showing suggestion items used in text input autocomplete. Corresponds to the JSON property initialSuggestions



2057
2058
2059
# File 'lib/google/apis/chat_v1/classes.rb', line 2057

def initial_suggestions
  @initial_suggestions
end

#labelString

At least one of label and hintText must be specified. Corresponds to the JSON property label

Returns:

  • (String)


2062
2063
2064
# File 'lib/google/apis/chat_v1/classes.rb', line 2062

def label
  @label
end

#nameString

The name of the text input which is used in formInput. Corresponds to the JSON property name

Returns:

  • (String)


2067
2068
2069
# File 'lib/google/apis/chat_v1/classes.rb', line 2067

def name
  @name
end

#on_change_actionGoogle::Apis::ChatV1::GoogleAppsCardV1Action

An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. Corresponds to the JSON property onChangeAction



2073
2074
2075
# File 'lib/google/apis/chat_v1/classes.rb', line 2073

def on_change_action
  @on_change_action
end

#typeString

The style of the text, for example, a single line or multiple lines. Corresponds to the JSON property type

Returns:

  • (String)


2078
2079
2080
# File 'lib/google/apis/chat_v1/classes.rb', line 2078

def type
  @type
end

#valueString

The default value when there is no input from the user. Corresponds to the JSON property value

Returns:

  • (String)


2083
2084
2085
# File 'lib/google/apis/chat_v1/classes.rb', line 2083

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
# File 'lib/google/apis/chat_v1/classes.rb', line 2090

def update!(**args)
  @auto_complete_action = args[:auto_complete_action] if args.key?(:auto_complete_action)
  @hint_text = args[:hint_text] if args.key?(:hint_text)
  @initial_suggestions = args[:initial_suggestions] if args.key?(:initial_suggestions)
  @label = args[:label] if args.key?(:label)
  @name = args[:name] if args.key?(:name)
  @on_change_action = args[:on_change_action] if args.key?(:on_change_action)
  @type = args[:type] if args.key?(:type)
  @value = args[:value] if args.key?(:value)
end