nodeum_sdk 1.85.1 → 1.86.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +69 -14
  3. data/docs/ByDateFacet.md +4 -0
  4. data/docs/ByFileExtensionFacet.md +2 -2
  5. data/docs/ByFileExtensionFacetAllOf.md +2 -2
  6. data/docs/ByGroupOwnerFacet.md +2 -2
  7. data/docs/ByGroupOwnerFacetAllOf.md +2 -2
  8. data/docs/ByPrimaryCloudFacet.md +21 -0
  9. data/docs/ByPrimaryCloudFacetAllOf.md +21 -0
  10. data/docs/ByPrimaryFacet.md +2 -2
  11. data/docs/ByPrimaryFacetAllOf.md +2 -2
  12. data/docs/ByPrimaryNasFacet.md +21 -0
  13. data/docs/ByPrimaryNasFacetAllOf.md +21 -0
  14. data/docs/ByPrimaryStorageFacet.md +31 -0
  15. data/docs/ByPrimaryTypeFacet.md +41 -0
  16. data/docs/BySecondaryCloudFacet.md +21 -0
  17. data/docs/BySecondaryCloudFacetAllOf.md +21 -0
  18. data/docs/BySecondaryNasFacet.md +21 -0
  19. data/docs/BySecondaryNasFacetAllOf.md +21 -0
  20. data/docs/BySecondaryStorageFacet.md +35 -0
  21. data/docs/BySecondaryTapeFacet.md +21 -0
  22. data/docs/BySecondaryTapeFacetAllOf.md +21 -0
  23. data/docs/BySecondaryTypeFacet.md +2 -2
  24. data/docs/BySecondaryTypeFacetAllOf.md +2 -2
  25. data/docs/BySizeFacet.md +4 -0
  26. data/docs/ByTaskStatusFacet.md +17 -0
  27. data/docs/ByTaskStatusFacetAllOf.md +17 -0
  28. data/docs/ByTaskStorageFacet.md +19 -0
  29. data/docs/ByTaskStorageFacetAllOf.md +19 -0
  30. data/docs/ByTaskWorkflowFacet.md +17 -0
  31. data/docs/ByTaskWorkflowFacetAllOf.md +17 -0
  32. data/docs/ByTypeFacetBucket.md +19 -0
  33. data/docs/ByTypeFacetBuckets.md +17 -0
  34. data/docs/ByUserOwnerFacet.md +2 -2
  35. data/docs/ByUserOwnerFacetAllOf.md +2 -2
  36. data/docs/Container.md +4 -0
  37. data/docs/DefaultFacet.md +17 -0
  38. data/docs/FileFacet.md +5 -3
  39. data/docs/FileFacetAllOf.md +21 -0
  40. data/docs/StatisticsApi.md +805 -42
  41. data/docs/StorageByTypeFacets.md +25 -0
  42. data/docs/StorageCloudBucketByTypeFacets.md +19 -0
  43. data/docs/StorageCloudBucketFacets.md +21 -0
  44. data/docs/StorageFacet.md +27 -0
  45. data/docs/StorageNasShareByTypeFacets.md +19 -0
  46. data/docs/StorageNasShareFacets.md +21 -0
  47. data/docs/StoragePoolByTypeFacets.md +19 -0
  48. data/docs/StoragePoolFacets.md +21 -0
  49. data/docs/StorageTapeByTypeFacets.md +21 -0
  50. data/docs/StorageTapeFacets.md +23 -0
  51. data/docs/TaskByWorkflowBucket.md +19 -0
  52. data/docs/TaskByWorkflowBucketAllOf.md +19 -0
  53. data/docs/TaskByWorkflowBuckets.md +17 -0
  54. data/docs/TaskFacet.md +27 -0
  55. data/docs/TaskFacetAllOf.md +27 -0
  56. data/docs/TaskFacetBucket.md +31 -0
  57. data/docs/TaskFacetBuckets.md +17 -0
  58. data/docs/TypeToPrimaryFacets.md +23 -0
  59. data/docs/TypeToSecondaryFacets.md +2 -0
  60. data/docs/UserConfiguration.md +21 -0
  61. data/docs/UserConfigurationCollection.md +19 -0
  62. data/docs/UsersApi.md +300 -0
  63. data/lib/nodeum_sdk.rb +43 -4
  64. data/lib/nodeum_sdk/api/statistics_api.rb +910 -51
  65. data/lib/nodeum_sdk/api/users_api.rb +318 -0
  66. data/lib/nodeum_sdk/models/by_date_facet.rb +19 -1
  67. data/lib/nodeum_sdk/models/by_file_extension_facet.rb +7 -7
  68. data/lib/nodeum_sdk/models/by_file_extension_facet_all_of.rb +7 -7
  69. data/lib/nodeum_sdk/models/by_group_owner_facet.rb +7 -7
  70. data/lib/nodeum_sdk/models/by_group_owner_facet_all_of.rb +7 -7
  71. data/lib/nodeum_sdk/models/by_primary_cloud_facet.rb +236 -0
  72. data/lib/nodeum_sdk/models/by_primary_cloud_facet_all_of.rb +224 -0
  73. data/lib/nodeum_sdk/models/by_primary_facet.rb +7 -7
  74. data/lib/nodeum_sdk/models/by_primary_facet_all_of.rb +7 -7
  75. data/lib/nodeum_sdk/models/by_primary_nas_facet.rb +236 -0
  76. data/lib/nodeum_sdk/models/by_primary_nas_facet_all_of.rb +224 -0
  77. data/lib/nodeum_sdk/models/by_primary_storage_facet.rb +277 -0
  78. data/lib/nodeum_sdk/models/by_primary_type_facet.rb +322 -0
  79. data/lib/nodeum_sdk/models/by_secondary_cloud_facet.rb +236 -0
  80. data/lib/nodeum_sdk/models/by_secondary_cloud_facet_all_of.rb +224 -0
  81. data/lib/nodeum_sdk/models/by_secondary_nas_facet.rb +236 -0
  82. data/lib/nodeum_sdk/models/by_secondary_nas_facet_all_of.rb +224 -0
  83. data/lib/nodeum_sdk/models/by_secondary_storage_facet.rb +295 -0
  84. data/lib/nodeum_sdk/models/by_secondary_tape_facet.rb +236 -0
  85. data/lib/nodeum_sdk/models/by_secondary_tape_facet_all_of.rb +224 -0
  86. data/lib/nodeum_sdk/models/by_secondary_type_facet.rb +7 -7
  87. data/lib/nodeum_sdk/models/by_secondary_type_facet_all_of.rb +7 -7
  88. data/lib/nodeum_sdk/models/by_size_facet.rb +19 -1
  89. data/lib/nodeum_sdk/models/by_task_status_facet.rb +218 -0
  90. data/lib/nodeum_sdk/models/by_task_status_facet_all_of.rb +206 -0
  91. data/lib/nodeum_sdk/models/by_task_storage_facet.rb +227 -0
  92. data/lib/nodeum_sdk/models/by_task_storage_facet_all_of.rb +215 -0
  93. data/lib/nodeum_sdk/models/by_task_workflow_facet.rb +218 -0
  94. data/lib/nodeum_sdk/models/by_task_workflow_facet_all_of.rb +206 -0
  95. data/lib/nodeum_sdk/models/by_type_facet_bucket.rb +223 -0
  96. data/lib/nodeum_sdk/models/by_type_facet_buckets.rb +208 -0
  97. data/lib/nodeum_sdk/models/by_user_owner_facet.rb +7 -7
  98. data/lib/nodeum_sdk/models/by_user_owner_facet_all_of.rb +7 -7
  99. data/lib/nodeum_sdk/models/container.rb +19 -1
  100. data/lib/nodeum_sdk/models/default_facet.rb +206 -0
  101. data/lib/nodeum_sdk/models/file_facet.rb +35 -14
  102. data/lib/nodeum_sdk/models/file_facet_all_of.rb +224 -0
  103. data/lib/nodeum_sdk/models/storage_by_type_facets.rb +242 -0
  104. data/lib/nodeum_sdk/models/storage_cloud_bucket_by_type_facets.rb +215 -0
  105. data/lib/nodeum_sdk/models/storage_cloud_bucket_facets.rb +232 -0
  106. data/lib/nodeum_sdk/models/storage_facet.rb +259 -0
  107. data/lib/nodeum_sdk/models/storage_nas_share_by_type_facets.rb +215 -0
  108. data/lib/nodeum_sdk/models/storage_nas_share_facets.rb +232 -0
  109. data/lib/nodeum_sdk/models/storage_pool_by_type_facets.rb +215 -0
  110. data/lib/nodeum_sdk/models/storage_pool_facets.rb +232 -0
  111. data/lib/nodeum_sdk/models/storage_tape_by_type_facets.rb +224 -0
  112. data/lib/nodeum_sdk/models/storage_tape_facets.rb +241 -0
  113. data/lib/nodeum_sdk/models/task_by_workflow_bucket.rb +227 -0
  114. data/lib/nodeum_sdk/models/task_by_workflow_bucket_all_of.rb +215 -0
  115. data/lib/nodeum_sdk/models/task_by_workflow_buckets.rb +208 -0
  116. data/lib/nodeum_sdk/models/task_facet.rb +263 -0
  117. data/lib/nodeum_sdk/models/task_facet_all_of.rb +251 -0
  118. data/lib/nodeum_sdk/models/task_facet_bucket.rb +277 -0
  119. data/lib/nodeum_sdk/models/task_facet_buckets.rb +208 -0
  120. data/lib/nodeum_sdk/models/type_to_primary_facets.rb +233 -0
  121. data/lib/nodeum_sdk/models/type_to_secondary_facets.rb +10 -1
  122. data/lib/nodeum_sdk/models/user_configuration.rb +224 -0
  123. data/lib/nodeum_sdk/models/user_configuration_collection.rb +217 -0
  124. data/lib/nodeum_sdk/version.rb +1 -1
  125. data/spec/models/by_primary_cloud_facet_all_of_spec.rb +53 -0
  126. data/spec/models/by_primary_cloud_facet_spec.rb +53 -0
  127. data/spec/models/by_primary_nas_facet_all_of_spec.rb +53 -0
  128. data/spec/models/by_primary_nas_facet_spec.rb +53 -0
  129. data/spec/models/by_primary_storage_facet_spec.rb +83 -0
  130. data/spec/models/by_primary_type_facet_spec.rb +113 -0
  131. data/spec/models/by_secondary_cloud_facet_all_of_spec.rb +53 -0
  132. data/spec/models/by_secondary_cloud_facet_spec.rb +53 -0
  133. data/spec/models/by_secondary_nas_facet_all_of_spec.rb +53 -0
  134. data/spec/models/by_secondary_nas_facet_spec.rb +53 -0
  135. data/spec/models/by_secondary_storage_facet_spec.rb +95 -0
  136. data/spec/models/by_secondary_tape_facet_all_of_spec.rb +53 -0
  137. data/spec/models/by_secondary_tape_facet_spec.rb +53 -0
  138. data/spec/models/by_task_status_facet_all_of_spec.rb +41 -0
  139. data/spec/models/by_task_status_facet_spec.rb +41 -0
  140. data/spec/models/by_task_storage_facet_all_of_spec.rb +47 -0
  141. data/spec/models/by_task_storage_facet_spec.rb +47 -0
  142. data/spec/models/by_task_workflow_facet_all_of_spec.rb +41 -0
  143. data/spec/models/by_task_workflow_facet_spec.rb +41 -0
  144. data/spec/models/by_type_facet_bucket_spec.rb +47 -0
  145. data/spec/models/by_type_facet_buckets_spec.rb +41 -0
  146. data/spec/models/default_facet_spec.rb +41 -0
  147. data/spec/models/file_facet_all_of_spec.rb +53 -0
  148. data/spec/models/storage_by_type_facets_spec.rb +65 -0
  149. data/spec/models/storage_cloud_bucket_by_type_facets_spec.rb +47 -0
  150. data/spec/models/storage_cloud_bucket_facets_spec.rb +53 -0
  151. data/spec/models/storage_facet_spec.rb +71 -0
  152. data/spec/models/storage_nas_share_by_type_facets_spec.rb +47 -0
  153. data/spec/models/storage_nas_share_facets_spec.rb +53 -0
  154. data/spec/models/storage_pool_by_type_facets_spec.rb +47 -0
  155. data/spec/models/storage_pool_facets_spec.rb +53 -0
  156. data/spec/models/storage_tape_by_type_facets_spec.rb +53 -0
  157. data/spec/models/storage_tape_facets_spec.rb +59 -0
  158. data/spec/models/task_by_workflow_bucket_all_of_spec.rb +47 -0
  159. data/spec/models/task_by_workflow_bucket_spec.rb +47 -0
  160. data/spec/models/task_by_workflow_buckets_spec.rb +41 -0
  161. data/spec/models/task_facet_all_of_spec.rb +71 -0
  162. data/spec/models/task_facet_bucket_spec.rb +83 -0
  163. data/spec/models/task_facet_buckets_spec.rb +41 -0
  164. data/spec/models/task_facet_spec.rb +71 -0
  165. data/spec/models/type_to_primary_facets_spec.rb +59 -0
  166. data/spec/models/user_configuration_collection_spec.rb +47 -0
  167. data/spec/models/user_configuration_spec.rb +53 -0
  168. metadata +174 -2
