Class: Google::Apis::ChatV1::GoogleAppsCardV1DateTimePicker
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::GoogleAppsCardV1DateTimePicker
- 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
Lets users specify a date, a time, or both a date and a time. Accepts text input from users, but features an interactive date and time selector that helps users enter correctly-formatted dates and times. If users enter a date or time incorrectly, the widget shows an error that prompts users to enter the correct format. Not supported by Chat apps. Support by Chat apps coming soon.
Instance Attribute Summary collapse
-
#label ⇒ String
The text that prompts users to enter a date, time, or datetime.
-
#name ⇒ String
The name by which the datetime picker 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.
-
#timezone_offset_date ⇒ Fixnum
The number representing the time zone offset from UTC, in minutes.
-
#type ⇒ String
What kind of date and time input the datetime picker supports.
-
#value_ms_epoch ⇒ Fixnum
The value displayed as the default value before user input or previous user input, represented in milliseconds (Epoch time).
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleAppsCardV1DateTimePicker
constructor
A new instance of GoogleAppsCardV1DateTimePicker.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleAppsCardV1DateTimePicker
Returns a new instance of GoogleAppsCardV1DateTimePicker.
1471 1472 1473 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1471 def initialize(**args) update!(**args) end |
Instance Attribute Details
#label ⇒ String
The text that prompts users to enter a date, time, or datetime. Specify text
that helps the user enter the information your app needs. For example, if
users are setting an appointment, then a label like "Appointment date" or "
Appointment date and time" might work well.
Corresponds to the JSON property label
1433 1434 1435 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1433 def label @label end |
#name ⇒ String
The name by which the datetime picker is identified in a form input event. For
details about working with form inputs, see Receive form data.
Corresponds to the JSON property name
1440 1441 1442 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1440 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. If the action is triggered,
the form values are sent to the server.
Corresponds to the JSON property onChangeAction
1447 1448 1449 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1447 def on_change_action @on_change_action end |
#timezone_offset_date ⇒ Fixnum
The number representing the time zone offset from UTC, in minutes. If set, the
value_ms_epoch is displayed in the specified time zone. If not set, it uses
the user's time zone setting on the client side.
Corresponds to the JSON property timezoneOffsetDate
1454 1455 1456 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1454 def timezone_offset_date @timezone_offset_date end |
#type ⇒ String
What kind of date and time input the datetime picker supports.
Corresponds to the JSON property type
1459 1460 1461 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1459 def type @type end |
#value_ms_epoch ⇒ Fixnum
The value displayed as the default value before user input or previous user
input, represented in milliseconds (Epoch time). For DATE_AND_TIME type, the full epoch value is used. For
DATE_ONLY type, only date of the epoch time is used. For TIME_ONLY type,
only time of the epoch time is used. For example, to represent 3:00 AM, set
epoch time to 3 * 60 * 60 * 1000.
Corresponds to the JSON property valueMsEpoch
1469 1470 1471 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1469 def value_ms_epoch @value_ms_epoch end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1476 1477 1478 1479 1480 1481 1482 1483 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1476 def update!(**args) @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) @timezone_offset_date = args[:timezone_offset_date] if args.key?(:timezone_offset_date) @type = args[:type] if args.key?(:type) @value_ms_epoch = args[:value_ms_epoch] if args.key?(:value_ms_epoch) end |