Class: Google::Apis::ChatV1::GoogleAppsCardV1DateTimePicker

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

Lets users input a date, a time, or both a date and a time. For an example in Google Chat apps, see Date time picker. 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. Google Workspace Add-ons and Chat apps:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1DateTimePicker

Returns a new instance of GoogleAppsCardV1DateTimePicker.



1778
1779
1780
# File 'lib/google/apis/chat_v1/classes.rb', line 1778

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

Instance Attribute Details

#labelString

The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as Appointment date or Appointment date and time. Corresponds to the JSON property label

Returns:

  • (String)


1737
1738
1739
# File 'lib/google/apis/chat_v1/classes.rb', line 1737

def label
  @label
end

#nameString

The name by which the DateTimePicker is identified in a form input event. For details about working with form inputs, see Receive form data. Corresponds to the JSON property name

Returns:

  • (String)


1744
1745
1746
# File 'lib/google/apis/chat_v1/classes.rb', line 1744

def name
  @name
end

#on_change_actionGoogle::Apis::ChatV1::GoogleAppsCardV1Action

An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. Google Workspace Add-ons and Chat apps: Corresponds to the JSON property onChangeAction



1752
1753
1754
# File 'lib/google/apis/chat_v1/classes.rb', line 1752

def on_change_action
  @on_change_action
end

#timezone_offset_dateFixnum

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 unset, the value defaults to the user's time zone setting. Corresponds to the JSON property timezoneOffsetDate

Returns:

  • (Fixnum)


1759
1760
1761
# File 'lib/google/apis/chat_v1/classes.rb', line 1759

def timezone_offset_date
  @timezone_offset_date
end

#typeString

Whether the widget supports inputting a date, a time, or the date and time. Corresponds to the JSON property type

Returns:

  • (String)


1764
1765
1766
# File 'lib/google/apis/chat_v1/classes.rb', line 1764

def type
  @type
end

#value_ms_epochFixnum

The default value displayed in the widget, in milliseconds since Unix epoch time. Specify the value based on the type of picker (DateTimePickerType): * DATE_AND_TIME: a calendar date and time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use 1672574400000. * DATE_ONLY: a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use 1672531200000. * TIME_ONLY: a time in UTC. For example, to represent 12:00 PM, use 43200000 (or 12 * 60 * 60 * 1000). Corresponds to the JSON property valueMsEpoch

Returns:

  • (Fixnum)


1776
1777
1778
# File 'lib/google/apis/chat_v1/classes.rb', line 1776

def value_ms_epoch
  @value_ms_epoch
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1783
1784
1785
1786
1787
1788
1789
1790
# File 'lib/google/apis/chat_v1/classes.rb', line 1783

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