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,293 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="MapiCalendarEventRecurrenceDto.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
|
+
# Recurrence properties of calendar object.
|
31
|
+
class MapiCalendarEventRecurrenceDto
|
32
|
+
# Time zone information that describes how to convert the meeting date and time on a recurring series to and from UTC.
|
33
|
+
# @return [MapiCalendarTimeZoneDto]
|
34
|
+
attr_accessor :appointment_time_zone_definition_recur
|
35
|
+
|
36
|
+
# Date of the last instance.
|
37
|
+
# @return [DateTime]
|
38
|
+
attr_accessor :clip_end
|
39
|
+
|
40
|
+
# Date of the first instance.
|
41
|
+
# @return [DateTime]
|
42
|
+
attr_accessor :clip_start
|
43
|
+
|
44
|
+
# Value indicating whether the object represents an exception.
|
45
|
+
# @return [BOOLEAN]
|
46
|
+
attr_accessor :is_exception
|
47
|
+
|
48
|
+
# Recurrence pattern.
|
49
|
+
# @return [MapiCalendarRecurrencePatternDto]
|
50
|
+
attr_accessor :recurrence_pattern
|
51
|
+
|
52
|
+
# Time zone information for a recurring meeting.
|
53
|
+
# @return [MapiCalendarTimeZoneDto]
|
54
|
+
attr_accessor :time_zone_struct
|
55
|
+
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
57
|
+
def self.attribute_map
|
58
|
+
{
|
59
|
+
:'appointment_time_zone_definition_recur' => :'appointmentTimeZoneDefinitionRecur',
|
60
|
+
:'clip_end' => :'clipEnd',
|
61
|
+
:'clip_start' => :'clipStart',
|
62
|
+
:'is_exception' => :'isException',
|
63
|
+
:'recurrence_pattern' => :'recurrencePattern',
|
64
|
+
:'time_zone_struct' => :'timeZoneStruct'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute type mapping.
|
69
|
+
def self.swagger_types
|
70
|
+
{
|
71
|
+
:'appointment_time_zone_definition_recur' => :'MapiCalendarTimeZoneDto',
|
72
|
+
:'clip_end' => :'DateTime',
|
73
|
+
:'clip_start' => :'DateTime',
|
74
|
+
:'is_exception' => :'BOOLEAN',
|
75
|
+
:'recurrence_pattern' => :'MapiCalendarRecurrencePatternDto',
|
76
|
+
:'time_zone_struct' => :'MapiCalendarTimeZoneDto'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# Initializes the object
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
def initialize(attributes = {})
|
83
|
+
return unless attributes.is_a?(Hash)
|
84
|
+
|
85
|
+
# convert string to symbol for hash key
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
87
|
+
|
88
|
+
if attributes.has_key?(:'appointmentTimeZoneDefinitionRecur')
|
89
|
+
self.appointment_time_zone_definition_recur = attributes[:'appointmentTimeZoneDefinitionRecur']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.has_key?(:'clipEnd')
|
93
|
+
self.clip_end = attributes[:'clipEnd']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.has_key?(:'clipStart')
|
97
|
+
self.clip_start = attributes[:'clipStart']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.has_key?(:'isException')
|
101
|
+
self.is_exception = attributes[:'isException']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.has_key?(:'recurrencePattern')
|
105
|
+
self.recurrence_pattern = attributes[:'recurrencePattern']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.has_key?(:'timeZoneStruct')
|
109
|
+
self.time_zone_struct = attributes[:'timeZoneStruct']
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
# Initializes the object
|
114
|
+
# @param [MapiCalendarTimeZoneDto] appointment_time_zone_definition_recur Time zone information that describes how to convert the meeting date and time on a recurring series to and from UTC.
|
115
|
+
# @param [DateTime] clip_end Date of the last instance.
|
116
|
+
# @param [DateTime] clip_start Date of the first instance.
|
117
|
+
# @param [BOOLEAN] is_exception Value indicating whether the object represents an exception.
|
118
|
+
# @param [MapiCalendarRecurrencePatternDto] recurrence_pattern Recurrence pattern.
|
119
|
+
# @param [MapiCalendarTimeZoneDto] time_zone_struct Time zone information for a recurring meeting.
|
120
|
+
def initialize(appointment_time_zone_definition_recur=nil, clip_end=nil, clip_start=nil, is_exception=nil, recurrence_pattern=nil, time_zone_struct=nil)
|
121
|
+
self.appointment_time_zone_definition_recur = appointment_time_zone_definition_recur if appointment_time_zone_definition_recur
|
122
|
+
self.clip_end = clip_end if clip_end
|
123
|
+
self.clip_start = clip_start if clip_start
|
124
|
+
self.is_exception = is_exception if is_exception
|
125
|
+
self.recurrence_pattern = recurrence_pattern if recurrence_pattern
|
126
|
+
self.time_zone_struct = time_zone_struct if time_zone_struct
|
127
|
+
end
|
128
|
+
|
129
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
130
|
+
# @return Array for valid properties with the reasons
|
131
|
+
def list_invalid_properties
|
132
|
+
invalid_properties = Array.new
|
133
|
+
if @clip_end.nil?
|
134
|
+
invalid_properties.push('invalid value for "clip_end", clip_end cannot be nil.')
|
135
|
+
end
|
136
|
+
|
137
|
+
if @clip_start.nil?
|
138
|
+
invalid_properties.push('invalid value for "clip_start", clip_start cannot be nil.')
|
139
|
+
end
|
140
|
+
|
141
|
+
if @is_exception.nil?
|
142
|
+
invalid_properties.push('invalid value for "is_exception", is_exception cannot be nil.')
|
143
|
+
end
|
144
|
+
|
145
|
+
invalid_properties
|
146
|
+
end
|
147
|
+
|
148
|
+
# Check to see if the all the properties in the model are valid
|
149
|
+
# @return true if the model is valid
|
150
|
+
def valid?
|
151
|
+
return false if @clip_end.nil?
|
152
|
+
return false if @clip_start.nil?
|
153
|
+
return false if @is_exception.nil?
|
154
|
+
true
|
155
|
+
end
|
156
|
+
|
157
|
+
# Checks equality by comparing each attribute.
|
158
|
+
# @param [Object] Object to be compared
|
159
|
+
def ==(o)
|
160
|
+
return true if self.equal?(o)
|
161
|
+
self.class == o.class &&
|
162
|
+
appointment_time_zone_definition_recur == o.appointment_time_zone_definition_recur &&
|
163
|
+
clip_end == o.clip_end &&
|
164
|
+
clip_start == o.clip_start &&
|
165
|
+
is_exception == o.is_exception &&
|
166
|
+
recurrence_pattern == o.recurrence_pattern &&
|
167
|
+
time_zone_struct == o.time_zone_struct
|
168
|
+
end
|
169
|
+
|
170
|
+
# @see the `==` method
|
171
|
+
# @param [Object] Object to be compared
|
172
|
+
def eql?(o)
|
173
|
+
self == o
|
174
|
+
end
|
175
|
+
|
176
|
+
# Calculates hash code according to all attributes.
|
177
|
+
# @return [Fixnum] Hash code
|
178
|
+
def hash
|
179
|
+
[appointment_time_zone_definition_recur, clip_end, clip_start, is_exception, recurrence_pattern, time_zone_struct].hash
|
180
|
+
end
|
181
|
+
|
182
|
+
# Builds the object from hash
|
183
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
184
|
+
# @return [Object] Returns the model itself
|
185
|
+
def build_from_hash(attributes)
|
186
|
+
return nil unless attributes.is_a?(Hash)
|
187
|
+
self.class.swagger_types.each_pair do |key, type|
|
188
|
+
attribute_key = self.class.attribute_map[key]
|
189
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
190
|
+
if type =~ /\AArray<(.*)>/i
|
191
|
+
# check to ensure the input is an array given that the the attribute
|
192
|
+
# is documented as an array but the input is not
|
193
|
+
if attributes[attribute_key].is_a?(Array)
|
194
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
195
|
+
end
|
196
|
+
elsif !attributes[attribute_key].nil?
|
197
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
198
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
199
|
+
end
|
200
|
+
|
201
|
+
self
|
202
|
+
end
|
203
|
+
|
204
|
+
# Deserializes the data based on type
|
205
|
+
# @param string type Data type
|
206
|
+
# @param string value Value to be deserialized
|
207
|
+
# @return [Object] Deserialized data
|
208
|
+
def _deserialize(type, value)
|
209
|
+
case type.to_sym
|
210
|
+
when :DateTime
|
211
|
+
DateTime.parse(value)
|
212
|
+
when :Date
|
213
|
+
Date.parse(value)
|
214
|
+
when :String
|
215
|
+
value.to_s
|
216
|
+
when :Integer
|
217
|
+
value.to_i
|
218
|
+
when :Float
|
219
|
+
value.to_f
|
220
|
+
when :BOOLEAN
|
221
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
222
|
+
true
|
223
|
+
else
|
224
|
+
false
|
225
|
+
end
|
226
|
+
when :Object
|
227
|
+
# generic object (usually a Hash), return directly
|
228
|
+
value
|
229
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
230
|
+
inner_type = Regexp.last_match[:inner_type]
|
231
|
+
value.map { |v| _deserialize(inner_type, v) }
|
232
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
233
|
+
k_type = Regexp.last_match[:k_type]
|
234
|
+
v_type = Regexp.last_match[:v_type]
|
235
|
+
{}.tap do |hash|
|
236
|
+
value.each do |k, v|
|
237
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
238
|
+
end
|
239
|
+
end
|
240
|
+
else # model
|
241
|
+
sub_type = value[:type] || value[:discriminator] || type
|
242
|
+
if AsposeEmailCloud.const_defined?(sub_type)
|
243
|
+
type = sub_type
|
244
|
+
end
|
245
|
+
temp_model = AsposeEmailCloud.const_get(type).new
|
246
|
+
temp_model.build_from_hash(value)
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
# Returns the string representation of the object
|
251
|
+
# @return [String] String presentation of the object
|
252
|
+
def to_s
|
253
|
+
to_hash.to_s
|
254
|
+
end
|
255
|
+
|
256
|
+
# to_body is an alias to to_hash (backward compatibility)
|
257
|
+
# @return [Hash] Returns the object in the form of hash
|
258
|
+
def to_body
|
259
|
+
to_hash
|
260
|
+
end
|
261
|
+
|
262
|
+
# Returns the object in the form of hash
|
263
|
+
# @return [Hash] Returns the object in the form of hash
|
264
|
+
def to_hash
|
265
|
+
hash = {}
|
266
|
+
self.class.attribute_map.each_pair do |attr, param|
|
267
|
+
value = self.send(attr)
|
268
|
+
next if value.nil?
|
269
|
+
hash[param] = _to_hash(value)
|
270
|
+
end
|
271
|
+
hash
|
272
|
+
end
|
273
|
+
|
274
|
+
# Outputs non-array value in the form of hash
|
275
|
+
# For object, use to_hash. Otherwise, just return the value
|
276
|
+
# @param [Object] value Any valid value
|
277
|
+
# @return [Hash] Returns the value in the form of hash
|
278
|
+
def _to_hash(value)
|
279
|
+
if value.is_a?(Array)
|
280
|
+
value.compact.map { |v| _to_hash(v) }
|
281
|
+
elsif value.is_a?(Hash)
|
282
|
+
{}.tap do |hash|
|
283
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
284
|
+
end
|
285
|
+
elsif value.respond_to? :to_hash
|
286
|
+
value.to_hash
|
287
|
+
else
|
288
|
+
value
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
end
|
293
|
+
end
|
@@ -0,0 +1,431 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="MapiCalendarExceptionInfoDto.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
|
+
# An exception specifies changes to an instance of a recurring series.
|
31
|
+
class MapiCalendarExceptionInfoDto
|
32
|
+
# Attachments in the recurrence exception.
|
33
|
+
# @return [Array<MapiAttachmentDto>]
|
34
|
+
attr_accessor :attachments
|
35
|
+
|
36
|
+
# Body.
|
37
|
+
# @return [String]
|
38
|
+
attr_accessor :body
|
39
|
+
|
40
|
+
# Enumerates the mapi calendar possible busy status Enum, available values: Free, Tentative, Busy, OutOfOffice
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :busy_status
|
43
|
+
|
44
|
+
# End date.
|
45
|
+
# @return [DateTime]
|
46
|
+
attr_accessor :end_date_time
|
47
|
+
|
48
|
+
# Value of this field specifies whether the Exception Embedded Message object contains attachments.
|
49
|
+
# @return [BOOLEAN]
|
50
|
+
attr_accessor :has_attachment
|
51
|
+
|
52
|
+
# Location.
|
53
|
+
# @return [String]
|
54
|
+
attr_accessor :location
|
55
|
+
|
56
|
+
# Enumerates the appointment state Enum, available values: Meeting, Received, Canceled
|
57
|
+
# @return [String]
|
58
|
+
attr_accessor :meeting_type
|
59
|
+
|
60
|
+
# Original start date.
|
61
|
+
# @return [DateTime]
|
62
|
+
attr_accessor :original_start_date
|
63
|
+
|
64
|
+
# Override flags. Items: Specifies what data in the MapiCalendarOverride structure has a value different from the recurring series. Enum, available values: Subject, MeetingType, ReminderDelta, Reminder, Location, BusyStatus, Attachment, Subtype, AppointmentColor, ExceptionalBody
|
65
|
+
# @return [Array<String>]
|
66
|
+
attr_accessor :override_flags
|
67
|
+
|
68
|
+
# Reminder delta.
|
69
|
+
# @return [Integer]
|
70
|
+
attr_accessor :reminder_delta
|
71
|
+
|
72
|
+
# Value for the PidLidReminderSet property.
|
73
|
+
# @return [BOOLEAN]
|
74
|
+
attr_accessor :reminder_set
|
75
|
+
|
76
|
+
# Start date.
|
77
|
+
# @return [DateTime]
|
78
|
+
attr_accessor :start_date_time
|
79
|
+
|
80
|
+
# Subject.
|
81
|
+
# @return [String]
|
82
|
+
attr_accessor :subject
|
83
|
+
|
84
|
+
# SubType.
|
85
|
+
# @return [Integer]
|
86
|
+
attr_accessor :sub_type
|
87
|
+
|
88
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
89
|
+
def self.attribute_map
|
90
|
+
{
|
91
|
+
:'attachments' => :'attachments',
|
92
|
+
:'body' => :'body',
|
93
|
+
:'busy_status' => :'busyStatus',
|
94
|
+
:'end_date_time' => :'endDateTime',
|
95
|
+
:'has_attachment' => :'hasAttachment',
|
96
|
+
:'location' => :'location',
|
97
|
+
:'meeting_type' => :'meetingType',
|
98
|
+
:'original_start_date' => :'originalStartDate',
|
99
|
+
:'override_flags' => :'overrideFlags',
|
100
|
+
:'reminder_delta' => :'reminderDelta',
|
101
|
+
:'reminder_set' => :'reminderSet',
|
102
|
+
:'start_date_time' => :'startDateTime',
|
103
|
+
:'subject' => :'subject',
|
104
|
+
:'sub_type' => :'subType'
|
105
|
+
}
|
106
|
+
end
|
107
|
+
|
108
|
+
# Attribute type mapping.
|
109
|
+
def self.swagger_types
|
110
|
+
{
|
111
|
+
:'attachments' => :'Array<MapiAttachmentDto>',
|
112
|
+
:'body' => :'String',
|
113
|
+
:'busy_status' => :'String',
|
114
|
+
:'end_date_time' => :'DateTime',
|
115
|
+
:'has_attachment' => :'BOOLEAN',
|
116
|
+
:'location' => :'String',
|
117
|
+
:'meeting_type' => :'String',
|
118
|
+
:'original_start_date' => :'DateTime',
|
119
|
+
:'override_flags' => :'Array<String>',
|
120
|
+
:'reminder_delta' => :'Integer',
|
121
|
+
:'reminder_set' => :'BOOLEAN',
|
122
|
+
:'start_date_time' => :'DateTime',
|
123
|
+
:'subject' => :'String',
|
124
|
+
:'sub_type' => :'Integer'
|
125
|
+
}
|
126
|
+
end
|
127
|
+
|
128
|
+
# Initializes the object
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
130
|
+
def initialize(attributes = {})
|
131
|
+
return unless attributes.is_a?(Hash)
|
132
|
+
|
133
|
+
# convert string to symbol for hash key
|
134
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
135
|
+
|
136
|
+
if attributes.has_key?(:'attachments')
|
137
|
+
if (value = attributes[:'attachments']).is_a?(Array)
|
138
|
+
self.attachments = value
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.has_key?(:'body')
|
143
|
+
self.body = attributes[:'body']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.has_key?(:'busyStatus')
|
147
|
+
self.busy_status = attributes[:'busyStatus']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.has_key?(:'endDateTime')
|
151
|
+
self.end_date_time = attributes[:'endDateTime']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.has_key?(:'hasAttachment')
|
155
|
+
self.has_attachment = attributes[:'hasAttachment']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes.has_key?(:'location')
|
159
|
+
self.location = attributes[:'location']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.has_key?(:'meetingType')
|
163
|
+
self.meeting_type = attributes[:'meetingType']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.has_key?(:'originalStartDate')
|
167
|
+
self.original_start_date = attributes[:'originalStartDate']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.has_key?(:'overrideFlags')
|
171
|
+
if (value = attributes[:'overrideFlags']).is_a?(Array)
|
172
|
+
self.override_flags = value
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
if attributes.has_key?(:'reminderDelta')
|
177
|
+
self.reminder_delta = attributes[:'reminderDelta']
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.has_key?(:'reminderSet')
|
181
|
+
self.reminder_set = attributes[:'reminderSet']
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes.has_key?(:'startDateTime')
|
185
|
+
self.start_date_time = attributes[:'startDateTime']
|
186
|
+
end
|
187
|
+
|
188
|
+
if attributes.has_key?(:'subject')
|
189
|
+
self.subject = attributes[:'subject']
|
190
|
+
end
|
191
|
+
|
192
|
+
if attributes.has_key?(:'subType')
|
193
|
+
self.sub_type = attributes[:'subType']
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
# Initializes the object
|
198
|
+
# @param [Array<MapiAttachmentDto>] attachments Attachments in the recurrence exception.
|
199
|
+
# @param [String] body Body.
|
200
|
+
# @param [String] busy_status Enumerates the mapi calendar possible busy status Enum, available values: Free, Tentative, Busy, OutOfOffice
|
201
|
+
# @param [DateTime] end_date_time End date.
|
202
|
+
# @param [BOOLEAN] has_attachment Value of this field specifies whether the Exception Embedded Message object contains attachments.
|
203
|
+
# @param [String] location Location.
|
204
|
+
# @param [String] meeting_type Enumerates the appointment state Enum, available values: Meeting, Received, Canceled
|
205
|
+
# @param [DateTime] original_start_date Original start date.
|
206
|
+
# @param [Array<String>] override_flags Override flags. Items: Specifies what data in the MapiCalendarOverride structure has a value different from the recurring series. Enum, available values: Subject, MeetingType, ReminderDelta, Reminder, Location, BusyStatus, Attachment, Subtype, AppointmentColor, ExceptionalBody
|
207
|
+
# @param [Integer] reminder_delta Reminder delta.
|
208
|
+
# @param [BOOLEAN] reminder_set Value for the PidLidReminderSet property.
|
209
|
+
# @param [DateTime] start_date_time Start date.
|
210
|
+
# @param [String] subject Subject.
|
211
|
+
# @param [Integer] sub_type SubType.
|
212
|
+
def initialize(attachments=nil, body=nil, busy_status=nil, end_date_time=nil, has_attachment=nil, location=nil, meeting_type=nil, original_start_date=nil, override_flags=nil, reminder_delta=nil, reminder_set=nil, start_date_time=nil, subject=nil, sub_type=nil)
|
213
|
+
self.attachments = attachments if attachments
|
214
|
+
self.body = body if body
|
215
|
+
self.busy_status = busy_status if busy_status
|
216
|
+
self.end_date_time = end_date_time if end_date_time
|
217
|
+
self.has_attachment = has_attachment if has_attachment
|
218
|
+
self.location = location if location
|
219
|
+
self.meeting_type = meeting_type if meeting_type
|
220
|
+
self.original_start_date = original_start_date if original_start_date
|
221
|
+
self.override_flags = override_flags if override_flags
|
222
|
+
self.reminder_delta = reminder_delta if reminder_delta
|
223
|
+
self.reminder_set = reminder_set if reminder_set
|
224
|
+
self.start_date_time = start_date_time if start_date_time
|
225
|
+
self.subject = subject if subject
|
226
|
+
self.sub_type = sub_type if sub_type
|
227
|
+
end
|
228
|
+
|
229
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
230
|
+
# @return Array for valid properties with the reasons
|
231
|
+
def list_invalid_properties
|
232
|
+
invalid_properties = Array.new
|
233
|
+
if @busy_status.nil?
|
234
|
+
invalid_properties.push('invalid value for "busy_status", busy_status cannot be nil.')
|
235
|
+
end
|
236
|
+
|
237
|
+
if @end_date_time.nil?
|
238
|
+
invalid_properties.push('invalid value for "end_date_time", end_date_time cannot be nil.')
|
239
|
+
end
|
240
|
+
|
241
|
+
if @has_attachment.nil?
|
242
|
+
invalid_properties.push('invalid value for "has_attachment", has_attachment cannot be nil.')
|
243
|
+
end
|
244
|
+
|
245
|
+
if @meeting_type.nil?
|
246
|
+
invalid_properties.push('invalid value for "meeting_type", meeting_type cannot be nil.')
|
247
|
+
end
|
248
|
+
|
249
|
+
if @original_start_date.nil?
|
250
|
+
invalid_properties.push('invalid value for "original_start_date", original_start_date cannot be nil.')
|
251
|
+
end
|
252
|
+
|
253
|
+
if @reminder_delta.nil?
|
254
|
+
invalid_properties.push('invalid value for "reminder_delta", reminder_delta cannot be nil.')
|
255
|
+
end
|
256
|
+
|
257
|
+
if @reminder_set.nil?
|
258
|
+
invalid_properties.push('invalid value for "reminder_set", reminder_set cannot be nil.')
|
259
|
+
end
|
260
|
+
|
261
|
+
if @start_date_time.nil?
|
262
|
+
invalid_properties.push('invalid value for "start_date_time", start_date_time cannot be nil.')
|
263
|
+
end
|
264
|
+
|
265
|
+
if @sub_type.nil?
|
266
|
+
invalid_properties.push('invalid value for "sub_type", sub_type cannot be nil.')
|
267
|
+
end
|
268
|
+
|
269
|
+
invalid_properties
|
270
|
+
end
|
271
|
+
|
272
|
+
# Check to see if the all the properties in the model are valid
|
273
|
+
# @return true if the model is valid
|
274
|
+
def valid?
|
275
|
+
return false if @busy_status.nil?
|
276
|
+
return false if @end_date_time.nil?
|
277
|
+
return false if @has_attachment.nil?
|
278
|
+
return false if @meeting_type.nil?
|
279
|
+
return false if @original_start_date.nil?
|
280
|
+
return false if @reminder_delta.nil?
|
281
|
+
return false if @reminder_set.nil?
|
282
|
+
return false if @start_date_time.nil?
|
283
|
+
return false if @sub_type.nil?
|
284
|
+
true
|
285
|
+
end
|
286
|
+
|
287
|
+
# Checks equality by comparing each attribute.
|
288
|
+
# @param [Object] Object to be compared
|
289
|
+
def ==(o)
|
290
|
+
return true if self.equal?(o)
|
291
|
+
self.class == o.class &&
|
292
|
+
attachments == o.attachments &&
|
293
|
+
body == o.body &&
|
294
|
+
busy_status == o.busy_status &&
|
295
|
+
end_date_time == o.end_date_time &&
|
296
|
+
has_attachment == o.has_attachment &&
|
297
|
+
location == o.location &&
|
298
|
+
meeting_type == o.meeting_type &&
|
299
|
+
original_start_date == o.original_start_date &&
|
300
|
+
override_flags == o.override_flags &&
|
301
|
+
reminder_delta == o.reminder_delta &&
|
302
|
+
reminder_set == o.reminder_set &&
|
303
|
+
start_date_time == o.start_date_time &&
|
304
|
+
subject == o.subject &&
|
305
|
+
sub_type == o.sub_type
|
306
|
+
end
|
307
|
+
|
308
|
+
# @see the `==` method
|
309
|
+
# @param [Object] Object to be compared
|
310
|
+
def eql?(o)
|
311
|
+
self == o
|
312
|
+
end
|
313
|
+
|
314
|
+
# Calculates hash code according to all attributes.
|
315
|
+
# @return [Fixnum] Hash code
|
316
|
+
def hash
|
317
|
+
[attachments, body, busy_status, end_date_time, has_attachment, location, meeting_type, original_start_date, override_flags, reminder_delta, reminder_set, start_date_time, subject, sub_type].hash
|
318
|
+
end
|
319
|
+
|
320
|
+
# Builds the object from hash
|
321
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
322
|
+
# @return [Object] Returns the model itself
|
323
|
+
def build_from_hash(attributes)
|
324
|
+
return nil unless attributes.is_a?(Hash)
|
325
|
+
self.class.swagger_types.each_pair do |key, type|
|
326
|
+
attribute_key = self.class.attribute_map[key]
|
327
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
328
|
+
if type =~ /\AArray<(.*)>/i
|
329
|
+
# check to ensure the input is an array given that the the attribute
|
330
|
+
# is documented as an array but the input is not
|
331
|
+
if attributes[attribute_key].is_a?(Array)
|
332
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
333
|
+
end
|
334
|
+
elsif !attributes[attribute_key].nil?
|
335
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
336
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
337
|
+
end
|
338
|
+
|
339
|
+
self
|
340
|
+
end
|
341
|
+
|
342
|
+
# Deserializes the data based on type
|
343
|
+
# @param string type Data type
|
344
|
+
# @param string value Value to be deserialized
|
345
|
+
# @return [Object] Deserialized data
|
346
|
+
def _deserialize(type, value)
|
347
|
+
case type.to_sym
|
348
|
+
when :DateTime
|
349
|
+
DateTime.parse(value)
|
350
|
+
when :Date
|
351
|
+
Date.parse(value)
|
352
|
+
when :String
|
353
|
+
value.to_s
|
354
|
+
when :Integer
|
355
|
+
value.to_i
|
356
|
+
when :Float
|
357
|
+
value.to_f
|
358
|
+
when :BOOLEAN
|
359
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
360
|
+
true
|
361
|
+
else
|
362
|
+
false
|
363
|
+
end
|
364
|
+
when :Object
|
365
|
+
# generic object (usually a Hash), return directly
|
366
|
+
value
|
367
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
368
|
+
inner_type = Regexp.last_match[:inner_type]
|
369
|
+
value.map { |v| _deserialize(inner_type, v) }
|
370
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
371
|
+
k_type = Regexp.last_match[:k_type]
|
372
|
+
v_type = Regexp.last_match[:v_type]
|
373
|
+
{}.tap do |hash|
|
374
|
+
value.each do |k, v|
|
375
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
376
|
+
end
|
377
|
+
end
|
378
|
+
else # model
|
379
|
+
sub_type = value[:type] || value[:discriminator] || type
|
380
|
+
if AsposeEmailCloud.const_defined?(sub_type)
|
381
|
+
type = sub_type
|
382
|
+
end
|
383
|
+
temp_model = AsposeEmailCloud.const_get(type).new
|
384
|
+
temp_model.build_from_hash(value)
|
385
|
+
end
|
386
|
+
end
|
387
|
+
|
388
|
+
# Returns the string representation of the object
|
389
|
+
# @return [String] String presentation of the object
|
390
|
+
def to_s
|
391
|
+
to_hash.to_s
|
392
|
+
end
|
393
|
+
|
394
|
+
# to_body is an alias to to_hash (backward compatibility)
|
395
|
+
# @return [Hash] Returns the object in the form of hash
|
396
|
+
def to_body
|
397
|
+
to_hash
|
398
|
+
end
|
399
|
+
|
400
|
+
# Returns the object in the form of hash
|
401
|
+
# @return [Hash] Returns the object in the form of hash
|
402
|
+
def to_hash
|
403
|
+
hash = {}
|
404
|
+
self.class.attribute_map.each_pair do |attr, param|
|
405
|
+
value = self.send(attr)
|
406
|
+
next if value.nil?
|
407
|
+
hash[param] = _to_hash(value)
|
408
|
+
end
|
409
|
+
hash
|
410
|
+
end
|
411
|
+
|
412
|
+
# Outputs non-array value in the form of hash
|
413
|
+
# For object, use to_hash. Otherwise, just return the value
|
414
|
+
# @param [Object] value Any valid value
|
415
|
+
# @return [Hash] Returns the value in the form of hash
|
416
|
+
def _to_hash(value)
|
417
|
+
if value.is_a?(Array)
|
418
|
+
value.compact.map { |v| _to_hash(v) }
|
419
|
+
elsif value.is_a?(Hash)
|
420
|
+
{}.tap do |hash|
|
421
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
422
|
+
end
|
423
|
+
elsif value.respond_to? :to_hash
|
424
|
+
value.to_hash
|
425
|
+
else
|
426
|
+
value
|
427
|
+
end
|
428
|
+
end
|
429
|
+
|
430
|
+
end
|
431
|
+
end
|