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,449 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="MapiCalendarRecurrencePatternDto.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
|
+
# Mapi recurrence pattern.
|
31
|
+
class MapiCalendarRecurrencePatternDto
|
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
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
95
|
+
def self.attribute_map
|
96
|
+
{
|
97
|
+
:'calendar_type' => :'calendarType',
|
98
|
+
:'deleted_instance_dates' => :'deletedInstanceDates',
|
99
|
+
:'end_date' => :'endDate',
|
100
|
+
:'end_type' => :'endType',
|
101
|
+
:'exceptions' => :'exceptions',
|
102
|
+
:'frequency' => :'frequency',
|
103
|
+
:'modified_instance_dates' => :'modifiedInstanceDates',
|
104
|
+
:'occurrence_count' => :'occurrenceCount',
|
105
|
+
:'pattern_type' => :'patternType',
|
106
|
+
:'period' => :'period',
|
107
|
+
:'sliding_flag' => :'slidingFlag',
|
108
|
+
:'start_date' => :'startDate',
|
109
|
+
:'week_start_day' => :'weekStartDay',
|
110
|
+
:'discriminator' => :'discriminator'
|
111
|
+
}
|
112
|
+
end
|
113
|
+
|
114
|
+
# Attribute type mapping.
|
115
|
+
def self.swagger_types
|
116
|
+
{
|
117
|
+
:'calendar_type' => :'String',
|
118
|
+
:'deleted_instance_dates' => :'Array<DateTime>',
|
119
|
+
:'end_date' => :'DateTime',
|
120
|
+
:'end_type' => :'String',
|
121
|
+
:'exceptions' => :'Array<MapiCalendarExceptionInfoDto>',
|
122
|
+
:'frequency' => :'String',
|
123
|
+
:'modified_instance_dates' => :'Array<DateTime>',
|
124
|
+
:'occurrence_count' => :'Integer',
|
125
|
+
:'pattern_type' => :'String',
|
126
|
+
:'period' => :'Integer',
|
127
|
+
:'sliding_flag' => :'BOOLEAN',
|
128
|
+
:'start_date' => :'DateTime',
|
129
|
+
:'week_start_day' => :'String',
|
130
|
+
:'discriminator' => :'String'
|
131
|
+
}
|
132
|
+
end
|
133
|
+
|
134
|
+
# Initializes the object
|
135
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
136
|
+
def initialize(attributes = {})
|
137
|
+
return unless attributes.is_a?(Hash)
|
138
|
+
|
139
|
+
# convert string to symbol for hash key
|
140
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
141
|
+
|
142
|
+
if attributes.has_key?(:'calendarType')
|
143
|
+
self.calendar_type = attributes[:'calendarType']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.has_key?(:'deletedInstanceDates')
|
147
|
+
if (value = attributes[:'deletedInstanceDates']).is_a?(Array)
|
148
|
+
self.deleted_instance_dates = value
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.has_key?(:'endDate')
|
153
|
+
self.end_date = attributes[:'endDate']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.has_key?(:'endType')
|
157
|
+
self.end_type = attributes[:'endType']
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.has_key?(:'exceptions')
|
161
|
+
if (value = attributes[:'exceptions']).is_a?(Array)
|
162
|
+
self.exceptions = value
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.has_key?(:'frequency')
|
167
|
+
self.frequency = attributes[:'frequency']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.has_key?(:'modifiedInstanceDates')
|
171
|
+
if (value = attributes[:'modifiedInstanceDates']).is_a?(Array)
|
172
|
+
self.modified_instance_dates = value
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
if attributes.has_key?(:'occurrenceCount')
|
177
|
+
self.occurrence_count = attributes[:'occurrenceCount']
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.has_key?(:'patternType')
|
181
|
+
self.pattern_type = attributes[:'patternType']
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes.has_key?(:'period')
|
185
|
+
self.period = attributes[:'period']
|
186
|
+
end
|
187
|
+
|
188
|
+
if attributes.has_key?(:'slidingFlag')
|
189
|
+
self.sliding_flag = attributes[:'slidingFlag']
|
190
|
+
end
|
191
|
+
|
192
|
+
if attributes.has_key?(:'startDate')
|
193
|
+
self.start_date = attributes[:'startDate']
|
194
|
+
end
|
195
|
+
|
196
|
+
if attributes.has_key?(:'weekStartDay')
|
197
|
+
self.week_start_day = attributes[:'weekStartDay']
|
198
|
+
end
|
199
|
+
|
200
|
+
if attributes.has_key?(:'discriminator')
|
201
|
+
@discriminator = self.class.name.split('::').last
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
# Initializes the object
|
206
|
+
# @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
|
207
|
+
# @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.
|
208
|
+
# @param [DateTime] end_date End date of an item recurrence pattern.
|
209
|
+
# @param [String] end_type Enumerates the ending type for the recurrence. Enum, available values: None, EndAfterDate, EndAfterNOccurrences, NeverEnd
|
210
|
+
# @param [Array<MapiCalendarExceptionInfoDto>] exceptions An exception specifies changes to an instance of a recurring series.
|
211
|
+
# @param [String] frequency Enumerates mapi calendar recurrence frequency Enum, available values: None, Daily, Weekly, Monthly, Yearly
|
212
|
+
# @param [Array<DateTime>] modified_instance_dates An array of dates, each of which is the date of a modified instance.
|
213
|
+
# @param [Integer] occurrence_count Number of occurrences in a recurrence.
|
214
|
+
# @param [String] pattern_type Enumerates the mapi calendar recurrence pattern types Enum, available values: Day, Week, Month, MonthEnd, MonthNth, HjMonth, HjMonthNth, HjMonthEnd
|
215
|
+
# @param [Integer] period Interval at which the meeting pattern repeats.
|
216
|
+
# @param [BOOLEAN] sliding_flag Defines whether pattern is sliding or not.
|
217
|
+
# @param [DateTime] start_date Start date of an item recurrence pattern.
|
218
|
+
# @param [String] week_start_day Day of week. Enum, available values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
|
219
|
+
# @param [String] discriminator
|
220
|
+
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)
|
221
|
+
self.calendar_type = calendar_type if calendar_type
|
222
|
+
self.deleted_instance_dates = deleted_instance_dates if deleted_instance_dates
|
223
|
+
self.end_date = end_date if end_date
|
224
|
+
self.end_type = end_type if end_type
|
225
|
+
self.exceptions = exceptions if exceptions
|
226
|
+
self.frequency = frequency if frequency
|
227
|
+
self.modified_instance_dates = modified_instance_dates if modified_instance_dates
|
228
|
+
self.occurrence_count = occurrence_count if occurrence_count
|
229
|
+
self.pattern_type = pattern_type if pattern_type
|
230
|
+
self.period = period if period
|
231
|
+
self.sliding_flag = sliding_flag if sliding_flag
|
232
|
+
self.start_date = start_date if start_date
|
233
|
+
self.week_start_day = week_start_day if week_start_day
|
234
|
+
@discriminator = self.class.name.split('::').last
|
235
|
+
end
|
236
|
+
|
237
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
238
|
+
# @return Array for valid properties with the reasons
|
239
|
+
def list_invalid_properties
|
240
|
+
invalid_properties = Array.new
|
241
|
+
if @calendar_type.nil?
|
242
|
+
invalid_properties.push('invalid value for "calendar_type", calendar_type cannot be nil.')
|
243
|
+
end
|
244
|
+
|
245
|
+
if @end_date.nil?
|
246
|
+
invalid_properties.push('invalid value for "end_date", end_date cannot be nil.')
|
247
|
+
end
|
248
|
+
|
249
|
+
if @end_type.nil?
|
250
|
+
invalid_properties.push('invalid value for "end_type", end_type cannot be nil.')
|
251
|
+
end
|
252
|
+
|
253
|
+
if @frequency.nil?
|
254
|
+
invalid_properties.push('invalid value for "frequency", frequency cannot be nil.')
|
255
|
+
end
|
256
|
+
|
257
|
+
if @occurrence_count.nil?
|
258
|
+
invalid_properties.push('invalid value for "occurrence_count", occurrence_count cannot be nil.')
|
259
|
+
end
|
260
|
+
|
261
|
+
if @pattern_type.nil?
|
262
|
+
invalid_properties.push('invalid value for "pattern_type", pattern_type cannot be nil.')
|
263
|
+
end
|
264
|
+
|
265
|
+
if @period.nil?
|
266
|
+
invalid_properties.push('invalid value for "period", period cannot be nil.')
|
267
|
+
end
|
268
|
+
|
269
|
+
if @sliding_flag.nil?
|
270
|
+
invalid_properties.push('invalid value for "sliding_flag", sliding_flag cannot be nil.')
|
271
|
+
end
|
272
|
+
|
273
|
+
if @start_date.nil?
|
274
|
+
invalid_properties.push('invalid value for "start_date", start_date cannot be nil.')
|
275
|
+
end
|
276
|
+
|
277
|
+
if @week_start_day.nil?
|
278
|
+
invalid_properties.push('invalid value for "week_start_day", week_start_day cannot be nil.')
|
279
|
+
end
|
280
|
+
|
281
|
+
if @discriminator.nil?
|
282
|
+
invalid_properties.push('invalid value for "discriminator", discriminator cannot be nil.')
|
283
|
+
end
|
284
|
+
|
285
|
+
invalid_properties
|
286
|
+
end
|
287
|
+
|
288
|
+
# Check to see if the all the properties in the model are valid
|
289
|
+
# @return true if the model is valid
|
290
|
+
def valid?
|
291
|
+
return false if @calendar_type.nil?
|
292
|
+
return false if @end_date.nil?
|
293
|
+
return false if @end_type.nil?
|
294
|
+
return false if @frequency.nil?
|
295
|
+
return false if @occurrence_count.nil?
|
296
|
+
return false if @pattern_type.nil?
|
297
|
+
return false if @period.nil?
|
298
|
+
return false if @sliding_flag.nil?
|
299
|
+
return false if @start_date.nil?
|
300
|
+
return false if @week_start_day.nil?
|
301
|
+
return false if @discriminator.nil?
|
302
|
+
true
|
303
|
+
end
|
304
|
+
|
305
|
+
# Checks equality by comparing each attribute.
|
306
|
+
# @param [Object] Object to be compared
|
307
|
+
def ==(o)
|
308
|
+
return true if self.equal?(o)
|
309
|
+
self.class == o.class &&
|
310
|
+
calendar_type == o.calendar_type &&
|
311
|
+
deleted_instance_dates == o.deleted_instance_dates &&
|
312
|
+
end_date == o.end_date &&
|
313
|
+
end_type == o.end_type &&
|
314
|
+
exceptions == o.exceptions &&
|
315
|
+
frequency == o.frequency &&
|
316
|
+
modified_instance_dates == o.modified_instance_dates &&
|
317
|
+
occurrence_count == o.occurrence_count &&
|
318
|
+
pattern_type == o.pattern_type &&
|
319
|
+
period == o.period &&
|
320
|
+
sliding_flag == o.sliding_flag &&
|
321
|
+
start_date == o.start_date &&
|
322
|
+
week_start_day == o.week_start_day &&
|
323
|
+
discriminator == o.discriminator
|
324
|
+
end
|
325
|
+
|
326
|
+
# @see the `==` method
|
327
|
+
# @param [Object] Object to be compared
|
328
|
+
def eql?(o)
|
329
|
+
self == o
|
330
|
+
end
|
331
|
+
|
332
|
+
# Calculates hash code according to all attributes.
|
333
|
+
# @return [Fixnum] Hash code
|
334
|
+
def hash
|
335
|
+
[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].hash
|
336
|
+
end
|
337
|
+
|
338
|
+
# Builds the object from hash
|
339
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
340
|
+
# @return [Object] Returns the model itself
|
341
|
+
def build_from_hash(attributes)
|
342
|
+
return nil unless attributes.is_a?(Hash)
|
343
|
+
self.class.swagger_types.each_pair do |key, type|
|
344
|
+
attribute_key = self.class.attribute_map[key]
|
345
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
346
|
+
if type =~ /\AArray<(.*)>/i
|
347
|
+
# check to ensure the input is an array given that the the attribute
|
348
|
+
# is documented as an array but the input is not
|
349
|
+
if attributes[attribute_key].is_a?(Array)
|
350
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
351
|
+
end
|
352
|
+
elsif !attributes[attribute_key].nil?
|
353
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
354
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
355
|
+
end
|
356
|
+
|
357
|
+
self
|
358
|
+
end
|
359
|
+
|
360
|
+
# Deserializes the data based on type
|
361
|
+
# @param string type Data type
|
362
|
+
# @param string value Value to be deserialized
|
363
|
+
# @return [Object] Deserialized data
|
364
|
+
def _deserialize(type, value)
|
365
|
+
case type.to_sym
|
366
|
+
when :DateTime
|
367
|
+
DateTime.parse(value)
|
368
|
+
when :Date
|
369
|
+
Date.parse(value)
|
370
|
+
when :String
|
371
|
+
value.to_s
|
372
|
+
when :Integer
|
373
|
+
value.to_i
|
374
|
+
when :Float
|
375
|
+
value.to_f
|
376
|
+
when :BOOLEAN
|
377
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
378
|
+
true
|
379
|
+
else
|
380
|
+
false
|
381
|
+
end
|
382
|
+
when :Object
|
383
|
+
# generic object (usually a Hash), return directly
|
384
|
+
value
|
385
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
386
|
+
inner_type = Regexp.last_match[:inner_type]
|
387
|
+
value.map { |v| _deserialize(inner_type, v) }
|
388
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
389
|
+
k_type = Regexp.last_match[:k_type]
|
390
|
+
v_type = Regexp.last_match[:v_type]
|
391
|
+
{}.tap do |hash|
|
392
|
+
value.each do |k, v|
|
393
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
394
|
+
end
|
395
|
+
end
|
396
|
+
else # model
|
397
|
+
sub_type = value[:type] || value[:discriminator] || type
|
398
|
+
if AsposeEmailCloud.const_defined?(sub_type)
|
399
|
+
type = sub_type
|
400
|
+
end
|
401
|
+
temp_model = AsposeEmailCloud.const_get(type).new
|
402
|
+
temp_model.build_from_hash(value)
|
403
|
+
end
|
404
|
+
end
|
405
|
+
|
406
|
+
# Returns the string representation of the object
|
407
|
+
# @return [String] String presentation of the object
|
408
|
+
def to_s
|
409
|
+
to_hash.to_s
|
410
|
+
end
|
411
|
+
|
412
|
+
# to_body is an alias to to_hash (backward compatibility)
|
413
|
+
# @return [Hash] Returns the object in the form of hash
|
414
|
+
def to_body
|
415
|
+
to_hash
|
416
|
+
end
|
417
|
+
|
418
|
+
# Returns the object in the form of hash
|
419
|
+
# @return [Hash] Returns the object in the form of hash
|
420
|
+
def to_hash
|
421
|
+
hash = {}
|
422
|
+
self.class.attribute_map.each_pair do |attr, param|
|
423
|
+
value = self.send(attr)
|
424
|
+
next if value.nil?
|
425
|
+
hash[param] = _to_hash(value)
|
426
|
+
end
|
427
|
+
hash
|
428
|
+
end
|
429
|
+
|
430
|
+
# Outputs non-array value in the form of hash
|
431
|
+
# For object, use to_hash. Otherwise, just return the value
|
432
|
+
# @param [Object] value Any valid value
|
433
|
+
# @return [Hash] Returns the value in the form of hash
|
434
|
+
def _to_hash(value)
|
435
|
+
if value.is_a?(Array)
|
436
|
+
value.compact.map { |v| _to_hash(v) }
|
437
|
+
elsif value.is_a?(Hash)
|
438
|
+
{}.tap do |hash|
|
439
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
440
|
+
end
|
441
|
+
elsif value.respond_to? :to_hash
|
442
|
+
value.to_hash
|
443
|
+
else
|
444
|
+
value
|
445
|
+
end
|
446
|
+
end
|
447
|
+
|
448
|
+
end
|
449
|
+
end
|
@@ -0,0 +1,228 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="MapiCalendarTimeZoneDto.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 mapi calendar time zone information.
|
31
|
+
class MapiCalendarTimeZoneDto
|
32
|
+
# Human-readable description of the time zone.
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :key_name
|
35
|
+
|
36
|
+
# Time zone rules
|
37
|
+
# @return [Array<MapiCalendarTimeZoneInfoDto>]
|
38
|
+
attr_accessor :time_zone_rules
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'key_name' => :'keyName',
|
44
|
+
:'time_zone_rules' => :'timeZoneRules'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute type mapping.
|
49
|
+
def self.swagger_types
|
50
|
+
{
|
51
|
+
:'key_name' => :'String',
|
52
|
+
:'time_zone_rules' => :'Array<MapiCalendarTimeZoneInfoDto>'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Initializes the object
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
+
def initialize(attributes = {})
|
59
|
+
return unless attributes.is_a?(Hash)
|
60
|
+
|
61
|
+
# convert string to symbol for hash key
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
63
|
+
|
64
|
+
if attributes.has_key?(:'keyName')
|
65
|
+
self.key_name = attributes[:'keyName']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.has_key?(:'timeZoneRules')
|
69
|
+
if (value = attributes[:'timeZoneRules']).is_a?(Array)
|
70
|
+
self.time_zone_rules = value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Initializes the object
|
76
|
+
# @param [String] key_name Human-readable description of the time zone.
|
77
|
+
# @param [Array<MapiCalendarTimeZoneInfoDto>] time_zone_rules Time zone rules
|
78
|
+
def initialize(key_name=nil, time_zone_rules=nil)
|
79
|
+
self.key_name = key_name if key_name
|
80
|
+
self.time_zone_rules = time_zone_rules if time_zone_rules
|
81
|
+
end
|
82
|
+
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
84
|
+
# @return Array for valid properties with the reasons
|
85
|
+
def list_invalid_properties
|
86
|
+
invalid_properties = Array.new
|
87
|
+
invalid_properties
|
88
|
+
end
|
89
|
+
|
90
|
+
# Check to see if the all the properties in the model are valid
|
91
|
+
# @return true if the model is valid
|
92
|
+
def valid?
|
93
|
+
true
|
94
|
+
end
|
95
|
+
|
96
|
+
# Checks equality by comparing each attribute.
|
97
|
+
# @param [Object] Object to be compared
|
98
|
+
def ==(o)
|
99
|
+
return true if self.equal?(o)
|
100
|
+
self.class == o.class &&
|
101
|
+
key_name == o.key_name &&
|
102
|
+
time_zone_rules == o.time_zone_rules
|
103
|
+
end
|
104
|
+
|
105
|
+
# @see the `==` method
|
106
|
+
# @param [Object] Object to be compared
|
107
|
+
def eql?(o)
|
108
|
+
self == o
|
109
|
+
end
|
110
|
+
|
111
|
+
# Calculates hash code according to all attributes.
|
112
|
+
# @return [Fixnum] Hash code
|
113
|
+
def hash
|
114
|
+
[key_name, time_zone_rules].hash
|
115
|
+
end
|
116
|
+
|
117
|
+
# Builds the object from hash
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
119
|
+
# @return [Object] Returns the model itself
|
120
|
+
def build_from_hash(attributes)
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
122
|
+
self.class.swagger_types.each_pair do |key, type|
|
123
|
+
attribute_key = self.class.attribute_map[key]
|
124
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
125
|
+
if type =~ /\AArray<(.*)>/i
|
126
|
+
# check to ensure the input is an array given that the the attribute
|
127
|
+
# is documented as an array but the input is not
|
128
|
+
if attributes[attribute_key].is_a?(Array)
|
129
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
130
|
+
end
|
131
|
+
elsif !attributes[attribute_key].nil?
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
133
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
134
|
+
end
|
135
|
+
|
136
|
+
self
|
137
|
+
end
|
138
|
+
|
139
|
+
# Deserializes the data based on type
|
140
|
+
# @param string type Data type
|
141
|
+
# @param string value Value to be deserialized
|
142
|
+
# @return [Object] Deserialized data
|
143
|
+
def _deserialize(type, value)
|
144
|
+
case type.to_sym
|
145
|
+
when :DateTime
|
146
|
+
DateTime.parse(value)
|
147
|
+
when :Date
|
148
|
+
Date.parse(value)
|
149
|
+
when :String
|
150
|
+
value.to_s
|
151
|
+
when :Integer
|
152
|
+
value.to_i
|
153
|
+
when :Float
|
154
|
+
value.to_f
|
155
|
+
when :BOOLEAN
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
157
|
+
true
|
158
|
+
else
|
159
|
+
false
|
160
|
+
end
|
161
|
+
when :Object
|
162
|
+
# generic object (usually a Hash), return directly
|
163
|
+
value
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
170
|
+
{}.tap do |hash|
|
171
|
+
value.each do |k, v|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
else # model
|
176
|
+
sub_type = value[:type] || value[:discriminator] || type
|
177
|
+
if AsposeEmailCloud.const_defined?(sub_type)
|
178
|
+
type = sub_type
|
179
|
+
end
|
180
|
+
temp_model = AsposeEmailCloud.const_get(type).new
|
181
|
+
temp_model.build_from_hash(value)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the string representation of the object
|
186
|
+
# @return [String] String presentation of the object
|
187
|
+
def to_s
|
188
|
+
to_hash.to_s
|
189
|
+
end
|
190
|
+
|
191
|
+
# to_body is an alias to to_hash (backward compatibility)
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_body
|
194
|
+
to_hash
|
195
|
+
end
|
196
|
+
|
197
|
+
# Returns the object in the form of hash
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
199
|
+
def to_hash
|
200
|
+
hash = {}
|
201
|
+
self.class.attribute_map.each_pair do |attr, param|
|
202
|
+
value = self.send(attr)
|
203
|
+
next if value.nil?
|
204
|
+
hash[param] = _to_hash(value)
|
205
|
+
end
|
206
|
+
hash
|
207
|
+
end
|
208
|
+
|
209
|
+
# Outputs non-array value in the form of hash
|
210
|
+
# For object, use to_hash. Otherwise, just return the value
|
211
|
+
# @param [Object] value Any valid value
|
212
|
+
# @return [Hash] Returns the value in the form of hash
|
213
|
+
def _to_hash(value)
|
214
|
+
if value.is_a?(Array)
|
215
|
+
value.compact.map { |v| _to_hash(v) }
|
216
|
+
elsif value.is_a?(Hash)
|
217
|
+
{}.tap do |hash|
|
218
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
219
|
+
end
|
220
|
+
elsif value.respond_to? :to_hash
|
221
|
+
value.to_hash
|
222
|
+
else
|
223
|
+
value
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
end
|
228
|
+
end
|