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,97 +27,101 @@
27
27
  require 'date'
28
28
 
29
29
  module AsposeEmailCloud
30
- # Class for disc space information.
31
- class DiscUsage
32
- # Application used disc space.
33
- attr_accessor :used_size
34
-
35
- # Total disc space.
36
- attr_accessor :total_size
37
-
38
- # Attribute mapping from ruby-style variable name to JSON key.
39
- def self.attribute_map
40
- {
41
- :'used_size' => :'usedSize',
42
- :'total_size' => :'totalSize'
43
- }
44
- end
45
-
46
- # Attribute type mapping.
47
- def self.swagger_types
48
- {
49
- :'used_size' => :'Integer',
50
- :'total_size' => :'Integer'
51
- }
52
- end
53
-
54
- # Initializes the object
55
- # @param [Hash] attributes Model attributes in the form of hash
56
- def initialize(attributes = {})
57
- return unless attributes.is_a?(Hash)
58
-
59
- # convert string to symbol for hash key
60
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
61
-
62
- if attributes.has_key?(:'usedSize')
63
- self.used_size = attributes[:'usedSize']
64
- end
65
-
66
- if attributes.has_key?(:'totalSize')
67
- self.total_size = attributes[:'totalSize']
68
- end
69
- end
70
-
71
- # Initializes the object
72
- def initialize(used_size=nil, total_size=nil)
73
- self.used_size = used_size
74
- self.total_size = total_size
75
- end
76
-
77
- # Show invalid properties with the reasons. Usually used together with valid?
78
- # @return Array for valid properties with the reasons
79
- def list_invalid_properties
80
- invalid_properties = Array.new
81
- if @used_size.nil?
82
- invalid_properties.push('invalid value for "used_size", used_size cannot be nil.')
83
- end
84
-
85
- if @total_size.nil?
86
- invalid_properties.push('invalid value for "total_size", total_size cannot be nil.')
87
- end
88
-
89
- invalid_properties
90
- end
91
-
92
- # Check to see if the all the properties in the model are valid
93
- # @return true if the model is valid
94
- def valid?
95
- return false if @used_size.nil?
96
- return false if @total_size.nil?
97
- true
98
- end
99
-
100
- # Checks equality by comparing each attribute.
101
- # @param [Object] Object to be compared
102
- def ==(o)
103
- return true if self.equal?(o)
104
- self.class == o.class &&
105
- used_size == o.used_size &&
106
- total_size == o.total_size
107
- end
108
-
109
- # @see the `==` method
110
- # @param [Object] Object to be compared
111
- def eql?(o)
112
- self == o
113
- end
114
-
115
- # Calculates hash code according to all attributes.
116
- # @return [Fixnum] Hash code
117
- def hash
118
- [used_size, total_size].hash
119
- end
120
-
30
+ # Class for disc space information.
31
+ class DiscUsage
32
+ # Application used disc space.
33
+ # @return [Integer]
34
+ attr_accessor :used_size
35
+
36
+ # Total disc space.
37
+ # @return [Integer]
38
+ attr_accessor :total_size
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'used_size' => :'usedSize',
44
+ :'total_size' => :'totalSize'
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.swagger_types
50
+ {
51
+ :'used_size' => :'Integer',
52
+ :'total_size' => :'Integer'
53
+ }
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ return unless attributes.is_a?(Hash)
60
+
61
+ # convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
63
+
64
+ if attributes.has_key?(:'usedSize')
65
+ self.used_size = attributes[:'usedSize']
66
+ end
67
+
68
+ if attributes.has_key?(:'totalSize')
69
+ self.total_size = attributes[:'totalSize']
70
+ end
71
+ end
72
+
73
+ # Initializes the object
74
+ # @param [Integer] used_size Application used disc space.
75
+ # @param [Integer] total_size Total disc space.
76
+ def initialize(used_size=nil, total_size=nil)
77
+ self.used_size = used_size if used_size
78
+ self.total_size = total_size if total_size
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ if @used_size.nil?
86
+ invalid_properties.push('invalid value for "used_size", used_size cannot be nil.')
87
+ end
88
+
89
+ if @total_size.nil?
90
+ invalid_properties.push('invalid value for "total_size", total_size cannot be nil.')
91
+ end
92
+
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ return false if @used_size.nil?
100
+ return false if @total_size.nil?
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ used_size == o.used_size &&
110
+ total_size == o.total_size
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Fixnum] Hash code
121
+ def hash
122
+ [used_size, total_size].hash
123
+ end
124
+
121
125
  # Builds the object from hash
122
126
  # @param [Hash] attributes Model attributes in the form of hash
123
127
  # @return [Object] Returns the model itself
@@ -224,6 +228,6 @@ module AsposeEmailCloud
224
228
  value
225
229
  end
226
230
  end
