influxdb-client-apis 1.15.0.pre.2461 → 1.16.0.pre.2890

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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/lib/influxdb-client-apis.rb +7 -2
  3. data/lib/influxdb2/apis/generated/api/authorizations_api.rb +11 -14
  4. data/lib/influxdb2/apis/generated/api/buckets_api.rb +14 -11
  5. data/lib/influxdb2/apis/generated/api/labels_api.rb +2 -2
  6. data/lib/influxdb2/apis/generated/api/organizations_api.rb +20 -20
  7. data/lib/influxdb2/apis/generated/api/users_api.rb +116 -2567
  8. data/lib/influxdb2/apis/generated/api_client.rb +2 -2
  9. data/lib/influxdb2/apis/generated/api_error.rb +2 -2
  10. data/lib/influxdb2/apis/generated/configuration.rb +4 -4
  11. data/lib/influxdb2/apis/generated/models/authorization.rb +3 -2
  12. data/lib/influxdb2/apis/generated/models/authorization_all_of.rb +3 -2
  13. data/lib/influxdb2/apis/generated/models/authorization_all_of_links.rb +3 -2
  14. data/lib/influxdb2/apis/generated/models/authorization_post_request.rb +326 -0
  15. data/lib/influxdb2/apis/generated/models/authorization_update_request.rb +3 -2
  16. data/lib/influxdb2/apis/generated/models/authorizations.rb +3 -2
  17. data/lib/influxdb2/apis/generated/models/bucket.rb +13 -3
  18. data/lib/influxdb2/apis/generated/models/bucket_links.rb +3 -2
  19. data/lib/influxdb2/apis/generated/models/buckets.rb +3 -2
  20. data/lib/influxdb2/apis/generated/models/label.rb +3 -2
  21. data/lib/influxdb2/apis/generated/models/label_create_request.rb +3 -2
  22. data/lib/influxdb2/apis/generated/models/label_mapping.rb +3 -2
  23. data/lib/influxdb2/apis/generated/models/label_response.rb +3 -2
  24. data/lib/influxdb2/apis/generated/models/label_update.rb +3 -2
  25. data/lib/influxdb2/apis/generated/models/labels_response.rb +3 -2
  26. data/lib/influxdb2/apis/generated/models/links.rb +3 -2
  27. data/lib/influxdb2/apis/generated/models/organization.rb +3 -2
  28. data/lib/influxdb2/apis/generated/models/organization_links.rb +3 -2
  29. data/lib/influxdb2/apis/generated/models/organizations.rb +3 -2
  30. data/lib/influxdb2/apis/generated/models/password_reset_body.rb +215 -0
  31. data/lib/influxdb2/apis/generated/models/patch_organization_request.rb +221 -0
  32. data/lib/influxdb2/apis/generated/models/permission.rb +3 -2
  33. data/lib/influxdb2/apis/generated/models/post_bucket_request.rb +15 -5
  34. data/lib/influxdb2/apis/generated/models/post_organization_request.rb +224 -0
  35. data/lib/influxdb2/apis/generated/models/resource.rb +5 -4
  36. data/lib/influxdb2/apis/generated/models/resource_member.rb +5 -4
  37. data/lib/influxdb2/apis/generated/models/resource_member_all_of.rb +3 -2
  38. data/lib/influxdb2/apis/generated/models/resource_members.rb +4 -3
  39. data/lib/influxdb2/apis/generated/models/{users_links.rb → resource_members_links.rb} +6 -5
  40. data/lib/influxdb2/apis/generated/models/resource_owner.rb +5 -4
  41. data/lib/influxdb2/apis/generated/models/resource_owner_all_of.rb +3 -2
  42. data/lib/influxdb2/apis/generated/models/resource_owners.rb +4 -3
  43. data/lib/influxdb2/apis/generated/models/retention_rule.rb +3 -2
  44. data/lib/influxdb2/apis/generated/models/user.rb +6 -14
  45. data/lib/influxdb2/apis/generated/models/user_response.rb +288 -0
  46. data/lib/influxdb2/apis/generated/models/{user_links.rb → user_response_links.rb} +6 -5
  47. data/lib/influxdb2/apis/generated/models/users.rb +5 -4
  48. data/test/influxdb2/authorizations_api_test.rb +3 -3
  49. data/test/influxdb2/organizations_api_test.rb +3 -3
  50. metadata +11 -6
