Class: Google::Apis::ChatV1::GoogleAppsCardV1TextInput
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::GoogleAppsCardV1TextInput
- 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 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 abstract data from users, use a text input. To collect defined data from users, use the selection input widget instead. Only supported in dialogs. Support for card messages coming soon.
Instance Attribute Summary collapse
-
#auto_complete_action ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Action
An action that describes the behavior when the form is submitted.
-
#hint_text ⇒ String
Text that appears below the text input field meant to assist users by prompting them to enter a certain value.
-
#initial_suggestions ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Suggestions
Suggested values that users can enter.
-
#label ⇒ String
The text that appears above the text input field in the user interface.
-
#name ⇒ String
The name by which the text input is identified in a form input event.
-
#on_change_action ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Action
An action that describes the behavior when the form is submitted.
-
#type ⇒ String
How a text input field appears in the user interface.
-
#value ⇒ String
The value entered by a user, returned as part of a form input event.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleAppsCardV1TextInput
constructor
A new instance of GoogleAppsCardV1TextInput.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleAppsCardV1TextInput
Returns a new instance of GoogleAppsCardV1TextInput.
2271 2272 2273 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2271 def initialize(**args) update!(**args) end |
Instance Attribute Details
#auto_complete_action ⇒ Google::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
2213 2214 2215 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2213 def auto_complete_action @auto_complete_action end |
#hint_text ⇒ String
Text that appears below the text input field meant to assist users by
prompting them to enter a certain value. This text is always visible. Required
if label is unspecified. Otherwise, optional.
Corresponds to the JSON property hintText
2220 2221 2222 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2220 def hint_text @hint_text end |
#initial_suggestions ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Suggestions
Suggested values that users can enter. These values appear when users click
inside the text input field. As users type, the suggested values dynamically
filter to match what the users have typed. For example, a text input field for
programming language might suggest Java, JavaScript, Python, and C++. When
users start typing "Jav", the list of suggestions filters to show just Java
and JavaScript. Suggested values help guide users to enter values that your
app can make sense of. When referring to JavaScript, some users might enter "
javascript" and others "java script". Suggesting "JavaScript" can standardize
how users interact with your app. When specified, TextInput.type is always
SINGLE_LINE, even if it is set to MULTIPLE_LINE.
Corresponds to the JSON property initialSuggestions
2234 2235 2236 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2234 def initial_suggestions @initial_suggestions end |
#label ⇒ String
The text that appears above the text input field in the user interface.
Specify text that helps the user enter the information your app needs. For
example, if you are asking someone's name, but specifically need their surname,
write "surname" instead of "name". Required if hintText is unspecified.
Otherwise, optional.
Corresponds to the JSON property label
2243 2244 2245 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2243 def label @label end |
#name ⇒ String
The name by which the text input is identified in a form input event. For
details about working with form inputs, see Receive form data.
Corresponds to the JSON property name
2250 2251 2252 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2250 def name @name end |
#on_change_action ⇒ Google::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
2256 2257 2258 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2256 def on_change_action @on_change_action end |
#type ⇒ String
How a text input field appears in the user interface. For example, whether the
field is single or multi-line.
Corresponds to the JSON property type
2262 2263 2264 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2262 def type @type end |
#value ⇒ String
The value entered by a user, returned as part of a form input event. For
details about working with form inputs, see Receive form data.
Corresponds to the JSON property value
2269 2270 2271 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2269 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2276 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 |