227
-
231
+
228
232
  end
229
233
  end
@@ -27,210 +27,262 @@
27
27
  require 'date'
28
28
 
29
29
  module AsposeEmailCloud
30
- # Email account settings request
31
- class EmailAccountRequest
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
- # Attribute mapping from ruby-style variable name to JSON key.
54
- def self.attribute_map
55
- {
56
- :'host' => :'host',
57
- :'port' => :'port',
58
- :'login' => :'login',
59
- :'security_options' => :'securityOptions',
60
- :'protocol_type' => :'protocolType',
61
- :'description' => :'description',
62
- :'storage_file' => :'storageFile'
63
- }
64
- end
65
-
66
- # Attribute type mapping.
67
- def self.swagger_types
68
- {
69
- :'host' => :'String',
70
- :'port' => :'Integer',
71
- :'login' => :'String',
72
- :'security_options' => :'Object',
73
- :'protocol_type' => :'Object',
74
- :'description' => :'String',
75
- :'storage_file' => :'StorageFileLocation'
76
- }
77
- end
78
-
79
- # Initializes the object
80
- # @param [Hash] attributes Model attributes in the form of hash
81
- def initialize(attributes = {})
82
- return unless attributes.is_a?(Hash)
83
-
84
- # convert string to symbol for hash key
85
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
86
-
87
- if attributes.has_key?(:'host')
88
- self.host = attributes[:'host']
89
- end
90
-
91
- if attributes.has_key?(:'port')
92
- self.port = attributes[:'port']
93
- end
94
-
95
- if attributes.has_key?(:'login')
96
- self.login = attributes[:'login']
97
- end
98
-
99
- if attributes.has_key?(:'securityOptions')
100
- self.security_options = attributes[:'securityOptions']
101
- end
102
-
103
- if attributes.has_key?(:'protocolType')
104
- self.protocol_type = attributes[:'protocolType']
105
- end
106
-
107
- if attributes.has_key?(:'description')
108
- self.description = attributes[:'description']
109
- end
110
-
111
- if attributes.has_key?(:'storageFile')
112
- self.storage_file = attributes[:'storageFile']
113
- end
114
- end
115
-
116
- # Initializes the object
117
- def initialize(host=nil, port=nil, login=nil, security_options=nil, protocol_type=nil, description=nil, storage_file=nil)
118
- self.host = host
119
- self.port = port
120
- self.login = login
121
- self.security_options = security_options
122
- self.protocol_type = protocol_type
123
- self.description = description
124
- self.storage_file = storage_file
125
- end
126
-
127
- # Show invalid properties with the reasons. Usually used together with valid?
128
- # @return Array for valid properties with the reasons
129
- def list_invalid_properties
130
- invalid_properties = Array.new
131
- if @host.nil?
132
- invalid_properties.push('invalid value for "host", host cannot be nil.')
133
- end
134
-
135
- if @host.to_s.length < 1
136
- invalid_properties.push('invalid value for "host", the character length must be great than or equal to 1.')
137
- end
138
-
139
- if @port.nil?
140
- invalid_properties.push('invalid value for "port", port cannot be nil.')
141
- end
142
-
143
- if @login.nil?
144
- invalid_properties.push('invalid value for "login", login cannot be nil.')
145
- end
146
-
147
- if @login.to_s.length < 1
148
- invalid_properties.push('invalid value for "login", the character length must be great than or equal to 1.')
149
- end
150
-
151
- if @security_options.nil?
152
- invalid_properties.push('invalid value for "security_options", security_options cannot be nil.')
153
- end
154
-
155
- if @protocol_type.nil?
156
- invalid_properties.push('invalid value for "protocol_type", protocol_type cannot be nil.')
157
- end
158
-
159
- if @storage_file.nil?
160
- invalid_properties.push('invalid value for "storage_file", storage_file cannot be nil.')
161
- end
162
-
163
- invalid_properties
164
- end
165
-
166
- # Check to see if the all the properties in the model are valid
167
- # @return true if the model is valid
168
- def valid?
169
- return false if @host.nil?
170
- return false if @host.to_s.length < 1
171
- return false if @port.nil?
172
- return false if @login.nil?
173
- return false if @login.to_s.length < 1
174
- return false if @security_options.nil?
175
- return false if @protocol_type.nil?
176
- return false if @storage_file.nil?
177
- true
178
- end
179
-
180
- # Custom attribute writer method with validation
181
- # @param [Object] host Value to be assigned
182
- def host=(host)
183
- if host.nil?
184
- fail ArgumentError, 'host cannot be nil'
185
- end
186
-
187
- if host.to_s.length < 1
188
- fail ArgumentError, 'invalid value for "host", the character length must be great than or equal to 1.'
189
- end
190
-
191
- @host = host
192
- end
193
-
194
- # Custom attribute writer method with validation
195
- # @param [Object] login Value to be assigned
196
- def login=(login)
197
- if login.nil?
198
- fail ArgumentError, 'login cannot be nil'
199
- end
200
-
201
- if login.to_s.length < 1
202
- fail ArgumentError, 'invalid value for "login", the character length must be great than or equal to 1.'
203
- end
204
-
205
- @login = login
206
- end
207
-
208
- # Checks equality by comparing each attribute.
209
- # @param [Object] Object to be compared
210
- def ==(o)
211
- return true if self.equal?(o)
212
- self.class == o.class &&
213
- host == o.host &&
214
- port == o.port &&
215
- login == o.login &&
216
- security_options == o.security_options &&
217
- protocol_type == o.protocol_type &&
218
- description == o.description &&
219
- storage_file == o.storage_file
220
- end
221
-
222
- # @see the `==` method
223
- # @param [Object] Object to be compared
224
- def eql?(o)
225
- self == o
226
- end
227
-
228
- # Calculates hash code according to all attributes.
229
- # @return [Fixnum] Hash code
230
- def hash
231
- [host, port, login, security_options, protocol_type, description, storage_file].hash
232
- end
233
-
30
+ # Email account settings request
31
+ class EmailAccountRequest
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
+ # Attribute mapping from ruby-style variable name to JSON key.
61
+ def self.attribute_map
62
+ {
63
+ :'host' => :'host',
64
+ :'port' => :'port',
65
+ :'login' => :'login',
66
+ :'security_options' => :'securityOptions',
67
+ :'protocol_type' => :'protocolType',
68
+ :'description' => :'description',
69
+ :'storage_file' => :'storageFile'
70
+ }
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.swagger_types
75
+ {
76
+ :'host' => :'String',
77
+ :'port' => :'Integer',
78
+ :'login' => :'String',
79
+ :'security_options' => :'String',
80
+ :'protocol_type' => :'String',
81
+ :'description' => :'String',
82
+ :'storage_file' => :'StorageFileLocation'
83
+ }
84
+ end
85
+
86
+ # Initializes the object
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ def initialize(attributes = {})
89
+ return unless attributes.is_a?(Hash)
90
+
91
+ # convert string to symbol for hash key
92
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
93
+
94
+ if attributes.has_key?(:'host')
95
+ self.host = attributes[:'host']
96
+ end
97
+
98
+ if attributes.has_key?(:'port')
99
+ self.port = attributes[:'port']
100
+ end
101
+
102
+ if attributes.has_key?(:'login')
103
+ self.login = attributes[:'login']
104
+ end
105
+
106
+ if attributes.has_key?(:'securityOptions')
107
+ self.security_options = attributes[:'securityOptions']
108
+ end
109
+
110
+ if attributes.has_key?(:'protocolType')
111
+ self.protocol_type = attributes[:'protocolType']
112
+ end
113
+
114
+ if attributes.has_key?(:'description')
115
+ self.description = attributes[:'description']
116
+ end
117
+
118
+ if attributes.has_key?(:'storageFile')
119
+ self.storage_file = attributes[:'storageFile']
120
+ end
121
+ end
122
+
123
+ # Initializes the object
124
+ # @param [String] host Email account host
125
+ # @param [Integer] port Email account port
126
+ # @param [String] login Email account login
127
+ # @param [String] security_options Enum, available values: None, SSLExplicit, SSLImplicit, SSLAuto, Auto
128
+ # @param [String] protocol_type Type of connection protocol. Enum, available values: IMAP, POP3, SMTP, EWS, WebDav
129
+ # @param [String] description Email account description
130
+ # @param [StorageFileLocation] storage_file A storage file location info to store email account
131
+ def initialize(host=nil, port=nil, login=nil, security_options=nil, protocol_type=nil, description=nil, storage_file=nil)
132
+ self.host = host if host
133
+ self.port = port if port
134
+ self.login = login if login
135
+ self.security_options = security_options if security_options
136
+ self.protocol_type = protocol_type if protocol_type
137
+ self.description = description if description
138
+ self.storage_file = storage_file if storage_file
139
+ end
140
+
141
+ # Show invalid properties with the reasons. Usually used together with valid?
142
+ # @return Array for valid properties with the reasons
143
+ def list_invalid_properties
144
+ invalid_properties = Array.new
145
+ if @host.nil?
146
+ invalid_properties.push('invalid value for "host", host cannot be nil.')
147
+ end
148
+
149
+ if @host.to_s.length < 1
150
+ invalid_properties.push('invalid value for "host", the character length must be great than or equal to 1.')
151
+ end
152
+
153
+ if @port.nil?
154
+ invalid_properties.push('invalid value for "port", port cannot be nil.')
155
+ end
156
+
157
+ if @login.nil?
158
+ invalid_properties.push('invalid value for "login", login cannot be nil.')
159
+ end
160
+
161
+ if @login.to_s.length < 1
162
+ invalid_properties.push('invalid value for "login", the character length must be great than or equal to 1.')
163
+ end
164
+
165
+ if @security_options.nil?
166
+ invalid_properties.push('invalid value for "security_options", security_options cannot be nil.')
167
+ end
168
+
169
+ if @security_options.to_s.length < 1
170
+ invalid_properties.push('invalid value for "security_options", the character length must be great than or equal to 1.')
171
+ end
172
+
173
+ if @protocol_type.nil?
174
+ invalid_properties.push('invalid value for "protocol_type", protocol_type cannot be nil.')
175
+ end
176
+
177
+ if @protocol_type.to_s.length < 1
178
+ invalid_properties.push('invalid value for "protocol_type", the character length must be great than or equal to 1.')
179
+ end
180
+
181
+ if @storage_file.nil?
182
+ invalid_properties.push('invalid value for "storage_file", storage_file cannot be nil.')
183
+ end
184
+
185
+ invalid_properties
186
+ end
187
+
188
+ # Check to see if the all the properties in the model are valid
189
+ # @return true if the model is valid
190
+ def valid?
191
+ return false if @host.nil?
192
+ return false if @host.to_s.length < 1
193
+ return false if @port.nil?
194
+ return false if @login.nil?
195
+ return false if @login.to_s.length < 1
196
+ return false if @security_options.nil?
197
+ return false if @security_options.to_s.length < 1
198
+ return false if @protocol_type.nil?
199
+ return false if @protocol_type.to_s.length < 1
200
+ return false if @storage_file.nil?
201
+ true
202
+ end
203
+
204
+ # Custom attribute writer method with validation
205
+ # @param [Object] host Value to be assigned
206
+ def host=(host)
207
+ if host.nil?
208
+ fail ArgumentError, 'host cannot be nil'
209
+ end
210
+
211
+ if host.to_s.length < 1
212
+ fail ArgumentError, 'invalid value for "host", the character length must be great than or equal to 1.'
213
+ end
214
+
215
+ @host = host
216
+ end
217
+
218
+ # Custom attribute writer method with validation
219
+ # @param [Object] login Value to be assigned
220
+ def login=(login)
221
+ if login.nil?
222
+ fail ArgumentError, 'login cannot be nil'
223
+ end
224
+
225
+ if login.to_s.length < 1
226
+ fail ArgumentError, 'invalid value for "login", the character length must be great than or equal to 1.'
227
+ end
228
+
229
+ @login = login
230
+ end
231
+
232
+ # Custom attribute writer method with validation
233
+ # @param [Object] security_options Value to be assigned
234
+ def security_options=(security_options)
235
+ if security_options.nil?
236
+ fail ArgumentError, 'security_options cannot be nil'
237
+ end
238
+
239
+ if security_options.to_s.length < 1
240
+ fail ArgumentError, 'invalid value for "security_options", the character length must be great than or equal to 1.'
241
+ end
242
+
243
+ @security_options = security_options
244
+ end
245
+
246
+ # Custom attribute writer method with validation
247
+ # @param [Object] protocol_type Value to be assigned
248
+ def protocol_type=(protocol_type)
249
+ if protocol_type.nil?
250
+ fail ArgumentError, 'protocol_type cannot be nil'
251
+ end
252
+
253
+ if protocol_type.to_s.length < 1
254
+ fail ArgumentError, 'invalid value for "protocol_type", the character length must be great than or equal to 1.'
255
+ end
256
+
257
+ @protocol_type = protocol_type
258
+ end
259
+
260
+ # Checks equality by comparing each attribute.
261
+ # @param [Object] Object to be compared
262
+ def ==(o)
263
+ return true if self.equal?(o)
264
+ self.class == o.class &&
265
+ host == o.host &&
266
+ port == o.port &&
267
+ login == o.login &&
268
+ security_options == o.security_options &&
269
+ protocol_type == o.protocol_type &&
270
+ description == o.description &&
271
+ storage_file == o.storage_file
272
+ end
273
+
274
+ # @see the `==` method
275
+ # @param [Object] Object to be compared
276
+ def eql?(o)
277
+ self == o
278
+ end
279
+
280
+ # Calculates hash code according to all attributes.
281
+ # @return [Fixnum] Hash code
282
+ def hash
283
+ [host, port, login, security_options, protocol_type, description, storage_file].hash
284
+ end
285
+
234
286
  # Builds the object from hash
235
287
  # @param [Hash] attributes Model attributes in the form of hash
236
288
  # @return [Object] Returns the model itself
@@ -337,6 +389,6 @@ module AsposeEmailCloud
337
389
  value
338
390
  end
339
391
  end
340
-
392
+
341
393
  end
342
394
  end