@@ -1,9 +1,9 @@
1
1
  =begin
2
- #Influx API Service
2
+ #Influx OSS API Service
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
 
@@ -1,9 +1,9 @@
1
1
  =begin
2
- #Influx API Service
2
+ #Influx OSS API Service
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
 
@@ -1,9 +1,9 @@
1
1
  =begin
2
- #Influx API Service
2
+ #Influx OSS API Service
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
 
@@ -236,13 +236,13 @@ module InfluxDB2::API
236
236
  {
237
237
  "HealthApi.get_health": [
238
238
  {
239
- url: "/",
239
+ url: "",
240
240
  description: "No description provided",
241
241
  }
242
242
  ],
243
243
  "ReadyApi.get_ready": [
244
244
  {
245
- url: "/",
245
+ url: "",
246
246
  description: "No description provided",
247
247
  }
248
248
  ],
@@ -1,15 +1,16 @@
1
1
  =begin
2
- #Influx API Service
2
+ #Influx OSS API Service
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
 
10
10
  =end
11
11
 
12
12
  require 'date'
13
+ require 'set'
13
14
  require 'time'
14
15
 
15
16
  module InfluxDB2::API
@@ -1,15 +1,16 @@
1
1
  =begin
2
- #Influx API Service
2
+ #Influx OSS API Service
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
 
10
10
  =end
11
11
 
12
12
  require 'date'
13
+ require 'set'
13
14
  require 'time'
14
15
 
15
16
  module InfluxDB2::API
@@ -1,15 +1,16 @@
1
1
  =begin
2
- #Influx API Service
2
+ #Influx OSS API Service
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
 
10
10
  =end
11
11
 
12
12
  require 'date'
13
+ require 'set'
13
14
  require 'time'
14
15
 
15
16
  module InfluxDB2::API
@@ -0,0 +1,326 @@
1
+ =begin
2
+ #Influx OSS API Service
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+
10
+ =end
11
+
12
+ require 'date'
13
+ require 'set'
14
+ require 'time'
15
+
16
+ module InfluxDB2::API
17
+ class AuthorizationPostRequest
18
+ # If inactive the token is inactive and requests using the token will be rejected.
19
+ attr_reader :status
20
+
21
+ # A description of the token.
22
+ attr_accessor :description
23
+
24
+ # ID of org that authorization is scoped to.
25
+ attr_accessor :org_id
26
+
27
+ # ID of user that authorization is scoped to.
28
+ attr_accessor :user_id
29
+
30
+ # List of permissions for an auth. An auth must have at least one Permission.
31
+ attr_reader :permissions
32
+
33
+ class EnumAttributeValidator
34
+ attr_reader :datatype
35
+ attr_reader :allowable_values
36
+
37
+ def initialize(datatype, allowable_values)
38
+ @allowable_values = allowable_values.map do |value|
39
+ case datatype.to_s
40
+ when /Integer/i
41
+ value.to_i
42
+ when /Float/i
43
+ value.to_f
44
+ else
45
+ value
46
+ end
47
+ end
48
+ end
49
+
50
+ def valid?(value)
51
+ !value || allowable_values.include?(value)
52
+ end
53
+ end
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+ :'status' => :'status',
59
+ :'description' => :'description',
60
+ :'org_id' => :'orgID',
61
+ :'user_id' => :'userID',
62
+ :'permissions' => :'permissions',
63
+ }
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'status' => :'String',
70
+ :'description' => :'String',
71
+ :'org_id' => :'String',
72
+ :'user_id' => :'String',
73
+ :'permissions' => :'Array<Permission>'
74
+ }
75
+ end
76
+
77
+ # List of attributes with nullable: true
78
+ def self.openapi_nullable
79
+ Set.new([
80
+ ])
81
+ end
82
+
83
+ # List of class defined in allOf (OpenAPI v3)
84
+ def self.openapi_all_of
85
+ [
86
+ :'AuthorizationPostRequestAllOf',
87
+ :'AuthorizationUpdateRequest'
88
+ ]
89
+ end
90
+
91
+ # Initializes the object
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ def initialize(attributes = {})
94
+ if (!attributes.is_a?(Hash))
95
+ fail ArgumentError, "The input argument (attributes) must be a hash in `InfluxDB2::AuthorizationPostRequest` initialize method"
96
+ end
97
+
98
+ # check to see if the attribute exists and convert string to symbol for hash key
99
+ attributes = attributes.each_with_object({}) { |(k, v), h|
100
+ if (!self.class.attribute_map.key?(k.to_sym))
101
+ fail ArgumentError, "`#{k}` is not a valid attribute in `InfluxDB2::AuthorizationPostRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
102
+ end
103
+ h[k.to_sym] = v
104
+ }
105
+
106
+ if attributes.key?(:'status')
107
+ self.status = attributes[:'status']
108
+ else
109
+ self.status = 'active'
110
+ end
111
+
112
+ if attributes.key?(:'description')
113
+ self.description = attributes[:'description']
114
+ end
115
+
116
+ if attributes.key?(:'org_id')
117
+ self.org_id = attributes[:'org_id']
118
+ end
119
+
120
+ if attributes.key?(:'user_id')
121
+ self.user_id = attributes[:'user_id']
122
+ end
123
+
124
+ if attributes.key?(:'permissions')
125
+ if (value = attributes[:'permissions']).is_a?(Array)
126
+ self.permissions = value
127
+ end
128
+ end
129
+ end
130
+
131
+ # Show invalid properties with the reasons. Usually used together with valid?
132
+ # @return Array for valid properties with the reasons
133
+ def list_invalid_properties
134
+ invalid_properties = Array.new
135
+ if @org_id.nil?
136
+ invalid_properties.push('invalid value for "org_id", org_id cannot be nil.')
137
+ end
138
+
139
+ if @permissions.nil?
140
+ invalid_properties.push('invalid value for "permissions", permissions cannot be nil.')
141
+ end
142
+
143
+ if @permissions.length < 1
144
+ invalid_properties.push('invalid value for "permissions", number of items must be greater than or equal to 1.')
145
+ end
146
+
147
+ invalid_properties
148
+ end
149
+
150
+ # Check to see if the all the properties in the model are valid
151
+ # @return true if the model is valid
152
+ def valid?
153
+ status_validator = EnumAttributeValidator.new('String', ["active", "inactive"])
154
+ return false unless status_validator.valid?(@status)
155
+ return false if @org_id.nil?
156
+ return false if @permissions.nil?
157
+ return false if @permissions.length < 1
158
+ true
159
+ end
160
+
161
+ # Custom attribute writer method checking allowed values (enum).
162
+ # @param [Object] status Object to be assigned
163
+ def status=(status)
164
+ validator = EnumAttributeValidator.new('String', ["active", "inactive"])
165
+ unless validator.valid?(status)
166
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
167
+ end
168
+ @status = status
169
+ end
170
+
171
+ # Custom attribute writer method with validation
172
+ # @param [Object] permissions Value to be assigned
173
+ def permissions=(permissions)
174
+ if permissions.nil?
175
+ fail ArgumentError, 'permissions cannot be nil'
176
+ end
177
+
178
+ if permissions.length < 1
179
+ fail ArgumentError, 'invalid value for "permissions", number of items must be greater than or equal to 1.'
180
+ end
181
+
182
+ @permissions = permissions
183
+ end
184
+
185
+ # Checks equality by comparing each attribute.
186
+ # @param [Object] Object to be compared
187
+ def ==(o)
188
+ return true if self.equal?(o)
189
+ self.class == o.class &&
190
+ status == o.status &&
191
+ description == o.description &&
192
+ org_id == o.org_id &&
193
+ user_id == o.user_id &&
194
+ permissions == o.permissions
195
+ end
196
+
197
+ # @see the `==` method
198
+ # @param [Object] Object to be compared
199
+ def eql?(o)
200
+ self == o
201
+ end
202
+
203
+ # Calculates hash code according to all attributes.
204
+ # @return [Integer] Hash code
205
+ def hash
206
+ [status, description, org_id, user_id, permissions].hash
207
+ end
208
+
209
+ # Builds the object from hash
210
+ # @param [Hash] attributes Model attributes in the form of hash
211
+ # @return [Object] Returns the model itself
212
+ def self.build_from_hash(attributes)
213
+ new.build_from_hash(attributes)
214
+ end
215
+
216
+ # Builds the object from hash
217
+ # @param [Hash] attributes Model attributes in the form of hash
218
+ # @return [Object] Returns the model itself
219
+ def build_from_hash(attributes)
220
+ return nil unless attributes.is_a?(Hash)
221
+ self.class.openapi_types.each_pair do |key, type|
222
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
223
+ self.send("#{key}=", nil)
224
+ elsif type =~ /\AArray<(.*)>/i
225
+ # check to ensure the input is an array given that the attribute
226
+ # is documented as an array but the input is not
227
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
228
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
229
+ end
230
+ elsif !attributes[self.class.attribute_map[key]].nil?
231
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
232
+ end
233
+ end
234
+
235
+ self
236
+ end
237
+
238
+ # Deserializes the data based on type
239
+ # @param string type Data type
240
+ # @param string value Value to be deserialized
241
+ # @return [Object] Deserialized data
242
+ def _deserialize(type, value)
243
+ case type.to_sym
244
+ when :Time
245
+ Time.parse(value)
246
+ when :Date
247
+ Date.parse(value)
248
+ when :String
249
+ value.to_s
250
+ when :Integer
251
+ value.to_i
252
+ when :Float
253
+ value.to_f
254
+ when :Boolean
255
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
256
+ true
257
+ else
258
+ false
259
+ end
260
+ when :Object
261
+ # generic object (usually a Hash), return directly
262
+ value
263
+ when /\AArray<(?<inner_type>.+)>\z/
264
+ inner_type = Regexp.last_match[:inner_type]
265
+ value.map { |v| _deserialize(inner_type, v) }
266
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
267
+ k_type = Regexp.last_match[:k_type]
268
+ v_type = Regexp.last_match[:v_type]
269
+ {}.tap do |hash|
270
+ value.each do |k, v|
271
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
272
+ end
273
+ end
274
+ else # model
275
+ InfluxDB2::API.const_get(type).build_from_hash(value)
276
+ end
277
+ end
278
+
279
+ # Returns the string representation of the object
280
+ # @return [String] String presentation of the object
281
+ def to_s
282
+ to_hash.to_s
283
+ end
284
+
285
+ # to_body is an alias to to_hash (backward compatibility)
286
+ # @return [Hash] Returns the object in the form of hash
287
+ def to_body
288
+ to_hash
289
+ end
290
+
291
+ # Returns the object in the form of hash
292
+ # @return [Hash] Returns the object in the form of hash
293
+ def to_hash
294
+ hash = {}
295
+ self.class.attribute_map.each_pair do |attr, param|
296
+ value = self.send(attr)
297
+ if value.nil?
298
+ is_nullable = self.class.openapi_nullable.include?(attr)
299
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
300
+ end
301
+
302
+ hash[param] = _to_hash(value)
303
+ end
304
+ hash
305
+ end
306
+
307
+ # Outputs non-array value in the form of hash
308
+ # For object, use to_hash. Otherwise, just return the value
309
+ # @param [Object] value Any valid value
310
+ # @return [Hash] Returns the value in the form of hash
311
+ def _to_hash(value)
312
+ if value.is_a?(Array)
313
+ value.compact.map { |v| _to_hash(v) }
314
+ elsif value.is_a?(Hash)
315
+ {}.tap do |hash|
316
+ value.each { |k, v| hash[k] = _to_hash(v) }
317
+ end
318
+ elsif value.respond_to? :to_hash
319
+ value.to_hash
320
+ else
321
+ value
322
+ end
323
+ end
324
+
325
+ end
326
+ end
@@ -1,15 +1,16 @@
1
1
  =begin
2
- #Influx API Service
2
+ #Influx OSS API Service
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
 
10
10
  =end
11
11
 
12
12
  require 'date'
13
+ require 'set'
13
14
  require 'time'
14
15
 
15
16
  module InfluxDB2::API