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,135 +27,146 @@
27
27
  require 'date'
28
28
 
29
29
  module AsposeEmailCloud
30
- # Send email file request
31
- class SendEmailBaseRequest
32
- attr_accessor :first_account
33
-
34
- attr_accessor :second_account
35
-
36
- attr_accessor :storage_folder
37
-
38
- # Email document (*.eml) file location in storage
39
- attr_accessor :email_file
40
-
41
- # Attribute mapping from ruby-style variable name to JSON key.
42
- def self.attribute_map
43
- {
44
- :'first_account' => :'firstAccount',
45
- :'second_account' => :'secondAccount',
46
- :'storage_folder' => :'storageFolder',
47
- :'email_file' => :'emailFile'
48
- }
49
- end
50
-
51
- # Attribute type mapping.
52
- def self.swagger_types
53
- {
54
- :'first_account' => :'String',
55
- :'second_account' => :'String',
56
- :'storage_folder' => :'StorageFolderLocation',
57
- :'email_file' => :'StorageFileLocation'
58
- }
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- return unless attributes.is_a?(Hash)
65
-
66
- # convert string to symbol for hash key
67
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
-
69
- if attributes.has_key?(:'firstAccount')
70
- self.first_account = attributes[:'firstAccount']
71
- end
72
-
73
- if attributes.has_key?(:'secondAccount')
74
- self.second_account = attributes[:'secondAccount']
75
- end
76
-
77
- if attributes.has_key?(:'storageFolder')
78
- self.storage_folder = attributes[:'storageFolder']
79
- end
80
-
81
- if attributes.has_key?(:'emailFile')
82
- self.email_file = attributes[:'emailFile']
83
- end
84
- end
85
-
86
- # Initializes the object
87
- def initialize(first_account=nil, second_account=nil, storage_folder=nil, email_file=nil)
88
- self.first_account = first_account
89
- self.second_account = second_account
90
- self.storage_folder = storage_folder
91
- self.email_file = email_file
92
- end
93
-
94
- # Show invalid properties with the reasons. Usually used together with valid?
95
- # @return Array for valid properties with the reasons
96
- def list_invalid_properties
97
- invalid_properties = Array.new
98
- if @first_account.nil?
99
- invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
100
- end
101
-
102
- if @first_account.to_s.length < 1
103
- invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
104
- end
105
-
106
- if @email_file.nil?
107
- invalid_properties.push('invalid value for "email_file", email_file cannot be nil.')
108
- end
109
-
110
- invalid_properties
111
- end
112
-
113
- # Check to see if the all the properties in the model are valid
114
- # @return true if the model is valid
115
- def valid?
116
- return false if @first_account.nil?
117
- return false if @first_account.to_s.length < 1
118
- return false if @email_file.nil?
119
- true
120
- end
121
-
122
- # Custom attribute writer method with validation
123
- # @param [Object] first_account Value to be assigned
124
- def first_account=(first_account)
125
- if first_account.nil?
126
- fail ArgumentError, 'first_account cannot be nil'
127
- end
128
-
129
- if first_account.to_s.length < 1
130
- fail ArgumentError, 'invalid value for "first_account", the character length must be great than or equal to 1.'
131
- end
132
-
133
- @first_account = first_account
134
- end
135
-
136
- # Checks equality by comparing each attribute.
137
- # @param [Object] Object to be compared
138
- def ==(o)
139
- return true if self.equal?(o)
140
- self.class == o.class &&
141
- first_account == o.first_account &&
142
- second_account == o.second_account &&
143
- storage_folder == o.storage_folder &&
144
- email_file == o.email_file
145
- end
146
-
147
- # @see the `==` method
148
- # @param [Object] Object to be compared
149
- def eql?(o)
150
- self == o
151
- end
152
-
153
- # Calculates hash code according to all attributes.
154
- # @return [Fixnum] Hash code
155
- def hash
156
- [first_account, second_account, storage_folder, email_file].hash
157
- end
158
-
30
+ # Send email file request
31
+ class SendEmailBaseRequest
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
+ # Email document (*.eml) file location in storage
45
+ # @return [StorageFileLocation]
46
+ attr_accessor :email_file
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'first_account' => :'firstAccount',
52
+ :'second_account' => :'secondAccount',
53
+ :'storage_folder' => :'storageFolder',
54
+ :'email_file' => :'emailFile'
55
+ }
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.swagger_types
60
+ {
61
+ :'first_account' => :'String',
62
+ :'second_account' => :'String',
63
+ :'storage_folder' => :'StorageFolderLocation',
64
+ :'email_file' => :'StorageFileLocation'
65
+ }
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ return unless attributes.is_a?(Hash)
72
+
73
+ # convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
75
+
76
+ if attributes.has_key?(:'firstAccount')
77
+ self.first_account = attributes[:'firstAccount']
78
+ end
79
+
80
+ if attributes.has_key?(:'secondAccount')
81
+ self.second_account = attributes[:'secondAccount']
82
+ end
83
+
84
+ if attributes.has_key?(:'storageFolder')
85
+ self.storage_folder = attributes[:'storageFolder']
86
+ end
87
+
88
+ if attributes.has_key?(:'emailFile')
89
+ self.email_file = attributes[:'emailFile']
90
+ end
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param [String] first_account First account storage file name for receiving emails (or universal one)
95
+ # @param [String] second_account Second account storage file name for sending emails (ignored if first is universal)
96
+ # @param [StorageFolderLocation] storage_folder Storage folder location of account files
97
+ # @param [StorageFileLocation] email_file Email document (*.eml) file location in storage
98
+ def initialize(first_account=nil, second_account=nil, storage_folder=nil, email_file=nil)
99
+ self.first_account = first_account if first_account
100
+ self.second_account = second_account if second_account
101
+ self.storage_folder = storage_folder if storage_folder
102
+ self.email_file = email_file if email_file
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ invalid_properties = Array.new
109
+ if @first_account.nil?
110
+ invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
111
+ end
112
+
113
+ if @first_account.to_s.length < 1
114
+ invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
115
+ end
116
+
117
+ if @email_file.nil?
118
+ invalid_properties.push('invalid value for "email_file", email_file cannot be nil.')
119
+ end
120
+
121
+ invalid_properties
122
+ end
123
+
124
+ # Check to see if the all the properties in the model are valid
125
+ # @return true if the model is valid
126
+ def valid?
127
+ return false if @first_account.nil?
128
+ return false if @first_account.to_s.length < 1
129
+ return false if @email_file.nil?
130
+ true
131
+ end
132
+
133
+ # Custom attribute writer method with validation
134
+ # @param [Object] first_account Value to be assigned
135
+ def first_account=(first_account)
136
+ if first_account.nil?
137
+ fail ArgumentError, 'first_account cannot be nil'
138
+ end
139
+
140
+ if first_account.to_s.length < 1
141
+ fail ArgumentError, 'invalid value for "first_account", the character length must be great than or equal to 1.'
142
+ end
143
+
144
+ @first_account = first_account
145
+ end
146
+
147
+ # Checks equality by comparing each attribute.
148
+ # @param [Object] Object to be compared
149
+ def ==(o)
150
+ return true if self.equal?(o)
151
+ self.class == o.class &&
152
+ first_account == o.first_account &&
153
+ second_account == o.second_account &&
154
+ storage_folder == o.storage_folder &&
155
+ email_file == o.email_file
156
+ end
157
+
158
+ # @see the `==` method
159
+ # @param [Object] Object to be compared
160
+ def eql?(o)
161
+ self == o
162
+ end
163
+
164
+ # Calculates hash code according to all attributes.
165
+ # @return [Fixnum] Hash code
166
+ def hash
167
+ [first_account, second_account, storage_folder, email_file].hash
168
+ end
169
+
159
170
  # Builds the object from hash
