influxdb-client-apis 1.15.0.pre.2461 → 1.15.0.pre.2653

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