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