aspose_email_cloud 19.11.0 → 19.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose-email-cloud.rb +43 -1
  3. data/lib/aspose-email-cloud/api/email_api.rb +221 -100
  4. data/lib/aspose-email-cloud/api_client.rb +4 -3
  5. data/lib/aspose-email-cloud/configuration.rb +4 -0
  6. data/lib/aspose-email-cloud/models/account_base_request.rb +123 -113
  7. data/lib/aspose-email-cloud/models/add_attachment_request.rb +86 -82
  8. data/lib/aspose-email-cloud/models/ai_bcr_base64_image.rb +228 -0
  9. data/lib/aspose-email-cloud/models/ai_bcr_base64_rq.rb +225 -0
  10. data/lib/aspose-email-cloud/models/ai_bcr_image.rb +215 -0
  11. data/lib/aspose-email-cloud/models/ai_bcr_image_storage_file.rb +228 -0
  12. data/lib/aspose-email-cloud/models/ai_bcr_ocr_data.rb +253 -0
  13. data/lib/aspose-email-cloud/models/ai_bcr_ocr_data_part.rb +297 -0
  14. data/lib/aspose-email-cloud/models/ai_bcr_options.rb +223 -0
  15. data/lib/aspose-email-cloud/models/ai_bcr_parse_storage_rq.rb +248 -0
  16. data/lib/aspose-email-cloud/models/ai_bcr_rq.rb +210 -0
  17. data/lib/aspose-email-cloud/models/ai_bcr_storage_image_rq.rb +230 -0
  18. data/lib/aspose-email-cloud/models/ai_name_component.rb +264 -0
  19. data/lib/aspose-email-cloud/models/ai_name_cultural_context.rb +267 -0
  20. data/lib/aspose-email-cloud/models/ai_name_extracted.rb +230 -0
  21. data/lib/aspose-email-cloud/models/ai_name_extracted_component.rb +228 -0
  22. data/lib/aspose-email-cloud/models/ai_name_formatted.rb +223 -0
  23. data/lib/aspose-email-cloud/models/ai_name_gender_hypothesis.rb +233 -0
  24. data/lib/aspose-email-cloud/models/ai_name_match_result.rb +230 -0
  25. data/lib/aspose-email-cloud/models/ai_name_mismatch.rb +246 -0
  26. data/lib/aspose-email-cloud/models/ai_name_parsed_match_rq.rb +263 -0
  27. data/lib/aspose-email-cloud/models/ai_name_parsed_rq.rb +243 -0
  28. data/lib/aspose-email-cloud/models/ai_name_weighted.rb +228 -0
  29. data/lib/aspose-email-cloud/models/ai_name_weighted_variants.rb +225 -0
  30. data/lib/aspose-email-cloud/models/append_email_account_base_request.rb +178 -163
  31. data/lib/aspose-email-cloud/models/append_email_base_request.rb +196 -179
  32. data/lib/aspose-email-cloud/models/append_email_mime_base_request.rb +215 -198
  33. data/lib/aspose-email-cloud/models/base_object.rb +9 -5
  34. data/lib/aspose-email-cloud/models/create_email_request.rb +91 -87
  35. data/lib/aspose-email-cloud/models/create_folder_base_request.rb +173 -160
  36. data/lib/aspose-email-cloud/models/delete_folder_base_request.rb +178 -165
  37. data/lib/aspose-email-cloud/models/delete_message_base_request.rb +178 -165
  38. data/lib/aspose-email-cloud/models/disc_usage.rb +96 -92
  39. data/lib/aspose-email-cloud/models/email_account_request.rb +257 -205
  40. data/lib/aspose-email-cloud/models/email_document.rb +93 -89
  41. data/lib/aspose-email-cloud/models/email_document_response.rb +73 -71
  42. data/lib/aspose-email-cloud/models/email_properties.rb +93 -88
  43. data/lib/aspose-email-cloud/models/email_property.rb +128 -119
  44. data/lib/aspose-email-cloud/models/email_property_response.rb +73 -71
  45. data/lib/aspose-email-cloud/models/error.rb +112 -104
  46. data/lib/aspose-email-cloud/models/error_details.rb +91 -87
  47. data/lib/aspose-email-cloud/models/file_version.rb +166 -152
  48. data/lib/aspose-email-cloud/models/file_versions.rb +75 -73
  49. data/lib/aspose-email-cloud/models/files_list.rb +75 -73
  50. data/lib/aspose-email-cloud/models/files_upload_result.rb +90 -86
  51. data/lib/aspose-email-cloud/models/hierarchical_object.rb +13 -7
  52. data/lib/aspose-email-cloud/models/hierarchical_object_request.rb +91 -87
  53. data/lib/aspose-email-cloud/models/hierarchical_object_response.rb +86 -82
  54. data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +17 -9
  55. data/lib/aspose-email-cloud/models/indexed_primitive_object.rb +17 -9
  56. data/lib/aspose-email-cloud/models/link.rb +112 -104
  57. data/lib/aspose-email-cloud/models/list_response_of_ai_bcr_ocr_data.rb +211 -0
  58. data/lib/aspose-email-cloud/models/list_response_of_ai_name_component.rb +211 -0
  59. data/lib/aspose-email-cloud/models/list_response_of_ai_name_extracted.rb +211 -0
  60. data/lib/aspose-email-cloud/models/list_response_of_ai_name_gender_hypothesis.rb +211 -0
  61. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object.rb +211 -0
  62. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object_response.rb +74 -71
  63. data/lib/aspose-email-cloud/models/list_response_of_mail_server_folder.rb +74 -71
  64. data/lib/aspose-email-cloud/models/list_response_of_storage_file_location.rb +211 -0
  65. data/lib/aspose-email-cloud/models/list_response_of_string.rb +74 -71
  66. data/lib/aspose-email-cloud/models/mail_server_folder.rb +86 -82
  67. data/lib/aspose-email-cloud/models/mime_response.rb +73 -71
  68. data/lib/aspose-email-cloud/models/object_exist.rb +96 -92
  69. data/lib/aspose-email-cloud/models/primitive_object.rb +13 -7
  70. data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +4 -4
  71. data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +6 -11
  72. data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +4 -4
  73. data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +4 -4
  74. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_request_data.rb +75 -0
  75. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_storage_request_data.rb +75 -0
  76. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_request_data.rb +75 -0
  77. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_storage_request_data.rb +75 -0
  78. data/lib/aspose-email-cloud/models/requests/ai_name_complete_request_data.rb +91 -0
  79. data/lib/aspose-email-cloud/models/requests/ai_name_expand_parsed_request_data.rb +75 -0
  80. data/lib/aspose-email-cloud/models/requests/ai_name_expand_request_data.rb +91 -0
  81. data/lib/aspose-email-cloud/models/requests/ai_name_format_parsed_request_data.rb +75 -0
  82. data/lib/aspose-email-cloud/models/requests/ai_name_format_request_data.rb +94 -0
  83. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_parsed_request_data.rb +75 -0
  84. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_request_data.rb +91 -0
  85. data/lib/aspose-email-cloud/models/requests/ai_name_match_parsed_request_data.rb +75 -0
  86. data/lib/aspose-email-cloud/models/requests/ai_name_match_request_data.rb +99 -0
  87. data/lib/aspose-email-cloud/models/requests/ai_name_parse_email_address_request_data.rb +91 -0
  88. data/lib/aspose-email-cloud/models/requests/ai_name_parse_request_data.rb +91 -0
  89. data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +2 -2
  90. data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +2 -2
  91. data/lib/aspose-email-cloud/models/requests/copy_file_request_data.rb +5 -5
  92. data/lib/aspose-email-cloud/models/requests/copy_folder_request_data.rb +4 -4
  93. data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +3 -3
  94. data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +5 -10
  95. data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +2 -2
  96. data/lib/aspose-email-cloud/models/requests/create_email_request_data.rb +3 -3
  97. data/lib/aspose-email-cloud/models/requests/create_folder_request_data.rb +2 -2
  98. data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +3 -3
  99. data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +5 -5
  100. data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +7 -12
  101. data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +2 -2
  102. data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +2 -2
  103. data/lib/aspose-email-cloud/models/requests/delete_file_request_data.rb +3 -3
  104. data/lib/aspose-email-cloud/models/requests/delete_folder_request_data.rb +3 -3
  105. data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +4 -4
  106. data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +3 -3
  107. data/lib/aspose-email-cloud/models/requests/download_file_request_data.rb +3 -3
  108. data/lib/aspose-email-cloud/models/requests/fetch_email_message_request_data.rb +7 -7
  109. data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +5 -5
  110. data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +5 -5
  111. data/lib/aspose-email-cloud/models/requests/get_calendar_request_data.rb +4 -4
  112. data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +7 -12
  113. data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +7 -12
  114. data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +6 -11
  115. data/lib/aspose-email-cloud/models/requests/get_disc_usage_request_data.rb +1 -1
  116. data/lib/aspose-email-cloud/models/requests/get_email_attachment_request_data.rb +5 -5
  117. data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +5 -5
  118. data/lib/aspose-email-cloud/models/requests/get_email_request_data.rb +4 -4
  119. data/lib/aspose-email-cloud/models/requests/get_file_versions_request_data.rb +2 -2
  120. data/lib/aspose-email-cloud/models/requests/get_files_list_request_data.rb +2 -2
  121. data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +5 -5
  122. data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +4 -4
  123. data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +5 -5
  124. data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +4 -4
  125. data/lib/aspose-email-cloud/models/requests/list_email_folders_request_data.rb +7 -7
  126. data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +10 -10
  127. data/lib/aspose-email-cloud/models/requests/move_file_request_data.rb +5 -5
  128. data/lib/aspose-email-cloud/models/requests/move_folder_request_data.rb +4 -4
  129. data/lib/aspose-email-cloud/models/requests/object_exists_request_data.rb +3 -3
  130. data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +2 -2
  131. data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +2 -2
  132. data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +2 -2
  133. data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +2 -2
  134. data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +5 -5
  135. data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +2 -2
  136. data/lib/aspose-email-cloud/models/requests/storage_exists_request_data.rb +1 -1
  137. data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +3 -3
  138. data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +5 -10
  139. data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +3 -3
  140. data/lib/aspose-email-cloud/models/requests/upload_file_request_data.rb +3 -3
  141. data/lib/aspose-email-cloud/models/save_email_account_request.rb +294 -240
  142. data/lib/aspose-email-cloud/models/save_o_auth_email_account_request.rb +368 -310
  143. data/lib/aspose-email-cloud/models/send_email_base_request.rb +141 -130
  144. data/lib/aspose-email-cloud/models/send_email_mime_base_request.rb +160 -149
  145. data/lib/aspose-email-cloud/models/set_email_property_request.rb +91 -87
  146. data/lib/aspose-email-cloud/models/set_message_read_flag_account_base_request.rb +178 -165
  147. data/lib/aspose-email-cloud/models/storage_exist.rb +78 -76
  148. data/lib/aspose-email-cloud/models/storage_file.rb +135 -125
  149. data/lib/aspose-email-cloud/models/storage_file_location.rb +123 -117
  150. data/lib/aspose-email-cloud/models/storage_folder_location.rb +86 -82
  151. data/lib/aspose-email-cloud/models/value_response.rb +73 -71
  152. data/lib/aspose-email-cloud/version.rb +1 -1
  153. metadata +45 -3
  154. data/lib/aspose-email-cloud/models/contact_format.rb +0 -45
