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,206 @@
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 ByTaskStatusFacetAllOf
17
+ attr_accessor :status
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'status' => :'status'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'status' => :'TaskFacetBuckets'
30
+ }
31
+ end
32
+
33
+ # List of attributes with nullable: true
34
+ def self.openapi_nullable
35
+ Set.new([
36
+ ])
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Nodeum::ByTaskStatusFacetAllOf` initialize method"
44
+ end
45
+
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Nodeum::ByTaskStatusFacetAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ end
51
+ h[k.to_sym] = v
52
+ }
53
+
54
+ if attributes.key?(:'status')
55
+ self.status = attributes[:'status']
56
+ end
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ true
70
+ end
71
+
72
+ # Checks equality by comparing each attribute.
73
+ # @param [Object] Object to be compared
74
+ def ==(o)
75
+ return true if self.equal?(o)
76
+ self.class == o.class &&
77
+ status == o.status
78
+ end
79
+
80
+ # @see the `==` method
81
+ # @param [Object] Object to be compared
82
+ def eql?(o)
83
+ self == o
84
+ end
85
+
86
+ # Calculates hash code according to all attributes.
87
+ # @return [Integer] Hash code
88
+ def hash
89
+ [status].hash
90
+ end
91
+
92
+ # Builds the object from hash
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ # @return [Object] Returns the model itself
95
+ def self.build_from_hash(attributes)
96
+ new.build_from_hash(attributes)
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def build_from_hash(attributes)
103
+ return nil unless attributes.is_a?(Hash)
104
+ self.class.openapi_types.each_pair do |key, type|
105
+ if type =~ /\AArray<(.*)>/i
106
+ # check to ensure the input is an array given that the attribute
107
+ # is documented as an array but the input is not
108
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
109
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
110
+ end
111
+ elsif !attributes[self.class.attribute_map[key]].nil?
112
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
113
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
114
+ end
115
+
116
+ self
117
+ end
118
+
119
+ # Deserializes the data based on type
120
+ # @param string type Data type
121
+ # @param string value Value to be deserialized
122
+ # @return [Object] Deserialized data
123
+ def _deserialize(type, value)
124
+ case type.to_sym
125
+ when :DateTime
126
+ DateTime.parse(value)
127
+ when :Date
128
+ Date.parse(value)
129
+ when :String
130
+ value.to_s
131
+ when :Integer
132
+ value.to_i
133
+ when :Float
134
+ value.to_f
135
+ when :Boolean
136
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
137
+ true
138
+ else
139
+ false
140
+ end
141
+ when :Object
142
+ # generic object (usually a Hash), return directly
143
+ value
144
+ when /\AArray<(?<inner_type>.+)>\z/
145
+ inner_type = Regexp.last_match[:inner_type]
146
+ value.map { |v| _deserialize(inner_type, v) }
147
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
148
+ k_type = Regexp.last_match[:k_type]
149
+ v_type = Regexp.last_match[:v_type]
150
+ {}.tap do |hash|
151
+ value.each do |k, v|
152
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
153
+ end
154
+ end
155
+ else # model
156
+ Nodeum.const_get(type).build_from_hash(value)
157
+ end
158
+ end
159
+
160
+ # Returns the string representation of the object
161
+ # @return [String] String presentation of the object
162
+ def to_s
163
+ to_hash.to_s
164
+ end
165
+
166
+ # to_body is an alias to to_hash (backward compatibility)
167
+ # @return [Hash] Returns the object in the form of hash
168
+ def to_body
169
+ to_hash
170
+ end
171
+
172
+ # Returns the object in the form of hash
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_hash
175
+ hash = {}
176
+ self.class.attribute_map.each_pair do |attr, param|
177
+ value = self.send(attr)
178
+ if value.nil?
179
+ is_nullable = self.class.openapi_nullable.include?(attr)
180
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
181
+ end
182
+
183
+ hash[param] = _to_hash(value)
184
+ end
185
+ hash
186
+ end
187
+
188
+ # Outputs non-array value in the form of hash
189
+ # For object, use to_hash. Otherwise, just return the value
190
+ # @param [Object] value Any valid value
191
+ # @return [Hash] Returns the value in the form of hash
192
+ def _to_hash(value)
193
+ if value.is_a?(Array)
194
+ value.compact.map { |v| _to_hash(v) }
195
+ elsif value.is_a?(Hash)
196
+ {}.tap do |hash|
197
+ value.each { |k, v| hash[k] = _to_hash(v) }
198
+ end
199
+ elsif value.respond_to? :to_hash
200
+ value.to_hash
201
+ else
202
+ value
203
+ end
204
+ end
205
+ end
206
+ end
@@ -0,0 +1,227 @@
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 ByTaskStorageFacet < TaskFacet
17
+ attr_accessor :source
18
+
19
+ attr_accessor :destination
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'source' => :'source',
25
+ :'destination' => :'destination'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'source' => :'TaskFacetBuckets',
33
+ :'destination' => :'TaskFacetBuckets'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # List of class defined in allOf (OpenAPI v3)
44
+ def self.openapi_all_of
45
+ [
46
+ :'ByTaskStorageFacetAllOf',
47
+ :'TaskFacet'
48
+ ]
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Nodeum::ByTaskStorageFacet` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Nodeum::ByTaskStorageFacet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ # call parent's initialize
67
+ super(attributes)
68
+
69
+ if attributes.key?(:'source')
70
+ self.source = attributes[:'source']
71
+ end
72
+
73
+ if attributes.key?(:'destination')
74
+ self.destination = attributes[:'destination']
75
+ end
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = super
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ true && super
89
+ end
90
+
91
+ # Checks equality by comparing each attribute.
92
+ # @param [Object] Object to be compared
93
+ def ==(o)
94
+ return true if self.equal?(o)
95
+ self.class == o.class &&
96
+ source == o.source &&
97
+ destination == o.destination && super(o)
98
+ end
99
+
100
+ # @see the `==` method
101
+ # @param [Object] Object to be compared
102
+ def eql?(o)
103
+ self == o
104
+ end
105
+
106
+ # Calculates hash code according to all attributes.
107
+ # @return [Integer] Hash code
108
+ def hash
109
+ [source, destination].hash
110
+ end
111
+
112
+ # Builds the object from hash
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ # @return [Object] Returns the model itself
115
+ def self.build_from_hash(attributes)
116
+ new.build_from_hash(attributes)
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def build_from_hash(attributes)
123
+ return nil unless attributes.is_a?(Hash)
124
+ super(attributes)
125
+ self.class.openapi_types.each_pair do |key, type|
126
+ if type =~ /\AArray<(.*)>/i
127
+ # check to ensure the input is an array given that the attribute
128
+ # is documented as an array but the input is not
129
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
130
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
131
+ end
132
+ elsif !attributes[self.class.attribute_map[key]].nil?
133
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
134
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
135
+ end
136
+
137
+ self
138
+ end
139
+
140
+ # Deserializes the data based on type
141
+ # @param string type Data type
142
+ # @param string value Value to be deserialized
143
+ # @return [Object] Deserialized data
144
+ def _deserialize(type, value)
145
+ case type.to_sym
146
+ when :DateTime
147
+ DateTime.parse(value)
148
+ when :Date
149
+ Date.parse(value)
150
+ when :String
151
+ value.to_s
152
+ when :Integer
153
+ value.to_i
154
+ when :Float
155
+ value.to_f
156
+ when :Boolean
157
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
+ true
159
+ else
160
+ false
161
+ end
162
+ when :Object
163
+ # generic object (usually a Hash), return directly
164
+ value
165
+ when /\AArray<(?<inner_type>.+)>\z/
166
+ inner_type = Regexp.last_match[:inner_type]
167
+ value.map { |v| _deserialize(inner_type, v) }
168
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
+ k_type = Regexp.last_match[:k_type]
170
+ v_type = Regexp.last_match[:v_type]
171
+ {}.tap do |hash|
172
+ value.each do |k, v|
173
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
174
+ end
175
+ end
176
+ else # model
177
+ Nodeum.const_get(type).build_from_hash(value)
178
+ end
179
+ end
180
+
181
+ # Returns the string representation of the object
182
+ # @return [String] String presentation of the object
183
+ def to_s
184
+ to_hash.to_s
185
+ end
186
+
187
+ # to_body is an alias to to_hash (backward compatibility)
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_body
190
+ to_hash
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = super
197
+ self.class.attribute_map.each_pair do |attr, param|
198
+ value = self.send(attr)
199
+ if value.nil?
200
+ is_nullable = self.class.openapi_nullable.include?(attr)
201
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
202
+ end
203
+
204
+ hash[param] = _to_hash(value)
205
+ end
206
+ hash
207
+ end
208
+
209
+ # Outputs non-array value in the form of hash
210
+ # For object, use to_hash. Otherwise, just return the value
211
+ # @param [Object] value Any valid value
212
+ # @return [Hash] Returns the value in the form of hash
213
+ def _to_hash(value)
214
+ if value.is_a?(Array)
215
+ value.compact.map { |v| _to_hash(v) }
216
+ elsif value.is_a?(Hash)
217
+ {}.tap do |hash|
218
+ value.each { |k, v| hash[k] = _to_hash(v) }
219
+ end
220
+ elsif value.respond_to? :to_hash
221
+ value.to_hash
222
+ else
223
+ value
224
+ end
225
+ end
226
+ end
227
+ end
@@ -0,0 +1,215 @@
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 ByTaskStorageFacetAllOf
17
+ attr_accessor :source
18
+
19
+ attr_accessor :destination
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'source' => :'source',
25
+ :'destination' => :'destination'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'source' => :'TaskFacetBuckets',
33
+ :'destination' => :'TaskFacetBuckets'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Nodeum::ByTaskStorageFacetAllOf` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Nodeum::ByTaskStorageFacetAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'source')
59
+ self.source = attributes[:'source']
60
+ end
61
+
62
+ if attributes.key?(:'destination')
63
+ self.destination = attributes[:'destination']
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ invalid_properties
72
+ end
73
+
74
+ # Check to see if the all the properties in the model are valid
75
+ # @return true if the model is valid
76
+ def valid?
77
+ true
78
+ end
79
+
80
+ # Checks equality by comparing each attribute.
81
+ # @param [Object] Object to be compared
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ source == o.source &&
86
+ destination == o.destination
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Integer] Hash code
97
+ def hash
98
+ [source, destination].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def self.build_from_hash(attributes)
105
+ new.build_from_hash(attributes)
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ self.class.openapi_types.each_pair do |key, type|
114
+ if type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :DateTime
135
+ DateTime.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :Boolean
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ Nodeum.const_get(type).build_from_hash(value)
166
+ end
167
+ end
168
+
169
+ # Returns the string representation of the object
170
+ # @return [String] String presentation of the object
171
+ def to_s
172
+ to_hash.to_s
173
+ end
174
+
175
+ # to_body is an alias to to_hash (backward compatibility)
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_body
178
+ to_hash
179
+ end
180
+
181
+ # Returns the object in the form of hash
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_hash
184
+ hash = {}
185
+ self.class.attribute_map.each_pair do |attr, param|
186
+ value = self.send(attr)
187
+ if value.nil?
188
+ is_nullable = self.class.openapi_nullable.include?(attr)
189
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
+ end
191
+
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ # Outputs non-array value in the form of hash
198
+ # For object, use to_hash. Otherwise, just return the value
199
+ # @param [Object] value Any valid value
200
+ # @return [Hash] Returns the value in the form of hash
201
+ def _to_hash(value)
202
+ if value.is_a?(Array)
203
+ value.compact.map { |v| _to_hash(v) }
204
+ elsif value.is_a?(Hash)
205
+ {}.tap do |hash|
206
+ value.each { |k, v| hash[k] = _to_hash(v) }
207
+ end
208
+ elsif value.respond_to? :to_hash
209
+ value.to_hash
210
+ else
211
+ value
212
+ end
213
+ end
214
+ end
215
+ end