aspose_email_cloud 19.12.0 → 20.1.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 +65 -0
- data/lib/aspose-email-cloud/api/email_api.rb +158 -1
- data/lib/aspose-email-cloud/models/ai_bcr_parse_ocr_data_rq.rb +230 -0
- data/lib/aspose-email-cloud/models/alternate_view.rb +279 -0
- data/lib/aspose-email-cloud/models/append_email_model_rq.rb +333 -0
- data/lib/aspose-email-cloud/models/associated_person.rb +241 -0
- data/lib/aspose-email-cloud/models/attachment.rb +321 -0
- data/lib/aspose-email-cloud/models/attachment_base.rb +251 -0
- data/lib/aspose-email-cloud/models/base_object.rb +86 -86
- data/lib/aspose-email-cloud/models/calendar_dto.rb +554 -0
- data/lib/aspose-email-cloud/models/calendar_dto_alternate_rq.rb +265 -0
- data/lib/aspose-email-cloud/models/calendar_dto_list.rb +212 -0
- data/lib/aspose-email-cloud/models/calendar_reminder.rb +315 -0
- data/lib/aspose-email-cloud/models/contact_dto.rb +696 -0
- data/lib/aspose-email-cloud/models/contact_dto_list.rb +212 -0
- data/lib/aspose-email-cloud/models/contact_photo.rb +228 -0
- data/lib/aspose-email-cloud/models/content_type.rb +264 -0
- data/lib/aspose-email-cloud/models/content_type_parameter.rb +223 -0
- data/lib/aspose-email-cloud/models/customer_event.rb +228 -0
- data/lib/aspose-email-cloud/models/email_address.rb +267 -0
- data/lib/aspose-email-cloud/models/email_dto.rb +678 -0
- data/lib/aspose-email-cloud/models/email_dto_list.rb +212 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_associated_person_category.rb +227 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_email_address_category.rb +227 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_event_category.rb +227 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_instant_messenger_category.rb +227 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_phone_number_category.rb +227 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_postal_address_category.rb +227 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_url_category.rb +227 -0
- data/lib/aspose-email-cloud/models/hierarchical_object.rb +101 -101
- data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +119 -119
- data/lib/aspose-email-cloud/models/indexed_primitive_object.rb +117 -117
- data/lib/aspose-email-cloud/models/instant_messenger_address.rb +241 -0
- data/lib/aspose-email-cloud/models/linked_resource.rb +264 -0
- data/lib/aspose-email-cloud/models/list_response_of_contact_dto.rb +211 -0
- data/lib/aspose-email-cloud/models/list_response_of_email_dto.rb +211 -0
- data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_calendar_dto.rb +211 -0
- data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_contact_dto.rb +211 -0
- data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_email_dto.rb +211 -0
- data/lib/aspose-email-cloud/models/mail_address.rb +241 -0
- data/lib/aspose-email-cloud/models/phone_number.rb +241 -0
- data/lib/aspose-email-cloud/models/postal_address.rb +350 -0
- data/lib/aspose-email-cloud/models/primitive_object.rb +99 -99
- data/lib/aspose-email-cloud/models/reminder_attendee.rb +210 -0
- data/lib/aspose-email-cloud/models/reminder_trigger.rb +246 -0
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_model_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/append_email_model_message_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/convert_email_request_data.rb +83 -0
- data/lib/aspose-email-cloud/models/requests/fetch_email_model_request_data.rb +93 -0
- data/lib/aspose-email-cloud/models/requests/get_calendar_model_as_alternate_request_data.rb +91 -0
- data/lib/aspose-email-cloud/models/requests/get_calendar_model_list_request_data.rb +85 -0
- data/lib/aspose-email-cloud/models/requests/get_calendar_model_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/get_contact_model_list_request_data.rb +87 -0
- data/lib/aspose-email-cloud/models/requests/get_contact_model_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/get_email_as_file_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/get_email_model_list_request_data.rb +87 -0
- data/lib/aspose-email-cloud/models/requests/get_email_model_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +1 -1
- data/lib/aspose-email-cloud/models/requests/list_email_models_request_data.rb +105 -0
- data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/save_email_model_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/send_email_model_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/send_email_model_rq.rb +273 -0
- data/lib/aspose-email-cloud/models/storage_model_of_calendar_dto.rb +222 -0
- data/lib/aspose-email-cloud/models/storage_model_of_contact_dto.rb +222 -0
- data/lib/aspose-email-cloud/models/storage_model_of_email_dto.rb +222 -0
- data/lib/aspose-email-cloud/models/storage_model_rq_of_calendar_dto.rb +222 -0
- data/lib/aspose-email-cloud/models/storage_model_rq_of_contact_dto.rb +222 -0
- data/lib/aspose-email-cloud/models/storage_model_rq_of_email_dto.rb +222 -0
- data/lib/aspose-email-cloud/models/url.rb +241 -0
- data/lib/aspose-email-cloud/models/value_response.rb +1 -1
- data/lib/aspose-email-cloud/version.rb +1 -1
- metadata +67 -2
@@ -0,0 +1,315 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="CalendarReminder.rb">
|
3
|
+
# Copyright (c) 2018-2019 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
|
+
# Provides a grouping of component properties that define an alarm.
|
31
|
+
class CalendarReminder
|
32
|
+
# Defines the action to be invoked when an alarm is triggered. Enum, available values: Audio, Display, Email, Procedure, None
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :action
|
35
|
+
|
36
|
+
# Collection of Reminder Attachments. Could be an absolute URI or Base64 string representation of attachment content
|
37
|
+
# @return [Array<String>]
|
38
|
+
attr_accessor :attachments
|
39
|
+
|
40
|
+
# Contains collection of ReminderAttendee objects.
|
41
|
+
# @return [Array<ReminderAttendee>]
|
42
|
+
attr_accessor :attendees
|
43
|
+
|
44
|
+
# Provides a more complete description of the alarm.
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :description
|
47
|
+
|
48
|
+
# Specifies the delay period in ticks, after which the alarm will repeat.
|
49
|
+
# @return [Integer]
|
50
|
+
attr_accessor :duration
|
51
|
+
|
52
|
+
# Defines the number of time the alarm should be repeated, after the initial trigger.
|
53
|
+
# @return [Integer]
|
54
|
+
attr_accessor :repeat
|
55
|
+
|
56
|
+
# Defines a short summary or subject for the alarm.
|
57
|
+
# @return [String]
|
58
|
+
attr_accessor :summary
|
59
|
+
|
60
|
+
# Specifies when an alarm will trigger.
|
61
|
+
# @return [ReminderTrigger]
|
62
|
+
attr_accessor :trigger
|
63
|
+
|
64
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
65
|
+
def self.attribute_map
|
66
|
+
{
|
67
|
+
:'action' => :'action',
|
68
|
+
:'attachments' => :'attachments',
|
69
|
+
:'attendees' => :'attendees',
|
70
|
+
:'description' => :'description',
|
71
|
+
:'duration' => :'duration',
|
72
|
+
:'repeat' => :'repeat',
|
73
|
+
:'summary' => :'summary',
|
74
|
+
:'trigger' => :'trigger'
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
# Attribute type mapping.
|
79
|
+
def self.swagger_types
|
80
|
+
{
|
81
|
+
:'action' => :'String',
|
82
|
+
:'attachments' => :'Array<String>',
|
83
|
+
:'attendees' => :'Array<ReminderAttendee>',
|
84
|
+
:'description' => :'String',
|
85
|
+
:'duration' => :'Integer',
|
86
|
+
:'repeat' => :'Integer',
|
87
|
+
:'summary' => :'String',
|
88
|
+
:'trigger' => :'ReminderTrigger'
|
89
|
+
}
|
90
|
+
end
|
91
|
+
|
92
|
+
# Initializes the object
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
94
|
+
def initialize(attributes = {})
|
95
|
+
return unless attributes.is_a?(Hash)
|
96
|
+
|
97
|
+
# convert string to symbol for hash key
|
98
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
99
|
+
|
100
|
+
if attributes.has_key?(:'action')
|
101
|
+
self.action = attributes[:'action']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.has_key?(:'attachments')
|
105
|
+
if (value = attributes[:'attachments']).is_a?(Array)
|
106
|
+
self.attachments = value
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.has_key?(:'attendees')
|
111
|
+
if (value = attributes[:'attendees']).is_a?(Array)
|
112
|
+
self.attendees = value
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.has_key?(:'description')
|
117
|
+
self.description = attributes[:'description']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.has_key?(:'duration')
|
121
|
+
self.duration = attributes[:'duration']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.has_key?(:'repeat')
|
125
|
+
self.repeat = attributes[:'repeat']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.has_key?(:'summary')
|
129
|
+
self.summary = attributes[:'summary']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.has_key?(:'trigger')
|
133
|
+
self.trigger = attributes[:'trigger']
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
# Initializes the object
|
138
|
+
# @param [String] action Defines the action to be invoked when an alarm is triggered. Enum, available values: Audio, Display, Email, Procedure, None
|
139
|
+
# @param [Array<String>] attachments Collection of Reminder Attachments. Could be an absolute URI or Base64 string representation of attachment content
|
140
|
+
# @param [Array<ReminderAttendee>] attendees Contains collection of ReminderAttendee objects.
|
141
|
+
# @param [String] description Provides a more complete description of the alarm.
|
142
|
+
# @param [Integer] duration Specifies the delay period in ticks, after which the alarm will repeat.
|
143
|
+
# @param [Integer] repeat Defines the number of time the alarm should be repeated, after the initial trigger.
|
144
|
+
# @param [String] summary Defines a short summary or subject for the alarm.
|
145
|
+
# @param [ReminderTrigger] trigger Specifies when an alarm will trigger.
|
146
|
+
def initialize(action=nil, attachments=nil, attendees=nil, description=nil, duration=nil, repeat=nil, summary=nil, trigger=nil)
|
147
|
+
self.action = action if action
|
148
|
+
self.attachments = attachments if attachments
|
149
|
+
self.attendees = attendees if attendees
|
150
|
+
self.description = description if description
|
151
|
+
self.duration = duration if duration
|
152
|
+
self.repeat = repeat if repeat
|
153
|
+
self.summary = summary if summary
|
154
|
+
self.trigger = trigger if trigger
|
155
|
+
end
|
156
|
+
|
157
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
158
|
+
# @return Array for valid properties with the reasons
|
159
|
+
def list_invalid_properties
|
160
|
+
invalid_properties = Array.new
|
161
|
+
if @action.nil?
|
162
|
+
invalid_properties.push('invalid value for "action", action cannot be nil.')
|
163
|
+
end
|
164
|
+
|
165
|
+
if @repeat.nil?
|
166
|
+
invalid_properties.push('invalid value for "repeat", repeat cannot be nil.')
|
167
|
+
end
|
168
|
+
|
169
|
+
invalid_properties
|
170
|
+
end
|
171
|
+
|
172
|
+
# Check to see if the all the properties in the model are valid
|
173
|
+
# @return true if the model is valid
|
174
|
+
def valid?
|
175
|
+
return false if @action.nil?
|
176
|
+
return false if @repeat.nil?
|
177
|
+
true
|
178
|
+
end
|
179
|
+
|
180
|
+
# Checks equality by comparing each attribute.
|
181
|
+
# @param [Object] Object to be compared
|
182
|
+
def ==(o)
|
183
|
+
return true if self.equal?(o)
|
184
|
+
self.class == o.class &&
|
185
|
+
action == o.action &&
|
186
|
+
attachments == o.attachments &&
|
187
|
+
attendees == o.attendees &&
|
188
|
+
description == o.description &&
|
189
|
+
duration == o.duration &&
|
190
|
+
repeat == o.repeat &&
|
191
|
+
summary == o.summary &&
|
192
|
+
trigger == o.trigger
|
193
|
+
end
|
194
|
+
|
195
|
+
# @see the `==` method
|
196
|
+
# @param [Object] Object to be compared
|
197
|
+
def eql?(o)
|
198
|
+
self == o
|
199
|
+
end
|
200
|
+
|
201
|
+
# Calculates hash code according to all attributes.
|
202
|
+
# @return [Fixnum] Hash code
|
203
|
+
def hash
|
204
|
+
[action, attachments, attendees, description, duration, repeat, summary, trigger].hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# Builds the object from hash
|
208
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
209
|
+
# @return [Object] Returns the model itself
|
210
|
+
def build_from_hash(attributes)
|
211
|
+
return nil unless attributes.is_a?(Hash)
|
212
|
+
self.class.swagger_types.each_pair do |key, type|
|
213
|
+
attribute_key = self.class.attribute_map[key]
|
214
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
215
|
+
if type =~ /\AArray<(.*)>/i
|
216
|
+
# check to ensure the input is an array given that the the attribute
|
217
|
+
# is documented as an array but the input is not
|
218
|
+
if attributes[attribute_key].is_a?(Array)
|
219
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
220
|
+
end
|
221
|
+
elsif !attributes[attribute_key].nil?
|
222
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
223
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
224
|
+
end
|
225
|
+
|
226
|
+
self
|
227
|
+
end
|
228
|
+
|
229
|
+
# Deserializes the data based on type
|
230
|
+
# @param string type Data type
|
231
|
+
# @param string value Value to be deserialized
|
232
|
+
# @return [Object] Deserialized data
|
233
|
+
def _deserialize(type, value)
|
234
|
+
case type.to_sym
|
235
|
+
when :DateTime
|
236
|
+
DateTime.parse(value)
|
237
|
+
when :Date
|
238
|
+
Date.parse(value)
|
239
|
+
when :String
|
240
|
+
value.to_s
|
241
|
+
when :Integer
|
242
|
+
value.to_i
|
243
|
+
when :Float
|
244
|
+
value.to_f
|
245
|
+
when :BOOLEAN
|
246
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
247
|
+
true
|
248
|
+
else
|
249
|
+
false
|
250
|
+
end
|
251
|
+
when :Object
|
252
|
+
# generic object (usually a Hash), return directly
|
253
|
+
value
|
254
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
255
|
+
inner_type = Regexp.last_match[:inner_type]
|
256
|
+
value.map { |v| _deserialize(inner_type, v) }
|
257
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
258
|
+
k_type = Regexp.last_match[:k_type]
|
259
|
+
v_type = Regexp.last_match[:v_type]
|
260
|
+
{}.tap do |hash|
|
261
|
+
value.each do |k, v|
|
262
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
263
|
+
end
|
264
|
+
end
|
265
|
+
else # model
|
266
|
+
type = value[:type] || type
|
267
|
+
temp_model = AsposeEmailCloud.const_get(type).new
|
268
|
+
temp_model.build_from_hash(value)
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
# Returns the string representation of the object
|
273
|
+
# @return [String] String presentation of the object
|
274
|
+
def to_s
|
275
|
+
to_hash.to_s
|
276
|
+
end
|
277
|
+
|
278
|
+
# to_body is an alias to to_hash (backward compatibility)
|
279
|
+
# @return [Hash] Returns the object in the form of hash
|
280
|
+
def to_body
|
281
|
+
to_hash
|
282
|
+
end
|
283
|
+
|
284
|
+
# Returns the object in the form of hash
|
285
|
+
# @return [Hash] Returns the object in the form of hash
|
286
|
+
def to_hash
|
287
|
+
hash = {}
|
288
|
+
self.class.attribute_map.each_pair do |attr, param|
|
289
|
+
value = self.send(attr)
|
290
|
+
next if value.nil?
|
291
|
+
hash[param] = _to_hash(value)
|
292
|
+
end
|
293
|
+
hash
|
294
|
+
end
|
295
|
+
|
296
|
+
# Outputs non-array value in the form of hash
|
297
|
+
# For object, use to_hash. Otherwise, just return the value
|
298
|
+
# @param [Object] value Any valid value
|
299
|
+
# @return [Hash] Returns the value in the form of hash
|
300
|
+
def _to_hash(value)
|
301
|
+
if value.is_a?(Array)
|
302
|
+
value.compact.map { |v| _to_hash(v) }
|
303
|
+
elsif value.is_a?(Hash)
|
304
|
+
{}.tap do |hash|
|
305
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
306
|
+
end
|
307
|
+
elsif value.respond_to? :to_hash
|
308
|
+
value.to_hash
|
309
|
+
else
|
310
|
+
value
|
311
|
+
end
|
312
|
+
end
|
313
|
+
|
314
|
+
end
|
315
|
+
end
|
@@ -0,0 +1,696 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="ContactDto.rb">
|
3
|
+
# Copyright (c) 2018-2019 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
|
+
# VCard document representation.
|
31
|
+
class ContactDto
|
32
|
+
# Associated persons.
|
33
|
+
# @return [Array<AssociatedPerson>]
|
34
|
+
attr_accessor :associated_persons
|
35
|
+
|
36
|
+
# Document attachments.
|
37
|
+
# @return [Array<Attachment>]
|
38
|
+
attr_accessor :attachments
|
39
|
+
|
40
|
+
# Company name.
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :company_name
|
43
|
+
|
44
|
+
# Computer network.
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :computer_network_name
|
47
|
+
|
48
|
+
# Customer id.
|
49
|
+
# @return [String]
|
50
|
+
attr_accessor :customer_id
|
51
|
+
|
52
|
+
# Department name.
|
53
|
+
# @return [String]
|
54
|
+
attr_accessor :department_name
|
55
|
+
|
56
|
+
# Display name.
|
57
|
+
# @return [String]
|
58
|
+
attr_accessor :display_name
|
59
|
+
|
60
|
+
# Person's email addresses.
|
61
|
+
# @return [Array<EmailAddress>]
|
62
|
+
attr_accessor :email_addresses
|
63
|
+
|
64
|
+
# Person's events.
|
65
|
+
# @return [Array<CustomerEvent>]
|
66
|
+
attr_accessor :events
|
67
|
+
|
68
|
+
# A name used for sorting.
|
69
|
+
# @return [String]
|
70
|
+
attr_accessor :file_as
|
71
|
+
|
72
|
+
# Specifies how to generate and recompute the value of the dispidFileAs property when other contact name properties change. Coincides MS-OXPROPS revision 16.2 from 7/31/2014. Enum, available values: Empty, DisplayName, FirstName, LastName, Organization, LastFirstMiddle, OrgLastFirstMiddle, LastFirstMiddleOrg, LastFirstMiddle2, LastFirstMiddle3, OrgLastFirstMiddle2, OrgLastFirstMiddle3, LastFirstMiddleOrg2, LastFirstMiddleOrg3, LastFirstMiddleGen, FirstMiddleLastGen, LastFirstMiddleGen2, BestMatch, AccordingToLocale, None
|
73
|
+
# @return [String]
|
74
|
+
attr_accessor :file_as_mapping
|
75
|
+
|
76
|
+
# URL path from which a client can retrieve free/busy information for the contact as an iCal file.
|
77
|
+
# @return [String]
|
78
|
+
attr_accessor :free_busy_location
|
79
|
+
|
80
|
+
# Enum defines gender of a person. Enum, available values: Unspecified, Female, Male
|
81
|
+
# @return [String]
|
82
|
+
attr_accessor :gender
|
83
|
+
|
84
|
+
# Person's given name.
|
85
|
+
# @return [String]
|
86
|
+
attr_accessor :given_name
|
87
|
+
|
88
|
+
# Government id number.
|
89
|
+
# @return [String]
|
90
|
+
attr_accessor :government_id_number
|
91
|
+
|
92
|
+
# Person's hobbies.
|
93
|
+
# @return [String]
|
94
|
+
attr_accessor :hobbies
|
95
|
+
|
96
|
+
# Person's initials.
|
97
|
+
# @return [String]
|
98
|
+
attr_accessor :initials
|
99
|
+
|
100
|
+
# Person's instant messenger addresses.
|
101
|
+
# @return [Array<InstantMessengerAddress>]
|
102
|
+
attr_accessor :instant_messengers
|
103
|
+
|
104
|
+
# Person's job title.
|
105
|
+
# @return [String]
|
106
|
+
attr_accessor :job_title
|
107
|
+
|
108
|
+
# Language.
|
109
|
+
# @return [String]
|
110
|
+
attr_accessor :language
|
111
|
+
|
112
|
+
# Person's location.
|
113
|
+
# @return [String]
|
114
|
+
attr_accessor :location
|
115
|
+
|
116
|
+
# Person's middle name.
|
117
|
+
# @return [String]
|
118
|
+
attr_accessor :middle_name
|
119
|
+
|
120
|
+
# Person's nickname.
|
121
|
+
# @return [String]
|
122
|
+
attr_accessor :nickname
|
123
|
+
|
124
|
+
# Notes.
|
125
|
+
# @return [String]
|
126
|
+
attr_accessor :notes
|
127
|
+
|
128
|
+
# Defines format of a text. Enum, available values: Text, Html
|
129
|
+
# @return [String]
|
130
|
+
attr_accessor :notes_format
|
131
|
+
|
132
|
+
# Office location.
|
133
|
+
# @return [String]
|
134
|
+
attr_accessor :office_location
|
135
|
+
|
136
|
+
# Contains an identifier for the mail user used within the mail user's organization.
|
137
|
+
# @return [String]
|
138
|
+
attr_accessor :organizational_id_number
|
139
|
+
|
140
|
+
# Person's phone numbers.
|
141
|
+
# @return [Array<PhoneNumber>]
|
142
|
+
attr_accessor :phone_numbers
|
143
|
+
|
144
|
+
# Person's photo.
|
145
|
+
# @return [ContactPhoto]
|
146
|
+
attr_accessor :photo
|
147
|
+
|
148
|
+
# Person's physical addresses.
|
149
|
+
# @return [Array<PostalAddress>]
|
150
|
+
attr_accessor :physical_addresses
|
151
|
+
|
152
|
+
# Encoding for all text properties.
|
153
|
+
# @return [String]
|
154
|
+
attr_accessor :preferred_text_encoding
|
155
|
+
|
156
|
+
# A prefix of a full name such like Mr.(mister), Dr.(doctor) and so on.
|
157
|
+
# @return [String]
|
158
|
+
attr_accessor :prefix
|
159
|
+
|
160
|
+
# A job position of a person in a company.
|
161
|
+
# @return [String]
|
162
|
+
attr_accessor :profession
|
163
|
+
|
164
|
+
# A suffix of a full name such like Jr.(junior), Sr.(senior) and so on.
|
165
|
+
# @return [String]
|
166
|
+
attr_accessor :suffix
|
167
|
+
|
168
|
+
# Person's surname.
|
169
|
+
# @return [String]
|
170
|
+
attr_accessor :surname
|
171
|
+
|
172
|
+
# Person's urls.
|
173
|
+
# @return [Array<Url>]
|
174
|
+
attr_accessor :urls
|
175
|
+
|
176
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
177
|
+
def self.attribute_map
|
178
|
+
{
|
179
|
+
:'associated_persons' => :'associatedPersons',
|
180
|
+
:'attachments' => :'attachments',
|
181
|
+
:'company_name' => :'companyName',
|
182
|
+
:'computer_network_name' => :'computerNetworkName',
|
183
|
+
:'customer_id' => :'customerId',
|
184
|
+
:'department_name' => :'departmentName',
|
185
|
+
:'display_name' => :'displayName',
|
186
|
+
:'email_addresses' => :'emailAddresses',
|
187
|
+
:'events' => :'events',
|
188
|
+
:'file_as' => :'fileAs',
|
189
|
+
:'file_as_mapping' => :'fileAsMapping',
|
190
|
+
:'free_busy_location' => :'freeBusyLocation',
|
191
|
+
:'gender' => :'gender',
|
192
|
+
:'given_name' => :'givenName',
|
193
|
+
:'government_id_number' => :'governmentIdNumber',
|
194
|
+
:'hobbies' => :'hobbies',
|
195
|
+
:'initials' => :'initials',
|
196
|
+
:'instant_messengers' => :'instantMessengers',
|
197
|
+
:'job_title' => :'jobTitle',
|
198
|
+
:'language' => :'language',
|
199
|
+
:'location' => :'location',
|
200
|
+
:'middle_name' => :'middleName',
|
201
|
+
:'nickname' => :'nickname',
|
202
|
+
:'notes' => :'notes',
|
203
|
+
:'notes_format' => :'notesFormat',
|
204
|
+
:'office_location' => :'officeLocation',
|
205
|
+
:'organizational_id_number' => :'organizationalIdNumber',
|
206
|
+
:'phone_numbers' => :'phoneNumbers',
|
207
|
+
:'photo' => :'photo',
|
208
|
+
:'physical_addresses' => :'physicalAddresses',
|
209
|
+
:'preferred_text_encoding' => :'preferredTextEncoding',
|
210
|
+
:'prefix' => :'prefix',
|
211
|
+
:'profession' => :'profession',
|
212
|
+
:'suffix' => :'suffix',
|
213
|
+
:'surname' => :'surname',
|
214
|
+
:'urls' => :'urls'
|
215
|
+
}
|
216
|
+
end
|
217
|
+
|
218
|
+
# Attribute type mapping.
|
219
|
+
def self.swagger_types
|
220
|
+
{
|
221
|
+
:'associated_persons' => :'Array<AssociatedPerson>',
|
222
|
+
:'attachments' => :'Array<Attachment>',
|
223
|
+
:'company_name' => :'String',
|
224
|
+
:'computer_network_name' => :'String',
|
225
|
+
:'customer_id' => :'String',
|
226
|
+
:'department_name' => :'String',
|
227
|
+
:'display_name' => :'String',
|
228
|
+
:'email_addresses' => :'Array<EmailAddress>',
|
229
|
+
:'events' => :'Array<CustomerEvent>',
|
230
|
+
:'file_as' => :'String',
|
231
|
+
:'file_as_mapping' => :'String',
|
232
|
+
:'free_busy_location' => :'String',
|
233
|
+
:'gender' => :'String',
|
234
|
+
:'given_name' => :'String',
|
235
|
+
:'government_id_number' => :'String',
|
236
|
+
:'hobbies' => :'String',
|
237
|
+
:'initials' => :'String',
|
238
|
+
:'instant_messengers' => :'Array<InstantMessengerAddress>',
|
239
|
+
:'job_title' => :'String',
|
240
|
+
:'language' => :'String',
|
241
|
+
:'location' => :'String',
|
242
|
+
:'middle_name' => :'String',
|
243
|
+
:'nickname' => :'String',
|
244
|
+
:'notes' => :'String',
|
245
|
+
:'notes_format' => :'String',
|
246
|
+
:'office_location' => :'String',
|
247
|
+
:'organizational_id_number' => :'String',
|
248
|
+
:'phone_numbers' => :'Array<PhoneNumber>',
|
249
|
+
:'photo' => :'ContactPhoto',
|
250
|
+
:'physical_addresses' => :'Array<PostalAddress>',
|
251
|
+
:'preferred_text_encoding' => :'String',
|
252
|
+
:'prefix' => :'String',
|
253
|
+
:'profession' => :'String',
|
254
|
+
:'suffix' => :'String',
|
255
|
+
:'surname' => :'String',
|
256
|
+
:'urls' => :'Array<Url>'
|
257
|
+
}
|
258
|
+
end
|
259
|
+
|
260
|
+
# Initializes the object
|
261
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
262
|
+
def initialize(attributes = {})
|
263
|
+
return unless attributes.is_a?(Hash)
|
264
|
+
|
265
|
+
# convert string to symbol for hash key
|
266
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
267
|
+
|
268
|
+
if attributes.has_key?(:'associatedPersons')
|
269
|
+
if (value = attributes[:'associatedPersons']).is_a?(Array)
|
270
|
+
self.associated_persons = value
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
if attributes.has_key?(:'attachments')
|
275
|
+
if (value = attributes[:'attachments']).is_a?(Array)
|
276
|
+
self.attachments = value
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
if attributes.has_key?(:'companyName')
|
281
|
+
self.company_name = attributes[:'companyName']
|
282
|
+
end
|
283
|
+
|
284
|
+
if attributes.has_key?(:'computerNetworkName')
|
285
|
+
self.computer_network_name = attributes[:'computerNetworkName']
|
286
|
+
end
|
287
|
+
|
288
|
+
if attributes.has_key?(:'customerId')
|
289
|
+
self.customer_id = attributes[:'customerId']
|
290
|
+
end
|
291
|
+
|
292
|
+
if attributes.has_key?(:'departmentName')
|
293
|
+
self.department_name = attributes[:'departmentName']
|
294
|
+
end
|
295
|
+
|
296
|
+
if attributes.has_key?(:'displayName')
|
297
|
+
self.display_name = attributes[:'displayName']
|
298
|
+
end
|
299
|
+
|
300
|
+
if attributes.has_key?(:'emailAddresses')
|
301
|
+
if (value = attributes[:'emailAddresses']).is_a?(Array)
|
302
|
+
self.email_addresses = value
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
if attributes.has_key?(:'events')
|
307
|
+
if (value = attributes[:'events']).is_a?(Array)
|
308
|
+
self.events = value
|
309
|
+
end
|
310
|
+
end
|
311
|
+
|
312
|
+
if attributes.has_key?(:'fileAs')
|
313
|
+
self.file_as = attributes[:'fileAs']
|
314
|
+
end
|
315
|
+
|
316
|
+
if attributes.has_key?(:'fileAsMapping')
|
317
|
+
self.file_as_mapping = attributes[:'fileAsMapping']
|
318
|
+
end
|
319
|
+
|
320
|
+
if attributes.has_key?(:'freeBusyLocation')
|
321
|
+
self.free_busy_location = attributes[:'freeBusyLocation']
|
322
|
+
end
|
323
|
+
|
324
|
+
if attributes.has_key?(:'gender')
|
325
|
+
self.gender = attributes[:'gender']
|
326
|
+
end
|
327
|
+
|
328
|
+
if attributes.has_key?(:'givenName')
|
329
|
+
self.given_name = attributes[:'givenName']
|
330
|
+
end
|
331
|
+
|
332
|
+
if attributes.has_key?(:'governmentIdNumber')
|
333
|
+
self.government_id_number = attributes[:'governmentIdNumber']
|
334
|
+
end
|
335
|
+
|
336
|
+
if attributes.has_key?(:'hobbies')
|
337
|
+
self.hobbies = attributes[:'hobbies']
|
338
|
+
end
|
339
|
+
|
340
|
+
if attributes.has_key?(:'initials')
|
341
|
+
self.initials = attributes[:'initials']
|
342
|
+
end
|
343
|
+
|
344
|
+
if attributes.has_key?(:'instantMessengers')
|
345
|
+
if (value = attributes[:'instantMessengers']).is_a?(Array)
|
346
|
+
self.instant_messengers = value
|
347
|
+
end
|
348
|
+
end
|
349
|
+
|
350
|
+
if attributes.has_key?(:'jobTitle')
|
351
|
+
self.job_title = attributes[:'jobTitle']
|
352
|
+
end
|
353
|
+
|
354
|
+
if attributes.has_key?(:'language')
|
355
|
+
self.language = attributes[:'language']
|
356
|
+
end
|
357
|
+
|
358
|
+
if attributes.has_key?(:'location')
|
359
|
+
self.location = attributes[:'location']
|
360
|
+
end
|
361
|
+
|
362
|
+
if attributes.has_key?(:'middleName')
|
363
|
+
self.middle_name = attributes[:'middleName']
|
364
|
+
end
|
365
|
+
|
366
|
+
if attributes.has_key?(:'nickname')
|
367
|
+
self.nickname = attributes[:'nickname']
|
368
|
+
end
|
369
|
+
|
370
|
+
if attributes.has_key?(:'notes')
|
371
|
+
self.notes = attributes[:'notes']
|
372
|
+
end
|
373
|
+
|
374
|
+
if attributes.has_key?(:'notesFormat')
|
375
|
+
self.notes_format = attributes[:'notesFormat']
|
376
|
+
end
|
377
|
+
|
378
|
+
if attributes.has_key?(:'officeLocation')
|
379
|
+
self.office_location = attributes[:'officeLocation']
|
380
|
+
end
|
381
|
+
|
382
|
+
if attributes.has_key?(:'organizationalIdNumber')
|
383
|
+
self.organizational_id_number = attributes[:'organizationalIdNumber']
|
384
|
+
end
|
385
|
+
|
386
|
+
if attributes.has_key?(:'phoneNumbers')
|
387
|
+
if (value = attributes[:'phoneNumbers']).is_a?(Array)
|
388
|
+
self.phone_numbers = value
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
|
+
if attributes.has_key?(:'photo')
|
393
|
+
self.photo = attributes[:'photo']
|
394
|
+
end
|
395
|
+
|
396
|
+
if attributes.has_key?(:'physicalAddresses')
|
397
|
+
if (value = attributes[:'physicalAddresses']).is_a?(Array)
|
398
|
+
self.physical_addresses = value
|
399
|
+
end
|
400
|
+
end
|
401
|
+
|
402
|
+
if attributes.has_key?(:'preferredTextEncoding')
|
403
|
+
self.preferred_text_encoding = attributes[:'preferredTextEncoding']
|
404
|
+
end
|
405
|
+
|
406
|
+
if attributes.has_key?(:'prefix')
|
407
|
+
self.prefix = attributes[:'prefix']
|
408
|
+
end
|
409
|
+
|
410
|
+
if attributes.has_key?(:'profession')
|
411
|
+
self.profession = attributes[:'profession']
|
412
|
+
end
|
413
|
+
|
414
|
+
if attributes.has_key?(:'suffix')
|
415
|
+
self.suffix = attributes[:'suffix']
|
416
|
+
end
|
417
|
+
|
418
|
+
if attributes.has_key?(:'surname')
|
419
|
+
self.surname = attributes[:'surname']
|
420
|
+
end
|
421
|
+
|
422
|
+
if attributes.has_key?(:'urls')
|
423
|
+
if (value = attributes[:'urls']).is_a?(Array)
|
424
|
+
self.urls = value
|
425
|
+
end
|
426
|
+
end
|
427
|
+
end
|
428
|
+
|
429
|
+
# Initializes the object
|
430
|
+
# @param [Array<AssociatedPerson>] associated_persons Associated persons.
|
431
|
+
# @param [Array<Attachment>] attachments Document attachments.
|
432
|
+
# @param [String] company_name Company name.
|
433
|
+
# @param [String] computer_network_name Computer network.
|
434
|
+
# @param [String] customer_id Customer id.
|
435
|
+
# @param [String] department_name Department name.
|
436
|
+
# @param [String] display_name Display name.
|
437
|
+
# @param [Array<EmailAddress>] email_addresses Person's email addresses.
|
438
|
+
# @param [Array<CustomerEvent>] events Person's events.
|
439
|
+
# @param [String] file_as A name used for sorting.
|
440
|
+
# @param [String] file_as_mapping Specifies how to generate and recompute the value of the dispidFileAs property when other contact name properties change. Coincides MS-OXPROPS revision 16.2 from 7/31/2014. Enum, available values: Empty, DisplayName, FirstName, LastName, Organization, LastFirstMiddle, OrgLastFirstMiddle, LastFirstMiddleOrg, LastFirstMiddle2, LastFirstMiddle3, OrgLastFirstMiddle2, OrgLastFirstMiddle3, LastFirstMiddleOrg2, LastFirstMiddleOrg3, LastFirstMiddleGen, FirstMiddleLastGen, LastFirstMiddleGen2, BestMatch, AccordingToLocale, None
|
441
|
+
# @param [String] free_busy_location URL path from which a client can retrieve free/busy information for the contact as an iCal file.
|
442
|
+
# @param [String] gender Enum defines gender of a person. Enum, available values: Unspecified, Female, Male
|
443
|
+
# @param [String] given_name Person's given name.
|
444
|
+
# @param [String] government_id_number Government id number.
|
445
|
+
# @param [String] hobbies Person's hobbies.
|
446
|
+
# @param [String] initials Person's initials.
|
447
|
+
# @param [Array<InstantMessengerAddress>] instant_messengers Person's instant messenger addresses.
|
448
|
+
# @param [String] job_title Person's job title.
|
449
|
+
# @param [String] language Language.
|
450
|
+
# @param [String] location Person's location.
|
451
|
+
# @param [String] middle_name Person's middle name.
|
452
|
+
# @param [String] nickname Person's nickname.
|
453
|
+
# @param [String] notes Notes.
|
454
|
+
# @param [String] notes_format Defines format of a text. Enum, available values: Text, Html
|
455
|
+
# @param [String] office_location Office location.
|
456
|
+
# @param [String] organizational_id_number Contains an identifier for the mail user used within the mail user's organization.
|
457
|
+
# @param [Array<PhoneNumber>] phone_numbers Person's phone numbers.
|
458
|
+
# @param [ContactPhoto] photo Person's photo.
|
459
|
+
# @param [Array<PostalAddress>] physical_addresses Person's physical addresses.
|
460
|
+
# @param [String] preferred_text_encoding Encoding for all text properties.
|
461
|
+
# @param [String] prefix A prefix of a full name such like Mr.(mister), Dr.(doctor) and so on.
|
462
|
+
# @param [String] profession A job position of a person in a company.
|
463
|
+
# @param [String] suffix A suffix of a full name such like Jr.(junior), Sr.(senior) and so on.
|
464
|
+
# @param [String] surname Person's surname.
|
465
|
+
# @param [Array<Url>] urls Person's urls.
|
466
|
+
def initialize(associated_persons=nil, attachments=nil, company_name=nil, computer_network_name=nil, customer_id=nil, department_name=nil, display_name=nil, email_addresses=nil, events=nil, file_as=nil, file_as_mapping=nil, free_busy_location=nil, gender=nil, given_name=nil, government_id_number=nil, hobbies=nil, initials=nil, instant_messengers=nil, job_title=nil, language=nil, location=nil, middle_name=nil, nickname=nil, notes=nil, notes_format=nil, office_location=nil, organizational_id_number=nil, phone_numbers=nil, photo=nil, physical_addresses=nil, preferred_text_encoding=nil, prefix=nil, profession=nil, suffix=nil, surname=nil, urls=nil)
|
467
|
+
self.associated_persons = associated_persons if associated_persons
|
468
|
+
self.attachments = attachments if attachments
|
469
|
+
self.company_name = company_name if company_name
|
470
|
+
self.computer_network_name = computer_network_name if computer_network_name
|
471
|
+
self.customer_id = customer_id if customer_id
|
472
|
+
self.department_name = department_name if department_name
|
473
|
+
self.display_name = display_name if display_name
|
474
|
+
self.email_addresses = email_addresses if email_addresses
|
475
|
+
self.events = events if events
|
476
|
+
self.file_as = file_as if file_as
|
477
|
+
self.file_as_mapping = file_as_mapping if file_as_mapping
|
478
|
+
self.free_busy_location = free_busy_location if free_busy_location
|
479
|
+
self.gender = gender if gender
|
480
|
+
self.given_name = given_name if given_name
|
481
|
+
self.government_id_number = government_id_number if government_id_number
|
482
|
+
self.hobbies = hobbies if hobbies
|
483
|
+
self.initials = initials if initials
|
484
|
+
self.instant_messengers = instant_messengers if instant_messengers
|
485
|
+
self.job_title = job_title if job_title
|
486
|
+
self.language = language if language
|
487
|
+
self.location = location if location
|
488
|
+
self.middle_name = middle_name if middle_name
|
489
|
+
self.nickname = nickname if nickname
|
490
|
+
self.notes = notes if notes
|
491
|
+
self.notes_format = notes_format if notes_format
|
492
|
+
self.office_location = office_location if office_location
|
493
|
+
self.organizational_id_number = organizational_id_number if organizational_id_number
|
494
|
+
self.phone_numbers = phone_numbers if phone_numbers
|
495
|
+
self.photo = photo if photo
|
496
|
+
self.physical_addresses = physical_addresses if physical_addresses
|
497
|
+
self.preferred_text_encoding = preferred_text_encoding if preferred_text_encoding
|
498
|
+
self.prefix = prefix if prefix
|
499
|
+
self.profession = profession if profession
|
500
|
+
self.suffix = suffix if suffix
|
501
|
+
self.surname = surname if surname
|
502
|
+
self.urls = urls if urls
|
503
|
+
end
|
504
|
+
|
505
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
506
|
+
# @return Array for valid properties with the reasons
|
507
|
+
def list_invalid_properties
|
508
|
+
invalid_properties = Array.new
|
509
|
+
if @file_as_mapping.nil?
|
510
|
+
invalid_properties.push('invalid value for "file_as_mapping", file_as_mapping cannot be nil.')
|
511
|
+
end
|
512
|
+
|
513
|
+
if @gender.nil?
|
514
|
+
invalid_properties.push('invalid value for "gender", gender cannot be nil.')
|
515
|
+
end
|
516
|
+
|
517
|
+
if @notes_format.nil?
|
518
|
+
invalid_properties.push('invalid value for "notes_format", notes_format cannot be nil.')
|
519
|
+
end
|
520
|
+
|
521
|
+
invalid_properties
|
522
|
+
end
|
523
|
+
|
524
|
+
# Check to see if the all the properties in the model are valid
|
525
|
+
# @return true if the model is valid
|
526
|
+
def valid?
|
527
|
+
return false if @file_as_mapping.nil?
|
528
|
+
return false if @gender.nil?
|
529
|
+
return false if @notes_format.nil?
|
530
|
+
true
|
531
|
+
end
|
532
|
+
|
533
|
+
# Checks equality by comparing each attribute.
|
534
|
+
# @param [Object] Object to be compared
|
535
|
+
def ==(o)
|
536
|
+
return true if self.equal?(o)
|
537
|
+
self.class == o.class &&
|
538
|
+
associated_persons == o.associated_persons &&
|
539
|
+
attachments == o.attachments &&
|
540
|
+
company_name == o.company_name &&
|
541
|
+
computer_network_name == o.computer_network_name &&
|
542
|
+
customer_id == o.customer_id &&
|
543
|
+
department_name == o.department_name &&
|
544
|
+
display_name == o.display_name &&
|
545
|
+
email_addresses == o.email_addresses &&
|
546
|
+
events == o.events &&
|
547
|
+
file_as == o.file_as &&
|
548
|
+
file_as_mapping == o.file_as_mapping &&
|
549
|
+
free_busy_location == o.free_busy_location &&
|
550
|
+
gender == o.gender &&
|
551
|
+
given_name == o.given_name &&
|
552
|
+
government_id_number == o.government_id_number &&
|
553
|
+
hobbies == o.hobbies &&
|
554
|
+
initials == o.initials &&
|
555
|
+
instant_messengers == o.instant_messengers &&
|
556
|
+
job_title == o.job_title &&
|
557
|
+
language == o.language &&
|
558
|
+
location == o.location &&
|
559
|
+
middle_name == o.middle_name &&
|
560
|
+
nickname == o.nickname &&
|
561
|
+
notes == o.notes &&
|
562
|
+
notes_format == o.notes_format &&
|
563
|
+
office_location == o.office_location &&
|
564
|
+
organizational_id_number == o.organizational_id_number &&
|
565
|
+
phone_numbers == o.phone_numbers &&
|
566
|
+
photo == o.photo &&
|
567
|
+
physical_addresses == o.physical_addresses &&
|
568
|
+
preferred_text_encoding == o.preferred_text_encoding &&
|
569
|
+
prefix == o.prefix &&
|
570
|
+
profession == o.profession &&
|
571
|
+
suffix == o.suffix &&
|
572
|
+
surname == o.surname &&
|
573
|
+
urls == o.urls
|
574
|
+
end
|
575
|
+
|
576
|
+
# @see the `==` method
|
577
|
+
# @param [Object] Object to be compared
|
578
|
+
def eql?(o)
|
579
|
+
self == o
|
580
|
+
end
|
581
|
+
|
582
|
+
# Calculates hash code according to all attributes.
|
583
|
+
# @return [Fixnum] Hash code
|
584
|
+
def hash
|
585
|
+
[associated_persons, attachments, company_name, computer_network_name, customer_id, department_name, display_name, email_addresses, events, file_as, file_as_mapping, free_busy_location, gender, given_name, government_id_number, hobbies, initials, instant_messengers, job_title, language, location, middle_name, nickname, notes, notes_format, office_location, organizational_id_number, phone_numbers, photo, physical_addresses, preferred_text_encoding, prefix, profession, suffix, surname, urls].hash
|
586
|
+
end
|
587
|
+
|
588
|
+
# Builds the object from hash
|
589
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
590
|
+
# @return [Object] Returns the model itself
|
591
|
+
def build_from_hash(attributes)
|
592
|
+
return nil unless attributes.is_a?(Hash)
|
593
|
+
self.class.swagger_types.each_pair do |key, type|
|
594
|
+
attribute_key = self.class.attribute_map[key]
|
595
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
596
|
+
if type =~ /\AArray<(.*)>/i
|
597
|
+
# check to ensure the input is an array given that the the attribute
|
598
|
+
# is documented as an array but the input is not
|
599
|
+
if attributes[attribute_key].is_a?(Array)
|
600
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
601
|
+
end
|
602
|
+
elsif !attributes[attribute_key].nil?
|
603
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
604
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
605
|
+
end
|
606
|
+
|
607
|
+
self
|
608
|
+
end
|
609
|
+
|
610
|
+
# Deserializes the data based on type
|
611
|
+
# @param string type Data type
|
612
|
+
# @param string value Value to be deserialized
|
613
|
+
# @return [Object] Deserialized data
|
614
|
+
def _deserialize(type, value)
|
615
|
+
case type.to_sym
|
616
|
+
when :DateTime
|
617
|
+
DateTime.parse(value)
|
618
|
+
when :Date
|
619
|
+
Date.parse(value)
|
620
|
+
when :String
|
621
|
+
value.to_s
|
622
|
+
when :Integer
|
623
|
+
value.to_i
|
624
|
+
when :Float
|
625
|
+
value.to_f
|
626
|
+
when :BOOLEAN
|
627
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
628
|
+
true
|
629
|
+
else
|
630
|
+
false
|
631
|
+
end
|
632
|
+
when :Object
|
633
|
+
# generic object (usually a Hash), return directly
|
634
|
+
value
|
635
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
636
|
+
inner_type = Regexp.last_match[:inner_type]
|
637
|
+
value.map { |v| _deserialize(inner_type, v) }
|
638
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
639
|
+
k_type = Regexp.last_match[:k_type]
|
640
|
+
v_type = Regexp.last_match[:v_type]
|
641
|
+
{}.tap do |hash|
|
642
|
+
value.each do |k, v|
|
643
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
644
|
+
end
|
645
|
+
end
|
646
|
+
else # model
|
647
|
+
type = value[:type] || type
|
648
|
+
temp_model = AsposeEmailCloud.const_get(type).new
|
649
|
+
temp_model.build_from_hash(value)
|
650
|
+
end
|
651
|
+
end
|
652
|
+
|
653
|
+
# Returns the string representation of the object
|
654
|
+
# @return [String] String presentation of the object
|
655
|
+
def to_s
|
656
|
+
to_hash.to_s
|
657
|
+
end
|
658
|
+
|
659
|
+
# to_body is an alias to to_hash (backward compatibility)
|
660
|
+
# @return [Hash] Returns the object in the form of hash
|
661
|
+
def to_body
|
662
|
+
to_hash
|
663
|
+
end
|
664
|
+
|
665
|
+
# Returns the object in the form of hash
|
666
|
+
# @return [Hash] Returns the object in the form of hash
|
667
|
+
def to_hash
|
668
|
+
hash = {}
|
669
|
+
self.class.attribute_map.each_pair do |attr, param|
|
670
|
+
value = self.send(attr)
|
671
|
+
next if value.nil?
|
672
|
+
hash[param] = _to_hash(value)
|
673
|
+
end
|
674
|
+
hash
|
675
|
+
end
|
676
|
+
|
677
|
+
# Outputs non-array value in the form of hash
|
678
|
+
# For object, use to_hash. Otherwise, just return the value
|
679
|
+
# @param [Object] value Any valid value
|
680
|
+
# @return [Hash] Returns the value in the form of hash
|
681
|
+
def _to_hash(value)
|
682
|
+
if value.is_a?(Array)
|
683
|
+
value.compact.map { |v| _to_hash(v) }
|
684
|
+
elsif value.is_a?(Hash)
|
685
|
+
{}.tap do |hash|
|
686
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
687
|
+
end
|
688
|
+
elsif value.respond_to? :to_hash
|
689
|
+
value.to_hash
|
690
|
+
else
|
691
|
+
value
|
692
|
+
end
|
693
|
+
end
|
694
|
+
|
695
|
+
end
|
696
|
+
end
|