togglr-sdk 1.0.2 → 1.0.4

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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/lib/togglr/client.rb +11 -17
  3. data/lib/togglr/version.rb +1 -1
  4. metadata +1 -51
  5. data/generated/Gemfile +0 -9
  6. data/generated/README.md +0 -121
  7. data/generated/Rakefile +0 -10
  8. data/generated/docs/DefaultApi.md +0 -282
  9. data/generated/docs/Error.md +0 -18
  10. data/generated/docs/ErrorBadRequest.md +0 -18
  11. data/generated/docs/ErrorError.md +0 -18
  12. data/generated/docs/ErrorInternalServerError.md +0 -18
  13. data/generated/docs/ErrorNotFound.md +0 -18
  14. data/generated/docs/ErrorPermissionDenied.md +0 -18
  15. data/generated/docs/ErrorTooManyRequests.md +0 -18
  16. data/generated/docs/ErrorUnauthorized.md +0 -18
  17. data/generated/docs/EvaluateResponse.md +0 -22
  18. data/generated/docs/FeatureErrorReport.md +0 -22
  19. data/generated/docs/FeatureHealth.md +0 -30
  20. data/generated/docs/HealthResponse.md +0 -20
  21. data/generated/git_push.sh +0 -57
  22. data/generated/lib/togglr-client/api/default_api.rb +0 -284
  23. data/generated/lib/togglr-client/api_client.rb +0 -437
  24. data/generated/lib/togglr-client/api_error.rb +0 -58
  25. data/generated/lib/togglr-client/configuration.rb +0 -392
  26. data/generated/lib/togglr-client/models/error.rb +0 -237
  27. data/generated/lib/togglr-client/models/error_bad_request.rb +0 -244
  28. data/generated/lib/togglr-client/models/error_error.rb +0 -220
  29. data/generated/lib/togglr-client/models/error_internal_server_error.rb +0 -244
  30. data/generated/lib/togglr-client/models/error_not_found.rb +0 -244
  31. data/generated/lib/togglr-client/models/error_permission_denied.rb +0 -244
  32. data/generated/lib/togglr-client/models/error_too_many_requests.rb +0 -244
  33. data/generated/lib/togglr-client/models/error_unauthorized.rb +0 -244
  34. data/generated/lib/togglr-client/models/evaluate_response.rb +0 -289
  35. data/generated/lib/togglr-client/models/feature_error_report.rb +0 -274
  36. data/generated/lib/togglr-client/models/feature_health.rb +0 -342
  37. data/generated/lib/togglr-client/models/health_response.rb +0 -287
  38. data/generated/lib/togglr-client/version.rb +0 -15
  39. data/generated/lib/togglr-client.rb +0 -52
  40. data/generated/spec/api/default_api_spec.rb +0 -81
  41. data/generated/spec/models/error_bad_request_spec.rb +0 -36
  42. data/generated/spec/models/error_error_spec.rb +0 -36
  43. data/generated/spec/models/error_internal_server_error_spec.rb +0 -36
  44. data/generated/spec/models/error_not_found_spec.rb +0 -36
  45. data/generated/spec/models/error_permission_denied_spec.rb +0 -36
  46. data/generated/spec/models/error_spec.rb +0 -36
  47. data/generated/spec/models/error_too_many_requests_spec.rb +0 -36
  48. data/generated/spec/models/error_unauthorized_spec.rb +0 -36
  49. data/generated/spec/models/evaluate_response_spec.rb +0 -48
  50. data/generated/spec/models/feature_error_report_spec.rb +0 -48
  51. data/generated/spec/models/feature_health_spec.rb +0 -72
  52. data/generated/spec/models/health_response_spec.rb +0 -46
  53. data/generated/spec/spec_helper.rb +0 -111
  54. data/generated/togglr-client.gemspec +0 -41
