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,319 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="MapiContactOtherPropertySetDto.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
|
+
# The properties are used to specify additional properties of contact.
|
31
|
+
class MapiContactOtherPropertySetDto
|
32
|
+
# Indicates whether the end-user wants this message object hidden from other users who have access to the message object.
|
33
|
+
# @return [BOOLEAN]
|
34
|
+
attr_accessor :private
|
35
|
+
|
36
|
+
# Specifies whether to create a journal for each action associated with this contact.
|
37
|
+
# @return [BOOLEAN]
|
38
|
+
attr_accessor :journal
|
39
|
+
|
40
|
+
# Specifies the initial signal time for a reminder.
|
41
|
+
# @return [DateTime]
|
42
|
+
attr_accessor :reminder_time
|
43
|
+
|
44
|
+
# Represents the status of a meeting request.
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :reminder_topic
|
47
|
+
|
48
|
+
# Specifies the first field on the contact that is intended for miscellaneous use for the contact.
|
49
|
+
# @return [String]
|
50
|
+
attr_accessor :user_field1
|
51
|
+
|
52
|
+
# Specifies the second field on the contact that is intended for miscellaneous use for the contact.
|
53
|
+
# @return [String]
|
54
|
+
attr_accessor :user_field2
|
55
|
+
|
56
|
+
# Specifies the third field on the contact that is intended for miscellaneous use for the contact.
|
57
|
+
# @return [String]
|
58
|
+
attr_accessor :user_field3
|
59
|
+
|
60
|
+
# Specifies the forth field on the contact that is intended for miscellaneous use for the contact.
|
61
|
+
# @return [String]
|
62
|
+
attr_accessor :user_field4
|
63
|
+
|
64
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
65
|
+
def self.attribute_map
|
66
|
+
{
|
67
|
+
:'private' => :'private',
|
68
|
+
:'journal' => :'journal',
|
69
|
+
:'reminder_time' => :'reminderTime',
|
70
|
+
:'reminder_topic' => :'reminderTopic',
|
71
|
+
:'user_field1' => :'userField1',
|
72
|
+
:'user_field2' => :'userField2',
|
73
|
+
:'user_field3' => :'userField3',
|
74
|
+
:'user_field4' => :'userField4'
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
# Attribute type mapping.
|
79
|
+
def self.swagger_types
|
80
|
+
{
|
81
|
+
:'private' => :'BOOLEAN',
|
82
|
+
:'journal' => :'BOOLEAN',
|
83
|
+
:'reminder_time' => :'DateTime',
|
84
|
+
:'reminder_topic' => :'String',
|
85
|
+
:'user_field1' => :'String',
|
86
|
+
:'user_field2' => :'String',
|
87
|
+
:'user_field3' => :'String',
|
88
|
+
:'user_field4' => :'String'
|
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?(:'private')
|
101
|
+
self.private = attributes[:'private']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.has_key?(:'journal')
|
105
|
+
self.journal = attributes[:'journal']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.has_key?(:'reminderTime')
|
109
|
+
self.reminder_time = attributes[:'reminderTime']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.has_key?(:'reminderTopic')
|
113
|
+
self.reminder_topic = attributes[:'reminderTopic']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.has_key?(:'userField1')
|
117
|
+
self.user_field1 = attributes[:'userField1']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.has_key?(:'userField2')
|
121
|
+
self.user_field2 = attributes[:'userField2']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.has_key?(:'userField3')
|
125
|
+
self.user_field3 = attributes[:'userField3']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.has_key?(:'userField4')
|
129
|
+
self.user_field4 = attributes[:'userField4']
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
# Initializes the object
|
134
|
+
# @param [BOOLEAN] private Indicates whether the end-user wants this message object hidden from other users who have access to the message object.
|
135
|
+
# @param [BOOLEAN] journal Specifies whether to create a journal for each action associated with this contact.
|
136
|
+
# @param [DateTime] reminder_time Specifies the initial signal time for a reminder.
|
137
|
+
# @param [String] reminder_topic Represents the status of a meeting request.
|
138
|
+
# @param [String] user_field1 Specifies the first field on the contact that is intended for miscellaneous use for the contact.
|
139
|
+
# @param [String] user_field2 Specifies the second field on the contact that is intended for miscellaneous use for the contact.
|
140
|
+
# @param [String] user_field3 Specifies the third field on the contact that is intended for miscellaneous use for the contact.
|
141
|
+
# @param [String] user_field4 Specifies the forth field on the contact that is intended for miscellaneous use for the contact.
|
142
|
+
def initialize(private=nil, journal=nil, reminder_time=nil, reminder_topic=nil, user_field1=nil, user_field2=nil, user_field3=nil, user_field4=nil)
|
143
|
+
self.private = private if private
|
144
|
+
self.journal = journal if journal
|
145
|
+
self.reminder_time = reminder_time if reminder_time
|
146
|
+
self.reminder_topic = reminder_topic if reminder_topic
|
147
|
+
self.user_field1 = user_field1 if user_field1
|
148
|
+
self.user_field2 = user_field2 if user_field2
|
149
|
+
self.user_field3 = user_field3 if user_field3
|
150
|
+
self.user_field4 = user_field4 if user_field4
|
151
|
+
end
|
152
|
+
|
153
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
154
|
+
# @return Array for valid properties with the reasons
|
155
|
+
def list_invalid_properties
|
156
|
+
invalid_properties = Array.new
|
157
|
+
if @private.nil?
|
158
|
+
invalid_properties.push('invalid value for "private", private cannot be nil.')
|
159
|
+
end
|
160
|
+
|
161
|
+
if @journal.nil?
|
162
|
+
invalid_properties.push('invalid value for "journal", journal cannot be nil.')
|
163
|
+
end
|
164
|
+
|
165
|
+
if @reminder_time.nil?
|
166
|
+
invalid_properties.push('invalid value for "reminder_time", reminder_time 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 @private.nil?
|
176
|
+
return false if @journal.nil?
|
177
|
+
return false if @reminder_time.nil?
|
178
|
+
true
|
179
|
+
end
|
180
|
+
|
181
|
+
# Checks equality by comparing each attribute.
|
182
|
+
# @param [Object] Object to be compared
|
183
|
+
def ==(o)
|
184
|
+
return true if self.equal?(o)
|
185
|
+
self.class == o.class &&
|
186
|
+
private == o.private &&
|
187
|
+
journal == o.journal &&
|
188
|
+
reminder_time == o.reminder_time &&
|
189
|
+
reminder_topic == o.reminder_topic &&
|
190
|
+
user_field1 == o.user_field1 &&
|
191
|
+
user_field2 == o.user_field2 &&
|
192
|
+
user_field3 == o.user_field3 &&
|
193
|
+
user_field4 == o.user_field4
|
194
|
+
end
|
195
|
+
|
196
|
+
# @see the `==` method
|
197
|
+
# @param [Object] Object to be compared
|
198
|
+
def eql?(o)
|
199
|
+
self == o
|
200
|
+
end
|
201
|
+
|
202
|
+
# Calculates hash code according to all attributes.
|
203
|
+
# @return [Fixnum] Hash code
|
204
|
+
def hash
|
205
|
+
[private, journal, reminder_time, reminder_topic, user_field1, user_field2, user_field3, user_field4].hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Builds the object from hash
|
209
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
210
|
+
# @return [Object] Returns the model itself
|
211
|
+
def build_from_hash(attributes)
|
212
|
+
return nil unless attributes.is_a?(Hash)
|
213
|
+
self.class.swagger_types.each_pair do |key, type|
|
214
|
+
attribute_key = self.class.attribute_map[key]
|
215
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
216
|
+
if type =~ /\AArray<(.*)>/i
|
217
|
+
# check to ensure the input is an array given that the the attribute
|
218
|
+
# is documented as an array but the input is not
|
219
|
+
if attributes[attribute_key].is_a?(Array)
|
220
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
221
|
+
end
|
222
|
+
elsif !attributes[attribute_key].nil?
|
223
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
224
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
225
|
+
end
|
226
|
+
|
227
|
+
self
|
228
|
+
end
|
229
|
+
|
230
|
+
# Deserializes the data based on type
|
231
|
+
# @param string type Data type
|
232
|
+
# @param string value Value to be deserialized
|
233
|
+
# @return [Object] Deserialized data
|
234
|
+
def _deserialize(type, value)
|
235
|
+
case type.to_sym
|
236
|
+
when :DateTime
|
237
|
+
DateTime.parse(value)
|
238
|
+
when :Date
|
239
|
+
Date.parse(value)
|
240
|
+
when :String
|
241
|
+
value.to_s
|
242
|
+
when :Integer
|
243
|
+
value.to_i
|
244
|
+
when :Float
|
245
|
+
value.to_f
|
246
|
+
when :BOOLEAN
|
247
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
248
|
+
true
|
249
|
+
else
|
250
|
+
false
|
251
|
+
end
|
252
|
+
when :Object
|
253
|
+
# generic object (usually a Hash), return directly
|
254
|
+
value
|
255
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
256
|
+
inner_type = Regexp.last_match[:inner_type]
|
257
|
+
value.map { |v| _deserialize(inner_type, v) }
|
258
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
259
|
+
k_type = Regexp.last_match[:k_type]
|
260
|
+
v_type = Regexp.last_match[:v_type]
|
261
|
+
{}.tap do |hash|
|
262
|
+
value.each do |k, v|
|
263
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
264
|
+
end
|
265
|
+
end
|
266
|
+
else # model
|
267
|
+
sub_type = value[:type] || value[:discriminator] || type
|
268
|
+
if AsposeEmailCloud.const_defined?(sub_type)
|
269
|
+
type = sub_type
|
270
|
+
end
|
271
|
+
temp_model = AsposeEmailCloud.const_get(type).new
|
272
|
+
temp_model.build_from_hash(value)
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
# Returns the string representation of the object
|
277
|
+
# @return [String] String presentation of the object
|
278
|
+
def to_s
|
279
|
+
to_hash.to_s
|
280
|
+
end
|
281
|
+
|
282
|
+
# to_body is an alias to to_hash (backward compatibility)
|
283
|
+
# @return [Hash] Returns the object in the form of hash
|
284
|
+
def to_body
|
285
|
+
to_hash
|
286
|
+
end
|
287
|
+
|
288
|
+
# Returns the object in the form of hash
|
289
|
+
# @return [Hash] Returns the object in the form of hash
|
290
|
+
def to_hash
|
291
|
+
hash = {}
|
292
|
+
self.class.attribute_map.each_pair do |attr, param|
|
293
|
+
value = self.send(attr)
|
294
|
+
next if value.nil?
|
295
|
+
hash[param] = _to_hash(value)
|
296
|
+
end
|
297
|
+
hash
|
298
|
+
end
|
299
|
+
|
300
|
+
# Outputs non-array value in the form of hash
|
301
|
+
# For object, use to_hash. Otherwise, just return the value
|
302
|
+
# @param [Object] value Any valid value
|
303
|
+
# @return [Hash] Returns the value in the form of hash
|
304
|
+
def _to_hash(value)
|
305
|
+
if value.is_a?(Array)
|
306
|
+
value.compact.map { |v| _to_hash(v) }
|
307
|
+
elsif value.is_a?(Hash)
|
308
|
+
{}.tap do |hash|
|
309
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
310
|
+
end
|
311
|
+
elsif value.respond_to? :to_hash
|
312
|
+
value.to_hash
|
313
|
+
else
|
314
|
+
value
|
315
|
+
end
|
316
|
+
end
|
317
|
+
|
318
|
+
end
|
319
|
+
end
|
@@ -0,0 +1,454 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="MapiContactPersonalInfoPropertySetDto.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
|
+
# Specify other additional contact information.
|
31
|
+
class MapiContactPersonalInfoPropertySetDto
|
32
|
+
# Specifies the name of the contact's spouse/partner
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :spouse_name
|
35
|
+
|
36
|
+
# Specifies the contact's personal web page URL
|
37
|
+
# @return [String]
|
38
|
+
attr_accessor :personal_home_page
|
39
|
+
|
40
|
+
# Specifies the language that the contact uses
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :language
|
43
|
+
|
44
|
+
# Specifies the additional notes
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :notes
|
47
|
+
|
48
|
+
# Specifies the hobbies of the contact
|
49
|
+
# @return [String]
|
50
|
+
attr_accessor :hobbies
|
51
|
+
|
52
|
+
# Specifies the location of the contact
|
53
|
+
# @return [String]
|
54
|
+
attr_accessor :location
|
55
|
+
|
56
|
+
# Specifies the contact's instant messaging address
|
57
|
+
# @return [String]
|
58
|
+
attr_accessor :instant_messaging_address
|
59
|
+
|
60
|
+
# Specifies an organizational ID number for the contact
|
61
|
+
# @return [String]
|
62
|
+
attr_accessor :organizational_id_number
|
63
|
+
|
64
|
+
# Specifies the contact's customer ID number
|
65
|
+
# @return [String]
|
66
|
+
attr_accessor :customer_id
|
67
|
+
|
68
|
+
# Specifies the contact's government ID number
|
69
|
+
# @return [String]
|
70
|
+
attr_accessor :government_id_number
|
71
|
+
|
72
|
+
# Specifies a URL path from which a client can retrieve free/busy information for the contact as an iCal file
|
73
|
+
# @return [String]
|
74
|
+
attr_accessor :free_busy_location
|
75
|
+
|
76
|
+
# Specifies the account name of the contact
|
77
|
+
# @return [String]
|
78
|
+
attr_accessor :account
|
79
|
+
|
80
|
+
# Specifies the contact's business web page URL
|
81
|
+
# @return [String]
|
82
|
+
attr_accessor :html
|
83
|
+
|
84
|
+
# Specifies the contact's business web page URL
|
85
|
+
# @return [String]
|
86
|
+
attr_accessor :business_home_page
|
87
|
+
|
88
|
+
# Specifies the contact's File Transfer Protocol (FTP) URL
|
89
|
+
# @return [String]
|
90
|
+
attr_accessor :ftp_site
|
91
|
+
|
92
|
+
# Specifies the name of the network to which the contact's computer is connected
|
93
|
+
# @return [String]
|
94
|
+
attr_accessor :computer_network_name
|
95
|
+
|
96
|
+
# Gender of the contact Enum, available values: Unspecified, Female, Male
|
97
|
+
# @return [String]
|
98
|
+
attr_accessor :gender
|
99
|
+
|
100
|
+
# Specifies the name of the person who referred this contact to the user
|
101
|
+
# @return [String]
|
102
|
+
attr_accessor :referred_by_name
|
103
|
+
|
104
|
+
# Contains a list of names of children.
|
105
|
+
# @return [Array<String>]
|
106
|
+
attr_accessor :children
|
107
|
+
|
108
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
109
|
+
def self.attribute_map
|
110
|
+
{
|
111
|
+
:'spouse_name' => :'spouseName',
|
112
|
+
:'personal_home_page' => :'personalHomePage',
|
113
|
+
:'language' => :'language',
|
114
|
+
:'notes' => :'notes',
|
115
|
+
:'hobbies' => :'hobbies',
|
116
|
+
:'location' => :'location',
|
117
|
+
:'instant_messaging_address' => :'instantMessagingAddress',
|
118
|
+
:'organizational_id_number' => :'organizationalIdNumber',
|
119
|
+
:'customer_id' => :'customerId',
|
120
|
+
:'government_id_number' => :'governmentIdNumber',
|
121
|
+
:'free_busy_location' => :'freeBusyLocation',
|
122
|
+
:'account' => :'account',
|
123
|
+
:'html' => :'html',
|
124
|
+
:'business_home_page' => :'businessHomePage',
|
125
|
+
:'ftp_site' => :'ftpSite',
|
126
|
+
:'computer_network_name' => :'computerNetworkName',
|
127
|
+
:'gender' => :'gender',
|
128
|
+
:'referred_by_name' => :'referredByName',
|
129
|
+
:'children' => :'children'
|
130
|
+
}
|
131
|
+
end
|
132
|
+
|
133
|
+
# Attribute type mapping.
|
134
|
+
def self.swagger_types
|
135
|
+
{
|
136
|
+
:'spouse_name' => :'String',
|
137
|
+
:'personal_home_page' => :'String',
|
138
|
+
:'language' => :'String',
|
139
|
+
:'notes' => :'String',
|
140
|
+
:'hobbies' => :'String',
|
141
|
+
:'location' => :'String',
|
142
|
+
:'instant_messaging_address' => :'String',
|
143
|
+
:'organizational_id_number' => :'String',
|
144
|
+
:'customer_id' => :'String',
|
145
|
+
:'government_id_number' => :'String',
|
146
|
+
:'free_busy_location' => :'String',
|
147
|
+
:'account' => :'String',
|
148
|
+
:'html' => :'String',
|
149
|
+
:'business_home_page' => :'String',
|
150
|
+
:'ftp_site' => :'String',
|
151
|
+
:'computer_network_name' => :'String',
|
152
|
+
:'gender' => :'String',
|
153
|
+
:'referred_by_name' => :'String',
|
154
|
+
:'children' => :'Array<String>'
|
155
|
+
}
|
156
|
+
end
|
157
|
+
|
158
|
+
# Initializes the object
|
159
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
160
|
+
def initialize(attributes = {})
|
161
|
+
return unless attributes.is_a?(Hash)
|
162
|
+
|
163
|
+
# convert string to symbol for hash key
|
164
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
165
|
+
|
166
|
+
if attributes.has_key?(:'spouseName')
|
167
|
+
self.spouse_name = attributes[:'spouseName']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.has_key?(:'personalHomePage')
|
171
|
+
self.personal_home_page = attributes[:'personalHomePage']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.has_key?(:'language')
|
175
|
+
self.language = attributes[:'language']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.has_key?(:'notes')
|
179
|
+
self.notes = attributes[:'notes']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.has_key?(:'hobbies')
|
183
|
+
self.hobbies = attributes[:'hobbies']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.has_key?(:'location')
|
187
|
+
self.location = attributes[:'location']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.has_key?(:'instantMessagingAddress')
|
191
|
+
self.instant_messaging_address = attributes[:'instantMessagingAddress']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.has_key?(:'organizationalIdNumber')
|
195
|
+
self.organizational_id_number = attributes[:'organizationalIdNumber']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.has_key?(:'customerId')
|
199
|
+
self.customer_id = attributes[:'customerId']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes.has_key?(:'governmentIdNumber')
|
203
|
+
self.government_id_number = attributes[:'governmentIdNumber']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes.has_key?(:'freeBusyLocation')
|
207
|
+
self.free_busy_location = attributes[:'freeBusyLocation']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes.has_key?(:'account')
|
211
|
+
self.account = attributes[:'account']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.has_key?(:'html')
|
215
|
+
self.html = attributes[:'html']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.has_key?(:'businessHomePage')
|
219
|
+
self.business_home_page = attributes[:'businessHomePage']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.has_key?(:'ftpSite')
|
223
|
+
self.ftp_site = attributes[:'ftpSite']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.has_key?(:'computerNetworkName')
|
227
|
+
self.computer_network_name = attributes[:'computerNetworkName']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.has_key?(:'gender')
|
231
|
+
self.gender = attributes[:'gender']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes.has_key?(:'referredByName')
|
235
|
+
self.referred_by_name = attributes[:'referredByName']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes.has_key?(:'children')
|
239
|
+
if (value = attributes[:'children']).is_a?(Array)
|
240
|
+
self.children = value
|
241
|
+
end
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
# Initializes the object
|
246
|
+
# @param [String] spouse_name Specifies the name of the contact's spouse/partner
|
247
|
+
# @param [String] personal_home_page Specifies the contact's personal web page URL
|
248
|
+
# @param [String] language Specifies the language that the contact uses
|
249
|
+
# @param [String] notes Specifies the additional notes
|
250
|
+
# @param [String] hobbies Specifies the hobbies of the contact
|
251
|
+
# @param [String] location Specifies the location of the contact
|
252
|
+
# @param [String] instant_messaging_address Specifies the contact's instant messaging address
|
253
|
+
# @param [String] organizational_id_number Specifies an organizational ID number for the contact
|
254
|
+
# @param [String] customer_id Specifies the contact's customer ID number
|
255
|
+
# @param [String] government_id_number Specifies the contact's government ID number
|
256
|
+
# @param [String] free_busy_location Specifies a URL path from which a client can retrieve free/busy information for the contact as an iCal file
|
257
|
+
# @param [String] account Specifies the account name of the contact
|
258
|
+
# @param [String] html Specifies the contact's business web page URL
|
259
|
+
# @param [String] business_home_page Specifies the contact's business web page URL
|
260
|
+
# @param [String] ftp_site Specifies the contact's File Transfer Protocol (FTP) URL
|
261
|
+
# @param [String] computer_network_name Specifies the name of the network to which the contact's computer is connected
|
262
|
+
# @param [String] gender Gender of the contact Enum, available values: Unspecified, Female, Male
|
263
|
+
# @param [String] referred_by_name Specifies the name of the person who referred this contact to the user
|
264
|
+
# @param [Array<String>] children Contains a list of names of children.
|
265
|
+
def initialize(spouse_name=nil, personal_home_page=nil, language=nil, notes=nil, hobbies=nil, location=nil, instant_messaging_address=nil, organizational_id_number=nil, customer_id=nil, government_id_number=nil, free_busy_location=nil, account=nil, html=nil, business_home_page=nil, ftp_site=nil, computer_network_name=nil, gender=nil, referred_by_name=nil, children=nil)
|
266
|
+
self.spouse_name = spouse_name if spouse_name
|
267
|
+
self.personal_home_page = personal_home_page if personal_home_page
|
268
|
+
self.language = language if language
|
269
|
+
self.notes = notes if notes
|
270
|
+
self.hobbies = hobbies if hobbies
|
271
|
+
self.location = location if location
|
272
|
+
self.instant_messaging_address = instant_messaging_address if instant_messaging_address
|
273
|
+
self.organizational_id_number = organizational_id_number if organizational_id_number
|
274
|
+
self.customer_id = customer_id if customer_id
|
275
|
+
self.government_id_number = government_id_number if government_id_number
|
276
|
+
self.free_busy_location = free_busy_location if free_busy_location
|
277
|
+
self.account = account if account
|
278
|
+
self.html = html if html
|
279
|
+
self.business_home_page = business_home_page if business_home_page
|
280
|
+
self.ftp_site = ftp_site if ftp_site
|
281
|
+
self.computer_network_name = computer_network_name if computer_network_name
|
282
|
+
self.gender = gender if gender
|
283
|
+
self.referred_by_name = referred_by_name if referred_by_name
|
284
|
+
self.children = children if children
|
285
|
+
end
|
286
|
+
|
287
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
288
|
+
# @return Array for valid properties with the reasons
|
289
|
+
def list_invalid_properties
|
290
|
+
invalid_properties = Array.new
|
291
|
+
if @gender.nil?
|
292
|
+
invalid_properties.push('invalid value for "gender", gender cannot be nil.')
|
293
|
+
end
|
294
|
+
|
295
|
+
invalid_properties
|
296
|
+
end
|
297
|
+
|
298
|
+
# Check to see if the all the properties in the model are valid
|
299
|
+
# @return true if the model is valid
|
300
|
+
def valid?
|
301
|
+
return false if @gender.nil?
|
302
|
+
true
|
303
|
+
end
|
304
|
+
|
305
|
+
# Checks equality by comparing each attribute.
|
306
|
+
# @param [Object] Object to be compared
|
307
|
+
def ==(o)
|
308
|
+
return true if self.equal?(o)
|
309
|
+
self.class == o.class &&
|
310
|
+
spouse_name == o.spouse_name &&
|
311
|
+
personal_home_page == o.personal_home_page &&
|
312
|
+
language == o.language &&
|
313
|
+
notes == o.notes &&
|
314
|
+
hobbies == o.hobbies &&
|
315
|
+
location == o.location &&
|
316
|
+
instant_messaging_address == o.instant_messaging_address &&
|
317
|
+
organizational_id_number == o.organizational_id_number &&
|
318
|
+
customer_id == o.customer_id &&
|
319
|
+
government_id_number == o.government_id_number &&
|
320
|
+
free_busy_location == o.free_busy_location &&
|
321
|
+
account == o.account &&
|
322
|
+
html == o.html &&
|
323
|
+
business_home_page == o.business_home_page &&
|
324
|
+
ftp_site == o.ftp_site &&
|
325
|
+
computer_network_name == o.computer_network_name &&
|
326
|
+
gender == o.gender &&
|
327
|
+
referred_by_name == o.referred_by_name &&
|
328
|
+
children == o.children
|
329
|
+
end
|
330
|
+
|
331
|
+
# @see the `==` method
|
332
|
+
# @param [Object] Object to be compared
|
333
|
+
def eql?(o)
|
334
|
+
self == o
|
335
|
+
end
|
336
|
+
|
337
|
+
# Calculates hash code according to all attributes.
|
338
|
+
# @return [Fixnum] Hash code
|
339
|
+
def hash
|
340
|
+
[spouse_name, personal_home_page, language, notes, hobbies, location, instant_messaging_address, organizational_id_number, customer_id, government_id_number, free_busy_location, account, html, business_home_page, ftp_site, computer_network_name, gender, referred_by_name, children].hash
|
341
|
+
end
|
342
|
+
|
343
|
+
# Builds the object from hash
|
344
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
345
|
+
# @return [Object] Returns the model itself
|
346
|
+
def build_from_hash(attributes)
|
347
|
+
return nil unless attributes.is_a?(Hash)
|
348
|
+
self.class.swagger_types.each_pair do |key, type|
|
349
|
+
attribute_key = self.class.attribute_map[key]
|
350
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
351
|
+
if type =~ /\AArray<(.*)>/i
|
352
|
+
# check to ensure the input is an array given that the the attribute
|
353
|
+
# is documented as an array but the input is not
|
354
|
+
if attributes[attribute_key].is_a?(Array)
|
355
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
356
|
+
end
|
357
|
+
elsif !attributes[attribute_key].nil?
|
358
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
359
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
360
|
+
end
|
361
|
+
|
362
|
+
self
|
363
|
+
end
|
364
|
+
|
365
|
+
# Deserializes the data based on type
|
366
|
+
# @param string type Data type
|
367
|
+
# @param string value Value to be deserialized
|
368
|
+
# @return [Object] Deserialized data
|
369
|
+
def _deserialize(type, value)
|
370
|
+
case type.to_sym
|
371
|
+
when :DateTime
|
372
|
+
DateTime.parse(value)
|
373
|
+
when :Date
|
374
|
+
Date.parse(value)
|
375
|
+
when :String
|
376
|
+
value.to_s
|
377
|
+
when :Integer
|
378
|
+
value.to_i
|
379
|
+
when :Float
|
380
|
+
value.to_f
|
381
|
+
when :BOOLEAN
|
382
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
383
|
+
true
|
384
|
+
else
|
385
|
+
false
|
386
|
+
end
|
387
|
+
when :Object
|
388
|
+
# generic object (usually a Hash), return directly
|
389
|
+
value
|
390
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
391
|
+
inner_type = Regexp.last_match[:inner_type]
|
392
|
+
value.map { |v| _deserialize(inner_type, v) }
|
393
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
394
|
+
k_type = Regexp.last_match[:k_type]
|
395
|
+
v_type = Regexp.last_match[:v_type]
|
396
|
+
{}.tap do |hash|
|
397
|
+
value.each do |k, v|
|
398
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
399
|
+
end
|
400
|
+
end
|
401
|
+
else # model
|
402
|
+
sub_type = value[:type] || value[:discriminator] || type
|
403
|
+
if AsposeEmailCloud.const_defined?(sub_type)
|
404
|
+
type = sub_type
|
405
|
+
end
|
406
|
+
temp_model = AsposeEmailCloud.const_get(type).new
|
407
|
+
temp_model.build_from_hash(value)
|
408
|
+
end
|
409
|
+
end
|
410
|
+
|
411
|
+
# Returns the string representation of the object
|
412
|
+
# @return [String] String presentation of the object
|
413
|
+
def to_s
|
414
|
+
to_hash.to_s
|
415
|
+
end
|
416
|
+
|
417
|
+
# to_body is an alias to to_hash (backward compatibility)
|
418
|
+
# @return [Hash] Returns the object in the form of hash
|
419
|
+
def to_body
|
420
|
+
to_hash
|
421
|
+
end
|
422
|
+
|
423
|
+
# Returns the object in the form of hash
|
424
|
+
# @return [Hash] Returns the object in the form of hash
|
425
|
+
def to_hash
|
426
|
+
hash = {}
|
427
|
+
self.class.attribute_map.each_pair do |attr, param|
|
428
|
+
value = self.send(attr)
|
429
|
+
next if value.nil?
|
430
|
+
hash[param] = _to_hash(value)
|
431
|
+
end
|
432
|
+
hash
|
433
|
+
end
|
434
|
+
|
435
|
+
# Outputs non-array value in the form of hash
|
436
|
+
# For object, use to_hash. Otherwise, just return the value
|
437
|
+
# @param [Object] value Any valid value
|
438
|
+
# @return [Hash] Returns the value in the form of hash
|
439
|
+
def _to_hash(value)
|
440
|
+
if value.is_a?(Array)
|
441
|
+
value.compact.map { |v| _to_hash(v) }
|
442
|
+
elsif value.is_a?(Hash)
|
443
|
+
{}.tap do |hash|
|
444
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
445
|
+
end
|
446
|
+
elsif value.respond_to? :to_hash
|
447
|
+
value.to_hash
|
448
|
+
else
|
449
|
+
value
|
450
|
+
end
|
451
|
+
end
|
452
|
+
|
453
|
+
end
|
454
|
+
end
|