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.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose-email-cloud.rb +74 -0
  3. data/lib/aspose-email-cloud/api/email_api.rb +147 -0
  4. data/lib/aspose-email-cloud/models/ai_bcr_image_storage_file.rb +3 -3
  5. data/lib/aspose-email-cloud/models/ai_bcr_parse_storage_rq.rb +3 -3
  6. data/lib/aspose-email-cloud/models/append_email_base_request.rb +3 -3
  7. data/lib/aspose-email-cloud/models/append_email_model_rq.rb +3 -3
  8. data/lib/aspose-email-cloud/models/calendar_dto.rb +17 -4
  9. data/lib/aspose-email-cloud/models/contact_photo.rb +29 -5
  10. data/lib/aspose-email-cloud/models/daily_recurrence_pattern_dto.rb +296 -0
  11. data/lib/aspose-email-cloud/models/mapi_attachment_dto.rb +226 -0
  12. data/lib/aspose-email-cloud/models/mapi_binary_property_dto.rb +250 -0
  13. data/lib/aspose-email-cloud/models/mapi_boolean_property_dto.rb +255 -0
  14. data/lib/aspose-email-cloud/models/mapi_calendar_attendees_dto.rb +266 -0
  15. data/lib/aspose-email-cloud/models/mapi_calendar_daily_recurrence_pattern_dto.rb +464 -0
  16. data/lib/aspose-email-cloud/models/mapi_calendar_dto.rb +728 -0
  17. data/lib/aspose-email-cloud/models/mapi_calendar_event_recurrence_dto.rb +293 -0
  18. data/lib/aspose-email-cloud/models/mapi_calendar_exception_info_dto.rb +431 -0
  19. data/lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb +449 -0
  20. data/lib/aspose-email-cloud/models/mapi_calendar_time_zone_dto.rb +228 -0
  21. data/lib/aspose-email-cloud/models/mapi_calendar_time_zone_info_dto.rb +313 -0
  22. data/lib/aspose-email-cloud/models/mapi_calendar_time_zone_rule_dto.rb +362 -0
  23. data/lib/aspose-email-cloud/models/mapi_calendar_weekly_recurrence_pattern_dto.rb +464 -0
  24. data/lib/aspose-email-cloud/models/mapi_calendar_yearly_and_monthly_recurrence_pattern_dto.rb +500 -0
  25. data/lib/aspose-email-cloud/models/mapi_contact_dto.rb +569 -0
  26. data/lib/aspose-email-cloud/models/mapi_contact_electronic_address_dto.rb +283 -0
  27. data/lib/aspose-email-cloud/models/mapi_contact_electronic_address_property_set_dto.rb +327 -0
  28. data/lib/aspose-email-cloud/models/mapi_contact_event_property_set_dto.rb +236 -0
  29. data/lib/aspose-email-cloud/models/mapi_contact_name_property_set_dto.rb +335 -0
  30. data/lib/aspose-email-cloud/models/mapi_contact_other_property_set_dto.rb +319 -0
  31. data/lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb +454 -0
  32. data/lib/aspose-email-cloud/models/mapi_contact_photo_dto.rb +255 -0
  33. data/lib/aspose-email-cloud/models/mapi_contact_physical_address_dto.rb +322 -0
  34. data/lib/aspose-email-cloud/models/mapi_contact_physical_address_property_set_dto.rb +239 -0
  35. data/lib/aspose-email-cloud/models/mapi_contact_professional_property_set_dto.rb +291 -0
  36. data/lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb +457 -0
  37. data/lib/aspose-email-cloud/models/mapi_date_time_property_dto.rb +255 -0
  38. data/lib/aspose-email-cloud/models/mapi_electronic_address_dto.rb +265 -0
  39. data/lib/aspose-email-cloud/models/mapi_file_as_property_dto.rb +255 -0
  40. data/lib/aspose-email-cloud/models/mapi_importance_property_dto.rb +255 -0
  41. data/lib/aspose-email-cloud/models/mapi_int_property_dto.rb +255 -0
  42. data/lib/aspose-email-cloud/models/mapi_known_property_descriptor.rb +237 -0
  43. data/lib/aspose-email-cloud/models/mapi_legacy_free_busy_property_dto.rb +255 -0
  44. data/lib/aspose-email-cloud/models/mapi_message_dto.rb +801 -0
  45. data/lib/aspose-email-cloud/models/mapi_message_item_base_dto.rb +452 -0
  46. data/lib/aspose-email-cloud/models/mapi_multi_int_property_dto.rb +252 -0
  47. data/lib/aspose-email-cloud/models/mapi_multi_string_property_dto.rb +252 -0
  48. data/lib/aspose-email-cloud/models/mapi_physical_address_index_property_dto.rb +255 -0
  49. data/lib/aspose-email-cloud/models/mapi_pid_lid_property_descriptor.rb +322 -0
  50. data/lib/aspose-email-cloud/models/mapi_pid_name_property_descriptor.rb +304 -0
  51. data/lib/aspose-email-cloud/models/mapi_pid_property_descriptor.rb +286 -0
  52. data/lib/aspose-email-cloud/models/mapi_pid_tag_property_descriptor.rb +322 -0
  53. data/lib/aspose-email-cloud/models/mapi_property_descriptor.rb +224 -0
  54. data/lib/aspose-email-cloud/models/mapi_property_dto.rb +237 -0
  55. data/lib/aspose-email-cloud/models/mapi_recipient_dto.rb +257 -0
  56. data/lib/aspose-email-cloud/models/mapi_response_type_property_dto.rb +255 -0
  57. data/lib/aspose-email-cloud/models/mapi_string_property_dto.rb +250 -0
  58. data/lib/aspose-email-cloud/models/monthly_recurrence_pattern_dto.rb +350 -0
  59. data/lib/aspose-email-cloud/models/recurrence_pattern_dto.rb +296 -0
  60. data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_mapi_model_request_data.rb +79 -0
  61. data/lib/aspose-email-cloud/models/requests/convert_contact_model_to_mapi_model_request_data.rb +79 -0
  62. data/lib/aspose-email-cloud/models/requests/convert_email_model_to_file_request_data.rb +2 -2
  63. data/lib/aspose-email-cloud/models/requests/convert_email_model_to_mapi_model_request_data.rb +79 -0
  64. data/lib/aspose-email-cloud/models/requests/convert_email_request_data.rb +2 -2
  65. data/lib/aspose-email-cloud/models/requests/convert_mapi_calendar_model_to_calendar_model_request_data.rb +79 -0
  66. data/lib/aspose-email-cloud/models/requests/convert_mapi_calendar_model_to_file_request_data.rb +89 -0
  67. data/lib/aspose-email-cloud/models/requests/convert_mapi_contact_model_to_contact_model_request_data.rb +79 -0
  68. data/lib/aspose-email-cloud/models/requests/convert_mapi_contact_model_to_file_request_data.rb +89 -0
  69. data/lib/aspose-email-cloud/models/requests/convert_mapi_message_model_to_email_model_request_data.rb +79 -0
  70. data/lib/aspose-email-cloud/models/requests/convert_mapi_message_model_to_file_request_data.rb +89 -0
  71. data/lib/aspose-email-cloud/models/requests/get_calendar_file_as_mapi_model_request_data.rb +80 -0
  72. data/lib/aspose-email-cloud/models/requests/get_contact_file_as_mapi_model_request_data.rb +90 -0
  73. data/lib/aspose-email-cloud/models/requests/get_email_as_file_request_data.rb +2 -2
  74. data/lib/aspose-email-cloud/models/requests/get_email_file_as_mapi_model_request_data.rb +90 -0
  75. data/lib/aspose-email-cloud/models/requests/get_email_model_list_request_data.rb +2 -2
  76. data/lib/aspose-email-cloud/models/requests/get_email_model_request_data.rb +2 -2
  77. data/lib/aspose-email-cloud/models/requests/get_mapi_calendar_model_request_data.rb +91 -0
  78. data/lib/aspose-email-cloud/models/requests/get_mapi_contact_model_request_data.rb +101 -0
  79. data/lib/aspose-email-cloud/models/requests/get_mapi_message_model_request_data.rb +101 -0
  80. data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +2 -2
  81. data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +2 -2
  82. data/lib/aspose-email-cloud/models/requests/save_email_model_request_data.rb +4 -4
  83. data/lib/aspose-email-cloud/models/requests/save_mapi_calendar_model_request_data.rb +99 -0
  84. data/lib/aspose-email-cloud/models/requests/save_mapi_contact_model_request_data.rb +99 -0
  85. data/lib/aspose-email-cloud/models/requests/save_mapi_message_model_request_data.rb +99 -0
  86. data/lib/aspose-email-cloud/models/send_email_base_request.rb +3 -3
  87. data/lib/aspose-email-cloud/models/send_email_model_rq.rb +3 -3
  88. data/lib/aspose-email-cloud/models/storage_model_rq_of_mapi_calendar_dto.rb +225 -0
  89. data/lib/aspose-email-cloud/models/storage_model_rq_of_mapi_contact_dto.rb +225 -0
  90. data/lib/aspose-email-cloud/models/storage_model_rq_of_mapi_message_dto.rb +225 -0
  91. data/lib/aspose-email-cloud/models/task_regenerating_pattern_dto.rb +314 -0
  92. data/lib/aspose-email-cloud/models/weekly_recurrence_pattern_dto.rb +311 -0
  93. data/lib/aspose-email-cloud/models/yearly_recurrence_pattern_dto.rb +368 -0
  94. data/lib/aspose-email-cloud/version.rb +1 -1
  95. metadata +76 -2
