google-calendar-apimatic-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +168 -0
- data/bin/console +15 -0
- data/lib/calendar_api/api_helper.rb +10 -0
- data/lib/calendar_api/apis/base_api.rb +67 -0
- data/lib/calendar_api/apis/calendar_list_api.rb +63 -0
- data/lib/calendar_api/apis/channels_api.rb +42 -0
- data/lib/calendar_api/apis/events_api.rb +354 -0
- data/lib/calendar_api/apis/free_busy_api.rb +37 -0
- data/lib/calendar_api/apis/oauth_authorization_api.rb +87 -0
- data/lib/calendar_api/client.rb +103 -0
- data/lib/calendar_api/configuration.rb +177 -0
- data/lib/calendar_api/exceptions/api_exception.rb +21 -0
- data/lib/calendar_api/exceptions/error_response_error1_exception.rb +46 -0
- data/lib/calendar_api/exceptions/oauth_provider_exception.rb +64 -0
- data/lib/calendar_api/http/api_response.rb +19 -0
- data/lib/calendar_api/http/auth/oauth_2.rb +162 -0
- data/lib/calendar_api/http/http_call_back.rb +10 -0
- data/lib/calendar_api/http/http_method_enum.rb +10 -0
- data/lib/calendar_api/http/http_request.rb +10 -0
- data/lib/calendar_api/http/http_response.rb +10 -0
- data/lib/calendar_api/http/proxy_settings.rb +22 -0
- data/lib/calendar_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/calendar_api/logging/sdk_logger.rb +17 -0
- data/lib/calendar_api/models/attachment.rb +115 -0
- data/lib/calendar_api/models/attendee.rb +167 -0
- data/lib/calendar_api/models/auto_decline_mode.rb +40 -0
- data/lib/calendar_api/models/base_model.rb +110 -0
- data/lib/calendar_api/models/birthday_properties.rb +96 -0
- data/lib/calendar_api/models/birthday_type.rb +48 -0
- data/lib/calendar_api/models/calendar_access_role.rb +44 -0
- data/lib/calendar_api/models/calendar_list_entry.rb +278 -0
- data/lib/calendar_api/models/calendar_list_entry_conference_properties.rb +83 -0
- data/lib/calendar_api/models/calendar_list_entry_notification_settings.rb +85 -0
- data/lib/calendar_api/models/calendar_list_response.rb +129 -0
- data/lib/calendar_api/models/calendar_notification.rb +86 -0
- data/lib/calendar_api/models/calendar_notification_method.rb +27 -0
- data/lib/calendar_api/models/calendar_notification_type.rb +48 -0
- data/lib/calendar_api/models/channel.rb +129 -0
- data/lib/calendar_api/models/channel_params.rb +75 -0
- data/lib/calendar_api/models/channel_type.rb +36 -0
- data/lib/calendar_api/models/chat_status.rb +36 -0
- data/lib/calendar_api/models/conference_create_request.rb +99 -0
- data/lib/calendar_api/models/conference_create_request_status.rb +76 -0
- data/lib/calendar_api/models/conference_data.rb +137 -0
- data/lib/calendar_api/models/conference_data_version.rb +43 -0
- data/lib/calendar_api/models/conference_entry_point.rb +126 -0
- data/lib/calendar_api/models/conference_request_status_code.rb +40 -0
- data/lib/calendar_api/models/conference_solution.rb +95 -0
- data/lib/calendar_api/models/conference_solution_key.rb +74 -0
- data/lib/calendar_api/models/conference_solution_type.rb +40 -0
- data/lib/calendar_api/models/custom_location.rb +75 -0
- data/lib/calendar_api/models/entry_point_type.rb +44 -0
- data/lib/calendar_api/models/error_response.rb +75 -0
- data/lib/calendar_api/models/error_response_error.rb +104 -0
- data/lib/calendar_api/models/error_response_error_errors_items.rb +95 -0
- data/lib/calendar_api/models/event.rb +551 -0
- data/lib/calendar_api/models/event_date_time.rb +107 -0
- data/lib/calendar_api/models/event_list.rb +208 -0
- data/lib/calendar_api/models/event_order_by.rb +36 -0
- data/lib/calendar_api/models/event_reminders.rb +95 -0
- data/lib/calendar_api/models/event_source.rb +86 -0
- data/lib/calendar_api/models/event_status.rb +40 -0
- data/lib/calendar_api/models/event_transparency.rb +37 -0
- data/lib/calendar_api/models/event_type.rb +52 -0
- data/lib/calendar_api/models/event_visibility.rb +44 -0
- data/lib/calendar_api/models/extended_properties.rb +87 -0
- data/lib/calendar_api/models/focus_time_properties.rb +99 -0
- data/lib/calendar_api/models/free_busy_calendar.rb +103 -0
- data/lib/calendar_api/models/free_busy_error.rb +85 -0
- data/lib/calendar_api/models/free_busy_group.rb +94 -0
- data/lib/calendar_api/models/free_busy_request.rb +150 -0
- data/lib/calendar_api/models/free_busy_request_item.rb +72 -0
- data/lib/calendar_api/models/free_busy_response.rb +135 -0
- data/lib/calendar_api/models/oauth_provider_error.rb +62 -0
- data/lib/calendar_api/models/oauth_scope.rb +41 -0
- data/lib/calendar_api/models/oauth_token.rb +96 -0
- data/lib/calendar_api/models/office_location.rb +116 -0
- data/lib/calendar_api/models/out_of_office_properties.rb +88 -0
- data/lib/calendar_api/models/person.rb +106 -0
- data/lib/calendar_api/models/reminder.rb +83 -0
- data/lib/calendar_api/models/reminder_method.rb +36 -0
- data/lib/calendar_api/models/response_status.rb +44 -0
- data/lib/calendar_api/models/send_updates.rb +40 -0
- data/lib/calendar_api/models/stop_channel_request.rb +85 -0
- data/lib/calendar_api/models/time_period.rb +102 -0
- data/lib/calendar_api/models/watch_request.rb +113 -0
- data/lib/calendar_api/models/working_location_properties.rb +107 -0
- data/lib/calendar_api/models/working_location_type.rb +40 -0
- data/lib/calendar_api/utilities/date_time_helper.rb +11 -0
- data/lib/calendar_api/utilities/file_wrapper.rb +28 -0
- data/lib/calendar_api.rb +114 -0
- metadata +176 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# calendar_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module CalendarApi
|
|
7
|
+
# Birthday or special event data. Used if eventType is birthday.
|
|
8
|
+
class BirthdayProperties < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Resource name of the contact this birthday event is linked to.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :contact
|
|
15
|
+
|
|
16
|
+
# Type of birthday or special event.
|
|
17
|
+
# @return [BirthdayType]
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
# Custom type label if type is "custom".
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :custom_type_name
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['contact'] = 'contact'
|
|
28
|
+
@_hash['type'] = 'type'
|
|
29
|
+
@_hash['custom_type_name'] = 'customTypeName'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
contact
|
|
37
|
+
type
|
|
38
|
+
custom_type_name
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(contact: SKIP, type: SKIP, custom_type_name: SKIP,
|
|
48
|
+
additional_properties: nil)
|
|
49
|
+
# Add additional model properties to the instance
|
|
50
|
+
additional_properties = {} if additional_properties.nil?
|
|
51
|
+
|
|
52
|
+
@contact = contact unless contact == SKIP
|
|
53
|
+
@type = type unless type == SKIP
|
|
54
|
+
@custom_type_name = custom_type_name unless custom_type_name == SKIP
|
|
55
|
+
@additional_properties = additional_properties
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
contact = hash.key?('contact') ? hash['contact'] : SKIP
|
|
64
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
65
|
+
custom_type_name =
|
|
66
|
+
hash.key?('customTypeName') ? hash['customTypeName'] : SKIP
|
|
67
|
+
|
|
68
|
+
# Create a new hash for additional properties, removing known properties.
|
|
69
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
70
|
+
|
|
71
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
72
|
+
new_hash, proc { |value| value }
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
# Create object from extracted values.
|
|
76
|
+
BirthdayProperties.new(contact: contact,
|
|
77
|
+
type: type,
|
|
78
|
+
custom_type_name: custom_type_name,
|
|
79
|
+
additional_properties: additional_properties)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Provides a human-readable string representation of the object.
|
|
83
|
+
def to_s
|
|
84
|
+
class_name = self.class.name.split('::').last
|
|
85
|
+
"<#{class_name} contact: #{@contact}, type: #{@type}, custom_type_name:"\
|
|
86
|
+
" #{@custom_type_name}, additional_properties: #{@additional_properties}>"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
90
|
+
def inspect
|
|
91
|
+
class_name = self.class.name.split('::').last
|
|
92
|
+
"<#{class_name} contact: #{@contact.inspect}, type: #{@type.inspect}, custom_type_name:"\
|
|
93
|
+
" #{@custom_type_name.inspect}, additional_properties: #{@additional_properties}>"
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# calendar_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module CalendarApi
|
|
7
|
+
# Type of birthday or special event.
|
|
8
|
+
class BirthdayType
|
|
9
|
+
BIRTHDAY_TYPE = [
|
|
10
|
+
# TODO: Write general description for ANNIVERSARY
|
|
11
|
+
ANNIVERSARY = 'anniversary'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for BIRTHDAY
|
|
14
|
+
BIRTHDAY = 'birthday'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for CUSTOM
|
|
17
|
+
CUSTOM = 'custom'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for OTHER
|
|
20
|
+
OTHER = 'other'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for ENUM_SELF
|
|
23
|
+
ENUM_SELF = 'self'.freeze
|
|
24
|
+
].freeze
|
|
25
|
+
|
|
26
|
+
def self.validate(value)
|
|
27
|
+
return false if value.nil?
|
|
28
|
+
|
|
29
|
+
BIRTHDAY_TYPE.include?(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.from_value(value, default_value = ANNIVERSARY)
|
|
33
|
+
return default_value if value.nil?
|
|
34
|
+
|
|
35
|
+
str = value.to_s.strip
|
|
36
|
+
|
|
37
|
+
case str.downcase
|
|
38
|
+
when 'anniversary' then ANNIVERSARY
|
|
39
|
+
when 'birthday' then BIRTHDAY
|
|
40
|
+
when 'custom' then CUSTOM
|
|
41
|
+
when 'other' then OTHER
|
|
42
|
+
when 'enum_self' then ENUM_SELF
|
|
43
|
+
else
|
|
44
|
+
default_value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# calendar_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module CalendarApi
|
|
7
|
+
# The user's access role for a calendar.
|
|
8
|
+
class CalendarAccessRole
|
|
9
|
+
CALENDAR_ACCESS_ROLE = [
|
|
10
|
+
# TODO: Write general description for FREEBUSYREADER
|
|
11
|
+
FREEBUSYREADER = 'freeBusyReader'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for READER
|
|
14
|
+
READER = 'reader'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for WRITER
|
|
17
|
+
WRITER = 'writer'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for OWNER
|
|
20
|
+
OWNER = 'owner'.freeze
|
|
21
|
+
].freeze
|
|
22
|
+
|
|
23
|
+
def self.validate(value)
|
|
24
|
+
return false if value.nil?
|
|
25
|
+
|
|
26
|
+
CALENDAR_ACCESS_ROLE.include?(value)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.from_value(value, default_value = FREEBUSYREADER)
|
|
30
|
+
return default_value if value.nil?
|
|
31
|
+
|
|
32
|
+
str = value.to_s.strip
|
|
33
|
+
|
|
34
|
+
case str.downcase
|
|
35
|
+
when 'freebusyreader' then FREEBUSYREADER
|
|
36
|
+
when 'reader' then READER
|
|
37
|
+
when 'writer' then WRITER
|
|
38
|
+
when 'owner' then OWNER
|
|
39
|
+
else
|
|
40
|
+
default_value
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
# calendar_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module CalendarApi
|
|
7
|
+
# An entry on the user's calendar list.
|
|
8
|
+
class CalendarListEntry < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Type of the resource.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :kind
|
|
15
|
+
|
|
16
|
+
# ETag of the resource.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :etag
|
|
19
|
+
|
|
20
|
+
# Identifier of the calendar. Use this value as the calendarId path
|
|
21
|
+
# parameter in event operations.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :id
|
|
24
|
+
|
|
25
|
+
# Title of the calendar.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :summary
|
|
28
|
+
|
|
29
|
+
# Description of the calendar.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :description
|
|
32
|
+
|
|
33
|
+
# Geographic location of the calendar as free-form text.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :location
|
|
36
|
+
|
|
37
|
+
# The time zone of the calendar.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :time_zone
|
|
40
|
+
|
|
41
|
+
# The summary that the authenticated user has set for this calendar.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :summary_override
|
|
44
|
+
|
|
45
|
+
# The color of the calendar. References an entry in the calendar section of
|
|
46
|
+
# the colors definition.
|
|
47
|
+
# @return [String]
|
|
48
|
+
attr_accessor :color_id
|
|
49
|
+
|
|
50
|
+
# The main color of the calendar in hexadecimal format (e.g. "#0088aa").
|
|
51
|
+
# @return [String]
|
|
52
|
+
attr_accessor :background_color
|
|
53
|
+
|
|
54
|
+
# The foreground color of the calendar in hexadecimal format (e.g.
|
|
55
|
+
# "#ffffff").
|
|
56
|
+
# @return [String]
|
|
57
|
+
attr_accessor :foreground_color
|
|
58
|
+
|
|
59
|
+
# Whether the calendar has been hidden from the list.
|
|
60
|
+
# @return [TrueClass | FalseClass]
|
|
61
|
+
attr_accessor :hidden
|
|
62
|
+
|
|
63
|
+
# Whether the calendar content shows up in the calendar UI.
|
|
64
|
+
# @return [TrueClass | FalseClass]
|
|
65
|
+
attr_accessor :selected
|
|
66
|
+
|
|
67
|
+
# The user's access role for a calendar.
|
|
68
|
+
# @return [CalendarAccessRole]
|
|
69
|
+
attr_accessor :access_role
|
|
70
|
+
|
|
71
|
+
# The default reminders that the authenticated user has for this calendar.
|
|
72
|
+
# @return [Array[Reminder]]
|
|
73
|
+
attr_accessor :default_reminders
|
|
74
|
+
|
|
75
|
+
# The notifications the authenticated user receives for this calendar.
|
|
76
|
+
# @return [CalendarListEntryNotificationSettings]
|
|
77
|
+
attr_accessor :notification_settings
|
|
78
|
+
|
|
79
|
+
# Whether the calendar is the primary calendar of the authenticated user.
|
|
80
|
+
# @return [TrueClass | FalseClass]
|
|
81
|
+
attr_accessor :primary
|
|
82
|
+
|
|
83
|
+
# Whether the calendar list entry has been removed from the list.
|
|
84
|
+
# @return [TrueClass | FalseClass]
|
|
85
|
+
attr_accessor :deleted
|
|
86
|
+
|
|
87
|
+
# Conference properties for this calendar.
|
|
88
|
+
# @return [CalendarListEntryConferenceProperties]
|
|
89
|
+
attr_accessor :conference_properties
|
|
90
|
+
|
|
91
|
+
# A mapping from model property names to API property names.
|
|
92
|
+
def self.names
|
|
93
|
+
@_hash = {} if @_hash.nil?
|
|
94
|
+
@_hash['kind'] = 'kind'
|
|
95
|
+
@_hash['etag'] = 'etag'
|
|
96
|
+
@_hash['id'] = 'id'
|
|
97
|
+
@_hash['summary'] = 'summary'
|
|
98
|
+
@_hash['description'] = 'description'
|
|
99
|
+
@_hash['location'] = 'location'
|
|
100
|
+
@_hash['time_zone'] = 'timeZone'
|
|
101
|
+
@_hash['summary_override'] = 'summaryOverride'
|
|
102
|
+
@_hash['color_id'] = 'colorId'
|
|
103
|
+
@_hash['background_color'] = 'backgroundColor'
|
|
104
|
+
@_hash['foreground_color'] = 'foregroundColor'
|
|
105
|
+
@_hash['hidden'] = 'hidden'
|
|
106
|
+
@_hash['selected'] = 'selected'
|
|
107
|
+
@_hash['access_role'] = 'accessRole'
|
|
108
|
+
@_hash['default_reminders'] = 'defaultReminders'
|
|
109
|
+
@_hash['notification_settings'] = 'notificationSettings'
|
|
110
|
+
@_hash['primary'] = 'primary'
|
|
111
|
+
@_hash['deleted'] = 'deleted'
|
|
112
|
+
@_hash['conference_properties'] = 'conferenceProperties'
|
|
113
|
+
@_hash
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# An array for optional fields
|
|
117
|
+
def self.optionals
|
|
118
|
+
%w[
|
|
119
|
+
kind
|
|
120
|
+
etag
|
|
121
|
+
id
|
|
122
|
+
summary
|
|
123
|
+
description
|
|
124
|
+
location
|
|
125
|
+
time_zone
|
|
126
|
+
summary_override
|
|
127
|
+
color_id
|
|
128
|
+
background_color
|
|
129
|
+
foreground_color
|
|
130
|
+
hidden
|
|
131
|
+
selected
|
|
132
|
+
access_role
|
|
133
|
+
default_reminders
|
|
134
|
+
notification_settings
|
|
135
|
+
primary
|
|
136
|
+
deleted
|
|
137
|
+
conference_properties
|
|
138
|
+
]
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# An array for nullable fields
|
|
142
|
+
def self.nullables
|
|
143
|
+
[]
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
def initialize(kind: 'calendar#calendarListEntry', etag: SKIP, id: SKIP,
|
|
147
|
+
summary: SKIP, description: SKIP, location: SKIP,
|
|
148
|
+
time_zone: SKIP, summary_override: SKIP, color_id: SKIP,
|
|
149
|
+
background_color: SKIP, foreground_color: SKIP,
|
|
150
|
+
hidden: false, selected: false, access_role: SKIP,
|
|
151
|
+
default_reminders: SKIP, notification_settings: SKIP,
|
|
152
|
+
primary: SKIP, deleted: false, conference_properties: SKIP,
|
|
153
|
+
additional_properties: nil)
|
|
154
|
+
# Add additional model properties to the instance
|
|
155
|
+
additional_properties = {} if additional_properties.nil?
|
|
156
|
+
|
|
157
|
+
@kind = kind unless kind == SKIP
|
|
158
|
+
@etag = etag unless etag == SKIP
|
|
159
|
+
@id = id unless id == SKIP
|
|
160
|
+
@summary = summary unless summary == SKIP
|
|
161
|
+
@description = description unless description == SKIP
|
|
162
|
+
@location = location unless location == SKIP
|
|
163
|
+
@time_zone = time_zone unless time_zone == SKIP
|
|
164
|
+
@summary_override = summary_override unless summary_override == SKIP
|
|
165
|
+
@color_id = color_id unless color_id == SKIP
|
|
166
|
+
@background_color = background_color unless background_color == SKIP
|
|
167
|
+
@foreground_color = foreground_color unless foreground_color == SKIP
|
|
168
|
+
@hidden = hidden unless hidden == SKIP
|
|
169
|
+
@selected = selected unless selected == SKIP
|
|
170
|
+
@access_role = access_role unless access_role == SKIP
|
|
171
|
+
@default_reminders = default_reminders unless default_reminders == SKIP
|
|
172
|
+
@notification_settings = notification_settings unless notification_settings == SKIP
|
|
173
|
+
@primary = primary unless primary == SKIP
|
|
174
|
+
@deleted = deleted unless deleted == SKIP
|
|
175
|
+
@conference_properties = conference_properties unless conference_properties == SKIP
|
|
176
|
+
@additional_properties = additional_properties
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Creates an instance of the object from a hash.
|
|
180
|
+
def self.from_hash(hash)
|
|
181
|
+
return nil unless hash
|
|
182
|
+
|
|
183
|
+
# Extract variables from the hash.
|
|
184
|
+
kind = hash['kind'] ||= 'calendar#calendarListEntry'
|
|
185
|
+
etag = hash.key?('etag') ? hash['etag'] : SKIP
|
|
186
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
187
|
+
summary = hash.key?('summary') ? hash['summary'] : SKIP
|
|
188
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
189
|
+
location = hash.key?('location') ? hash['location'] : SKIP
|
|
190
|
+
time_zone = hash.key?('timeZone') ? hash['timeZone'] : SKIP
|
|
191
|
+
summary_override =
|
|
192
|
+
hash.key?('summaryOverride') ? hash['summaryOverride'] : SKIP
|
|
193
|
+
color_id = hash.key?('colorId') ? hash['colorId'] : SKIP
|
|
194
|
+
background_color =
|
|
195
|
+
hash.key?('backgroundColor') ? hash['backgroundColor'] : SKIP
|
|
196
|
+
foreground_color =
|
|
197
|
+
hash.key?('foregroundColor') ? hash['foregroundColor'] : SKIP
|
|
198
|
+
hidden = hash['hidden'] ||= false
|
|
199
|
+
selected = hash['selected'] ||= false
|
|
200
|
+
access_role = hash.key?('accessRole') ? hash['accessRole'] : SKIP
|
|
201
|
+
# Parameter is an array, so we need to iterate through it
|
|
202
|
+
default_reminders = nil
|
|
203
|
+
unless hash['defaultReminders'].nil?
|
|
204
|
+
default_reminders = []
|
|
205
|
+
hash['defaultReminders'].each do |structure|
|
|
206
|
+
default_reminders << (Reminder.from_hash(structure) if structure)
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
default_reminders = SKIP unless hash.key?('defaultReminders')
|
|
211
|
+
if hash['notificationSettings']
|
|
212
|
+
notification_settings = CalendarListEntryNotificationSettings.from_hash(hash['notificationSettings'])
|
|
213
|
+
end
|
|
214
|
+
primary = hash.key?('primary') ? hash['primary'] : SKIP
|
|
215
|
+
deleted = hash['deleted'] ||= false
|
|
216
|
+
if hash['conferenceProperties']
|
|
217
|
+
conference_properties = CalendarListEntryConferenceProperties.from_hash(hash['conferenceProperties'])
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Create a new hash for additional properties, removing known properties.
|
|
221
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
222
|
+
|
|
223
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
224
|
+
new_hash, proc { |value| value }
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
# Create object from extracted values.
|
|
228
|
+
CalendarListEntry.new(kind: kind,
|
|
229
|
+
etag: etag,
|
|
230
|
+
id: id,
|
|
231
|
+
summary: summary,
|
|
232
|
+
description: description,
|
|
233
|
+
location: location,
|
|
234
|
+
time_zone: time_zone,
|
|
235
|
+
summary_override: summary_override,
|
|
236
|
+
color_id: color_id,
|
|
237
|
+
background_color: background_color,
|
|
238
|
+
foreground_color: foreground_color,
|
|
239
|
+
hidden: hidden,
|
|
240
|
+
selected: selected,
|
|
241
|
+
access_role: access_role,
|
|
242
|
+
default_reminders: default_reminders,
|
|
243
|
+
notification_settings: notification_settings,
|
|
244
|
+
primary: primary,
|
|
245
|
+
deleted: deleted,
|
|
246
|
+
conference_properties: conference_properties,
|
|
247
|
+
additional_properties: additional_properties)
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Provides a human-readable string representation of the object.
|
|
251
|
+
def to_s
|
|
252
|
+
class_name = self.class.name.split('::').last
|
|
253
|
+
"<#{class_name} kind: #{@kind}, etag: #{@etag}, id: #{@id}, summary: #{@summary},"\
|
|
254
|
+
" description: #{@description}, location: #{@location}, time_zone: #{@time_zone},"\
|
|
255
|
+
" summary_override: #{@summary_override}, color_id: #{@color_id}, background_color:"\
|
|
256
|
+
" #{@background_color}, foreground_color: #{@foreground_color}, hidden: #{@hidden},"\
|
|
257
|
+
" selected: #{@selected}, access_role: #{@access_role}, default_reminders:"\
|
|
258
|
+
" #{@default_reminders}, notification_settings: #{@notification_settings}, primary:"\
|
|
259
|
+
" #{@primary}, deleted: #{@deleted}, conference_properties: #{@conference_properties},"\
|
|
260
|
+
" additional_properties: #{@additional_properties}>"
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
264
|
+
def inspect
|
|
265
|
+
class_name = self.class.name.split('::').last
|
|
266
|
+
"<#{class_name} kind: #{@kind.inspect}, etag: #{@etag.inspect}, id: #{@id.inspect},"\
|
|
267
|
+
" summary: #{@summary.inspect}, description: #{@description.inspect}, location:"\
|
|
268
|
+
" #{@location.inspect}, time_zone: #{@time_zone.inspect}, summary_override:"\
|
|
269
|
+
" #{@summary_override.inspect}, color_id: #{@color_id.inspect}, background_color:"\
|
|
270
|
+
" #{@background_color.inspect}, foreground_color: #{@foreground_color.inspect}, hidden:"\
|
|
271
|
+
" #{@hidden.inspect}, selected: #{@selected.inspect}, access_role: #{@access_role.inspect},"\
|
|
272
|
+
" default_reminders: #{@default_reminders.inspect}, notification_settings:"\
|
|
273
|
+
" #{@notification_settings.inspect}, primary: #{@primary.inspect}, deleted:"\
|
|
274
|
+
" #{@deleted.inspect}, conference_properties: #{@conference_properties.inspect},"\
|
|
275
|
+
" additional_properties: #{@additional_properties}>"
|
|
276
|
+
end
|
|
277
|
+
end
|
|
278
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# calendar_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module CalendarApi
|
|
7
|
+
# Conference properties for this calendar.
|
|
8
|
+
class CalendarListEntryConferenceProperties < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The types of conference solutions supported for this calendar.
|
|
13
|
+
# @return [Array[ConferenceSolutionType]]
|
|
14
|
+
attr_accessor :allowed_conference_solution_types
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['allowed_conference_solution_types'] =
|
|
20
|
+
'allowedConferenceSolutionTypes'
|
|
21
|
+
@_hash
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# An array for optional fields
|
|
25
|
+
def self.optionals
|
|
26
|
+
%w[
|
|
27
|
+
allowed_conference_solution_types
|
|
28
|
+
]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# An array for nullable fields
|
|
32
|
+
def self.nullables
|
|
33
|
+
[]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def initialize(allowed_conference_solution_types: SKIP,
|
|
37
|
+
additional_properties: nil)
|
|
38
|
+
# Add additional model properties to the instance
|
|
39
|
+
additional_properties = {} if additional_properties.nil?
|
|
40
|
+
|
|
41
|
+
unless allowed_conference_solution_types == SKIP
|
|
42
|
+
@allowed_conference_solution_types =
|
|
43
|
+
allowed_conference_solution_types
|
|
44
|
+
end
|
|
45
|
+
@additional_properties = additional_properties
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Creates an instance of the object from a hash.
|
|
49
|
+
def self.from_hash(hash)
|
|
50
|
+
return nil unless hash
|
|
51
|
+
|
|
52
|
+
# Extract variables from the hash.
|
|
53
|
+
allowed_conference_solution_types =
|
|
54
|
+
hash.key?('allowedConferenceSolutionTypes') ? hash['allowedConferenceSolutionTypes'] : SKIP
|
|
55
|
+
|
|
56
|
+
# Create a new hash for additional properties, removing known properties.
|
|
57
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
58
|
+
|
|
59
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
60
|
+
new_hash, proc { |value| value }
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
# Create object from extracted values.
|
|
64
|
+
CalendarListEntryConferenceProperties.new(allowed_conference_solution_types: allowed_conference_solution_types,
|
|
65
|
+
additional_properties: additional_properties)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Provides a human-readable string representation of the object.
|
|
69
|
+
def to_s
|
|
70
|
+
class_name = self.class.name.split('::').last
|
|
71
|
+
"<#{class_name} allowed_conference_solution_types: #{@allowed_conference_solution_types},"\
|
|
72
|
+
" additional_properties: #{@additional_properties}>"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
76
|
+
def inspect
|
|
77
|
+
class_name = self.class.name.split('::').last
|
|
78
|
+
"<#{class_name} allowed_conference_solution_types:"\
|
|
79
|
+
" #{@allowed_conference_solution_types.inspect}, additional_properties:"\
|
|
80
|
+
" #{@additional_properties}>"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# calendar_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module CalendarApi
|
|
7
|
+
# The notifications the authenticated user receives for this calendar.
|
|
8
|
+
class CalendarListEntryNotificationSettings < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# List of notification settings for this calendar.
|
|
13
|
+
# @return [Array[CalendarNotification]]
|
|
14
|
+
attr_accessor :notifications
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['notifications'] = 'notifications'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
notifications
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(notifications: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@notifications = notifications unless notifications == SKIP
|
|
40
|
+
@additional_properties = additional_properties
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Creates an instance of the object from a hash.
|
|
44
|
+
def self.from_hash(hash)
|
|
45
|
+
return nil unless hash
|
|
46
|
+
|
|
47
|
+
# Extract variables from the hash.
|
|
48
|
+
# Parameter is an array, so we need to iterate through it
|
|
49
|
+
notifications = nil
|
|
50
|
+
unless hash['notifications'].nil?
|
|
51
|
+
notifications = []
|
|
52
|
+
hash['notifications'].each do |structure|
|
|
53
|
+
notifications << (CalendarNotification.from_hash(structure) if structure)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
notifications = SKIP unless hash.key?('notifications')
|
|
58
|
+
|
|
59
|
+
# Create a new hash for additional properties, removing known properties.
|
|
60
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
61
|
+
|
|
62
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
63
|
+
new_hash, proc { |value| value }
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
# Create object from extracted values.
|
|
67
|
+
CalendarListEntryNotificationSettings.new(notifications: notifications,
|
|
68
|
+
additional_properties: additional_properties)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Provides a human-readable string representation of the object.
|
|
72
|
+
def to_s
|
|
73
|
+
class_name = self.class.name.split('::').last
|
|
74
|
+
"<#{class_name} notifications: #{@notifications}, additional_properties:"\
|
|
75
|
+
" #{@additional_properties}>"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
79
|
+
def inspect
|
|
80
|
+
class_name = self.class.name.split('::').last
|
|
81
|
+
"<#{class_name} notifications: #{@notifications.inspect}, additional_properties:"\
|
|
82
|
+
" #{@additional_properties}>"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|