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
 
@@ -29,7 +29,7 @@ module InfluxDB2::API
29
29
  # Attribute type mapping.
30
30
  def self.openapi_types
31
31
  {
32
- :'links' => :'UsersLinks',
32
+ :'links' => :'ResourceMembersLinks',
33
33
  :'users' => :'Array<ResourceOwner>'
34
34
  }
35
35
  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
 
@@ -23,8 +23,6 @@ module InfluxDB2::API
23
23
  # If inactive the user is inactive.
24
24
  attr_reader :status
25
25
 
26
- attr_accessor :links
27
-
28
26
  class EnumAttributeValidator
29
27
  attr_reader :datatype
30
28
  attr_reader :allowable_values
@@ -54,7 +52,6 @@ module InfluxDB2::API
54
52
  :'oauth_id' => :'oauthID',
55
53
  :'name' => :'name',
56
54
  :'status' => :'status',
57
- :'links' => :'links',
58
55
  }
59
56
  end
60
57
 
@@ -64,8 +61,7 @@ module InfluxDB2::API
64
61
  :'id' => :'String',
65
62
  :'oauth_id' => :'String',
66
63
  :'name' => :'String',
67
- :'status' => :'String',
68
- :'links' => :'UserLinks'
64
+ :'status' => :'String'
69
65
  }
70
66
  end
71
67
 
@@ -107,10 +103,6 @@ module InfluxDB2::API
107
103
  else
108
104
  self.status = 'active'
109
105
  end
110
-
111
- if attributes.key?(:'links')
112
- self.links = attributes[:'links']
113
- end
114
106
  end
115
107
 
116
108
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -151,8 +143,7 @@ module InfluxDB2::API
151
143
  id == o.id &&
152
144
  oauth_id == o.oauth_id &&
153
145
  name == o.name &&
154
- status == o.status &&
155
- links == o.links
146
+ status == o.status
156
147
  end
157
148
 
158
149
  # @see the `==` method
@@ -164,7 +155,7 @@ module InfluxDB2::API
164
155
  # Calculates hash code according to all attributes.
165
156
  # @return [Integer] Hash code
166
157
  def hash
167
- [id, oauth_id, name, status, links].hash
158
+ [id, oauth_id, name, status].hash
168
159
  end
169
160
 
170
161
  # Builds the object from hash
