ory-hydra-client 0.0.0.alpha62 → 0.0.0.alpha63

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