Class: Google::Apis::CalendarV3::EventDateTime

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/calendar_v3/classes.rb,
lib/google/apis/calendar_v3/representations.rb,
lib/google/apis/calendar_v3/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EventDateTime

Returns a new instance of EventDateTime.



1807
1808
1809
# File 'lib/google/apis/calendar_v3/classes.rb', line 1807

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

Instance Attribute Details

#dateDate

The date, in the format "yyyy-mm-dd", if this is an all-day event. Corresponds to the JSON property date

Returns:

  • (Date)


1789
1790
1791
# File 'lib/google/apis/calendar_v3/classes.rb', line 1789

def date
  @date
end

#date_timeDateTime

The time, as a combined date-time value (formatted according to RFC3339). A time zone offset is required unless a time zone is explicitly specified in timeZone. Corresponds to the JSON property dateTime

Returns:

  • (DateTime)


1796
1797
1798
# File 'lib/google/apis/calendar_v3/classes.rb', line 1796

def date_time
  @date_time
end

#time_zoneString

The time zone in which the time is specified. (Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) For recurring events this field is required and specifies the time zone in which the recurrence is expanded. For single events this field is optional and indicates a custom time zone for the event start/end. Corresponds to the JSON property timeZone

Returns:

  • (String)


1805
1806
1807
# File 'lib/google/apis/calendar_v3/classes.rb', line 1805

def time_zone
  @time_zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1812
1813
1814
1815
1816
# File 'lib/google/apis/calendar_v3/classes.rb', line 1812

def update!(**args)
  @date = args[:date] if args.key?(:date)
  @date_time = args[:date_time] if args.key?(:date_time)
  @time_zone = args[:time_zone] if args.key?(:time_zone)
end