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,92 +27,96 @@
27
27
  require 'date'
28
28
 
29
29
  module AsposeEmailCloud
30
- # The error details
31
- class ErrorDetails
32
- # The request id
33
- attr_accessor :request_id
34
-
35
- # Date
36
- attr_accessor :date
37
-
38
- # Attribute mapping from ruby-style variable name to JSON key.
39
- def self.attribute_map
40
- {
41
- :'request_id' => :'requestId',
42
- :'date' => :'date'
43
- }
44
- end
45
-
46
- # Attribute type mapping.
47
- def self.swagger_types
48
- {
49
- :'request_id' => :'String',
50
- :'date' => :'DateTime'
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?(:'requestId')
63
- self.request_id = attributes[:'requestId']
64
- end
65
-
66
- if attributes.has_key?(:'date')
67
- self.date = attributes[:'date']
68
- end
69
- end
70
-
71
- # Initializes the object
72
- def initialize(request_id=nil, date=nil)
73
- self.request_id = request_id
74
- self.date = date
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 @date.nil?
82
- invalid_properties.push('invalid value for "date", date cannot be nil.')
83
- end
84
-
85
- invalid_properties
86
- end
87
-
88
- # Check to see if the all the properties in the model are valid
89
- # @return true if the model is valid
90
- def valid?
91
- return false if @date.nil?
92
- true
93
- end
94
-
95
- # Checks equality by comparing each attribute.
96
- # @param [Object] Object to be compared
97
- def ==(o)
98
- return true if self.equal?(o)
99
- self.class == o.class &&
100
- request_id == o.request_id &&
101
- date == o.date
102
- end
103
-
104
- # @see the `==` method
105
- # @param [Object] Object to be compared
106
- def eql?(o)
107
- self == o
108
- end
109
-
110
- # Calculates hash code according to all attributes.
111
- # @return [Fixnum] Hash code
112
- def hash
113
- [request_id, date].hash
114
- end
115
-
30
+ # The error details
31
+ class ErrorDetails
32
+ # The request id
33
+ # @return [String]
34
+ attr_accessor :request_id
35
+
36
+ # Date
37
+ # @return [DateTime]
38
+ attr_accessor :date
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'request_id' => :'requestId',
44
+ :'date' => :'date'
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.swagger_types
50
+ {
51
+ :'request_id' => :'String',
52
+ :'date' => :'DateTime'
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?(:'requestId')
65
+ self.request_id = attributes[:'requestId']
66
+ end
67
+
68
+ if attributes.has_key?(:'date')
69
+ self.date = attributes[:'date']
70
+ end
71
+ end
72
+
73
+ # Initializes the object
74
+ # @param [String] request_id The request id
75
+ # @param [DateTime] date Date
76
+ def initialize(request_id=nil, date=nil)
77
+ self.request_id = request_id if request_id
78
+ self.date = date if date
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 @date.nil?
86
+ invalid_properties.push('invalid value for "date", date 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 @date.nil?
96
+ true
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param [Object] Object to be compared
101
+ def ==(o)
102
+ return true if self.equal?(o)
103
+ self.class == o.class &&
104
+ request_id == o.request_id &&
105
+ date == o.date
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Fixnum] Hash code
116
+ def hash
117
+ [request_id, date].hash
118
+ end
119
+
116
120
  # Builds the object from hash
117
121
  # @param [Hash] attributes Model attributes in the form of hash
118
122
  # @return [Object] Returns the model itself
@@ -219,6 +223,6 @@ module AsposeEmailCloud
219
223
  value
220
224
  end
221
225
  end
222
-
226
+
223
227
  end
224
228
  end
@@ -27,157 +27,171 @@
27
27
  require 'date'
28
28
 
29
29
  module AsposeEmailCloud
30
- # File Version
31
- class FileVersion
32
- # File or folder name.
33
- attr_accessor :name
34
-
35
- # True if it is a folder.
36
- attr_accessor :is_folder
37
-
38
- # File or folder last modified DateTime.
39
- attr_accessor :modified_date
40
-
41
- # File or folder size.
42
- attr_accessor :size
43
-
44
- # File or folder path.
45
- attr_accessor :path
46
-
47
- # File Version ID.
48
- attr_accessor :version_id
49
-
50
- # Specifies whether the file is (true) or is not (false) the latest version of an file.
51
- attr_accessor :is_latest
52
-
53
- # Attribute mapping from ruby-style variable name to JSON key.
54
- def self.attribute_map
55
- {
56
- :'name' => :'name',
57
- :'is_folder' => :'isFolder',
58
- :'modified_date' => :'modifiedDate',
59
- :'size' => :'size',
60
- :'path' => :'path',
61
- :'version_id' => :'versionId',
62
- :'is_latest' => :'isLatest'
63
- }
64
- end
65
-
66
- # Attribute type mapping.
67
- def self.swagger_types
68
- {
69
- :'name' => :'String',
70
- :'is_folder' => :'BOOLEAN',
71
- :'modified_date' => :'DateTime',
72
- :'size' => :'Integer',
73
- :'path' => :'String',
74
- :'version_id' => :'String',
75
- :'is_latest' => :'BOOLEAN'
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?(:'name')
88
- self.name = attributes[:'name']
89
- end
90
-
91
- if attributes.has_key?(:'isFolder')
92
- self.is_folder = attributes[:'isFolder']
93
- end
94
-
95
- if attributes.has_key?(:'modifiedDate')
96
- self.modified_date = attributes[:'modifiedDate']
97
- end
98
-
99
- if attributes.has_key?(:'size')
100
- self.size = attributes[:'size']
101
- end
102
-
103
- if attributes.has_key?(:'path')
104
- self.path = attributes[:'path']
105
- end
106
-
107
- if attributes.has_key?(:'versionId')
108
- self.version_id = attributes[:'versionId']
109
- end
110
-
111
- if attributes.has_key?(:'isLatest')
112
- self.is_latest = attributes[:'isLatest']
113
- end
114
- end
115
-
116
- # Initializes the object
117
- def initialize(name=nil, is_folder=nil, modified_date=nil, size=nil, path=nil, version_id=nil, is_latest=nil)
118
- self.name = name
119
- self.is_folder = is_folder
120
- self.modified_date = modified_date
121
- self.size = size
122
- self.path = path
123
- self.version_id = version_id
124
- self.is_latest = is_latest
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 @is_folder.nil?
132
- invalid_properties.push('invalid value for "is_folder", is_folder cannot be nil.')
133
- end
134
-
135
- if @size.nil?
136
- invalid_properties.push('invalid value for "size", size cannot be nil.')
137
- end
138
-
139
- if @is_latest.nil?
140
- invalid_properties.push('invalid value for "is_latest", is_latest cannot be nil.')
141
- end
142
-
143
- invalid_properties
144
- end
145
-
146
- # Check to see if the all the properties in the model are valid
147
- # @return true if the model is valid
148
- def valid?
149
- return false if @is_folder.nil?
150
- return false if @size.nil?
151
- return false if @is_latest.nil?
152
- true
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
- name == o.name &&
161
- is_folder == o.is_folder &&
162
- modified_date == o.modified_date &&
163
- size == o.size &&
164
- path == o.path &&
165
- version_id == o.version_id &&
166
- is_latest == o.is_latest
167
- end
168
-
169
- # @see the `==` method
170
- # @param [Object] Object to be compared
171
- def eql?(o)
172
- self == o
173
- end
174
-
175
- # Calculates hash code according to all attributes.
176
- # @return [Fixnum] Hash code
177
- def hash
178
- [name, is_folder, modified_date, size, path, version_id, is_latest].hash
179
- end
180
-
30
+ # File Version
31
+ class FileVersion
32
+ # File or folder name.
33
+ # @return [String]
34
+ attr_accessor :name
35
+
36
+ # True if it is a folder.
37
+ # @return [BOOLEAN]
38
+ attr_accessor :is_folder
39
+
40
+ # File or folder last modified DateTime.
41
+ # @return [DateTime]
42
+ attr_accessor :modified_date
43
+
44
+ # File or folder size.
45
+ # @return [Integer]
46
+ attr_accessor :size
47
+
48
+ # File or folder path.
49
+ # @return [String]
50
+ attr_accessor :path
51
+
52
+ # File Version ID.
53
+ # @return [String]
54
+ attr_accessor :version_id
55
+
56
+ # Specifies whether the file is (true) or is not (false) the latest version of an file.
57
+ # @return [BOOLEAN]
58
+ attr_accessor :is_latest
59
+
60
+ # Attribute mapping from ruby-style variable name to JSON key.
61
+ def self.attribute_map
62
+ {
63
+ :'name' => :'name',
64
+ :'is_folder' => :'isFolder',
65
+ :'modified_date' => :'modifiedDate',
66
+ :'size' => :'size',
67
+ :'path' => :'path',
68
+ :'version_id' => :'versionId',
69
+ :'is_latest' => :'isLatest'
70
+ }
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.swagger_types
75
+ {
76
+ :'name' => :'String',
77
+ :'is_folder' => :'BOOLEAN',
78
+ :'modified_date' => :'DateTime',
79
+ :'size' => :'Integer',
80
+ :'path' => :'String',
81
+ :'version_id' => :'String',
82
+ :'is_latest' => :'BOOLEAN'
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?(:'name')
95
+ self.name = attributes[:'name']
96
+ end
97
+
98
+ if attributes.has_key?(:'isFolder')
99
+ self.is_folder = attributes[:'isFolder']
100
+ end
101
+
102
+ if attributes.has_key?(:'modifiedDate')
103
+ self.modified_date = attributes[:'modifiedDate']
104
+ end
105
+
106
+ if attributes.has_key?(:'size')
107
+ self.size = attributes[:'size']
108
+ end
109
+
110
+ if attributes.has_key?(:'path')
111
+ self.path = attributes[:'path']
112
+ end
113
+
114
+ if attributes.has_key?(:'versionId')
115
+ self.version_id = attributes[:'versionId']
116
+ end
117
+
118
+ if attributes.has_key?(:'isLatest')
119
+ self.is_latest = attributes[:'isLatest']
120
+ end
121
+ end
122
+
123
+ # Initializes the object
124
+ # @param [String] name File or folder name.
125
+ # @param [BOOLEAN] is_folder True if it is a folder.
126
+ # @param [DateTime] modified_date File or folder last modified DateTime.
127
+ # @param [Integer] size File or folder size.
128
+ # @param [String] path File or folder path.
129
+ # @param [String] version_id File Version ID.
130
+ # @param [BOOLEAN] is_latest Specifies whether the file is (true) or is not (false) the latest version of an file.
131
+ def initialize(name=nil, is_folder=nil, modified_date=nil, size=nil, path=nil, version_id=nil, is_latest=nil)
132
+ self.name = name if name
133
+ self.is_folder = is_folder if is_folder
134
+ self.modified_date = modified_date if modified_date
135
+ self.size = size if size
136
+ self.path = path if path
137
+ self.version_id = version_id if version_id
138
+ self.is_latest = is_latest if is_latest
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 @is_folder.nil?
146
+ invalid_properties.push('invalid value for "is_folder", is_folder cannot be nil.')
147
+ end
148
+
149
+ if @size.nil?
150
+ invalid_properties.push('invalid value for "size", size cannot be nil.')
151
+ end
152
+
153
+ if @is_latest.nil?
154
+ invalid_properties.push('invalid value for "is_latest", is_latest cannot be nil.')
155
+ end
156
+
157
+ invalid_properties
158
+ end
159
+
160
+ # Check to see if the all the properties in the model are valid
161
+ # @return true if the model is valid
162
+ def valid?
163
+ return false if @is_folder.nil?
164
+ return false if @size.nil?
165
+ return false if @is_latest.nil?
166
+ true
167
+ end
168
+
169
+ # Checks equality by comparing each attribute.
170
+ # @param [Object] Object to be compared
171
+ def ==(o)
172
+ return true if self.equal?(o)
173
+ self.class == o.class &&
174
+ name == o.name &&
175
+ is_folder == o.is_folder &&
176
+ modified_date == o.modified_date &&
177
+ size == o.size &&
178
+ path == o.path &&
179
+ version_id == o.version_id &&
180
+ is_latest == o.is_latest
181
+ end
182
+
183
+ # @see the `==` method
184
+ # @param [Object] Object to be compared
185
+ def eql?(o)
186
+ self == o
187
+ end
188
+
189
+ # Calculates hash code according to all attributes.
190
+ # @return [Fixnum] Hash code
191
+ def hash
192
+ [name, is_folder, modified_date, size, path, version_id, is_latest].hash
193
+ end
194
+
181
195
  # Builds the object from hash
182
196
  # @param [Hash] attributes Model attributes in the form of hash
183
197
  # @return [Object] Returns the model itself
@@ -284,6 +298,6 @@ module AsposeEmailCloud
284
298
  value
285
299
  end
286
300
  end
287
-
301
+
288
302
  end
289
303
  end