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,170 +27,183 @@
27
27
  require 'date'
28
28
 
29
29
  module AsposeEmailCloud
30
- # Delete folder request
31
- class DeleteFolderBaseRequest
32
- attr_accessor :first_account
33
-
34
- attr_accessor :second_account
35
-
36
- attr_accessor :storage_folder
37
-
38
- # Folder name
39
- attr_accessor :folder
40
-
41
- # Specifies that folder should be deleted permanently
42
- attr_accessor :delete_permanently
43
-
44
- # Attribute mapping from ruby-style variable name to JSON key.
45
- def self.attribute_map
46
- {
47
- :'first_account' => :'firstAccount',
48
- :'second_account' => :'secondAccount',
49
- :'storage_folder' => :'storageFolder',
50
- :'folder' => :'folder',
51
- :'delete_permanently' => :'deletePermanently'
52
- }
53
- end
54
-
55
- # Attribute type mapping.
56
- def self.swagger_types
57
- {
58
- :'first_account' => :'String',
59
- :'second_account' => :'String',
60
- :'storage_folder' => :'StorageFolderLocation',
61
- :'folder' => :'String',
62
- :'delete_permanently' => :'BOOLEAN'
63
- }
64
- end
65
-
66
- # Initializes the object
67
- # @param [Hash] attributes Model attributes in the form of hash
68
- def initialize(attributes = {})
69
- return unless attributes.is_a?(Hash)
70
-
71
- # convert string to symbol for hash key
72
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
73
-
74
- if attributes.has_key?(:'firstAccount')
75
- self.first_account = attributes[:'firstAccount']
76
- end
77
-
78
- if attributes.has_key?(:'secondAccount')
79
- self.second_account = attributes[:'secondAccount']
80
- end
81
-
82
- if attributes.has_key?(:'storageFolder')
83
- self.storage_folder = attributes[:'storageFolder']
84
- end
85
-
86
- if attributes.has_key?(:'folder')
87
- self.folder = attributes[:'folder']
88
- end
89
-
90
- if attributes.has_key?(:'deletePermanently')
91
- self.delete_permanently = attributes[:'deletePermanently']
92
- end
93
- end
94
-
95
- # Initializes the object
96
- def initialize(first_account=nil, second_account=nil, storage_folder=nil, folder=nil, delete_permanently=nil)
97
- self.first_account = first_account
98
- self.second_account = second_account
99
- self.storage_folder = storage_folder
100
- self.folder = folder
101
- self.delete_permanently = delete_permanently
102
- end
103
-
104
- # Show invalid properties with the reasons. Usually used together with valid?
105
- # @return Array for valid properties with the reasons
106
- def list_invalid_properties
107
- invalid_properties = Array.new
108
- if @first_account.nil?
109
- invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
110
- end
111
-
112
- if @first_account.to_s.length < 1
113
- invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
114
- end
115
-
116
- if @folder.nil?
117
- invalid_properties.push('invalid value for "folder", folder cannot be nil.')
118
- end
119
-
120
- if @folder.to_s.length < 1
121
- invalid_properties.push('invalid value for "folder", the character length must be great than or equal to 1.')
122
- end
123
-
124
- if @delete_permanently.nil?
125
- invalid_properties.push('invalid value for "delete_permanently", delete_permanently cannot be nil.')
126
- end
127
-
128
- invalid_properties
129
- end
130
-
131
- # Check to see if the all the properties in the model are valid
132
- # @return true if the model is valid
133
- def valid?
134
- return false if @first_account.nil?
135
- return false if @first_account.to_s.length < 1
136
- return false if @folder.nil?
137
- return false if @folder.to_s.length < 1
138
- return false if @delete_permanently.nil?
139
- true
140
- end
141
-
142
- # Custom attribute writer method with validation
143
- # @param [Object] first_account Value to be assigned
144
- def first_account=(first_account)
145
- if first_account.nil?
146
- fail ArgumentError, 'first_account cannot be nil'
147
- end
148
-
149
- if first_account.to_s.length < 1
150
- fail ArgumentError, 'invalid value for "first_account", the character length must be great than or equal to 1.'
151
- end
152
-
153
- @first_account = first_account
154
- end
155
-
156
- # Custom attribute writer method with validation
157
- # @param [Object] folder Value to be assigned
158
- def folder=(folder)
159
- if folder.nil?
160
- fail ArgumentError, 'folder cannot be nil'
161
- end
162
-
163
- if folder.to_s.length < 1
164
- fail ArgumentError, 'invalid value for "folder", the character length must be great than or equal to 1.'
165
- end
166
-
167
- @folder = folder
168
- end
169
-
170
- # Checks equality by comparing each attribute.
171
- # @param [Object] Object to be compared
172
- def ==(o)
173
- return true if self.equal?(o)
174
- self.class == o.class &&
175
- first_account == o.first_account &&
176
- second_account == o.second_account &&
177
- storage_folder == o.storage_folder &&
178
- folder == o.folder &&
179
- delete_permanently == o.delete_permanently
180
- end
181
-
182
- # @see the `==` method
183
- # @param [Object] Object to be compared
184
- def eql?(o)
185
- self == o
186
- end
187
-
188
- # Calculates hash code according to all attributes.
189
- # @return [Fixnum] Hash code
190
- def hash
191
- [first_account, second_account, storage_folder, folder, delete_permanently].hash
192
- end
193
-
30
+ # Delete folder request
31
+ class DeleteFolderBaseRequest
32
+ # First account storage file name for receiving emails (or universal one)
33
+ # @return [String]
34
+ attr_accessor :first_account
35
+
36
+ # Second account storage file name for sending emails (ignored if first is universal)
37
+ # @return [String]
38
+ attr_accessor :second_account
39
+
40
+ # Storage folder location of account files
41
+ # @return [StorageFolderLocation]
42
+ attr_accessor :storage_folder
43
+
44
+ # Folder name
45
+ # @return [String]
46
+ attr_accessor :folder
47
+
48
+ # Specifies that folder should be deleted permanently
49
+ # @return [BOOLEAN]
50
+ attr_accessor :delete_permanently
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'first_account' => :'firstAccount',
56
+ :'second_account' => :'secondAccount',
57
+ :'storage_folder' => :'storageFolder',
58
+ :'folder' => :'folder',
59
+ :'delete_permanently' => :'deletePermanently'
60
+ }
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.swagger_types
65
+ {
66
+ :'first_account' => :'String',
67
+ :'second_account' => :'String',
68
+ :'storage_folder' => :'StorageFolderLocation',
69
+ :'folder' => :'String',
70
+ :'delete_permanently' => :'BOOLEAN'
71
+ }
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ return unless attributes.is_a?(Hash)
78
+
79
+ # convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
81
+
82
+ if attributes.has_key?(:'firstAccount')
83
+ self.first_account = attributes[:'firstAccount']
84
+ end
85
+
86
+ if attributes.has_key?(:'secondAccount')
87
+ self.second_account = attributes[:'secondAccount']
88
+ end
89
+
90
+ if attributes.has_key?(:'storageFolder')
91
+ self.storage_folder = attributes[:'storageFolder']
92
+ end
93
+
94
+ if attributes.has_key?(:'folder')
95
+ self.folder = attributes[:'folder']
96
+ end
97
+
98
+ if attributes.has_key?(:'deletePermanently')
99
+ self.delete_permanently = attributes[:'deletePermanently']
100
+ end
101
+ end
102
+
103
+ # Initializes the object
104
+ # @param [String] first_account First account storage file name for receiving emails (or universal one)
105
+ # @param [String] second_account Second account storage file name for sending emails (ignored if first is universal)
106
+ # @param [StorageFolderLocation] storage_folder Storage folder location of account files
107
+ # @param [String] folder Folder name
108
+ # @param [BOOLEAN] delete_permanently Specifies that folder should be deleted permanently
109
+ def initialize(first_account=nil, second_account=nil, storage_folder=nil, folder=nil, delete_permanently=nil)
110
+ self.first_account = first_account if first_account
111
+ self.second_account = second_account if second_account
112
+ self.storage_folder = storage_folder if storage_folder
113
+ self.folder = folder if folder
114
+ self.delete_permanently = delete_permanently if delete_permanently
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ invalid_properties = Array.new
121
+ if @first_account.nil?
122
+ invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
123
+ end
124
+
125
+ if @first_account.to_s.length < 1
126
+ invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
127
+ end
128
+
129
+ if @folder.nil?
130
+ invalid_properties.push('invalid value for "folder", folder cannot be nil.')
131
+ end
132
+
133
+ if @folder.to_s.length < 1
134
+ invalid_properties.push('invalid value for "folder", the character length must be great than or equal to 1.')
135
+ end
136
+
137
+ if @delete_permanently.nil?
138
+ invalid_properties.push('invalid value for "delete_permanently", delete_permanently cannot be nil.')
139
+ end
140
+
141
+ invalid_properties
142
+ end
143
+
144
+ # Check to see if the all the properties in the model are valid
145
+ # @return true if the model is valid
146
+ def valid?
147
+ return false if @first_account.nil?
148
+ return false if @first_account.to_s.length < 1
149
+ return false if @folder.nil?
150
+ return false if @folder.to_s.length < 1
151
+ return false if @delete_permanently.nil?
152
+ true
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] first_account Value to be assigned
157
+ def first_account=(first_account)
158
+ if first_account.nil?
159
+ fail ArgumentError, 'first_account cannot be nil'
160
+ end
161
+
162
+ if first_account.to_s.length < 1
163
+ fail ArgumentError, 'invalid value for "first_account", the character length must be great than or equal to 1.'
164
+ end
165
+
166
+ @first_account = first_account
167
+ end
168
+
169
+ # Custom attribute writer method with validation
170
+ # @param [Object] folder Value to be assigned
171
+ def folder=(folder)
172
+ if folder.nil?
173
+ fail ArgumentError, 'folder cannot be nil'
174
+ end
175
+
176
+ if folder.to_s.length < 1
177
+ fail ArgumentError, 'invalid value for "folder", the character length must be great than or equal to 1.'
178
+ end
179
+
180
+ @folder = folder
181
+ end
182
+
183
+ # Checks equality by comparing each attribute.
184
+ # @param [Object] Object to be compared
185
+ def ==(o)
186
+ return true if self.equal?(o)
187
+ self.class == o.class &&
188
+ first_account == o.first_account &&
189
+ second_account == o.second_account &&
190
+ storage_folder == o.storage_folder &&
191
+ folder == o.folder &&
192
+ delete_permanently == o.delete_permanently
193
+ end
194
+
195
+ # @see the `==` method
196
+ # @param [Object] Object to be compared
197
+ def eql?(o)
198
+ self == o
199
+ end
200
+
201
+ # Calculates hash code according to all attributes.
202
+ # @return [Fixnum] Hash code
203
+ def hash
204
+ [first_account, second_account, storage_folder, folder, delete_permanently].hash
205
+ end
206
+
194
207
  # Builds the object from hash