@@ -0,0 +1,287 @@
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 UserResponse
17
+ attr_accessor :id
18
+
19
+ attr_accessor :oauth_id
20
+
21
+ attr_accessor :name
22
+
23
+ # If inactive the user is inactive.
24
+ attr_reader :status
25
+
26
+ attr_accessor :links
27
+
28
+ class EnumAttributeValidator
29
+ attr_reader :datatype
30
+ attr_reader :allowable_values
31
+
32
+ def initialize(datatype, allowable_values)
33
+ @allowable_values = allowable_values.map do |value|
34
+ case datatype.to_s
35
+ when /Integer/i
36
+ value.to_i
37
+ when /Float/i
38
+ value.to_f
39
+ else
40
+ value
41
+ end
42
+ end
43
+ end
44
+
45
+ def valid?(value)
46
+ !value || allowable_values.include?(value)
47
+ end
48
+ end
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'id' => :'id',
54
+ :'oauth_id' => :'oauthID',
55
+ :'name' => :'name',
56
+ :'status' => :'status',
57
+ :'links' => :'links',
58
+ }
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'id' => :'String',
65
+ :'oauth_id' => :'String',
66
+ :'name' => :'String',
67
+ :'status' => :'String',
68
+ :'links' => :'UserResponseLinks'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `InfluxDB2::UserResponse` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ attributes = attributes.each_with_object({}) { |(k, v), h|
87
+ if (!self.class.attribute_map.key?(k.to_sym))
88
+ fail ArgumentError, "`#{k}` is not a valid attribute in `InfluxDB2::UserResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
89
+ end
90
+ h[k.to_sym] = v
91
+ }
92
+
93
+ if attributes.key?(:'id')
94
+ self.id = attributes[:'id']
95
+ end
96
+
97
+ if attributes.key?(:'oauth_id')
98
+ self.oauth_id = attributes[:'oauth_id']
99
+ end
100
+
101
+ if attributes.key?(:'name')
102
+ self.name = attributes[:'name']
103
+ end
104
+
105
+ if attributes.key?(:'status')
106
+ self.status = attributes[:'status']
107
+ else
108
+ self.status = 'active'
109
+ end
110
+
111
+ if attributes.key?(:'links')
112
+ self.links = attributes[:'links']
113
+ end
114
+ end
115
+
116
+ # Show invalid properties with the reasons. Usually used together with valid?
117
+ # @return Array for valid properties with the reasons
118
+ def list_invalid_properties
119
+ invalid_properties = Array.new
120
+ if @name.nil?
121
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
122
+ end
123
+
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ return false if @name.nil?
131
+ status_validator = EnumAttributeValidator.new('String', ["active", "inactive"])
132
+ return false unless status_validator.valid?(@status)
133
+ true
134
+ end
135
+
136
+ # Custom attribute writer method checking allowed values (enum).
137
+ # @param [Object] status Object to be assigned
138
+ def status=(status)
139
+ validator = EnumAttributeValidator.new('String', ["active", "inactive"])
140
+ unless validator.valid?(status)
141
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
142
+ end
143
+ @status = status
144
+ end
145
+
146
+ # Checks equality by comparing each attribute.
147
+ # @param [Object] Object to be compared
148
+ def ==(o)
149
+ return true if self.equal?(o)
150
+ self.class == o.class &&
151
+ id == o.id &&
152
+ oauth_id == o.oauth_id &&
153
+ name == o.name &&
154
+ status == o.status &&
155
+ links == o.links
156
+ end
157
+
158
+ # @see the `==` method
159
+ # @param [Object] Object to be compared
160
+ def eql?(o)
161
+ self == o
162
+ end
163
+
164
+ # Calculates hash code according to all attributes.
165
+ # @return [Integer] Hash code
166
+ def hash
167
+ [id, oauth_id, name, status, links].hash
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 self.build_from_hash(attributes)
174
+ new.build_from_hash(attributes)
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def build_from_hash(attributes)
181
+ return nil unless attributes.is_a?(Hash)
182
+ self.class.openapi_types.each_pair do |key, type|
183
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
184
+ self.send("#{key}=", nil)
185
+ elsif type =~ /\AArray<(.*)>/i
186
+ # check to ensure the input is an array given that the attribute
187
+ # is documented as an array but the input is not
188
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
189
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
190
+ end
191
+ elsif !attributes[self.class.attribute_map[key]].nil?
192
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
193
+ end
194
+ end
195
+
196
+ self
197
+ end
198
+
199
+ # Deserializes the data based on type
200
+ # @param string type Data type
201
+ # @param string value Value to be deserialized
202
+ # @return [Object] Deserialized data
203
+ def _deserialize(type, value)
204
+ case type.to_sym
205
+ when :Time
206
+ Time.parse(value)
207
+ when :Date
208
+ Date.parse(value)
209
+ when :String
210
+ value.to_s
211
+ when :Integer
212
+ value.to_i
213
+ when :Float
214
+ value.to_f
215
+ when :Boolean
216
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
217
+ true
218
+ else
219
+ false
220
+ end
221
+ when :Object
222
+ # generic object (usually a Hash), return directly
223
+ value
224
+ when /\AArray<(?<inner_type>.+)>\z/
225
+ inner_type = Regexp.last_match[:inner_type]
226
+ value.map { |v| _deserialize(inner_type, v) }
227
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
228
+ k_type = Regexp.last_match[:k_type]
229
+ v_type = Regexp.last_match[:v_type]
230
+ {}.tap do |hash|
231
+ value.each do |k, v|
232
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
233
+ end
234
+ end
235
+ else # model
236
+ InfluxDB2::API.const_get(type).build_from_hash(value)
237
+ end
238
+ end
239
+
240
+ # Returns the string representation of the object
241
+ # @return [String] String presentation of the object
242
+ def to_s
243
+ to_hash.to_s
244
+ end
245
+
246
+ # to_body is an alias to to_hash (backward compatibility)
247
+ # @return [Hash] Returns the object in the form of hash
248
+ def to_body
249
+ to_hash
250
+ end
251
+
252
+ # Returns the object in the form of hash
253
+ # @return [Hash] Returns the object in the form of hash
254
+ def to_hash
255
+ hash = {}
256
+ self.class.attribute_map.each_pair do |attr, param|
257
+ value = self.send(attr)
258
+ if value.nil?
259
+ is_nullable = self.class.openapi_nullable.include?(attr)
260
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
261
+ end
262
+
263
+ hash[param] = _to_hash(value)
264
+ end
265
+ hash
266
+ end
267
+
268
+ # Outputs non-array value in the form of hash
269
+ # For object, use to_hash. Otherwise, just return the value
270
+ # @param [Object] value Any valid value
271
+ # @return [Hash] Returns the value in the form of hash
272
+ def _to_hash(value)
273
+ if value.is_a?(Array)
274
+ value.compact.map { |v| _to_hash(v) }
275
+ elsif value.is_a?(Hash)
276
+ {}.tap do |hash|
277
+ value.each { |k, v| hash[k] = _to_hash(v) }
278
+ end
279
+ elsif value.respond_to? :to_hash
280
+ value.to_hash
281
+ else
282
+ value
283
+ end
284
+ end
285
+
286
+ end
287
+ 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
 
@@ -13,7 +13,7 @@ require 'date'
13
13
  require 'time'
14
14
 
15
15
  module InfluxDB2::API
16
- class UserLinks
16
+ class UserResponseLinks
17
17
  attr_accessor :_self
18
18
 
19
19
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -40,13 +40,13 @@ module InfluxDB2::API
40
40
  # @param [Hash] attributes Model attributes in the form of hash
41
41
  def initialize(attributes = {})
42
42
  if (!attributes.is_a?(Hash))
43
- fail ArgumentError, "The input argument (attributes) must be a hash in `InfluxDB2::UserLinks` initialize method"
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `InfluxDB2::UserResponseLinks` initialize method"
44
44
  end
45
45
 
46
46
  # check to see if the attribute exists and convert string to symbol for hash key
47
47
  attributes = attributes.each_with_object({}) { |(k, v), h|
48
48
  if (!self.class.attribute_map.key?(k.to_sym))
49
- fail ArgumentError, "`#{k}` is not a valid attribute in `InfluxDB2::UserLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `InfluxDB2::UserResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
50
  end
51
51
  h[k.to_sym] = v
52
52
  }
@@ -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
 
@@ -29,8 +29,8 @@ module InfluxDB2::API
29
29
  # Attribute type mapping.
30
30
  def self.openapi_types
31
31
  {
32
- :'links' => :'UsersLinks',
33
- :'users' => :'Array<User>'
32
+ :'links' => :'ResourceMembersLinks',
33
+ :'users' => :'Array<UserResponse>'
34
34
  }
35
35
  end
36
36