@@ -0,0 +1,251 @@
1
+ =begin
2
+ #Nodeum API
3
+
4
+ #The Nodeum API makes it easy to tap into the digital data mesh that runs across your organisation. Make requests to our API endpoints and we’ll give you everything you need to interconnect your business workflows with your storage. All production API requests are made to: http://nodeumhostname/api/ The current production version of the API is v1. **REST** The Nodeum API is a RESTful API. This means that the API is designed to allow you to get, create, update, & delete objects with the HTTP verbs GET, POST, PUT, PATCH, & DELETE. **JSON** The Nodeum API speaks exclusively in JSON. This means that you should always set the Content-Type header to application/json to ensure that your requests are properly accepted and processed by the API. **Authentication** All API calls require user-password authentication. **Cross-Origin Resource Sharing** The Nodeum API supports CORS for communicating from Javascript for these endpoints. You will need to specify an Origin URI when creating your application to allow for CORS to be whitelisted for your domain. **Pagination** Some endpoints such as File Listing return a potentially lengthy array of objects. In order to keep the response sizes manageable the API will take advantage of pagination. Pagination is a mechanism for returning a subset of the results for a request and allowing for subsequent requests to “page” through the rest of the results until the end is reached. Paginated endpoints follow a standard interface that accepts two query parameters, limit and offset, and return a payload that follows a standard form. These parameters names and their behavior are borrowed from SQL LIMIT and OFFSET keywords. **Versioning** The Nodeum API is constantly being worked on to add features, make improvements, and fix bugs. This means that you should expect changes to be introduced and documented. However, there are some changes or additions that are considered backwards-compatible and your applications should be flexible enough to handle them. These include: - Adding new endpoints to the API - Adding new attributes to the response of an existing endpoint - Changing the order of attributes of responses (JSON by definition is an object of unordered key/value pairs) **Filter parameters** When browsing a list of items, multiple filter parameters may be applied. Some operators can be added to the value as a prefix: - `=` value is equal. Default operator, may be omitted - `!=` value is different - `>` greater than - `>=` greater than or equal - `<` lower than - `>=` lower than or equal - `><` included in list, items should be separated by `|` - `!><` not included in list, items should be separated by `|` - `~` pattern matching, may include `%` (any characters) and `_` (one character) - `!~` pattern not matching, may include `%` (any characters) and `_` (one character)
5
+
6
+ The version of the OpenAPI document: 2.1.0
7
+ Contact: info@nodeum.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Nodeum
16
+ class TaskFacetAllOf
17
+ attr_accessor :to_process_size_sum
18
+
19
+ attr_accessor :processed_size_sum
20
+
21
+ attr_accessor :to_process_files_sum
22
+
23
+ attr_accessor :processed_files_sum
24
+
25
+ attr_accessor :finalized_files_sum
26
+
27
+ attr_accessor :bandwidth_avg
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'to_process_size_sum' => :'to_process_size_sum',
33
+ :'processed_size_sum' => :'processed_size_sum',
34
+ :'to_process_files_sum' => :'to_process_files_sum',
35
+ :'processed_files_sum' => :'processed_files_sum',
36
+ :'finalized_files_sum' => :'finalized_files_sum',
37
+ :'bandwidth_avg' => :'bandwidth_avg'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'to_process_size_sum' => :'Integer',
45
+ :'processed_size_sum' => :'Integer',
46
+ :'to_process_files_sum' => :'Integer',
47
+ :'processed_files_sum' => :'Integer',
48
+ :'finalized_files_sum' => :'Integer',
49
+ :'bandwidth_avg' => :'Integer'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Nodeum::TaskFacetAllOf` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!self.class.attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Nodeum::TaskFacetAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'to_process_size_sum')
75
+ self.to_process_size_sum = attributes[:'to_process_size_sum']
76
+ end
77
+
78
+ if attributes.key?(:'processed_size_sum')
79
+ self.processed_size_sum = attributes[:'processed_size_sum']
80
+ end
81
+
82
+ if attributes.key?(:'to_process_files_sum')
83
+ self.to_process_files_sum = attributes[:'to_process_files_sum']
84
+ end
85
+
86
+ if attributes.key?(:'processed_files_sum')
87
+ self.processed_files_sum = attributes[:'processed_files_sum']
88
+ end
89
+
90
+ if attributes.key?(:'finalized_files_sum')
91
+ self.finalized_files_sum = attributes[:'finalized_files_sum']
92
+ end
93
+
94
+ if attributes.key?(:'bandwidth_avg')
95
+ self.bandwidth_avg = attributes[:'bandwidth_avg']
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ invalid_properties = Array.new
103
+ invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ to_process_size_sum == o.to_process_size_sum &&
118
+ processed_size_sum == o.processed_size_sum &&
119
+ to_process_files_sum == o.to_process_files_sum &&
120
+ processed_files_sum == o.processed_files_sum &&
121
+ finalized_files_sum == o.finalized_files_sum &&
122
+ bandwidth_avg == o.bandwidth_avg
123
+ end
124
+
125
+ # @see the `==` method
126
+ # @param [Object] Object to be compared
127
+ def eql?(o)
128
+ self == o
129
+ end
130
+
131
+ # Calculates hash code according to all attributes.
132
+ # @return [Integer] Hash code
133
+ def hash
134
+ [to_process_size_sum, processed_size_sum, to_process_files_sum, processed_files_sum, finalized_files_sum, bandwidth_avg].hash
135
+ end
136
+
137
+ # Builds the object from hash
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ # @return [Object] Returns the model itself
140
+ def self.build_from_hash(attributes)
141
+ new.build_from_hash(attributes)
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def build_from_hash(attributes)
148
+ return nil unless attributes.is_a?(Hash)
149
+ self.class.openapi_types.each_pair do |key, type|
150
+ if type =~ /\AArray<(.*)>/i
151
+ # check to ensure the input is an array given that the attribute
152
+ # is documented as an array but the input is not
153
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
154
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
155
+ end
156
+ elsif !attributes[self.class.attribute_map[key]].nil?
157
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
158
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
159
+ end
160
+
161
+ self
162
+ end
163
+
164
+ # Deserializes the data based on type
165
+ # @param string type Data type
166
+ # @param string value Value to be deserialized
167
+ # @return [Object] Deserialized data
168
+ def _deserialize(type, value)
169
+ case type.to_sym
170
+ when :DateTime
171
+ DateTime.parse(value)
172
+ when :Date
173
+ Date.parse(value)
174
+ when :String
175
+ value.to_s
176
+ when :Integer
177
+ value.to_i
178
+ when :Float
179
+ value.to_f
180
+ when :Boolean
181
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
182
+ true
183
+ else
184
+ false
185
+ end
186
+ when :Object
187
+ # generic object (usually a Hash), return directly
188
+ value
189
+ when /\AArray<(?<inner_type>.+)>\z/
190
+ inner_type = Regexp.last_match[:inner_type]
191
+ value.map { |v| _deserialize(inner_type, v) }
192
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
193
+ k_type = Regexp.last_match[:k_type]
194
+ v_type = Regexp.last_match[:v_type]
195
+ {}.tap do |hash|
196
+ value.each do |k, v|
197
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
198
+ end
199
+ end
200
+ else # model
201
+ Nodeum.const_get(type).build_from_hash(value)
202
+ end
203
+ end
204
+
205
+ # Returns the string representation of the object
206
+ # @return [String] String presentation of the object
207
+ def to_s
208
+ to_hash.to_s
209
+ end
210
+
211
+ # to_body is an alias to to_hash (backward compatibility)
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_body
214
+ to_hash
215
+ end
216
+
217
+ # Returns the object in the form of hash
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_hash
220
+ hash = {}
221
+ self.class.attribute_map.each_pair do |attr, param|
222
+ value = self.send(attr)
223
+ if value.nil?
224
+ is_nullable = self.class.openapi_nullable.include?(attr)
225
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
226
+ end
227
+
228
+ hash[param] = _to_hash(value)
229
+ end
230
+ hash
231
+ end
232
+
233
+ # Outputs non-array value in the form of hash
234
+ # For object, use to_hash. Otherwise, just return the value
235
+ # @param [Object] value Any valid value
236
+ # @return [Hash] Returns the value in the form of hash
237
+ def _to_hash(value)
238
+ if value.is_a?(Array)
239
+ value.compact.map { |v| _to_hash(v) }
240
+ elsif value.is_a?(Hash)
241
+ {}.tap do |hash|
242
+ value.each { |k, v| hash[k] = _to_hash(v) }
243
+ end
244
+ elsif value.respond_to? :to_hash
245
+ value.to_hash
246
+ else
247
+ value
248
+ end
249
+ end
250
+ end
251
+ end
@@ -0,0 +1,277 @@
1
+ =begin
2
+ #Nodeum API
3
+
4
+ #The Nodeum API makes it easy to tap into the digital data mesh that runs across your organisation. Make requests to our API endpoints and we’ll give you everything you need to interconnect your business workflows with your storage. All production API requests are made to: http://nodeumhostname/api/ The current production version of the API is v1. **REST** The Nodeum API is a RESTful API. This means that the API is designed to allow you to get, create, update, & delete objects with the HTTP verbs GET, POST, PUT, PATCH, & DELETE. **JSON** The Nodeum API speaks exclusively in JSON. This means that you should always set the Content-Type header to application/json to ensure that your requests are properly accepted and processed by the API. **Authentication** All API calls require user-password authentication. **Cross-Origin Resource Sharing** The Nodeum API supports CORS for communicating from Javascript for these endpoints. You will need to specify an Origin URI when creating your application to allow for CORS to be whitelisted for your domain. **Pagination** Some endpoints such as File Listing return a potentially lengthy array of objects. In order to keep the response sizes manageable the API will take advantage of pagination. Pagination is a mechanism for returning a subset of the results for a request and allowing for subsequent requests to “page” through the rest of the results until the end is reached. Paginated endpoints follow a standard interface that accepts two query parameters, limit and offset, and return a payload that follows a standard form. These parameters names and their behavior are borrowed from SQL LIMIT and OFFSET keywords. **Versioning** The Nodeum API is constantly being worked on to add features, make improvements, and fix bugs. This means that you should expect changes to be introduced and documented. However, there are some changes or additions that are considered backwards-compatible and your applications should be flexible enough to handle them. These include: - Adding new endpoints to the API - Adding new attributes to the response of an existing endpoint - Changing the order of attributes of responses (JSON by definition is an object of unordered key/value pairs) **Filter parameters** When browsing a list of items, multiple filter parameters may be applied. Some operators can be added to the value as a prefix: - `=` value is equal. Default operator, may be omitted - `!=` value is different - `>` greater than - `>=` greater than or equal - `<` lower than - `>=` lower than or equal - `><` included in list, items should be separated by `|` - `!><` not included in list, items should be separated by `|` - `~` pattern matching, may include `%` (any characters) and `_` (one character) - `!~` pattern not matching, may include `%` (any characters) and `_` (one character)
5
+
6
+ The version of the OpenAPI document: 2.1.0
7
+ Contact: info@nodeum.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Nodeum
16
+ class TaskFacetBucket
17
+ attr_accessor :val
18
+
19
+ attr_accessor :count
20
+
21
+ attr_accessor :to_process_size_sum
22
+
23
+ attr_accessor :processed_size_sum
24
+
25
+ attr_accessor :to_process_files_sum
26
+
27
+ attr_accessor :processed_files_sum
28
+
29
+ attr_accessor :finalized_files_sum
30
+
31
+ attr_accessor :bandwidth_avg
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'val' => :'val',
37
+ :'count' => :'count',
38
+ :'to_process_size_sum' => :'to_process_size_sum',
39
+ :'processed_size_sum' => :'processed_size_sum',
40
+ :'to_process_files_sum' => :'to_process_files_sum',
41
+ :'processed_files_sum' => :'processed_files_sum',
42
+ :'finalized_files_sum' => :'finalized_files_sum',
43
+ :'bandwidth_avg' => :'bandwidth_avg'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'val' => :'Object',
51
+ :'count' => :'Integer',
52
+ :'to_process_size_sum' => :'Integer',
53
+ :'processed_size_sum' => :'Integer',
54
+ :'to_process_files_sum' => :'Integer',
55
+ :'processed_files_sum' => :'Integer',
56
+ :'finalized_files_sum' => :'Integer',
57
+ :'bandwidth_avg' => :'Integer'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # List of class defined in allOf (OpenAPI v3)
68
+ def self.openapi_all_of
69
+ [
70
+ :'ByDateFacetBucketAllOf',
71
+ :'TaskFacet'
72
+ ]
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ if (!attributes.is_a?(Hash))
79
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Nodeum::TaskFacetBucket` initialize method"
80
+ end
81
+
82
+ # check to see if the attribute exists and convert string to symbol for hash key
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!self.class.attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Nodeum::TaskFacetBucket`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'val')
91
+ self.val = attributes[:'val']
92
+ end
93
+
94
+ if attributes.key?(:'count')
95
+ self.count = attributes[:'count']
96
+ end
97
+
98
+ if attributes.key?(:'to_process_size_sum')
99
+ self.to_process_size_sum = attributes[:'to_process_size_sum']
100
+ end
101
+
102
+ if attributes.key?(:'processed_size_sum')
103
+ self.processed_size_sum = attributes[:'processed_size_sum']
104
+ end
105
+
106
+ if attributes.key?(:'to_process_files_sum')
107
+ self.to_process_files_sum = attributes[:'to_process_files_sum']
108
+ end
109
+
110
+ if attributes.key?(:'processed_files_sum')
111
+ self.processed_files_sum = attributes[:'processed_files_sum']
112
+ end
113
+
114
+ if attributes.key?(:'finalized_files_sum')
115
+ self.finalized_files_sum = attributes[:'finalized_files_sum']
116
+ end
117
+
118
+ if attributes.key?(:'bandwidth_avg')
119
+ self.bandwidth_avg = attributes[:'bandwidth_avg']
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ invalid_properties = Array.new
127
+ invalid_properties
128
+ end
129
+
130
+ # Check to see if the all the properties in the model are valid
131
+ # @return true if the model is valid
132
+ def valid?
133
+ true
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
+ val == o.val &&
142
+ count == o.count &&
143
+ to_process_size_sum == o.to_process_size_sum &&
144
+ processed_size_sum == o.processed_size_sum &&
145
+ to_process_files_sum == o.to_process_files_sum &&
146
+ processed_files_sum == o.processed_files_sum &&
147
+ finalized_files_sum == o.finalized_files_sum &&
148
+ bandwidth_avg == o.bandwidth_avg
149
+ end
150
+
151
+ # @see the `==` method
152
+ # @param [Object] Object to be compared
153
+ def eql?(o)
154
+ self == o
155
+ end
156
+
157
+ # Calculates hash code according to all attributes.
158
+ # @return [Integer] Hash code
159
+ def hash
160
+ [val, count, to_process_size_sum, processed_size_sum, to_process_files_sum, processed_files_sum, finalized_files_sum, bandwidth_avg].hash
161
+ end
162
+
163
+ # Builds the object from hash
164
+ # @param [Hash] attributes Model attributes in the form of hash
165
+ # @return [Object] Returns the model itself
166
+ def self.build_from_hash(attributes)
167
+ new.build_from_hash(attributes)
168
+ end
169
+
170
+ # Builds the object from hash
171
+ # @param [Hash] attributes Model attributes in the form of hash
172
+ # @return [Object] Returns the model itself
173
+ def build_from_hash(attributes)
174
+ return nil unless attributes.is_a?(Hash)
175
+ self.class.openapi_types.each_pair do |key, type|
176
+ if type =~ /\AArray<(.*)>/i
177
+ # check to ensure the input is an array given that the attribute
178
+ # is documented as an array but the input is not
179
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
180
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
181
+ end
182
+ elsif !attributes[self.class.attribute_map[key]].nil?
183
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
184
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
185
+ end
186
+
187
+ self
188
+ end
189
+
190
+ # Deserializes the data based on type
191
+ # @param string type Data type
192
+ # @param string value Value to be deserialized
193
+ # @return [Object] Deserialized data
194
+ def _deserialize(type, value)
195
+ case type.to_sym
196
+ when :DateTime
197
+ DateTime.parse(value)
198
+ when :Date
199
+ Date.parse(value)
200
+ when :String
201
+ value.to_s
202
+ when :Integer
203
+ value.to_i
204
+ when :Float
205
+ value.to_f
206
+ when :Boolean
207
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
208
+ true
209
+ else
210
+ false
211
+ end
212
+ when :Object
213
+ # generic object (usually a Hash), return directly
214
+ value
215
+ when /\AArray<(?<inner_type>.+)>\z/
216
+ inner_type = Regexp.last_match[:inner_type]
217
+ value.map { |v| _deserialize(inner_type, v) }
218
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
219
+ k_type = Regexp.last_match[:k_type]
220
+ v_type = Regexp.last_match[:v_type]
221
+ {}.tap do |hash|
222
+ value.each do |k, v|
223
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
224
+ end
225
+ end
226
+ else # model
227
+ Nodeum.const_get(type).build_from_hash(value)
228
+ end
229
+ end
230
+
231
+ # Returns the string representation of the object
232
+ # @return [String] String presentation of the object
233
+ def to_s
234
+ to_hash.to_s
235
+ end
236
+
237
+ # to_body is an alias to to_hash (backward compatibility)
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_body
240
+ to_hash
241
+ end
242
+
243
+ # Returns the object in the form of hash
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_hash
246
+ hash = {}
247
+ self.class.attribute_map.each_pair do |attr, param|
248
+ value = self.send(attr)
249
+ if value.nil?
250
+ is_nullable = self.class.openapi_nullable.include?(attr)
251
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
252
+ end
253
+
254
+ hash[param] = _to_hash(value)
255
+ end
256
+ hash
257
+ end
258
+
259
+ # Outputs non-array value in the form of hash
260
+ # For object, use to_hash. Otherwise, just return the value
261
+ # @param [Object] value Any valid value
262
+ # @return [Hash] Returns the value in the form of hash
263
+ def _to_hash(value)
264
+ if value.is_a?(Array)
265
+ value.compact.map { |v| _to_hash(v) }
266
+ elsif value.is_a?(Hash)
267
+ {}.tap do |hash|
268
+ value.each { |k, v| hash[k] = _to_hash(v) }
269
+ end
270
+ elsif value.respond_to? :to_hash
271
+ value.to_hash
272
+ else
273
+ value
274
+ end
275
+ end
276
+ end
277
+ end