@@ -27,315 +27,373 @@
27
27
  require 'date'
28
28
 
29
29
  module AsposeEmailCloud
30
- # Save email account settings with OAuth request
31
- class SaveOAuthEmailAccountRequest
32
- # Email account host
33
- attr_accessor :host
34
-
35
- # Email account port
36
- attr_accessor :port
37
-
38
- # Email account login
39
- attr_accessor :login
40
-
41
- # Email account security options
42
- attr_accessor :security_options
43
-
44
- # Email account protocol type
45
- attr_accessor :protocol_type
46
-
47
- # Email account description
48
- attr_accessor :description
49
-
50
- # A storage file location info to store email account
51
- attr_accessor :storage_file
52
-
53
- # OAuth client identifier
54
- attr_accessor :client_id
55
-
56
- # OAuth client secret
57
- attr_accessor :client_secret
58
-
59
- # OAuth refresh token
60
- attr_accessor :refresh_token
61
-
62
- # Attribute mapping from ruby-style variable name to JSON key.
63
- def self.attribute_map
64
- {
65
- :'host' => :'host',
66
- :'port' => :'port',
67
- :'login' => :'login',
68
- :'security_options' => :'securityOptions',
69
- :'protocol_type' => :'protocolType',
70
- :'description' => :'description',
71
- :'storage_file' => :'storageFile',
72
- :'client_id' => :'clientId',
73
- :'client_secret' => :'clientSecret',
74
- :'refresh_token' => :'refreshToken'
75
- }
76
- end
77
-
78
- # Attribute type mapping.
79
- def self.swagger_types
80
- {
81
- :'host' => :'String',
82
- :'port' => :'Integer',
83
- :'login' => :'String',
84
- :'security_options' => :'Object',
85
- :'protocol_type' => :'Object',
86
- :'description' => :'String',
87
- :'storage_file' => :'StorageFileLocation',
88
- :'client_id' => :'String',
89
- :'client_secret' => :'String',
90
- :'refresh_token' => :'String'
91
- }
92
- end
93
-
94
- # Initializes the object
95
- # @param [Hash] attributes Model attributes in the form of hash
96
- def initialize(attributes = {})
97
- return unless attributes.is_a?(Hash)
98
-
99
- # convert string to symbol for hash key
100
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
101
-
102
- if attributes.has_key?(:'host')
103
- self.host = attributes[:'host']
104
- end
105
-
106
- if attributes.has_key?(:'port')
107
- self.port = attributes[:'port']
108
- end
109
-
110
- if attributes.has_key?(:'login')
111
- self.login = attributes[:'login']
112
- end
113
-
114
- if attributes.has_key?(:'securityOptions')
115
- self.security_options = attributes[:'securityOptions']
116
- end
117
-
118
- if attributes.has_key?(:'protocolType')
119
- self.protocol_type = attributes[:'protocolType']
120
- end
121
-
122
- if attributes.has_key?(:'description')
123
- self.description = attributes[:'description']
124
- end
125
-
126
- if attributes.has_key?(:'storageFile')
127
- self.storage_file = attributes[:'storageFile']
128
- end
129
-
130
- if attributes.has_key?(:'clientId')
131
- self.client_id = attributes[:'clientId']
132
- end
133
-
134
- if attributes.has_key?(:'clientSecret')
135
- self.client_secret = attributes[:'clientSecret']
136
- end
137
-
138
- if attributes.has_key?(:'refreshToken')
139
- self.refresh_token = attributes[:'refreshToken']
140
- end
141
- end
142
-
143
- # Initializes the object
144
- def initialize(host=nil, port=nil, login=nil, security_options=nil, protocol_type=nil, description=nil, storage_file=nil, client_id=nil, client_secret=nil, refresh_token=nil)
145
- self.host = host
146
- self.port = port
147
- self.login = login
148
- self.security_options = security_options
149
- self.protocol_type = protocol_type
150
- self.description = description
151
- self.storage_file = storage_file
152
- self.client_id = client_id
153
- self.client_secret = client_secret
154
- self.refresh_token = refresh_token
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 @host.nil?
162
- invalid_properties.push('invalid value for "host", host cannot be nil.')
163
- end
164
-
165
- if @host.to_s.length < 1
166
- invalid_properties.push('invalid value for "host", the character length must be great than or equal to 1.')
167
- end
168
-
169
- if @port.nil?
170
- invalid_properties.push('invalid value for "port", port cannot be nil.')
171
- end
172
-
173
- if @login.nil?
174
- invalid_properties.push('invalid value for "login", login cannot be nil.')
175
- end
176
-
177
- if @login.to_s.length < 1
178
- invalid_properties.push('invalid value for "login", the character length must be great than or equal to 1.')
179
- end
180
-
181
- if @security_options.nil?
182
- invalid_properties.push('invalid value for "security_options", security_options cannot be nil.')
183
- end
184
-
185
- if @protocol_type.nil?
186
- invalid_properties.push('invalid value for "protocol_type", protocol_type cannot be nil.')
187
- end
188
-
189
- if @storage_file.nil?
190
- invalid_properties.push('invalid value for "storage_file", storage_file cannot be nil.')
191
- end
192
-
193
- if @client_id.nil?
194
- invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
195
- end
196
-
197
- if @client_id.to_s.length < 1
198
- invalid_properties.push('invalid value for "client_id", the character length must be great than or equal to 1.')
199
- end
200
-
201
- if @client_secret.nil?
202
- invalid_properties.push('invalid value for "client_secret", client_secret cannot be nil.')
203
- end
204
-
205
- if @client_secret.to_s.length < 1
206
- invalid_properties.push('invalid value for "client_secret", the character length must be great than or equal to 1.')
207
- end
208
-
209
- if @refresh_token.nil?
210
- invalid_properties.push('invalid value for "refresh_token", refresh_token cannot be nil.')
211
- end
212
-
213
- if @refresh_token.to_s.length < 1
214
- invalid_properties.push('invalid value for "refresh_token", the character length must be great than or equal to 1.')
215
- end
216
-
217
- invalid_properties
218
- end
219
-
220
- # Check to see if the all the properties in the model are valid
221
- # @return true if the model is valid
222
- def valid?
223
- return false if @host.nil?
224
- return false if @host.to_s.length < 1
225
- return false if @port.nil?
226
- return false if @login.nil?
227
- return false if @login.to_s.length < 1
228
- return false if @security_options.nil?
229
- return false if @protocol_type.nil?
230
- return false if @storage_file.nil?
231
- return false if @client_id.nil?
232
- return false if @client_id.to_s.length < 1
233
- return false if @client_secret.nil?
234
- return false if @client_secret.to_s.length < 1
235
- return false if @refresh_token.nil?
236
- return false if @refresh_token.to_s.length < 1
237
- true
238
- end
239
-
240
- # Custom attribute writer method with validation
241
- # @param [Object] host Value to be assigned
242
- def host=(host)
243
- if host.nil?
244
- fail ArgumentError, 'host cannot be nil'
245
- end
246
-
247
- if host.to_s.length < 1
248
- fail ArgumentError, 'invalid value for "host", the character length must be great than or equal to 1.'
249
- end
250
-
251
- @host = host
252
- end
253
-
254
- # Custom attribute writer method with validation
255
- # @param [Object] login Value to be assigned
256
- def login=(login)
257
- if login.nil?
258
- fail ArgumentError, 'login cannot be nil'
259
- end
260
-
261
- if login.to_s.length < 1
262
- fail ArgumentError, 'invalid value for "login", the character length must be great than or equal to 1.'
263
- end
264
-
265
- @login = login
266
- end
267
-
268
- # Custom attribute writer method with validation
269
- # @param [Object] client_id Value to be assigned
270
- def client_id=(client_id)
271
- if client_id.nil?
272
- fail ArgumentError, 'client_id cannot be nil'
273
- end
274
-
275
- if client_id.to_s.length < 1
276
- fail ArgumentError, 'invalid value for "client_id", the character length must be great than or equal to 1.'
277
- end
278
-
279
- @client_id = client_id
280
- end
281
-
282
- # Custom attribute writer method with validation
283
- # @param [Object] client_secret Value to be assigned
284
- def client_secret=(client_secret)
285
- if client_secret.nil?
286
- fail ArgumentError, 'client_secret cannot be nil'
287
- end
288
-
289
- if client_secret.to_s.length < 1
290
- fail ArgumentError, 'invalid value for "client_secret", the character length must be great than or equal to 1.'
291
- end
292
-
293
- @client_secret = client_secret
294
- end
295
-
296
- # Custom attribute writer method with validation
297
- # @param [Object] refresh_token Value to be assigned
298
- def refresh_token=(refresh_token)
299
- if refresh_token.nil?
300
- fail ArgumentError, 'refresh_token cannot be nil'
301
- end
302
-
303
- if refresh_token.to_s.length < 1
304
- fail ArgumentError, 'invalid value for "refresh_token", the character length must be great than or equal to 1.'
305
- end
306
-
307
- @refresh_token = refresh_token
308
- end
309
-
310
- # Checks equality by comparing each attribute.
311
- # @param [Object] Object to be compared
312
- def ==(o)
313
- return true if self.equal?(o)
314
- self.class == o.class &&
315
- host == o.host &&
316
- port == o.port &&
317
- login == o.login &&
318
- security_options == o.security_options &&
319
- protocol_type == o.protocol_type &&
320
- description == o.description &&
321
- storage_file == o.storage_file &&
322
- client_id == o.client_id &&
323
- client_secret == o.client_secret &&
324
- refresh_token == o.refresh_token
325
- end
326
-
327
- # @see the `==` method
328
- # @param [Object] Object to be compared
329
- def eql?(o)
330
- self == o
331
- end
332
-
333
- # Calculates hash code according to all attributes.
334
- # @return [Fixnum] Hash code
335
- def hash
336
- [host, port, login, security_options, protocol_type, description, storage_file, client_id, client_secret, refresh_token].hash
337
- end
338
-
30
+ # Save email account settings with OAuth request
31
+ class SaveOAuthEmailAccountRequest
32
+ # Email account host
33
+ # @return [String]
34
+ attr_accessor :host
35
+
36
+ # Email account port
37
+ # @return [Integer]
38
+ attr_accessor :port
39
+
40
+ # Email account login
41
+ # @return [String]
42
+ attr_accessor :login
43
+
44
+ # Enum, available values: None, SSLExplicit, SSLImplicit, SSLAuto, Auto
45
+ # @return [String]
46
+ attr_accessor :security_options
47
+
48
+ # Type of connection protocol. Enum, available values: IMAP, POP3, SMTP, EWS, WebDav
49
+ # @return [String]
50
+ attr_accessor :protocol_type
51
+
52
+ # Email account description
53
+ # @return [String]
54
+ attr_accessor :description
55
+
56
+ # A storage file location info to store email account
57
+ # @return [StorageFileLocation]
58
+ attr_accessor :storage_file
59
+
60
+ # OAuth client identifier
61
+ # @return [String]
62
+ attr_accessor :client_id
63
+
64
+ # OAuth client secret
65
+ # @return [String]
66
+ attr_accessor :client_secret
67
+
68
+ # OAuth refresh token
69
+ # @return [String]
70
+ attr_accessor :refresh_token
71
+
72
+ # Attribute mapping from ruby-style variable name to JSON key.
73
+ def self.attribute_map
74
+ {
75
+ :'host' => :'host',
76
+ :'port' => :'port',
77
+ :'login' => :'login',
78
+ :'security_options' => :'securityOptions',
79
+ :'protocol_type' => :'protocolType',
80
+ :'description' => :'description',
81
+ :'storage_file' => :'storageFile',
82
+ :'client_id' => :'clientId',
83
+ :'client_secret' => :'clientSecret',
84
+ :'refresh_token' => :'refreshToken'
85
+ }
86
+ end
87
+
88
+ # Attribute type mapping.
89
+ def self.swagger_types
90
+ {
91
+ :'host' => :'String',
92
+ :'port' => :'Integer',
93
+ :'login' => :'String',
94
+ :'security_options' => :'String',
95
+ :'protocol_type' => :'String',
96
+ :'description' => :'String',
97
+ :'storage_file' => :'StorageFileLocation',
98
+ :'client_id' => :'String',
99
+ :'client_secret' => :'String',
100
+ :'refresh_token' => :'String'
101
+ }
102
+ end
103
+
104
+ # Initializes the object
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ def initialize(attributes = {})
107
+ return unless attributes.is_a?(Hash)
108
+
109
+ # convert string to symbol for hash key
110
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
111
+
112
+ if attributes.has_key?(:'host')
113
+ self.host = attributes[:'host']
114
+ end
115
+
116
+ if attributes.has_key?(:'port')
117
+ self.port = attributes[:'port']
118
+ end
119
+
120
+ if attributes.has_key?(:'login')
121
+ self.login = attributes[:'login']
122
+ end
123
+
124
+ if attributes.has_key?(:'securityOptions')
125
+ self.security_options = attributes[:'securityOptions']
126
+ end
127
+
128
+ if attributes.has_key?(:'protocolType')
129
+ self.protocol_type = attributes[:'protocolType']
130
+ end
131
+
132
+ if attributes.has_key?(:'description')
133
+ self.description = attributes[:'description']
134
+ end
135
+
136
+ if attributes.has_key?(:'storageFile')
137
+ self.storage_file = attributes[:'storageFile']
138
+ end
139
+
140
+ if attributes.has_key?(:'clientId')
141
+ self.client_id = attributes[:'clientId']
142
+ end
143
+
144
+ if attributes.has_key?(:'clientSecret')
145
+ self.client_secret = attributes[:'clientSecret']
146
+ end
147
+
148
+ if attributes.has_key?(:'refreshToken')
149
+ self.refresh_token = attributes[:'refreshToken']
150
+ end
151
+ end
152
+
153
+ # Initializes the object
154
+ # @param [String] host Email account host
155
+ # @param [Integer] port Email account port
156
+ # @param [String] login Email account login
157
+ # @param [String] security_options Enum, available values: None, SSLExplicit, SSLImplicit, SSLAuto, Auto
158
+ # @param [String] protocol_type Type of connection protocol. Enum, available values: IMAP, POP3, SMTP, EWS, WebDav
159
+ # @param [String] description Email account description
160
+ # @param [StorageFileLocation] storage_file A storage file location info to store email account
161
+ # @param [String] client_id OAuth client identifier
162
+ # @param [String] client_secret OAuth client secret
163
+ # @param [String] refresh_token OAuth refresh token
164
+ def initialize(host=nil, port=nil, login=nil, security_options=nil, protocol_type=nil, description=nil, storage_file=nil, client_id=nil, client_secret=nil, refresh_token=nil)
165
+ self.host = host if host
166
+ self.port = port if port
167
+ self.login = login if login
168
+ self.security_options = security_options if security_options
169
+ self.protocol_type = protocol_type if protocol_type
170
+ self.description = description if description
171
+ self.storage_file = storage_file if storage_file
172
+ self.client_id = client_id if client_id
173
+ self.client_secret = client_secret if client_secret
174
+ self.refresh_token = refresh_token if refresh_token
175
+ end
176
+
177
+ # Show invalid properties with the reasons. Usually used together with valid?
178
+ # @return Array for valid properties with the reasons
179
+ def list_invalid_properties
180
+ invalid_properties = Array.new
181
+ if @host.nil?
182
+ invalid_properties.push('invalid value for "host", host cannot be nil.')
183
+ end
184
+
185
+ if @host.to_s.length < 1
186
+ invalid_properties.push('invalid value for "host", the character length must be great than or equal to 1.')
187
+ end
188
+
189
+ if @port.nil?
190
+ invalid_properties.push('invalid value for "port", port cannot be nil.')
191
+ end
192
+
193
+ if @login.nil?
194
+ invalid_properties.push('invalid value for "login", login cannot be nil.')
195
+ end
196
+
197
+ if @login.to_s.length < 1
198
+ invalid_properties.push('invalid value for "login", the character length must be great than or equal to 1.')
199
+ end
200
+
201
+ if @security_options.nil?
202
+ invalid_properties.push('invalid value for "security_options", security_options cannot be nil.')
203
+ end
204
+
205
+ if @security_options.to_s.length < 1
206
+ invalid_properties.push('invalid value for "security_options", the character length must be great than or equal to 1.')
207
+ end
208
+
209
+ if @protocol_type.nil?
210
+ invalid_properties.push('invalid value for "protocol_type", protocol_type cannot be nil.')
211
+ end
212
+
213
+ if @protocol_type.to_s.length < 1
214
+ invalid_properties.push('invalid value for "protocol_type", the character length must be great than or equal to 1.')
215
+ end
216
+
217
+ if @storage_file.nil?
218
+ invalid_properties.push('invalid value for "storage_file", storage_file cannot be nil.')
219
+ end
220
+
221
+ if @client_id.nil?
222
+ invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
223
+ end
224
+
225
+ if @client_id.to_s.length < 1
226
+ invalid_properties.push('invalid value for "client_id", the character length must be great than or equal to 1.')
227
+ end
228
+
229
+ if @client_secret.nil?
230
+ invalid_properties.push('invalid value for "client_secret", client_secret cannot be nil.')
231
+ end
232
+
233
+ if @client_secret.to_s.length < 1
234
+ invalid_properties.push('invalid value for "client_secret", the character length must be great than or equal to 1.')
235
+ end
236
+
237
+ if @refresh_token.nil?
238
+ invalid_properties.push('invalid value for "refresh_token", refresh_token cannot be nil.')
239
+ end
240
+
241
+ if @refresh_token.to_s.length < 1
242
+ invalid_properties.push('invalid value for "refresh_token", the character length must be great than or equal to 1.')
243
+ end
244
+
245
+ invalid_properties
246
+ end
247
+
248
+ # Check to see if the all the properties in the model are valid
249
+ # @return true if the model is valid
250
+ def valid?
251
+ return false if @host.nil?
252
+ return false if @host.to_s.length < 1
253
+ return false if @port.nil?
254
+ return false if @login.nil?
255
+ return false if @login.to_s.length < 1
256
+ return false if @security_options.nil?
257
+ return false if @security_options.to_s.length < 1
258
+ return false if @protocol_type.nil?
259
+ return false if @protocol_type.to_s.length < 1
260
+ return false if @storage_file.nil?
261
+ return false if @client_id.nil?
262
+ return false if @client_id.to_s.length < 1
263
+ return false if @client_secret.nil?
264
+ return false if @client_secret.to_s.length < 1
265
+ return false if @refresh_token.nil?
266
+ return false if @refresh_token.to_s.length < 1
267
+ true
268
+ end
269
+
270
+ # Custom attribute writer method with validation
271
+ # @param [Object] host Value to be assigned
272
+ def host=(host)
273
+ if host.nil?
274
+ fail ArgumentError, 'host cannot be nil'
275
+ end
276
+
277
+ if host.to_s.length < 1
278
+ fail ArgumentError, 'invalid value for "host", the character length must be great than or equal to 1.'
279
+ end
280
+
281
+ @host = host
282
+ end
283
+
284
+ # Custom attribute writer method with validation
285
+ # @param [Object] login Value to be assigned
286
+ def login=(login)
287
+ if login.nil?
288
+ fail ArgumentError, 'login cannot be nil'
289
+ end
290
+
291
+ if login.to_s.length < 1
292
+ fail ArgumentError, 'invalid value for "login", the character length must be great than or equal to 1.'
293
+ end
294
+
295
+ @login = login
296
+ end
297
+
298
+ # Custom attribute writer method with validation
299
+ # @param [Object] security_options Value to be assigned
300
+ def security_options=(security_options)
301
+ if security_options.nil?
302
+ fail ArgumentError, 'security_options cannot be nil'
303
+ end
304
+
305
+ if security_options.to_s.length < 1
306
+ fail ArgumentError, 'invalid value for "security_options", the character length must be great than or equal to 1.'
307
+ end
308
+
309
+ @security_options = security_options
310
+ end
311
+
312
+ # Custom attribute writer method with validation
313
+ # @param [Object] protocol_type Value to be assigned
314
+ def protocol_type=(protocol_type)
315
+ if protocol_type.nil?
316
+ fail ArgumentError, 'protocol_type cannot be nil'
317
+ end
318
+
319
+ if protocol_type.to_s.length < 1
320
+ fail ArgumentError, 'invalid value for "protocol_type", the character length must be great than or equal to 1.'
321
+ end
322
+
323
+ @protocol_type = protocol_type
324
+ end
325
+
326
+ # Custom attribute writer method with validation
327
+ # @param [Object] client_id Value to be assigned
328
+ def client_id=(client_id)
329
+ if client_id.nil?
330
+ fail ArgumentError, 'client_id cannot be nil'
331
+ end
332
+
333
+ if client_id.to_s.length < 1
334
+ fail ArgumentError, 'invalid value for "client_id", the character length must be great than or equal to 1.'
335
+ end
336
+
337
+ @client_id = client_id
338
+ end
339
+
340
+ # Custom attribute writer method with validation
341
+ # @param [Object] client_secret Value to be assigned
342
+ def client_secret=(client_secret)
343
+ if client_secret.nil?
344
+ fail ArgumentError, 'client_secret cannot be nil'
345
+ end
346
+
347
+ if client_secret.to_s.length < 1
348
+ fail ArgumentError, 'invalid value for "client_secret", the character length must be great than or equal to 1.'
349
+ end
350
+
351
+ @client_secret = client_secret
352
+ end
353
+
354
+ # Custom attribute writer method with validation
355
+ # @param [Object] refresh_token Value to be assigned
356
+ def refresh_token=(refresh_token)
357
+ if refresh_token.nil?
358
+ fail ArgumentError, 'refresh_token cannot be nil'
359
+ end
360
+
361
+ if refresh_token.to_s.length < 1
362
+ fail ArgumentError, 'invalid value for "refresh_token", the character length must be great than or equal to 1.'
363
+ end
364
+
365
+ @refresh_token = refresh_token
366
+ end
367
+
368
+ # Checks equality by comparing each attribute.
369
+ # @param [Object] Object to be compared
370
+ def ==(o)
371
+ return true if self.equal?(o)
372
+ self.class == o.class &&
373
+ host == o.host &&
374
+ port == o.port &&
375
+ login == o.login &&
376
+ security_options == o.security_options &&
377
+ protocol_type == o.protocol_type &&
378
+ description == o.description &&
379
+ storage_file == o.storage_file &&
380
+ client_id == o.client_id &&
381
+ client_secret == o.client_secret &&
382
+ refresh_token == o.refresh_token
383
+ end
384
+
385
+ # @see the `==` method
386
+ # @param [Object] Object to be compared
387
+ def eql?(o)
388
+ self == o
389
+ end
390
+
391
+ # Calculates hash code according to all attributes.
392
+ # @return [Fixnum] Hash code
393
+ def hash
394
+ [host, port, login, security_options, protocol_type, description, storage_file, client_id, client_secret, refresh_token].hash
395
+ end
396
+
339
397
  # Builds the object from hash
340
398
  # @param [Hash] attributes Model attributes in the form of hash
341
399
  # @return [Object] Returns the model itself
@@ -442,6 +500,6 @@ module AsposeEmailCloud
442
500
  value
443
501
  end
444
502
  end
445
-
503
+
446
504
  end
447
505
  end