160
171
  # @param [Hash] attributes Model attributes in the form of hash
161
172
  # @return [Object] Returns the model itself
@@ -262,6 +273,6 @@ module AsposeEmailCloud
262
273
  value
263
274
  end
264
275
  end
265
-
276
+
266
277
  end
267
278
  end
@@ -27,154 +27,165 @@
27
27
  require 'date'
28
28
 
29
29
  module AsposeEmailCloud
30
- # Send email MIME request
31
- class SendEmailMimeBaseRequest
32
- attr_accessor :first_account
33
-
34
- attr_accessor :second_account
35
-
36
- attr_accessor :storage_folder
37
-
38
- # Email document serialized as MIME
39
- attr_accessor :base64_mime_message
40
-
41
- # Attribute mapping from ruby-style variable name to JSON key.
42
- def self.attribute_map
43
- {
44
- :'first_account' => :'firstAccount',
45
- :'second_account' => :'secondAccount',
46
- :'storage_folder' => :'storageFolder',
47
- :'base64_mime_message' => :'base64MimeMessage'
48
- }
49
- end
50
-
51
- # Attribute type mapping.
52
- def self.swagger_types
53
- {
54
- :'first_account' => :'String',
55
- :'second_account' => :'String',
56
- :'storage_folder' => :'StorageFolderLocation',
57
- :'base64_mime_message' => :'String'
58
- }
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- return unless attributes.is_a?(Hash)
65
-
66
- # convert string to symbol for hash key
67
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
-
69
- if attributes.has_key?(:'firstAccount')
70
- self.first_account = attributes[:'firstAccount']
71
- end
72
-
73
- if attributes.has_key?(:'secondAccount')
74
- self.second_account = attributes[:'secondAccount']
75
- end
76
-
77
- if attributes.has_key?(:'storageFolder')
78
- self.storage_folder = attributes[:'storageFolder']
79
- end
80
-
81
- if attributes.has_key?(:'base64MimeMessage')
82
- self.base64_mime_message = attributes[:'base64MimeMessage']
83
- end
84
- end
85
-
86
- # Initializes the object
87
- def initialize(first_account=nil, second_account=nil, storage_folder=nil, base64_mime_message=nil)
88
- self.first_account = first_account
89
- self.second_account = second_account
90
- self.storage_folder = storage_folder
91
- self.base64_mime_message = base64_mime_message
92
- end
93
-
94
- # Show invalid properties with the reasons. Usually used together with valid?
95
- # @return Array for valid properties with the reasons
96
- def list_invalid_properties
97
- invalid_properties = Array.new
98
- if @first_account.nil?
99
- invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
100
- end
101
-
102
- if @first_account.to_s.length < 1
103
- invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
104
- end
105
-
106
- if @base64_mime_message.nil?
107
- invalid_properties.push('invalid value for "base64_mime_message", base64_mime_message cannot be nil.')
108
- end
109
-
110
- if @base64_mime_message.to_s.length < 1
111
- invalid_properties.push('invalid value for "base64_mime_message", the character length must be great than or equal to 1.')
112
- end
113
-
114
- invalid_properties
115
- end
116
-
117
- # Check to see if the all the properties in the model are valid
118
- # @return true if the model is valid
119
- def valid?
120
- return false if @first_account.nil?
121
- return false if @first_account.to_s.length < 1
122
- return false if @base64_mime_message.nil?
123
- return false if @base64_mime_message.to_s.length < 1
124
- true
125
- end
126
-
127
- # Custom attribute writer method with validation
128
- # @param [Object] first_account Value to be assigned
129
- def first_account=(first_account)
130
- if first_account.nil?
131
- fail ArgumentError, 'first_account cannot be nil'
132
- end
133
-
134
- if first_account.to_s.length < 1
135
- fail ArgumentError, 'invalid value for "first_account", the character length must be great than or equal to 1.'
136
- end
137
-
138
- @first_account = first_account
139
- end
140
-
141
- # Custom attribute writer method with validation
142
- # @param [Object] base64_mime_message Value to be assigned
143
- def base64_mime_message=(base64_mime_message)
144
- if base64_mime_message.nil?
145
- fail ArgumentError, 'base64_mime_message cannot be nil'
146
- end
147
-
148
- if base64_mime_message.to_s.length < 1
149
- fail ArgumentError, 'invalid value for "base64_mime_message", the character length must be great than or equal to 1.'
150
- end
151
-
152
- @base64_mime_message = base64_mime_message
153
- end
154
-
155
- # Checks equality by comparing each attribute.
156
- # @param [Object] Object to be compared
157
- def ==(o)
158
- return true if self.equal?(o)
159
- self.class == o.class &&
160
- first_account == o.first_account &&
161
- second_account == o.second_account &&
162
- storage_folder == o.storage_folder &&
163
- base64_mime_message == o.base64_mime_message
164
- end
165
-
166
- # @see the `==` method
167
- # @param [Object] Object to be compared
168
- def eql?(o)
169
- self == o
170
- end
171
-
172
- # Calculates hash code according to all attributes.
173
- # @return [Fixnum] Hash code
174
- def hash
175
- [first_account, second_account, storage_folder, base64_mime_message].hash
176
- end
177
-
30
+ # Send email MIME request
31
+ class SendEmailMimeBaseRequest
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
+ # Email document serialized as MIME
45
+ # @return [String]
46
+ attr_accessor :base64_mime_message
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'first_account' => :'firstAccount',
52
+ :'second_account' => :'secondAccount',
53
+ :'storage_folder' => :'storageFolder',
54
+ :'base64_mime_message' => :'base64MimeMessage'
55
+ }
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.swagger_types
60
+ {
61
+ :'first_account' => :'String',
62
+ :'second_account' => :'String',
63
+ :'storage_folder' => :'StorageFolderLocation',
64
+ :'base64_mime_message' => :'String'
65
+ }
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ return unless attributes.is_a?(Hash)
72
+
73
+ # convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
75
+
76
+ if attributes.has_key?(:'firstAccount')
77
+ self.first_account = attributes[:'firstAccount']
78
+ end
79
+
80
+ if attributes.has_key?(:'secondAccount')
81
+ self.second_account = attributes[:'secondAccount']
82
+ end
83
+
84
+ if attributes.has_key?(:'storageFolder')
85
+ self.storage_folder = attributes[:'storageFolder']
86
+ end
87
+
88
+ if attributes.has_key?(:'base64MimeMessage')
89
+ self.base64_mime_message = attributes[:'base64MimeMessage']
90
+ end
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param [String] first_account First account storage file name for receiving emails (or universal one)
95
+ # @param [String] second_account Second account storage file name for sending emails (ignored if first is universal)
96
+ # @param [StorageFolderLocation] storage_folder Storage folder location of account files
97
+ # @param [String] base64_mime_message Email document serialized as MIME
98
+ def initialize(first_account=nil, second_account=nil, storage_folder=nil, base64_mime_message=nil)
99
+ self.first_account = first_account if first_account
100
+ self.second_account = second_account if second_account
101
+ self.storage_folder = storage_folder if storage_folder
102
+ self.base64_mime_message = base64_mime_message if base64_mime_message
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ invalid_properties = Array.new
109
+ if @first_account.nil?
110
+ invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
111
+ end
112
+
113
+ if @first_account.to_s.length < 1
114
+ invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
115
+ end
116
+
117
+ if @base64_mime_message.nil?
118
+ invalid_properties.push('invalid value for "base64_mime_message", base64_mime_message cannot be nil.')
119
+ end
120
+
121
+ if @base64_mime_message.to_s.length < 1
122
+ invalid_properties.push('invalid value for "base64_mime_message", the character length must be great than or equal to 1.')
123
+ end
124
+
125
+ invalid_properties
126
+ end
127
+
128
+ # Check to see if the all the properties in the model are valid
129
+ # @return true if the model is valid
130
+ def valid?
131
+ return false if @first_account.nil?
132
+ return false if @first_account.to_s.length < 1
133
+ return false if @base64_mime_message.nil?
134
+ return false if @base64_mime_message.to_s.length < 1
135
+ true
136
+ end
137
+
138
+ # Custom attribute writer method with validation
139
+ # @param [Object] first_account Value to be assigned
140
+ def first_account=(first_account)
141
+ if first_account.nil?
142
+ fail ArgumentError, 'first_account cannot be nil'
143
+ end
144
+
145
+ if first_account.to_s.length < 1
146
+ fail ArgumentError, 'invalid value for "first_account", the character length must be great than or equal to 1.'
147
+ end
148
+
149
+ @first_account = first_account
150
+ end
151
+
152
+ # Custom attribute writer method with validation
153
+ # @param [Object] base64_mime_message Value to be assigned
154
+ def base64_mime_message=(base64_mime_message)
155
+ if base64_mime_message.nil?
156
+ fail ArgumentError, 'base64_mime_message cannot be nil'
157
+ end
158
+
159
+ if base64_mime_message.to_s.length < 1
160
+ fail ArgumentError, 'invalid value for "base64_mime_message", the character length must be great than or equal to 1.'
161
+ end
162
+
163
+ @base64_mime_message = base64_mime_message
164
+ end
165
+
166
+ # Checks equality by comparing each attribute.
167
+ # @param [Object] Object to be compared
168
+ def ==(o)
169
+ return true if self.equal?(o)
170
+ self.class == o.class &&
171
+ first_account == o.first_account &&
172
+ second_account == o.second_account &&
173
+ storage_folder == o.storage_folder &&
174
+ base64_mime_message == o.base64_mime_message
175
+ end
176
+
177
+ # @see the `==` method
178
+ # @param [Object] Object to be compared
179
+ def eql?(o)
180
+ self == o
181
+ end
182
+
183
+ # Calculates hash code according to all attributes.
184
+ # @return [Fixnum] Hash code
185
+ def hash
186
+ [first_account, second_account, storage_folder, base64_mime_message].hash
187
+ end
188
+
178
189
  # Builds the object from hash
179
190
  # @param [Hash] attributes Model attributes in the form of hash
180
191
  # @return [Object] Returns the model itself
@@ -281,6 +292,6 @@ module AsposeEmailCloud
281
292
  value
282
293
  end
283
294
  end
284
-
295
+
285
296
  end
286
297
  end