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