aspose_email_cloud 20.5.0 → 20.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aspose-email-cloud.rb +74 -0
- data/lib/aspose-email-cloud/api/email_api.rb +147 -0
- data/lib/aspose-email-cloud/models/ai_bcr_image_storage_file.rb +3 -3
- data/lib/aspose-email-cloud/models/ai_bcr_parse_storage_rq.rb +3 -3
- data/lib/aspose-email-cloud/models/append_email_base_request.rb +3 -3
- data/lib/aspose-email-cloud/models/append_email_model_rq.rb +3 -3
- data/lib/aspose-email-cloud/models/calendar_dto.rb +17 -4
- data/lib/aspose-email-cloud/models/contact_photo.rb +29 -5
- data/lib/aspose-email-cloud/models/daily_recurrence_pattern_dto.rb +296 -0
- data/lib/aspose-email-cloud/models/mapi_attachment_dto.rb +226 -0
- data/lib/aspose-email-cloud/models/mapi_binary_property_dto.rb +250 -0
- data/lib/aspose-email-cloud/models/mapi_boolean_property_dto.rb +255 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_attendees_dto.rb +266 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_daily_recurrence_pattern_dto.rb +464 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_dto.rb +728 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_event_recurrence_dto.rb +293 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_exception_info_dto.rb +431 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb +449 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_time_zone_dto.rb +228 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_time_zone_info_dto.rb +313 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_time_zone_rule_dto.rb +362 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_weekly_recurrence_pattern_dto.rb +464 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_yearly_and_monthly_recurrence_pattern_dto.rb +500 -0
- data/lib/aspose-email-cloud/models/mapi_contact_dto.rb +569 -0
- data/lib/aspose-email-cloud/models/mapi_contact_electronic_address_dto.rb +283 -0
- data/lib/aspose-email-cloud/models/mapi_contact_electronic_address_property_set_dto.rb +327 -0
- data/lib/aspose-email-cloud/models/mapi_contact_event_property_set_dto.rb +236 -0
- data/lib/aspose-email-cloud/models/mapi_contact_name_property_set_dto.rb +335 -0
- data/lib/aspose-email-cloud/models/mapi_contact_other_property_set_dto.rb +319 -0
- data/lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb +454 -0
- data/lib/aspose-email-cloud/models/mapi_contact_photo_dto.rb +255 -0
- data/lib/aspose-email-cloud/models/mapi_contact_physical_address_dto.rb +322 -0
- data/lib/aspose-email-cloud/models/mapi_contact_physical_address_property_set_dto.rb +239 -0
- data/lib/aspose-email-cloud/models/mapi_contact_professional_property_set_dto.rb +291 -0
- data/lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb +457 -0
- data/lib/aspose-email-cloud/models/mapi_date_time_property_dto.rb +255 -0
- data/lib/aspose-email-cloud/models/mapi_electronic_address_dto.rb +265 -0
- data/lib/aspose-email-cloud/models/mapi_file_as_property_dto.rb +255 -0
- data/lib/aspose-email-cloud/models/mapi_importance_property_dto.rb +255 -0
- data/lib/aspose-email-cloud/models/mapi_int_property_dto.rb +255 -0
- data/lib/aspose-email-cloud/models/mapi_known_property_descriptor.rb +237 -0
- data/lib/aspose-email-cloud/models/mapi_legacy_free_busy_property_dto.rb +255 -0
- data/lib/aspose-email-cloud/models/mapi_message_dto.rb +801 -0
- data/lib/aspose-email-cloud/models/mapi_message_item_base_dto.rb +452 -0
- data/lib/aspose-email-cloud/models/mapi_multi_int_property_dto.rb +252 -0
- data/lib/aspose-email-cloud/models/mapi_multi_string_property_dto.rb +252 -0
- data/lib/aspose-email-cloud/models/mapi_physical_address_index_property_dto.rb +255 -0
- data/lib/aspose-email-cloud/models/mapi_pid_lid_property_descriptor.rb +322 -0
- data/lib/aspose-email-cloud/models/mapi_pid_name_property_descriptor.rb +304 -0
- data/lib/aspose-email-cloud/models/mapi_pid_property_descriptor.rb +286 -0
- data/lib/aspose-email-cloud/models/mapi_pid_tag_property_descriptor.rb +322 -0
- data/lib/aspose-email-cloud/models/mapi_property_descriptor.rb +224 -0
- data/lib/aspose-email-cloud/models/mapi_property_dto.rb +237 -0
- data/lib/aspose-email-cloud/models/mapi_recipient_dto.rb +257 -0
- data/lib/aspose-email-cloud/models/mapi_response_type_property_dto.rb +255 -0
- data/lib/aspose-email-cloud/models/mapi_string_property_dto.rb +250 -0
- data/lib/aspose-email-cloud/models/monthly_recurrence_pattern_dto.rb +350 -0
- data/lib/aspose-email-cloud/models/recurrence_pattern_dto.rb +296 -0
- data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_mapi_model_request_data.rb +79 -0
- data/lib/aspose-email-cloud/models/requests/convert_contact_model_to_mapi_model_request_data.rb +79 -0
- data/lib/aspose-email-cloud/models/requests/convert_email_model_to_file_request_data.rb +2 -2
- data/lib/aspose-email-cloud/models/requests/convert_email_model_to_mapi_model_request_data.rb +79 -0
- data/lib/aspose-email-cloud/models/requests/convert_email_request_data.rb +2 -2
- data/lib/aspose-email-cloud/models/requests/convert_mapi_calendar_model_to_calendar_model_request_data.rb +79 -0
- data/lib/aspose-email-cloud/models/requests/convert_mapi_calendar_model_to_file_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/convert_mapi_contact_model_to_contact_model_request_data.rb +79 -0
- data/lib/aspose-email-cloud/models/requests/convert_mapi_contact_model_to_file_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/convert_mapi_message_model_to_email_model_request_data.rb +79 -0
- data/lib/aspose-email-cloud/models/requests/convert_mapi_message_model_to_file_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/get_calendar_file_as_mapi_model_request_data.rb +80 -0
- data/lib/aspose-email-cloud/models/requests/get_contact_file_as_mapi_model_request_data.rb +90 -0
- data/lib/aspose-email-cloud/models/requests/get_email_as_file_request_data.rb +2 -2
- data/lib/aspose-email-cloud/models/requests/get_email_file_as_mapi_model_request_data.rb +90 -0
- data/lib/aspose-email-cloud/models/requests/get_email_model_list_request_data.rb +2 -2
- data/lib/aspose-email-cloud/models/requests/get_email_model_request_data.rb +2 -2
- data/lib/aspose-email-cloud/models/requests/get_mapi_calendar_model_request_data.rb +91 -0
- data/lib/aspose-email-cloud/models/requests/get_mapi_contact_model_request_data.rb +101 -0
- data/lib/aspose-email-cloud/models/requests/get_mapi_message_model_request_data.rb +101 -0
- data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +2 -2
- data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +2 -2
- data/lib/aspose-email-cloud/models/requests/save_email_model_request_data.rb +4 -4
- data/lib/aspose-email-cloud/models/requests/save_mapi_calendar_model_request_data.rb +99 -0
- data/lib/aspose-email-cloud/models/requests/save_mapi_contact_model_request_data.rb +99 -0
- data/lib/aspose-email-cloud/models/requests/save_mapi_message_model_request_data.rb +99 -0
- data/lib/aspose-email-cloud/models/send_email_base_request.rb +3 -3
- data/lib/aspose-email-cloud/models/send_email_model_rq.rb +3 -3
- data/lib/aspose-email-cloud/models/storage_model_rq_of_mapi_calendar_dto.rb +225 -0
- data/lib/aspose-email-cloud/models/storage_model_rq_of_mapi_contact_dto.rb +225 -0
- data/lib/aspose-email-cloud/models/storage_model_rq_of_mapi_message_dto.rb +225 -0
- data/lib/aspose-email-cloud/models/task_regenerating_pattern_dto.rb +314 -0
- data/lib/aspose-email-cloud/models/weekly_recurrence_pattern_dto.rb +311 -0
- data/lib/aspose-email-cloud/models/yearly_recurrence_pattern_dto.rb +368 -0
- data/lib/aspose-email-cloud/version.rb +1 -1
- metadata +76 -2
@@ -0,0 +1,500 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="MapiCalendarYearlyAndMonthlyRecurrencePatternDto.rb">
|
3
|
+
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
14
|
+
# all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# ----------------------------------------------------------------------------
|
25
|
+
|
26
|
+
|
27
|
+
require 'date'
|
28
|
+
|
29
|
+
module AsposeEmailCloud
|
30
|
+
# Represents the yearly and monthly recurrence pattern of the mapi calendar
|
31
|
+
class MapiCalendarYearlyAndMonthlyRecurrencePatternDto
|
32
|
+
# Enumerated the calendar type of the mapi recurrence Enum, available values: Default, CalGregorian, CalGregorianUs, CalJapan, CalTaiwan, CalKorea, CalHijri, CalThai, CalHebrew, CalGregorianMeFrench, CalGregorianArabic, CalGregorianXLitEnglish, CalGregorianXLitFrench, CalLunarJapanese, CalChineseLunar, CalSaka, CalLunarEtoChn, CalLunarEtoKor, CalLunarRokuyou, CalLunarKorean, CalUmAlQura
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :calendar_type
|
35
|
+
|
36
|
+
# An array of dates, each of which is the original instance date of either a deleted instance or a modified instance for this recurrence.
|
37
|
+
# @return [Array<DateTime>]
|
38
|
+
attr_accessor :deleted_instance_dates
|
39
|
+
|
40
|
+
# End date of an item recurrence pattern.
|
41
|
+
# @return [DateTime]
|
42
|
+
attr_accessor :end_date
|
43
|
+
|
44
|
+
# Enumerates the ending type for the recurrence. Enum, available values: None, EndAfterDate, EndAfterNOccurrences, NeverEnd
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :end_type
|
47
|
+
|
48
|
+
# An exception specifies changes to an instance of a recurring series.
|
49
|
+
# @return [Array<MapiCalendarExceptionInfoDto>]
|
50
|
+
attr_accessor :exceptions
|
51
|
+
|
52
|
+
# Enumerates mapi calendar recurrence frequency Enum, available values: None, Daily, Weekly, Monthly, Yearly
|
53
|
+
# @return [String]
|
54
|
+
attr_accessor :frequency
|
55
|
+
|
56
|
+
# An array of dates, each of which is the date of a modified instance.
|
57
|
+
# @return [Array<DateTime>]
|
58
|
+
attr_accessor :modified_instance_dates
|
59
|
+
|
60
|
+
# Number of occurrences in a recurrence.
|
61
|
+
# @return [Integer]
|
62
|
+
attr_accessor :occurrence_count
|
63
|
+
|
64
|
+
# Enumerates the mapi calendar recurrence pattern types Enum, available values: Day, Week, Month, MonthEnd, MonthNth, HjMonth, HjMonthNth, HjMonthEnd
|
65
|
+
# @return [String]
|
66
|
+
attr_accessor :pattern_type
|
67
|
+
|
68
|
+
# Interval at which the meeting pattern repeats.
|
69
|
+
# @return [Integer]
|
70
|
+
attr_accessor :period
|
71
|
+
|
72
|
+
# Defines whether pattern is sliding or not.
|
73
|
+
# @return [BOOLEAN]
|
74
|
+
attr_accessor :sliding_flag
|
75
|
+
|
76
|
+
# Start date of an item recurrence pattern.
|
77
|
+
# @return [DateTime]
|
78
|
+
attr_accessor :start_date
|
79
|
+
|
80
|
+
# Day of week. Enum, available values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
|
81
|
+
# @return [String]
|
82
|
+
attr_accessor :week_start_day
|
83
|
+
|
84
|
+
|
85
|
+
# @return [String]
|
86
|
+
def discriminator #getter method
|
87
|
+
self.class.name.split('::').last
|
88
|
+
end
|
89
|
+
|
90
|
+
def discriminator=(discriminator) #setter method, parameter ignored
|
91
|
+
@discriminator = self.class.name.split('::').last
|
92
|
+
end
|
93
|
+
|
94
|
+
# Day of the month on which the recurrence falls.
|
95
|
+
# @return [Integer]
|
96
|
+
attr_accessor :day
|
97
|
+
|
98
|
+
# Days of week at which the event occurs. Items: Enumerates the days of week of the mapi calendar recurrence pattern Enum, available values: Saturday, Friday, Thursday, Wednesday, Tuesday, Monday, Sunday
|
99
|
+
# @return [Array<String>]
|
100
|
+
attr_accessor :day_of_week
|
101
|
+
|
102
|
+
# Day positions, typically found in a month. Enum, available values: None, First, Second, Third, Fourth, Last
|
103
|
+
# @return [String]
|
104
|
+
attr_accessor :position
|
105
|
+
|
106
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
107
|
+
def self.attribute_map
|
108
|
+
{
|
109
|
+
:'calendar_type' => :'calendarType',
|
110
|
+
:'deleted_instance_dates' => :'deletedInstanceDates',
|
111
|
+
:'end_date' => :'endDate',
|
112
|
+
:'end_type' => :'endType',
|
113
|
+
:'exceptions' => :'exceptions',
|
114
|
+
:'frequency' => :'frequency',
|
115
|
+
:'modified_instance_dates' => :'modifiedInstanceDates',
|
116
|
+
:'occurrence_count' => :'occurrenceCount',
|
117
|
+
:'pattern_type' => :'patternType',
|
118
|
+
:'period' => :'period',
|
119
|
+
:'sliding_flag' => :'slidingFlag',
|
120
|
+
:'start_date' => :'startDate',
|
121
|
+
:'week_start_day' => :'weekStartDay',
|
122
|
+
:'discriminator' => :'discriminator',
|
123
|
+
:'day' => :'day',
|
124
|
+
:'day_of_week' => :'dayOfWeek',
|
125
|
+
:'position' => :'position'
|
126
|
+
}
|
127
|
+
end
|
128
|
+
|
129
|
+
# Attribute type mapping.
|
130
|
+
def self.swagger_types
|
131
|
+
{
|
132
|
+
:'calendar_type' => :'String',
|
133
|
+
:'deleted_instance_dates' => :'Array<DateTime>',
|
134
|
+
:'end_date' => :'DateTime',
|
135
|
+
:'end_type' => :'String',
|
136
|
+
:'exceptions' => :'Array<MapiCalendarExceptionInfoDto>',
|
137
|
+
:'frequency' => :'String',
|
138
|
+
:'modified_instance_dates' => :'Array<DateTime>',
|
139
|
+
:'occurrence_count' => :'Integer',
|
140
|
+
:'pattern_type' => :'String',
|
141
|
+
:'period' => :'Integer',
|
142
|
+
:'sliding_flag' => :'BOOLEAN',
|
143
|
+
:'start_date' => :'DateTime',
|
144
|
+
:'week_start_day' => :'String',
|
145
|
+
:'discriminator' => :'String',
|
146
|
+
:'day' => :'Integer',
|
147
|
+
:'day_of_week' => :'Array<String>',
|
148
|
+
:'position' => :'String'
|
149
|
+
}
|
150
|
+
end
|
151
|
+
|
152
|
+
# Initializes the object
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
154
|
+
def initialize(attributes = {})
|
155
|
+
return unless attributes.is_a?(Hash)
|
156
|
+
|
157
|
+
# convert string to symbol for hash key
|
158
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
159
|
+
|
160
|
+
if attributes.has_key?(:'calendarType')
|
161
|
+
self.calendar_type = attributes[:'calendarType']
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.has_key?(:'deletedInstanceDates')
|
165
|
+
if (value = attributes[:'deletedInstanceDates']).is_a?(Array)
|
166
|
+
self.deleted_instance_dates = value
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.has_key?(:'endDate')
|
171
|
+
self.end_date = attributes[:'endDate']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.has_key?(:'endType')
|
175
|
+
self.end_type = attributes[:'endType']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.has_key?(:'exceptions')
|
179
|
+
if (value = attributes[:'exceptions']).is_a?(Array)
|
180
|
+
self.exceptions = value
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes.has_key?(:'frequency')
|
185
|
+
self.frequency = attributes[:'frequency']
|
186
|
+
end
|
187
|
+
|
188
|
+
if attributes.has_key?(:'modifiedInstanceDates')
|
189
|
+
if (value = attributes[:'modifiedInstanceDates']).is_a?(Array)
|
190
|
+
self.modified_instance_dates = value
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.has_key?(:'occurrenceCount')
|
195
|
+
self.occurrence_count = attributes[:'occurrenceCount']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.has_key?(:'patternType')
|
199
|
+
self.pattern_type = attributes[:'patternType']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes.has_key?(:'period')
|
203
|
+
self.period = attributes[:'period']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes.has_key?(:'slidingFlag')
|
207
|
+
self.sliding_flag = attributes[:'slidingFlag']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes.has_key?(:'startDate')
|
211
|
+
self.start_date = attributes[:'startDate']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.has_key?(:'weekStartDay')
|
215
|
+
self.week_start_day = attributes[:'weekStartDay']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.has_key?(:'discriminator')
|
219
|
+
@discriminator = self.class.name.split('::').last
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.has_key?(:'day')
|
223
|
+
self.day = attributes[:'day']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.has_key?(:'dayOfWeek')
|
227
|
+
if (value = attributes[:'dayOfWeek']).is_a?(Array)
|
228
|
+
self.day_of_week = value
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
if attributes.has_key?(:'position')
|
233
|
+
self.position = attributes[:'position']
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
# Initializes the object
|
238
|
+
# @param [String] calendar_type Enumerated the calendar type of the mapi recurrence Enum, available values: Default, CalGregorian, CalGregorianUs, CalJapan, CalTaiwan, CalKorea, CalHijri, CalThai, CalHebrew, CalGregorianMeFrench, CalGregorianArabic, CalGregorianXLitEnglish, CalGregorianXLitFrench, CalLunarJapanese, CalChineseLunar, CalSaka, CalLunarEtoChn, CalLunarEtoKor, CalLunarRokuyou, CalLunarKorean, CalUmAlQura
|
239
|
+
# @param [Array<DateTime>] deleted_instance_dates An array of dates, each of which is the original instance date of either a deleted instance or a modified instance for this recurrence.
|
240
|
+
# @param [DateTime] end_date End date of an item recurrence pattern.
|
241
|
+
# @param [String] end_type Enumerates the ending type for the recurrence. Enum, available values: None, EndAfterDate, EndAfterNOccurrences, NeverEnd
|
242
|
+
# @param [Array<MapiCalendarExceptionInfoDto>] exceptions An exception specifies changes to an instance of a recurring series.
|
243
|
+
# @param [String] frequency Enumerates mapi calendar recurrence frequency Enum, available values: None, Daily, Weekly, Monthly, Yearly
|
244
|
+
# @param [Array<DateTime>] modified_instance_dates An array of dates, each of which is the date of a modified instance.
|
245
|
+
# @param [Integer] occurrence_count Number of occurrences in a recurrence.
|
246
|
+
# @param [String] pattern_type Enumerates the mapi calendar recurrence pattern types Enum, available values: Day, Week, Month, MonthEnd, MonthNth, HjMonth, HjMonthNth, HjMonthEnd
|
247
|
+
# @param [Integer] period Interval at which the meeting pattern repeats.
|
248
|
+
# @param [BOOLEAN] sliding_flag Defines whether pattern is sliding or not.
|
249
|
+
# @param [DateTime] start_date Start date of an item recurrence pattern.
|
250
|
+
# @param [String] week_start_day Day of week. Enum, available values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
|
251
|
+
# @param [String] discriminator
|
252
|
+
# @param [Integer] day Day of the month on which the recurrence falls.
|
253
|
+
# @param [Array<String>] day_of_week Days of week at which the event occurs. Items: Enumerates the days of week of the mapi calendar recurrence pattern Enum, available values: Saturday, Friday, Thursday, Wednesday, Tuesday, Monday, Sunday
|
254
|
+
# @param [String] position Day positions, typically found in a month. Enum, available values: None, First, Second, Third, Fourth, Last
|
255
|
+
def initialize(calendar_type=nil, deleted_instance_dates=nil, end_date=nil, end_type=nil, exceptions=nil, frequency=nil, modified_instance_dates=nil, occurrence_count=nil, pattern_type=nil, period=nil, sliding_flag=nil, start_date=nil, week_start_day=nil, discriminator=nil, day=nil, day_of_week=nil, position=nil)
|
256
|
+
self.calendar_type = calendar_type if calendar_type
|
257
|
+
self.deleted_instance_dates = deleted_instance_dates if deleted_instance_dates
|
258
|
+
self.end_date = end_date if end_date
|
259
|
+
self.end_type = end_type if end_type
|
260
|
+
self.exceptions = exceptions if exceptions
|
261
|
+
self.frequency = frequency if frequency
|
262
|
+
self.modified_instance_dates = modified_instance_dates if modified_instance_dates
|
263
|
+
self.occurrence_count = occurrence_count if occurrence_count
|
264
|
+
self.pattern_type = pattern_type if pattern_type
|
265
|
+
self.period = period if period
|
266
|
+
self.sliding_flag = sliding_flag if sliding_flag
|
267
|
+
self.start_date = start_date if start_date
|
268
|
+
self.week_start_day = week_start_day if week_start_day
|
269
|
+
@discriminator = self.class.name.split('::').last
|
270
|
+
self.day = day if day
|
271
|
+
self.day_of_week = day_of_week if day_of_week
|
272
|
+
self.position = position if position
|
273
|
+
end
|
274
|
+
|
275
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
276
|
+
# @return Array for valid properties with the reasons
|
277
|
+
def list_invalid_properties
|
278
|
+
invalid_properties = Array.new
|
279
|
+
if @calendar_type.nil?
|
280
|
+
invalid_properties.push('invalid value for "calendar_type", calendar_type cannot be nil.')
|
281
|
+
end
|
282
|
+
|
283
|
+
if @end_date.nil?
|
284
|
+
invalid_properties.push('invalid value for "end_date", end_date cannot be nil.')
|
285
|
+
end
|
286
|
+
|
287
|
+
if @end_type.nil?
|
288
|
+
invalid_properties.push('invalid value for "end_type", end_type cannot be nil.')
|
289
|
+
end
|
290
|
+
|
291
|
+
if @frequency.nil?
|
292
|
+
invalid_properties.push('invalid value for "frequency", frequency cannot be nil.')
|
293
|
+
end
|
294
|
+
|
295
|
+
if @occurrence_count.nil?
|
296
|
+
invalid_properties.push('invalid value for "occurrence_count", occurrence_count cannot be nil.')
|
297
|
+
end
|
298
|
+
|
299
|
+
if @pattern_type.nil?
|
300
|
+
invalid_properties.push('invalid value for "pattern_type", pattern_type cannot be nil.')
|
301
|
+
end
|
302
|
+
|
303
|
+
if @period.nil?
|
304
|
+
invalid_properties.push('invalid value for "period", period cannot be nil.')
|
305
|
+
end
|
306
|
+
|
307
|
+
if @sliding_flag.nil?
|
308
|
+
invalid_properties.push('invalid value for "sliding_flag", sliding_flag cannot be nil.')
|
309
|
+
end
|
310
|
+
|
311
|
+
if @start_date.nil?
|
312
|
+
invalid_properties.push('invalid value for "start_date", start_date cannot be nil.')
|
313
|
+
end
|
314
|
+
|
315
|
+
if @week_start_day.nil?
|
316
|
+
invalid_properties.push('invalid value for "week_start_day", week_start_day cannot be nil.')
|
317
|
+
end
|
318
|
+
|
319
|
+
if @discriminator.nil?
|
320
|
+
invalid_properties.push('invalid value for "discriminator", discriminator cannot be nil.')
|
321
|
+
end
|
322
|
+
|
323
|
+
if @day.nil?
|
324
|
+
invalid_properties.push('invalid value for "day", day cannot be nil.')
|
325
|
+
end
|
326
|
+
|
327
|
+
if @position.nil?
|
328
|
+
invalid_properties.push('invalid value for "position", position cannot be nil.')
|
329
|
+
end
|
330
|
+
|
331
|
+
invalid_properties
|
332
|
+
end
|
333
|
+
|
334
|
+
# Check to see if the all the properties in the model are valid
|
335
|
+
# @return true if the model is valid
|
336
|
+
def valid?
|
337
|
+
return false if @calendar_type.nil?
|
338
|
+
return false if @end_date.nil?
|
339
|
+
return false if @end_type.nil?
|
340
|
+
return false if @frequency.nil?
|
341
|
+
return false if @occurrence_count.nil?
|
342
|
+
return false if @pattern_type.nil?
|
343
|
+
return false if @period.nil?
|
344
|
+
return false if @sliding_flag.nil?
|
345
|
+
return false if @start_date.nil?
|
346
|
+
return false if @week_start_day.nil?
|
347
|
+
return false if @discriminator.nil?
|
348
|
+
return false if @day.nil?
|
349
|
+
return false if @position.nil?
|
350
|
+
true
|
351
|
+
end
|
352
|
+
|
353
|
+
# Checks equality by comparing each attribute.
|
354
|
+
# @param [Object] Object to be compared
|
355
|
+
def ==(o)
|
356
|
+
return true if self.equal?(o)
|
357
|
+
self.class == o.class &&
|
358
|
+
calendar_type == o.calendar_type &&
|
359
|
+
deleted_instance_dates == o.deleted_instance_dates &&
|
360
|
+
end_date == o.end_date &&
|
361
|
+
end_type == o.end_type &&
|
362
|
+
exceptions == o.exceptions &&
|
363
|
+
frequency == o.frequency &&
|
364
|
+
modified_instance_dates == o.modified_instance_dates &&
|
365
|
+
occurrence_count == o.occurrence_count &&
|
366
|
+
pattern_type == o.pattern_type &&
|
367
|
+
period == o.period &&
|
368
|
+
sliding_flag == o.sliding_flag &&
|
369
|
+
start_date == o.start_date &&
|
370
|
+
week_start_day == o.week_start_day &&
|
371
|
+
discriminator == o.discriminator &&
|
372
|
+
day == o.day &&
|
373
|
+
day_of_week == o.day_of_week &&
|
374
|
+
position == o.position
|
375
|
+
end
|
376
|
+
|
377
|
+
# @see the `==` method
|
378
|
+
# @param [Object] Object to be compared
|
379
|
+
def eql?(o)
|
380
|
+
self == o
|
381
|
+
end
|
382
|
+
|
383
|
+
# Calculates hash code according to all attributes.
|
384
|
+
# @return [Fixnum] Hash code
|
385
|
+
def hash
|
386
|
+
[calendar_type, deleted_instance_dates, end_date, end_type, exceptions, frequency, modified_instance_dates, occurrence_count, pattern_type, period, sliding_flag, start_date, week_start_day, discriminator, day, day_of_week, position].hash
|
387
|
+
end
|
388
|
+
|
389
|
+
# Builds the object from hash
|
390
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
391
|
+
# @return [Object] Returns the model itself
|
392
|
+
def build_from_hash(attributes)
|
393
|
+
return nil unless attributes.is_a?(Hash)
|
394
|
+
self.class.swagger_types.each_pair do |key, type|
|
395
|
+
attribute_key = self.class.attribute_map[key]
|
396
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
397
|
+
if type =~ /\AArray<(.*)>/i
|
398
|
+
# check to ensure the input is an array given that the the attribute
|
399
|
+
# is documented as an array but the input is not
|
400
|
+
if attributes[attribute_key].is_a?(Array)
|
401
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
402
|
+
end
|
403
|
+
elsif !attributes[attribute_key].nil?
|
404
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
405
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
406
|
+
end
|
407
|
+
|
408
|
+
self
|
409
|
+
end
|
410
|
+
|
411
|
+
# Deserializes the data based on type
|
412
|
+
# @param string type Data type
|
413
|
+
# @param string value Value to be deserialized
|
414
|
+
# @return [Object] Deserialized data
|
415
|
+
def _deserialize(type, value)
|
416
|
+
case type.to_sym
|
417
|
+
when :DateTime
|
418
|
+
DateTime.parse(value)
|
419
|
+
when :Date
|
420
|
+
Date.parse(value)
|
421
|
+
when :String
|
422
|
+
value.to_s
|
423
|
+
when :Integer
|
424
|
+
value.to_i
|
425
|
+
when :Float
|
426
|
+
value.to_f
|
427
|
+
when :BOOLEAN
|
428
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
429
|
+
true
|
430
|
+
else
|
431
|
+
false
|
432
|
+
end
|
433
|
+
when :Object
|
434
|
+
# generic object (usually a Hash), return directly
|
435
|
+
value
|
436
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
437
|
+
inner_type = Regexp.last_match[:inner_type]
|
438
|
+
value.map { |v| _deserialize(inner_type, v) }
|
439
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
440
|
+
k_type = Regexp.last_match[:k_type]
|
441
|
+
v_type = Regexp.last_match[:v_type]
|
442
|
+
{}.tap do |hash|
|
443
|
+
value.each do |k, v|
|
444
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
445
|
+
end
|
446
|
+
end
|
447
|
+
else # model
|
448
|
+
sub_type = value[:type] || value[:discriminator] || type
|
449
|
+
if AsposeEmailCloud.const_defined?(sub_type)
|
450
|
+
type = sub_type
|
451
|
+
end
|
452
|
+
temp_model = AsposeEmailCloud.const_get(type).new
|
453
|
+
temp_model.build_from_hash(value)
|
454
|
+
end
|
455
|
+
end
|
456
|
+
|
457
|
+
# Returns the string representation of the object
|
458
|
+
# @return [String] String presentation of the object
|
459
|
+
def to_s
|
460
|
+
to_hash.to_s
|
461
|
+
end
|
462
|
+
|
463
|
+
# to_body is an alias to to_hash (backward compatibility)
|
464
|
+
# @return [Hash] Returns the object in the form of hash
|
465
|
+
def to_body
|
466
|
+
to_hash
|
467
|
+
end
|
468
|
+
|
469
|
+
# Returns the object in the form of hash
|
470
|
+
# @return [Hash] Returns the object in the form of hash
|
471
|
+
def to_hash
|
472
|
+
hash = {}
|
473
|
+
self.class.attribute_map.each_pair do |attr, param|
|
474
|
+
value = self.send(attr)
|
475
|
+
next if value.nil?
|
476
|
+
hash[param] = _to_hash(value)
|
477
|
+
end
|
478
|
+
hash
|
479
|
+
end
|
480
|
+
|
481
|
+
# Outputs non-array value in the form of hash
|
482
|
+
# For object, use to_hash. Otherwise, just return the value
|
483
|
+
# @param [Object] value Any valid value
|
484
|
+
# @return [Hash] Returns the value in the form of hash
|
485
|
+
def _to_hash(value)
|
486
|
+
if value.is_a?(Array)
|
487
|
+
value.compact.map { |v| _to_hash(v) }
|
488
|
+
elsif value.is_a?(Hash)
|
489
|
+
{}.tap do |hash|
|
490
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
491
|
+
end
|
492
|
+
elsif value.respond_to? :to_hash
|
493
|
+
value.to_hash
|
494
|
+
else
|
495
|
+
value
|
496
|
+
end
|
497
|
+
end
|
498
|
+
|
499
|
+
end
|
500
|
+
end
|