ory-hydra-client 1.4.6 → 1.5.0.beta5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -4
  3. data/docs/AdminApi.md +1 -1
  4. data/docs/ConsentRequestSession.md +2 -2
  5. data/docs/ContainerWaitOKBodyError.md +17 -0
  6. data/docs/FlushInactiveOAuth2TokensRequest.md +1 -1
  7. data/docs/JSONWebKey.md +12 -12
  8. data/docs/OAuth2TokenIntrospection.md +1 -1
  9. data/docs/Oauth2TokenResponse.md +6 -6
  10. data/docs/OpenIDConnectContext.md +1 -1
  11. data/docs/PluginConfig.md +47 -0
  12. data/docs/PluginConfigArgs.md +23 -0
  13. data/docs/PluginConfigInterface.md +19 -0
  14. data/docs/PluginConfigLinux.md +21 -0
  15. data/docs/PluginConfigNetwork.md +17 -0
  16. data/docs/PluginConfigRootfs.md +19 -0
  17. data/docs/PluginConfigUser.md +19 -0
  18. data/docs/PluginDevice.md +23 -0
  19. data/docs/PluginEnv.md +23 -0
  20. data/docs/PluginInterfaceType.md +21 -0
  21. data/docs/PluginMount.md +29 -0
  22. data/docs/PluginSettings.md +23 -0
  23. data/docs/PreviousConsentSession.md +3 -3
  24. data/docs/RejectRequest.md +5 -5
  25. data/docs/VolumeUsageData.md +19 -0
  26. data/lib/ory-hydra-client.rb +14 -0
  27. data/lib/ory-hydra-client/api/admin_api.rb +2 -2
  28. data/lib/ory-hydra-client/models/consent_request_session.rb +4 -8
  29. data/lib/ory-hydra-client/models/container_wait_ok_body_error.rb +208 -0
  30. data/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +1 -2
  31. data/lib/ory-hydra-client/models/health_not_ready_status.rb +0 -1
  32. data/lib/ory-hydra-client/models/health_status.rb +0 -1
  33. data/lib/ory-hydra-client/models/json_web_key.rb +1 -13
  34. data/lib/ory-hydra-client/models/json_web_key_set.rb +1 -1
  35. data/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb +0 -1
  36. data/lib/ory-hydra-client/models/o_auth2_token_introspection.rb +2 -4
  37. data/lib/ory-hydra-client/models/oauth2_token_response.rb +0 -6
  38. data/lib/ory-hydra-client/models/open_id_connect_context.rb +2 -4
  39. data/lib/ory-hydra-client/models/plugin_config.rb +422 -0
  40. data/lib/ory-hydra-client/models/plugin_config_args.rb +262 -0
  41. data/lib/ory-hydra-client/models/plugin_config_interface.rb +230 -0
  42. data/lib/ory-hydra-client/models/plugin_config_linux.rb +247 -0
  43. data/lib/ory-hydra-client/models/plugin_config_network.rb +213 -0
  44. data/lib/ory-hydra-client/models/plugin_config_rootfs.rb +220 -0
  45. data/lib/ory-hydra-client/models/plugin_config_user.rb +218 -0
  46. data/lib/ory-hydra-client/models/plugin_device.rb +260 -0
  47. data/lib/ory-hydra-client/models/plugin_env.rb +260 -0
  48. data/lib/ory-hydra-client/models/plugin_interface_type.rb +243 -0
  49. data/lib/ory-hydra-client/models/plugin_mount.rb +307 -0
  50. data/lib/ory-hydra-client/models/plugin_settings.rb +265 -0
  51. data/lib/ory-hydra-client/models/previous_consent_session.rb +1 -4
  52. data/lib/ory-hydra-client/models/reject_request.rb +0 -5
  53. data/lib/ory-hydra-client/models/version.rb +0 -1
  54. data/lib/ory-hydra-client/models/volume_usage_data.rb +228 -0
  55. data/lib/ory-hydra-client/version.rb +1 -1
  56. data/spec/models/container_wait_ok_body_error_spec.rb +41 -0
  57. data/spec/models/plugin_config_args_spec.rb +59 -0
  58. data/spec/models/plugin_config_interface_spec.rb +47 -0
  59. data/spec/models/plugin_config_linux_spec.rb +53 -0
  60. data/spec/models/plugin_config_network_spec.rb +41 -0
  61. data/spec/models/plugin_config_rootfs_spec.rb +47 -0
  62. data/spec/models/plugin_config_spec.rb +131 -0
  63. data/spec/models/plugin_config_user_spec.rb +47 -0
  64. data/spec/models/plugin_device_spec.rb +59 -0
  65. data/spec/models/plugin_env_spec.rb +59 -0
  66. data/spec/models/plugin_interface_type_spec.rb +53 -0
  67. data/spec/models/plugin_mount_spec.rb +77 -0
  68. data/spec/models/plugin_settings_spec.rb +59 -0
  69. data/spec/models/volume_usage_data_spec.rb +47 -0
  70. metadata +77 -21