195
208
  # @param [Hash] attributes Model attributes in the form of hash
196
209
  # @return [Object] Returns the model itself
@@ -297,6 +310,6 @@ module AsposeEmailCloud
297
310
  value
298
311
  end
299
312
  end
300
-
313
+
301
314
  end
302
315
  end
@@ -27,170 +27,183 @@
27
27
  require 'date'
28
28
 
29
29
  module AsposeEmailCloud
30
- # Delete message request
31
- class DeleteMessageBaseRequest
32
- attr_accessor :first_account
33
-
34
- attr_accessor :second_account
35
-
36
- attr_accessor :storage_folder
37
-
38
- # Message identifier
39
- attr_accessor :message_id
40
-
41
- # Specifies that message should be deleted permanently
42
- attr_accessor :delete_permanently
43
-
44
- # Attribute mapping from ruby-style variable name to JSON key.
45
- def self.attribute_map
46
- {
47
- :'first_account' => :'firstAccount',
48
- :'second_account' => :'secondAccount',
49
- :'storage_folder' => :'storageFolder',
50
- :'message_id' => :'messageId',
51
- :'delete_permanently' => :'deletePermanently'
52
- }
53
- end
54
-
55
- # Attribute type mapping.
56
- def self.swagger_types
57
- {
58
- :'first_account' => :'String',
59
- :'second_account' => :'String',
60
- :'storage_folder' => :'StorageFolderLocation',
61
- :'message_id' => :'String',
62
- :'delete_permanently' => :'BOOLEAN'
63
- }
64
- end
65
-
66
- # Initializes the object
67
- # @param [Hash] attributes Model attributes in the form of hash
68
- def initialize(attributes = {})
69
- return unless attributes.is_a?(Hash)
70
-
71
- # convert string to symbol for hash key
72
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
73
-
74
- if attributes.has_key?(:'firstAccount')
75
- self.first_account = attributes[:'firstAccount']
76
- end
77
-
78
- if attributes.has_key?(:'secondAccount')
79
- self.second_account = attributes[:'secondAccount']
80
- end
81
-
82
- if attributes.has_key?(:'storageFolder')
83
- self.storage_folder = attributes[:'storageFolder']
84
- end
85
-
86
- if attributes.has_key?(:'messageId')
87
- self.message_id = attributes[:'messageId']
88
- end
89
-
90
- if attributes.has_key?(:'deletePermanently')
91
- self.delete_permanently = attributes[:'deletePermanently']
92
- end
93
- end
94
-
95
- # Initializes the object
96
- def initialize(first_account=nil, second_account=nil, storage_folder=nil, message_id=nil, delete_permanently=nil)
97
- self.first_account = first_account
98
- self.second_account = second_account
99
- self.storage_folder = storage_folder
100
- self.message_id = message_id
101
- self.delete_permanently = delete_permanently
102
- end
103
-
104
- # Show invalid properties with the reasons. Usually used together with valid?
105
- # @return Array for valid properties with the reasons
106
- def list_invalid_properties
107
- invalid_properties = Array.new
108
- if @first_account.nil?
109
- invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
110
- end
111
-
112
- if @first_account.to_s.length < 1
113
- invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
114
- end
115
-
116
- if @message_id.nil?
117
- invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
118
- end
119
-
120
- if @message_id.to_s.length < 1
121
- invalid_properties.push('invalid value for "message_id", the character length must be great than or equal to 1.')
122
- end
123
-
124
- if @delete_permanently.nil?
125
- invalid_properties.push('invalid value for "delete_permanently", delete_permanently cannot be nil.')
126
- end
127
-
128
- invalid_properties
129
- end
130
-
131
- # Check to see if the all the properties in the model are valid
132
- # @return true if the model is valid
133
- def valid?
134
- return false if @first_account.nil?
135
- return false if @first_account.to_s.length < 1
136
- return false if @message_id.nil?
137
- return false if @message_id.to_s.length < 1
138
- return false if @delete_permanently.nil?
139
- true
140
- end
141
-
142
- # Custom attribute writer method with validation
143
- # @param [Object] first_account Value to be assigned
144
- def first_account=(first_account)
145
- if first_account.nil?
146
- fail ArgumentError, 'first_account cannot be nil'
147
- end
148
-
149
- if first_account.to_s.length < 1
150
- fail ArgumentError, 'invalid value for "first_account", the character length must be great than or equal to 1.'
151
- end
152
-
153
- @first_account = first_account
154
- end
155
-
156
- # Custom attribute writer method with validation
157
- # @param [Object] message_id Value to be assigned
158
- def message_id=(message_id)
159
- if message_id.nil?
160
- fail ArgumentError, 'message_id cannot be nil'
161
- end
162
-
163
- if message_id.to_s.length < 1
164
- fail ArgumentError, 'invalid value for "message_id", the character length must be great than or equal to 1.'
165
- end
166
-
167
- @message_id = message_id
168
- end
169
-
170
- # Checks equality by comparing each attribute.
171
- # @param [Object] Object to be compared
172
- def ==(o)
173
- return true if self.equal?(o)
174
- self.class == o.class &&
175
- first_account == o.first_account &&
176
- second_account == o.second_account &&
177
- storage_folder == o.storage_folder &&
178
- message_id == o.message_id &&
179
- delete_permanently == o.delete_permanently
180
- end
181
-
182
- # @see the `==` method
183
- # @param [Object] Object to be compared
184
- def eql?(o)
185
- self == o
186
- end
187
-
188
- # Calculates hash code according to all attributes.
189
- # @return [Fixnum] Hash code
190
- def hash
191
- [first_account, second_account, storage_folder, message_id, delete_permanently].hash
192
- end
193
-
30
+ # Delete message request
31
+ class DeleteMessageBaseRequest
32
+ # First account storage file name for receiving emails (or universal one)
33
+ # @return [String]
34
+ attr_accessor :first_account
35
+
36
+ # Second account storage file name for sending emails (ignored if first is universal)
37
+ # @return [String]
38
+ attr_accessor :second_account
39
+
40
+ # Storage folder location of account files
41
+ # @return [StorageFolderLocation]
42
+ attr_accessor :storage_folder
43
+
44
+ # Message identifier
45
+ # @return [String]
46
+ attr_accessor :message_id
47
+
48
+ # Specifies that message should be deleted permanently
49
+ # @return [BOOLEAN]
50
+ attr_accessor :delete_permanently
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'first_account' => :'firstAccount',
56
+ :'second_account' => :'secondAccount',
57
+ :'storage_folder' => :'storageFolder',
58
+ :'message_id' => :'messageId',
59
+ :'delete_permanently' => :'deletePermanently'
60
+ }
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.swagger_types
65
+ {
66
+ :'first_account' => :'String',
67
+ :'second_account' => :'String',
68
+ :'storage_folder' => :'StorageFolderLocation',
69
+ :'message_id' => :'String',
70
+ :'delete_permanently' => :'BOOLEAN'
71
+ }
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ return unless attributes.is_a?(Hash)
78
+
79
+ # convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
81
+
82
+ if attributes.has_key?(:'firstAccount')
83
+ self.first_account = attributes[:'firstAccount']
84
+ end
85
+
86
+ if attributes.has_key?(:'secondAccount')
87
+ self.second_account = attributes[:'secondAccount']
88
+ end
89
+
90
+ if attributes.has_key?(:'storageFolder')
91
+ self.storage_folder = attributes[:'storageFolder']
92
+ end
93
+
94
+ if attributes.has_key?(:'messageId')
95
+ self.message_id = attributes[:'messageId']
96
+ end
97
+
98
+ if attributes.has_key?(:'deletePermanently')
99
+ self.delete_permanently = attributes[:'deletePermanently']
100
+ end
101
+ end
102
+
103
+ # Initializes the object
104
+ # @param [String] first_account First account storage file name for receiving emails (or universal one)
105
+ # @param [String] second_account Second account storage file name for sending emails (ignored if first is universal)
106
+ # @param [StorageFolderLocation] storage_folder Storage folder location of account files
107
+ # @param [String] message_id Message identifier
108
+ # @param [BOOLEAN] delete_permanently Specifies that message should be deleted permanently
109
+ def initialize(first_account=nil, second_account=nil, storage_folder=nil, message_id=nil, delete_permanently=nil)
110
+ self.first_account = first_account if first_account
111
+ self.second_account = second_account if second_account
112
+ self.storage_folder = storage_folder if storage_folder
113
+ self.message_id = message_id if message_id
114
+ self.delete_permanently = delete_permanently if delete_permanently
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ invalid_properties = Array.new
121
+ if @first_account.nil?
122
+ invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
123
+ end
124
+
125
+ if @first_account.to_s.length < 1
126
+ invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
127
+ end
128
+
129
+ if @message_id.nil?
130
+ invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
131
+ end
132
+
133
+ if @message_id.to_s.length < 1
134
+ invalid_properties.push('invalid value for "message_id", the character length must be great than or equal to 1.')
135
+ end
136
+
137
+ if @delete_permanently.nil?
138
+ invalid_properties.push('invalid value for "delete_permanently", delete_permanently cannot be nil.')
139
+ end
140
+
141
+ invalid_properties
142
+ end
143
+
144
+ # Check to see if the all the properties in the model are valid
145
+ # @return true if the model is valid
146
+ def valid?
147
+ return false if @first_account.nil?
148
+ return false if @first_account.to_s.length < 1
149
+ return false if @message_id.nil?
150
+ return false if @message_id.to_s.length < 1
151
+ return false if @delete_permanently.nil?
152
+ true
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] first_account Value to be assigned
157
+ def first_account=(first_account)
158
+ if first_account.nil?
159
+ fail ArgumentError, 'first_account cannot be nil'
160
+ end
161
+
162
+ if first_account.to_s.length < 1
163
+ fail ArgumentError, 'invalid value for "first_account", the character length must be great than or equal to 1.'
164
+ end
165
+
166
+ @first_account = first_account
167
+ end
168
+
169
+ # Custom attribute writer method with validation
170
+ # @param [Object] message_id Value to be assigned
171
+ def message_id=(message_id)
172
+ if message_id.nil?
173
+ fail ArgumentError, 'message_id cannot be nil'
174
+ end
175
+
176
+ if message_id.to_s.length < 1
177
+ fail ArgumentError, 'invalid value for "message_id", the character length must be great than or equal to 1.'
178
+ end
179
+
180
+ @message_id = message_id
181
+ end
182
+
183
+ # Checks equality by comparing each attribute.
184
+ # @param [Object] Object to be compared
185
+ def ==(o)
186
+ return true if self.equal?(o)
187
+ self.class == o.class &&
188
+ first_account == o.first_account &&
189
+ second_account == o.second_account &&
190
+ storage_folder == o.storage_folder &&
191
+ message_id == o.message_id &&
192
+ delete_permanently == o.delete_permanently
193
+ end
194
+
195
+ # @see the `==` method
196
+ # @param [Object] Object to be compared
197
+ def eql?(o)
198
+ self == o
199
+ end
200
+
201
+ # Calculates hash code according to all attributes.
202
+ # @return [Fixnum] Hash code
203
+ def hash
204
+ [first_account, second_account, storage_folder, message_id, delete_permanently].hash
205
+ end
206
+
194
207
  # Builds the object from hash
195
208
  # @param [Hash] attributes Model attributes in the form of hash
196
209
  # @return [Object] Returns the model itself
@@ -297,6 +310,6 @@ module AsposeEmailCloud
297
310
  value
298
311
  end
299
312
  end
300
-
313
+
301
314
  end
302
315
  end