@@ -0,0 +1,569 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="MapiContactDto.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 outlook contact information.
31
+ class MapiContactDto
32
+ # Message item attachments.
33
+ # @return [Array<MapiAttachmentDto>]
34
+ attr_accessor :attachments
35
+
36
+ # Billing information associated with an item.
37
+ # @return [String]
38
+ attr_accessor :billing
39
+
40
+ # Message text.
41
+ # @return [String]
42
+ attr_accessor :body
43
+
44
+ # Gets the BodyRtf of the message converted to HTML, if present, otherwise an empty string.
45
+ # @return [String]
46
+ attr_accessor :body_html
47
+
48
+ # RTF formatted message text.
49
+ # @return [String]
50
+ attr_accessor :body_rtf
51
+
52
+ # The content type of message body. Enum, available values: PlainText, Html, Rtf
53
+ # @return [String]
54
+ attr_accessor :body_type
55
+
56
+ # Contains keywords or categories for the message object.
57
+ # @return [Array<String>]
58
+ attr_accessor :categories
59
+
60
+ # Contains the names of the companies that are associated with an item.
61
+ # @return [Array<String>]
62
+ attr_accessor :companies
63
+
64
+ # The item id, uses with a server.
65
+ # @return [String]
66
+ attr_accessor :item_id
67
+
68
+ # Case-sensitive string that identifies the sender-defined message class, such as IPM.Note. The message class specifies the type, purpose, or content of the message.
69
+ # @return [String]
70
+ attr_accessor :message_class
71
+
72
+ # Contains the mileage information that is associated with an item.
73
+ # @return [String]
74
+ attr_accessor :mileage
75
+
76
+ # Recipients of the message.
77
+ # @return [Array<MapiRecipientDto>]
78
+ attr_accessor :recipients
79
+
80
+ # Contains values that indicate the message sensitivity. Enum, available values: None, Personal, Private, CompanyConfidential
81
+ # @return [String]
82
+ attr_accessor :sensitivity
83
+
84
+ # Subject of the message.
85
+ # @return [String]
86
+ attr_accessor :subject
87
+
88
+ # Subject prefix that typically indicates some action on a message, such as \"FW: \" for forwarding.
89
+ # @return [String]
90
+ attr_accessor :subject_prefix
91
+
92
+ # List of MAPI properties
93
+ # @return [Array<MapiPropertyDto>]
94
+ attr_accessor :properties
95
+
96
+
97
+ # @return [String]
98
+ def discriminator #getter method
99
+ self.class.name.split('::').last
100
+ end
101
+
102
+ def discriminator=(discriminator) #setter method, parameter ignored
103
+ @discriminator = self.class.name.split('::').last
104
+ end
105
+
106
+ # Specify properties for up to three different e-mail addresses and three different fax addresses.
107
+ # @return [MapiContactElectronicAddressPropertySetDto]
108
+ attr_accessor :electronic_addresses
109
+
110
+ # Specify events associated with a contact.
111
+ # @return [MapiContactEventPropertySetDto]
112
+ attr_accessor :events
113
+
114
+ # The properties are used to specify the name of the person represented by the contact.
115
+ # @return [MapiContactNamePropertySetDto]
116
+ attr_accessor :name_info
117
+
118
+ # Specify other fields of contact.
119
+ # @return [MapiContactOtherPropertySetDto]
120
+ attr_accessor :other_fields
121
+
122
+ # Specify other additional contact information.
123
+ # @return [MapiContactPersonalInfoPropertySetDto]
124
+ attr_accessor :personal_info
125
+
126
+ # Contact photo.
127
+ # @return [MapiContactPhotoDto]
128
+ attr_accessor :photo
129
+
130
+ # Specify three physical addresses: Home Address, Work Address, and Other Address. One of the addresses can be marked as the Mailing Address.
131
+ # @return [MapiContactPhysicalAddressPropertySetDto]
132
+ attr_accessor :physical_addresses
133
+
134
+ # Properties are used to store professional details for the person represented by the contact.
135
+ # @return [MapiContactProfessionalPropertySetDto]
136
+ attr_accessor :professional_info
137
+
138
+ # Specify telephone numbers for the contact.
139
+ # @return [MapiContactTelephonePropertySetDto]
140
+ attr_accessor :telephones
141
+
142
+ # Attribute mapping from ruby-style variable name to JSON key.
143
+ def self.attribute_map
144
+ {
145
+ :'attachments' => :'attachments',
146
+ :'billing' => :'billing',
147
+ :'body' => :'body',
148
+ :'body_html' => :'bodyHtml',
149
+ :'body_rtf' => :'bodyRtf',
150
+ :'body_type' => :'bodyType',
151
+ :'categories' => :'categories',
152
+ :'companies' => :'companies',
153
+ :'item_id' => :'itemId',
154
+ :'message_class' => :'messageClass',
155
+ :'mileage' => :'mileage',
156
+ :'recipients' => :'recipients',
157
+ :'sensitivity' => :'sensitivity',
158
+ :'subject' => :'subject',
159
+ :'subject_prefix' => :'subjectPrefix',
160
+ :'properties' => :'properties',
161
+ :'discriminator' => :'discriminator',
162
+ :'electronic_addresses' => :'electronicAddresses',
163
+ :'events' => :'events',
164
+ :'name_info' => :'nameInfo',
165
+ :'other_fields' => :'otherFields',
166
+ :'personal_info' => :'personalInfo',
167
+ :'photo' => :'photo',
168
+ :'physical_addresses' => :'physicalAddresses',
169
+ :'professional_info' => :'professionalInfo',
170
+ :'telephones' => :'telephones'
171
+ }
172
+ end
173
+
174
+ # Attribute type mapping.
175
+ def self.swagger_types
176
+ {
177
+ :'attachments' => :'Array<MapiAttachmentDto>',
178
+ :'billing' => :'String',
179
+ :'body' => :'String',
180
+ :'body_html' => :'String',
181
+ :'body_rtf' => :'String',
182
+ :'body_type' => :'String',
183
+ :'categories' => :'Array<String>',
184
+ :'companies' => :'Array<String>',
185
+ :'item_id' => :'String',
186
+ :'message_class' => :'String',
187
+ :'mileage' => :'String',
188
+ :'recipients' => :'Array<MapiRecipientDto>',
189
+ :'sensitivity' => :'String',
190
+ :'subject' => :'String',
191
+ :'subject_prefix' => :'String',
192
+ :'properties' => :'Array<MapiPropertyDto>',
193
+ :'discriminator' => :'String',
194
+ :'electronic_addresses' => :'MapiContactElectronicAddressPropertySetDto',
195
+ :'events' => :'MapiContactEventPropertySetDto',
196
+ :'name_info' => :'MapiContactNamePropertySetDto',
197
+ :'other_fields' => :'MapiContactOtherPropertySetDto',
198
+ :'personal_info' => :'MapiContactPersonalInfoPropertySetDto',
199
+ :'photo' => :'MapiContactPhotoDto',
200
+ :'physical_addresses' => :'MapiContactPhysicalAddressPropertySetDto',
201
+ :'professional_info' => :'MapiContactProfessionalPropertySetDto',
202
+ :'telephones' => :'MapiContactTelephonePropertySetDto'
203
+ }
204
+ end
205
+
206
+ # Initializes the object
207
+ # @param [Hash] attributes Model attributes in the form of hash
208
+ def initialize(attributes = {})
209
+ return unless attributes.is_a?(Hash)
210
+
211
+ # convert string to symbol for hash key
212
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
213
+
214
+ if attributes.has_key?(:'attachments')
215
+ if (value = attributes[:'attachments']).is_a?(Array)
216
+ self.attachments = value
217
+ end
218
+ end
219
+
220
+ if attributes.has_key?(:'billing')
221
+ self.billing = attributes[:'billing']
222
+ end
223
+
224
+ if attributes.has_key?(:'body')
225
+ self.body = attributes[:'body']
226
+ end
227
+
228
+ if attributes.has_key?(:'bodyHtml')
229
+ self.body_html = attributes[:'bodyHtml']
230
+ end
231
+
232
+ if attributes.has_key?(:'bodyRtf')
233
+ self.body_rtf = attributes[:'bodyRtf']
234
+ end
235
+
236
+ if attributes.has_key?(:'bodyType')
237
+ self.body_type = attributes[:'bodyType']
238
+ end
239
+
240
+ if attributes.has_key?(:'categories')
241
+ if (value = attributes[:'categories']).is_a?(Array)
242
+ self.categories = value
243
+ end
244
+ end
245
+
246
+ if attributes.has_key?(:'companies')
247
+ if (value = attributes[:'companies']).is_a?(Array)
248
+ self.companies = value
249
+ end
250
+ end
251
+
252
+ if attributes.has_key?(:'itemId')
253
+ self.item_id = attributes[:'itemId']
254
+ end
255
+
256
+ if attributes.has_key?(:'messageClass')
257
+ self.message_class = attributes[:'messageClass']
258
+ end
259
+
260
+ if attributes.has_key?(:'mileage')
261
+ self.mileage = attributes[:'mileage']
262
+ end
263
+
264
+ if attributes.has_key?(:'recipients')
265
+ if (value = attributes[:'recipients']).is_a?(Array)
266
+ self.recipients = value
267
+ end
268
+ end
269
+
270
+ if attributes.has_key?(:'sensitivity')
271
+ self.sensitivity = attributes[:'sensitivity']
272
+ end
273
+
274
+ if attributes.has_key?(:'subject')
275
+ self.subject = attributes[:'subject']
276
+ end
277
+
278
+ if attributes.has_key?(:'subjectPrefix')
279
+ self.subject_prefix = attributes[:'subjectPrefix']
280
+ end
281
+
282
+ if attributes.has_key?(:'properties')
283
+ if (value = attributes[:'properties']).is_a?(Array)
284
+ self.properties = value
285
+ end
286
+ end
287
+
288
+ if attributes.has_key?(:'discriminator')
289
+ @discriminator = self.class.name.split('::').last
290
+ end
291
+
292
+ if attributes.has_key?(:'electronicAddresses')
293
+ self.electronic_addresses = attributes[:'electronicAddresses']
294
+ end
295
+
296
+ if attributes.has_key?(:'events')
297
+ self.events = attributes[:'events']
298
+ end
299
+
300
+ if attributes.has_key?(:'nameInfo')
301
+ self.name_info = attributes[:'nameInfo']
302
+ end
303
+
304
+ if attributes.has_key?(:'otherFields')
305
+ self.other_fields = attributes[:'otherFields']
306
+ end
307
+
308
+ if attributes.has_key?(:'personalInfo')
309
+ self.personal_info = attributes[:'personalInfo']
310
+ end
311
+
312
+ if attributes.has_key?(:'photo')
313
+ self.photo = attributes[:'photo']
314
+ end
315
+
316
+ if attributes.has_key?(:'physicalAddresses')
317
+ self.physical_addresses = attributes[:'physicalAddresses']
318
+ end
319
+
320
+ if attributes.has_key?(:'professionalInfo')
321
+ self.professional_info = attributes[:'professionalInfo']
322
+ end
323
+
324
+ if attributes.has_key?(:'telephones')
325
+ self.telephones = attributes[:'telephones']
326
+ end
327
+ end
328
+
329
+ # Initializes the object
330
+ # @param [Array<MapiAttachmentDto>] attachments Message item attachments.
331
+ # @param [String] billing Billing information associated with an item.
332
+ # @param [String] body Message text.
333
+ # @param [String] body_html Gets the BodyRtf of the message converted to HTML, if present, otherwise an empty string.
334
+ # @param [String] body_rtf RTF formatted message text.
335
+ # @param [String] body_type The content type of message body. Enum, available values: PlainText, Html, Rtf
336
+ # @param [Array<String>] categories Contains keywords or categories for the message object.
337
+ # @param [Array<String>] companies Contains the names of the companies that are associated with an item.
338
+ # @param [String] item_id The item id, uses with a server.
339
+ # @param [String] message_class Case-sensitive string that identifies the sender-defined message class, such as IPM.Note. The message class specifies the type, purpose, or content of the message.
340
+ # @param [String] mileage Contains the mileage information that is associated with an item.
341
+ # @param [Array<MapiRecipientDto>] recipients Recipients of the message.
342
+ # @param [String] sensitivity Contains values that indicate the message sensitivity. Enum, available values: None, Personal, Private, CompanyConfidential
343
+ # @param [String] subject Subject of the message.
344
+ # @param [String] subject_prefix Subject prefix that typically indicates some action on a message, such as \"FW: \" for forwarding.
345
+ # @param [Array<MapiPropertyDto>] properties List of MAPI properties
346
+ # @param [String] discriminator
347
+ # @param [MapiContactElectronicAddressPropertySetDto] electronic_addresses Specify properties for up to three different e-mail addresses and three different fax addresses.
348
+ # @param [MapiContactEventPropertySetDto] events Specify events associated with a contact.
349
+ # @param [MapiContactNamePropertySetDto] name_info The properties are used to specify the name of the person represented by the contact.
350
+ # @param [MapiContactOtherPropertySetDto] other_fields Specify other fields of contact.
351
+ # @param [MapiContactPersonalInfoPropertySetDto] personal_info Specify other additional contact information.
352
+ # @param [MapiContactPhotoDto] photo Contact photo.
353
+ # @param [MapiContactPhysicalAddressPropertySetDto] physical_addresses Specify three physical addresses: Home Address, Work Address, and Other Address. One of the addresses can be marked as the Mailing Address.
354
+ # @param [MapiContactProfessionalPropertySetDto] professional_info Properties are used to store professional details for the person represented by the contact.
355
+ # @param [MapiContactTelephonePropertySetDto] telephones Specify telephone numbers for the contact.
356
+ def initialize(attachments=nil, billing=nil, body=nil, body_html=nil, body_rtf=nil, body_type=nil, categories=nil, companies=nil, item_id=nil, message_class=nil, mileage=nil, recipients=nil, sensitivity=nil, subject=nil, subject_prefix=nil, properties=nil, discriminator=nil, electronic_addresses=nil, events=nil, name_info=nil, other_fields=nil, personal_info=nil, photo=nil, physical_addresses=nil, professional_info=nil, telephones=nil)
357
+ self.attachments = attachments if attachments
358
+ self.billing = billing if billing
359
+ self.body = body if body
360
+ self.body_html = body_html if body_html
361
+ self.body_rtf = body_rtf if body_rtf
362
+ self.body_type = body_type if body_type
363
+ self.categories = categories if categories
364
+ self.companies = companies if companies
365
+ self.item_id = item_id if item_id
366
+ self.message_class = message_class if message_class
367
+ self.mileage = mileage if mileage
368
+ self.recipients = recipients if recipients
369
+ self.sensitivity = sensitivity if sensitivity
370
+ self.subject = subject if subject
371
+ self.subject_prefix = subject_prefix if subject_prefix
372
+ self.properties = properties if properties
373
+ @discriminator = self.class.name.split('::').last
374
+ self.electronic_addresses = electronic_addresses if electronic_addresses
375
+ self.events = events if events
376
+ self.name_info = name_info if name_info
377
+ self.other_fields = other_fields if other_fields
378
+ self.personal_info = personal_info if personal_info
379
+ self.photo = photo if photo
380
+ self.physical_addresses = physical_addresses if physical_addresses
381
+ self.professional_info = professional_info if professional_info
382
+ self.telephones = telephones if telephones
383
+ end
384
+
385
+ # Show invalid properties with the reasons. Usually used together with valid?
386
+ # @return Array for valid properties with the reasons
387
+ def list_invalid_properties
388
+ invalid_properties = Array.new
389
+ if @body_type.nil?
390
+ invalid_properties.push('invalid value for "body_type", body_type cannot be nil.')
391
+ end
392
+
393
+ if @sensitivity.nil?
394
+ invalid_properties.push('invalid value for "sensitivity", sensitivity cannot be nil.')
395
+ end
396
+
397
+ if @discriminator.nil?
398
+ invalid_properties.push('invalid value for "discriminator", discriminator cannot be nil.')
399
+ end
400
+
401
+ invalid_properties
402
+ end
403
+
404
+ # Check to see if the all the properties in the model are valid
405
+ # @return true if the model is valid
406
+ def valid?
407
+ return false if @body_type.nil?
408
+ return false if @sensitivity.nil?
409
+ return false if @discriminator.nil?
410
+ true
411
+ end
412
+
413
+ # Checks equality by comparing each attribute.
414
+ # @param [Object] Object to be compared
415
+ def ==(o)
416
+ return true if self.equal?(o)
417
+ self.class == o.class &&
418
+ attachments == o.attachments &&
419
+ billing == o.billing &&
420
+ body == o.body &&
421
+ body_html == o.body_html &&
422
+ body_rtf == o.body_rtf &&
423
+ body_type == o.body_type &&
424
+ categories == o.categories &&
425
+ companies == o.companies &&
426
+ item_id == o.item_id &&
427
+ message_class == o.message_class &&
428
+ mileage == o.mileage &&
429
+ recipients == o.recipients &&
430
+ sensitivity == o.sensitivity &&
431
+ subject == o.subject &&
432
+ subject_prefix == o.subject_prefix &&
433
+ properties == o.properties &&
434
+ discriminator == o.discriminator &&
435
+ electronic_addresses == o.electronic_addresses &&
436
+ events == o.events &&
437
+ name_info == o.name_info &&
438
+ other_fields == o.other_fields &&
439
+ personal_info == o.personal_info &&
440
+ photo == o.photo &&
441
+ physical_addresses == o.physical_addresses &&
442
+ professional_info == o.professional_info &&
443
+ telephones == o.telephones
444
+ end
445
+
446
+ # @see the `==` method
447
+ # @param [Object] Object to be compared
448
+ def eql?(o)
449
+ self == o
450
+ end
451
+
452
+ # Calculates hash code according to all attributes.
453
+ # @return [Fixnum] Hash code
454
+ def hash
455
+ [attachments, billing, body, body_html, body_rtf, body_type, categories, companies, item_id, message_class, mileage, recipients, sensitivity, subject, subject_prefix, properties, discriminator, electronic_addresses, events, name_info, other_fields, personal_info, photo, physical_addresses, professional_info, telephones].hash
456
+ end
457
+
458
+ # Builds the object from hash
459
+ # @param [Hash] attributes Model attributes in the form of hash
460
+ # @return [Object] Returns the model itself
461
+ def build_from_hash(attributes)
462
+ return nil unless attributes.is_a?(Hash)
463
+ self.class.swagger_types.each_pair do |key, type|
464
+ attribute_key = self.class.attribute_map[key]
465
+ attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
466
+ if type =~ /\AArray<(.*)>/i
467
+ # check to ensure the input is an array given that the the attribute
468
+ # is documented as an array but the input is not
469
+ if attributes[attribute_key].is_a?(Array)
470
+ self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
471
+ end
472
+ elsif !attributes[attribute_key].nil?
473
+ self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
474
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
475
+ end
476
+
477
+ self
478
+ end
479
+
480
+ # Deserializes the data based on type
481
+ # @param string type Data type
482
+ # @param string value Value to be deserialized
483
+ # @return [Object] Deserialized data
484
+ def _deserialize(type, value)
485
+ case type.to_sym
486
+ when :DateTime
487
+ DateTime.parse(value)
488
+ when :Date
489
+ Date.parse(value)
490
+ when :String
491
+ value.to_s
492
+ when :Integer
493
+ value.to_i
494
+ when :Float
495
+ value.to_f
496
+ when :BOOLEAN
497
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
498
+ true
499
+ else
500
+ false
501
+ end
502
+ when :Object
503
+ # generic object (usually a Hash), return directly
504
+ value
505
+ when /\AArray<(?<inner_type>.+)>\z/
506
+ inner_type = Regexp.last_match[:inner_type]
507
+ value.map { |v| _deserialize(inner_type, v) }
508
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
509
+ k_type = Regexp.last_match[:k_type]
510
+ v_type = Regexp.last_match[:v_type]
511
+ {}.tap do |hash|
512
+ value.each do |k, v|
513
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
514
+ end
515
+ end
516
+ else # model
517
+ sub_type = value[:type] || value[:discriminator] || type
518
+ if AsposeEmailCloud.const_defined?(sub_type)
519
+ type = sub_type
520
+ end
521
+ temp_model = AsposeEmailCloud.const_get(type).new
522
+ temp_model.build_from_hash(value)
523
+ end
524
+ end
525
+
526
+ # Returns the string representation of the object
527
+ # @return [String] String presentation of the object
528
+ def to_s
529
+ to_hash.to_s
530
+ end
531
+
532
+ # to_body is an alias to to_hash (backward compatibility)
533
+ # @return [Hash] Returns the object in the form of hash
534
+ def to_body
535
+ to_hash
536
+ end
537
+
538
+ # Returns the object in the form of hash
539
+ # @return [Hash] Returns the object in the form of hash
540
+ def to_hash
541
+ hash = {}
542
+ self.class.attribute_map.each_pair do |attr, param|
543
+ value = self.send(attr)
544
+ next if value.nil?
545
+ hash[param] = _to_hash(value)
546
+ end
547
+ hash
548
+ end
549
+
550
+ # Outputs non-array value in the form of hash
551
+ # For object, use to_hash. Otherwise, just return the value
552
+ # @param [Object] value Any valid value
553
+ # @return [Hash] Returns the value in the form of hash
554
+ def _to_hash(value)
555
+ if value.is_a?(Array)
556
+ value.compact.map { |v| _to_hash(v) }
557
+ elsif value.is_a?(Hash)
558
+ {}.tap do |hash|
559
+ value.each { |k, v| hash[k] = _to_hash(v) }
560
+ end
561
+ elsif value.respond_to? :to_hash
562
+ value.to_hash
563
+ else
564
+ value
565
+ end
566
+ end
567
+
568
+ end
569
+ end