@@ -1,289 +0,0 @@
1
- =begin
2
- #SDK API
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.15.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module TogglrClient
17
- class EvaluateResponse
18
- attr_accessor :feature_key
19
-
20
- attr_accessor :enabled
21
-
22
- attr_accessor :value
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'feature_key' => :'feature_key',
28
- :'enabled' => :'enabled',
29
- :'value' => :'value'
30
- }
31
- end
32
-
33
- # Returns attribute mapping this model knows about
34
- def self.acceptable_attribute_map
35
- attribute_map
36
- end
37
-
38
- # Returns all the JSON keys this model knows about
39
- def self.acceptable_attributes
40
- acceptable_attribute_map.values
41
- end
42
-
43
- # Attribute type mapping.
44
- def self.openapi_types
45
- {
46
- :'feature_key' => :'String',
47
- :'enabled' => :'Boolean',
48
- :'value' => :'String'
49
- }
50
- end
51
-
52
- # List of attributes with nullable: true
53
- def self.openapi_nullable
54
- Set.new([
55
- ])
56
- end
57
-
58
- # Initializes the object
59
- # @param [Hash] attributes Model attributes in the form of hash
60
- def initialize(attributes = {})
61
- if (!attributes.is_a?(Hash))
62
- fail ArgumentError, "The input argument (attributes) must be a hash in `TogglrClient::EvaluateResponse` initialize method"
63
- end
64
-
65
- # check to see if the attribute exists and convert string to symbol for hash key
66
- acceptable_attribute_map = self.class.acceptable_attribute_map
67
- attributes = attributes.each_with_object({}) { |(k, v), h|
68
- if (!acceptable_attribute_map.key?(k.to_sym))
69
- fail ArgumentError, "`#{k}` is not a valid attribute in `TogglrClient::EvaluateResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
- end
71
- h[k.to_sym] = v
72
- }
73
-
74
- if attributes.key?(:'feature_key')
75
- self.feature_key = attributes[:'feature_key']
76
- else
77
- self.feature_key = nil
78
- end
79
-
80
- if attributes.key?(:'enabled')
81
- self.enabled = attributes[:'enabled']
82
- else
83
- self.enabled = nil
84
- end
85
-
86
- if attributes.key?(:'value')
87
- self.value = attributes[:'value']
88
- else
89
- self.value = nil
90
- end
91
- end
92
-
93
- # Show invalid properties with the reasons. Usually used together with valid?
94
- # @return Array for valid properties with the reasons
95
- def list_invalid_properties
96
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
- invalid_properties = Array.new
98
- if @feature_key.nil?
99
- invalid_properties.push('invalid value for "feature_key", feature_key cannot be nil.')
100
- end
101
-
102
- if @enabled.nil?
103
- invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
104
- end
105
-
106
- if @value.nil?
107
- invalid_properties.push('invalid value for "value", value cannot be nil.')
108
- end
109
-
110
- invalid_properties
111
- end
112
-
113
- # Check to see if the all the properties in the model are valid
114
- # @return true if the model is valid
115
- def valid?
116
- warn '[DEPRECATED] the `valid?` method is obsolete'
117
- return false if @feature_key.nil?
118
- return false if @enabled.nil?
119
- return false if @value.nil?
120
- true
121
- end
122
-
123
- # Custom attribute writer method with validation
124
- # @param [Object] feature_key Value to be assigned
125
- def feature_key=(feature_key)
126
- if feature_key.nil?
127
- fail ArgumentError, 'feature_key cannot be nil'
128
- end
129
-
130
- @feature_key = feature_key
131
- end
132
-
133
- # Custom attribute writer method with validation
134
- # @param [Object] enabled Value to be assigned
135
- def enabled=(enabled)
136
- if enabled.nil?
137
- fail ArgumentError, 'enabled cannot be nil'
138
- end
139
-
140
- @enabled = enabled
141
- end
142
-
143
- # Custom attribute writer method with validation
144
- # @param [Object] value Value to be assigned
145
- def value=(value)
146
- if value.nil?
147
- fail ArgumentError, 'value cannot be nil'
148
- end
149
-
150
- @value = value
151
- end
152
-
153
- # Checks equality by comparing each attribute.
154
- # @param [Object] Object to be compared
155
- def ==(o)
156
- return true if self.equal?(o)
157
- self.class == o.class &&
158
- feature_key == o.feature_key &&
159
- enabled == o.enabled &&
160
- value == o.value
161
- end
162
-
163
- # @see the `==` method
164
- # @param [Object] Object to be compared
165
- def eql?(o)
166
- self == o
167
- end
168
-
169
- # Calculates hash code according to all attributes.
170
- # @return [Integer] Hash code
171
- def hash
172
- [feature_key, enabled, value].hash
173
- end
174
-
175
- # Builds the object from hash
176
- # @param [Hash] attributes Model attributes in the form of hash
177
- # @return [Object] Returns the model itself
178
- def self.build_from_hash(attributes)
179
- return nil unless attributes.is_a?(Hash)
180
- attributes = attributes.transform_keys(&:to_sym)
181
- transformed_hash = {}
182
- openapi_types.each_pair do |key, type|
183
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
184
- transformed_hash["#{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[attribute_map[key]].is_a?(Array)
189
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
190
- end
191
- elsif !attributes[attribute_map[key]].nil?
192
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
193
- end
194
- end
195
- new(transformed_hash)
196
- end
197
-
198
- # Deserializes the data based on type
199
- # @param string type Data type
200
- # @param string value Value to be deserialized
201
- # @return [Object] Deserialized data
202
- def self._deserialize(type, value)
203
- case type.to_sym
204
- when :Time
205
- Time.parse(value)
206
- when :Date
207
- Date.parse(value)
208
- when :String
209
- value.to_s
210
- when :Integer
211
- value.to_i
212
- when :Float
213
- value.to_f
214
- when :Boolean
215
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
216
- true
217
- else
218
- false
219
- end
220
- when :Object
221
- # generic object (usually a Hash), return directly
222
- value
223
- when /\AArray<(?<inner_type>.+)>\z/
224
- inner_type = Regexp.last_match[:inner_type]
225
- value.map { |v| _deserialize(inner_type, v) }
226
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
227
- k_type = Regexp.last_match[:k_type]
228
- v_type = Regexp.last_match[:v_type]
229
- {}.tap do |hash|
230
- value.each do |k, v|
231
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
232
- end
233
- end
234
- else # model
235
- # models (e.g. Pet) or oneOf
236
- klass = TogglrClient.const_get(type)
237
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
238
- end
239
- end
240
-
241
- # Returns the string representation of the object
242
- # @return [String] String presentation of the object
243
- def to_s
244
- to_hash.to_s
245
- end
246
-
247
- # to_body is an alias to to_hash (backward compatibility)
248
- # @return [Hash] Returns the object in the form of hash
249
- def to_body
250
- to_hash
251
- end
252
-
253
- # Returns the object in the form of hash
254
- # @return [Hash] Returns the object in the form of hash
255
- def to_hash
256
- hash = {}
257
- self.class.attribute_map.each_pair do |attr, param|
258
- value = self.send(attr)
259
- if value.nil?
260
- is_nullable = self.class.openapi_nullable.include?(attr)
261
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
262
- end
263
-
264
- hash[param] = _to_hash(value)
265
- end
266
- hash
267
- end
268
-
269
- # Outputs non-array value in the form of hash
270
- # For object, use to_hash. Otherwise, just return the value
271
- # @param [Object] value Any valid value
272
- # @return [Hash] Returns the value in the form of hash
273
- def _to_hash(value)
274
- if value.is_a?(Array)
275
- value.compact.map { |v| _to_hash(v) }
276
- elsif value.is_a?(Hash)
277
- {}.tap do |hash|
278
- value.each { |k, v| hash[k] = _to_hash(v) }
279
- end
280
- elsif value.respond_to? :to_hash
281
- value.to_hash
282
- else
283
- value
284
- end
285
- end
286
-
287
- end
288
-
289
- end
@@ -1,274 +0,0 @@
1
- =begin
2
- #SDK API
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.15.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module TogglrClient
17
- class FeatureErrorReport
18
- attr_accessor :error_type
19
-
20
- attr_accessor :error_message
21
-
22
- attr_accessor :context
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'error_type' => :'error_type',
28
- :'error_message' => :'error_message',
29
- :'context' => :'context'
30
- }
31
- end
32
-
33
- # Returns attribute mapping this model knows about
34
- def self.acceptable_attribute_map
35
- attribute_map
36
- end
37
-
38
- # Returns all the JSON keys this model knows about
39
- def self.acceptable_attributes
40
- acceptable_attribute_map.values
41
- end
42
-
43
- # Attribute type mapping.
44
- def self.openapi_types
45
- {
46
- :'error_type' => :'String',
47
- :'error_message' => :'String',
48
- :'context' => :'Hash<String, Object>'
49
- }
50
- end
51
-
52
- # List of attributes with nullable: true
53
- def self.openapi_nullable
54
- Set.new([
55
- ])
56
- end
57
-
58
- # Initializes the object
59
- # @param [Hash] attributes Model attributes in the form of hash
60
- def initialize(attributes = {})
61
- if (!attributes.is_a?(Hash))
62
- fail ArgumentError, "The input argument (attributes) must be a hash in `TogglrClient::FeatureErrorReport` initialize method"
63
- end
64
-
65
- # check to see if the attribute exists and convert string to symbol for hash key
66
- acceptable_attribute_map = self.class.acceptable_attribute_map
67
- attributes = attributes.each_with_object({}) { |(k, v), h|
68
- if (!acceptable_attribute_map.key?(k.to_sym))
69
- fail ArgumentError, "`#{k}` is not a valid attribute in `TogglrClient::FeatureErrorReport`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
- end
71
- h[k.to_sym] = v
72
- }
73
-
74
- if attributes.key?(:'error_type')
75
- self.error_type = attributes[:'error_type']
76
- else
77
- self.error_type = nil
78
- end
79
-
80
- if attributes.key?(:'error_message')
81
- self.error_message = attributes[:'error_message']
82
- else
83
- self.error_message = nil
84
- end
85
-
86
- if attributes.key?(:'context')
87
- if (value = attributes[:'context']).is_a?(Hash)
88
- self.context = value
89
- end
90
- end
91
- end
92
-
93
- # Show invalid properties with the reasons. Usually used together with valid?
94
- # @return Array for valid properties with the reasons
95
- def list_invalid_properties
96
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
- invalid_properties = Array.new
98
- if @error_type.nil?
99
- invalid_properties.push('invalid value for "error_type", error_type cannot be nil.')
100
- end
101
-
102
- if @error_message.nil?
103
- invalid_properties.push('invalid value for "error_message", error_message cannot be nil.')
104
- end
105
-
106
- invalid_properties
107
- end
108
-
109
- # Check to see if the all the properties in the model are valid
110
- # @return true if the model is valid
111
- def valid?
112
- warn '[DEPRECATED] the `valid?` method is obsolete'
113
- return false if @error_type.nil?
114
- return false if @error_message.nil?
115
- true
116
- end
117
-
118
- # Custom attribute writer method with validation
119
- # @param [Object] error_type Value to be assigned
120
- def error_type=(error_type)
121
- if error_type.nil?
122
- fail ArgumentError, 'error_type cannot be nil'
123
- end
124
-
125
- @error_type = error_type
126
- end
127
-
128
- # Custom attribute writer method with validation
129
- # @param [Object] error_message Value to be assigned
130
- def error_message=(error_message)
131
- if error_message.nil?
132
- fail ArgumentError, 'error_message cannot be nil'
133
- end
134
-
135
- @error_message = error_message
136
- end
137
-
138
- # Checks equality by comparing each attribute.
139
- # @param [Object] Object to be compared
140
- def ==(o)
141
- return true if self.equal?(o)
142
- self.class == o.class &&
143
- error_type == o.error_type &&
144
- error_message == o.error_message &&
145
- context == o.context
146
- end
147
-
148
- # @see the `==` method
149
- # @param [Object] Object to be compared
150
- def eql?(o)
151
- self == o
152
- end
153
-
154
- # Calculates hash code according to all attributes.
155
- # @return [Integer] Hash code
156
- def hash
157
- [error_type, error_message, context].hash
158
- end
159
-
160
- # Builds the object from hash
161
- # @param [Hash] attributes Model attributes in the form of hash
162
- # @return [Object] Returns the model itself
163
- def self.build_from_hash(attributes)
164
- return nil unless attributes.is_a?(Hash)
165
- attributes = attributes.transform_keys(&:to_sym)
166
- transformed_hash = {}
167
- openapi_types.each_pair do |key, type|
168
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
169
- transformed_hash["#{key}"] = nil
170
- elsif type =~ /\AArray<(.*)>/i
171
- # check to ensure the input is an array given that the attribute
172
- # is documented as an array but the input is not
173
- if attributes[attribute_map[key]].is_a?(Array)
174
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
175
- end
176
- elsif !attributes[attribute_map[key]].nil?
177
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
178
- end
179
- end
180
- new(transformed_hash)
181
- end
182
-
183
- # Deserializes the data based on type
184
- # @param string type Data type
185
- # @param string value Value to be deserialized
186
- # @return [Object] Deserialized data
187
- def self._deserialize(type, value)
188
- case type.to_sym
189
- when :Time
190
- Time.parse(value)
191
- when :Date
192
- Date.parse(value)
193
- when :String
194
- value.to_s
195
- when :Integer
196
- value.to_i
197
- when :Float
198
- value.to_f
199
- when :Boolean
200
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
201
- true
202
- else
203
- false
204
- end
205
- when :Object
206
- # generic object (usually a Hash), return directly
207
- value
208
- when /\AArray<(?<inner_type>.+)>\z/
209
- inner_type = Regexp.last_match[:inner_type]
210
- value.map { |v| _deserialize(inner_type, v) }
211
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
212
- k_type = Regexp.last_match[:k_type]
213
- v_type = Regexp.last_match[:v_type]
214
- {}.tap do |hash|
215
- value.each do |k, v|
216
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
217
- end
218
- end
219
- else # model
220
- # models (e.g. Pet) or oneOf
221
- klass = TogglrClient.const_get(type)
222
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
223
- end
224
- end
225
-
226
- # Returns the string representation of the object
227
- # @return [String] String presentation of the object
228
- def to_s
229
- to_hash.to_s
230
- end
231
-
232
- # to_body is an alias to to_hash (backward compatibility)
233
- # @return [Hash] Returns the object in the form of hash
234
- def to_body
235
- to_hash
236
- end
237
-
238
- # Returns the object in the form of hash
239
- # @return [Hash] Returns the object in the form of hash
240
- def to_hash
241
- hash = {}
242
- self.class.attribute_map.each_pair do |attr, param|
243
- value = self.send(attr)
244
- if value.nil?
245
- is_nullable = self.class.openapi_nullable.include?(attr)
246
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
247
- end
248
-
249
- hash[param] = _to_hash(value)
250
- end
251
- hash
252
- end
253
-
254
- # Outputs non-array value in the form of hash
255
- # For object, use to_hash. Otherwise, just return the value
256
- # @param [Object] value Any valid value
257
- # @return [Hash] Returns the value in the form of hash
258
- def _to_hash(value)
259
- if value.is_a?(Array)
260
- value.compact.map { |v| _to_hash(v) }
261
- elsif value.is_a?(Hash)
262
- {}.tap do |hash|
263
- value.each { |k, v| hash[k] = _to_hash(v) }
264
- end
265
- elsif value.respond_to? :to_hash
266
- value.to_hash
267
- else
268
- value
269
- end
270
- end
271
-
272
- end
273
-
274
- end