@@ -0,0 +1,262 @@
1
+ =begin
2
+ #ORY Hydra
3
+
4
+ #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
+
6
+ The version of the OpenAPI document: latest
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module OryHydraClient
16
+ # PluginConfigArgs plugin config args
17
+ class PluginConfigArgs
18
+ # description
19
+ attr_accessor :description
20
+
21
+ # name
22
+ attr_accessor :name
23
+
24
+ # settable
25
+ attr_accessor :settable
26
+
27
+ # value
28
+ attr_accessor :value
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'description' => :'Description',
34
+ :'name' => :'Name',
35
+ :'settable' => :'Settable',
36
+ :'value' => :'Value'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'description' => :'String',
44
+ :'name' => :'String',
45
+ :'settable' => :'Array<String>',
46
+ :'value' => :'Array<String>'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginConfigArgs` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginConfigArgs`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'description')
72
+ self.description = attributes[:'description']
73
+ end
74
+
75
+ if attributes.key?(:'name')
76
+ self.name = attributes[:'name']
77
+ end
78
+
79
+ if attributes.key?(:'settable')
80
+ if (value = attributes[:'settable']).is_a?(Array)
81
+ self.settable = value
82
+ end
83
+ end
84
+
85
+ if attributes.key?(:'value')
86
+ if (value = attributes[:'value']).is_a?(Array)
87
+ self.value = value
88
+ end
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ invalid_properties = Array.new
96
+ if @description.nil?
97
+ invalid_properties.push('invalid value for "description", description cannot be nil.')
98
+ end
99
+
100
+ if @name.nil?
101
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
102
+ end
103
+
104
+ if @settable.nil?
105
+ invalid_properties.push('invalid value for "settable", settable cannot be nil.')
106
+ end
107
+
108
+ if @value.nil?
109
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
110
+ end
111
+
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ return false if @description.nil?
119
+ return false if @name.nil?
120
+ return false if @settable.nil?
121
+ return false if @value.nil?
122
+ true
123
+ end
124
+
125
+ # Checks equality by comparing each attribute.
126
+ # @param [Object] Object to be compared
127
+ def ==(o)
128
+ return true if self.equal?(o)
129
+ self.class == o.class &&
130
+ description == o.description &&
131
+ name == o.name &&
132
+ settable == o.settable &&
133
+ value == o.value
134
+ end
135
+
136
+ # @see the `==` method
137
+ # @param [Object] Object to be compared
138
+ def eql?(o)
139
+ self == o
140
+ end
141
+
142
+ # Calculates hash code according to all attributes.
143
+ # @return [Integer] Hash code
144
+ def hash
145
+ [description, name, settable, value].hash
146
+ end
147
+
148
+ # Builds the object from hash
149
+ # @param [Hash] attributes Model attributes in the form of hash
150
+ # @return [Object] Returns the model itself
151
+ def self.build_from_hash(attributes)
152
+ new.build_from_hash(attributes)
153
+ end
154
+
155
+ # Builds the object from hash
156
+ # @param [Hash] attributes Model attributes in the form of hash
157
+ # @return [Object] Returns the model itself
158
+ def build_from_hash(attributes)
159
+ return nil unless attributes.is_a?(Hash)
160
+ self.class.openapi_types.each_pair do |key, type|
161
+ if type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
165
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
166
+ end
167
+ elsif !attributes[self.class.attribute_map[key]].nil?
168
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
169
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
170
+ end
171
+
172
+ self
173
+ end
174
+
175
+ # Deserializes the data based on type
176
+ # @param string type Data type
177
+ # @param string value Value to be deserialized
178
+ # @return [Object] Deserialized data
179
+ def _deserialize(type, value)
180
+ case type.to_sym
181
+ when :DateTime
182
+ DateTime.parse(value)
183
+ when :Date
184
+ Date.parse(value)
185
+ when :String
186
+ value.to_s
187
+ when :Integer
188
+ value.to_i
189
+ when :Float
190
+ value.to_f
191
+ when :Boolean
192
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
193
+ true
194
+ else
195
+ false
196
+ end
197
+ when :Object
198
+ # generic object (usually a Hash), return directly
199
+ value
200
+ when /\AArray<(?<inner_type>.+)>\z/
201
+ inner_type = Regexp.last_match[:inner_type]
202
+ value.map { |v| _deserialize(inner_type, v) }
203
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
204
+ k_type = Regexp.last_match[:k_type]
205
+ v_type = Regexp.last_match[:v_type]
206
+ {}.tap do |hash|
207
+ value.each do |k, v|
208
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
209
+ end
210
+ end
211
+ else # model
212
+ OryHydraClient.const_get(type).build_from_hash(value)
213
+ end
214
+ end
215
+
216
+ # Returns the string representation of the object
217
+ # @return [String] String presentation of the object
218
+ def to_s
219
+ to_hash.to_s
220
+ end
221
+
222
+ # to_body is an alias to to_hash (backward compatibility)
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_body
225
+ to_hash
226
+ end
227
+
228
+ # Returns the object in the form of hash
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_hash
231
+ hash = {}
232
+ self.class.attribute_map.each_pair do |attr, param|
233
+ value = self.send(attr)
234
+ if value.nil?
235
+ is_nullable = self.class.openapi_nullable.include?(attr)
236
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
237
+ end
238
+
239
+ hash[param] = _to_hash(value)
240
+ end
241
+ hash
242
+ end
243
+
244
+ # Outputs non-array value in the form of hash
245
+ # For object, use to_hash. Otherwise, just return the value
246
+ # @param [Object] value Any valid value
247
+ # @return [Hash] Returns the value in the form of hash
248
+ def _to_hash(value)
249
+ if value.is_a?(Array)
250
+ value.compact.map { |v| _to_hash(v) }
251
+ elsif value.is_a?(Hash)
252
+ {}.tap do |hash|
253
+ value.each { |k, v| hash[k] = _to_hash(v) }
254
+ end
255
+ elsif value.respond_to? :to_hash
256
+ value.to_hash
257
+ else
258
+ value
259
+ end
260
+ end
261
+ end
262
+ end
@@ -0,0 +1,230 @@
1
+ =begin
2
+ #ORY Hydra
3
+
4
+ #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
+
6
+ The version of the OpenAPI document: latest
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module OryHydraClient
16
+ # PluginConfigInterface The interface between Docker and the plugin
17
+ class PluginConfigInterface
18
+ # socket
19
+ attr_accessor :socket
20
+
21
+ # types
22
+ attr_accessor :types
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'socket' => :'Socket',
28
+ :'types' => :'Types'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'socket' => :'String',
36
+ :'types' => :'Array<PluginInterfaceType>'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginConfigInterface` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginConfigInterface`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'socket')
62
+ self.socket = attributes[:'socket']
63
+ end
64
+
65
+ if attributes.key?(:'types')
66
+ if (value = attributes[:'types']).is_a?(Array)
67
+ self.types = value
68
+ end
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ invalid_properties = Array.new
76
+ if @socket.nil?
77
+ invalid_properties.push('invalid value for "socket", socket cannot be nil.')
78
+ end
79
+
80
+ if @types.nil?
81
+ invalid_properties.push('invalid value for "types", types cannot be nil.')
82
+ end
83
+
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ return false if @socket.nil?
91
+ return false if @types.nil?
92
+ true
93
+ end
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param [Object] Object to be compared
97
+ def ==(o)
98
+ return true if self.equal?(o)
99
+ self.class == o.class &&
100
+ socket == o.socket &&
101
+ types == o.types
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [socket, types].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ new.build_from_hash(attributes)
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ self.class.openapi_types.each_pair do |key, type|
129
+ if type =~ /\AArray<(.*)>/i
130
+ # check to ensure the input is an array given that the attribute
131
+ # is documented as an array but the input is not
132
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
133
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
134
+ end
135
+ elsif !attributes[self.class.attribute_map[key]].nil?
136
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
137
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
138
+ end
139
+
140
+ self
141
+ end
142
+
143
+ # Deserializes the data based on type
144
+ # @param string type Data type
145
+ # @param string value Value to be deserialized
146
+ # @return [Object] Deserialized data
147
+ def _deserialize(type, value)
148
+ case type.to_sym
149
+ when :DateTime
150
+ DateTime.parse(value)
151
+ when :Date
152
+ Date.parse(value)
153
+ when :String
154
+ value.to_s
155
+ when :Integer
156
+ value.to_i
157
+ when :Float
158
+ value.to_f
159
+ when :Boolean
160
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
161
+ true
162
+ else
163
+ false
164
+ end
165
+ when :Object
166
+ # generic object (usually a Hash), return directly
167
+ value
168
+ when /\AArray<(?<inner_type>.+)>\z/
169
+ inner_type = Regexp.last_match[:inner_type]
170
+ value.map { |v| _deserialize(inner_type, v) }
171
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
172
+ k_type = Regexp.last_match[:k_type]
173
+ v_type = Regexp.last_match[:v_type]
174
+ {}.tap do |hash|
175
+ value.each do |k, v|
176
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
177
+ end
178
+ end
179
+ else # model
180
+ OryHydraClient.const_get(type).build_from_hash(value)
181
+ end
182
+ end
183
+
184
+ # Returns the string representation of the object
185
+ # @return [String] String presentation of the object
186
+ def to_s
187
+ to_hash.to_s
188
+ end
189
+
190
+ # to_body is an alias to to_hash (backward compatibility)
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_body
193
+ to_hash
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ if value.nil?
203
+ is_nullable = self.class.openapi_nullable.include?(attr)
204
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
+ end
206
+
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ # Outputs non-array value in the form of hash
213
+ # For object, use to_hash. Otherwise, just return the value
214
+ # @param [Object] value Any valid value
215
+ # @return [Hash] Returns the value in the form of hash
216
+ def _to_hash(value)
217
+ if value.is_a?(Array)
218
+ value.compact.map { |v| _to_hash(v) }
219
+ elsif value.is_a?(Hash)
220
+ {}.tap do |hash|
221
+ value.each { |k, v| hash[k] = _to_hash(v) }
222
+ end
223
+ elsif value.respond_to? :to_hash
224
+ value.to_hash
225
+ else
226
+ value
227
+ end
228
+ end
229
+ end
230
+ end