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.
- checksums.yaml +4 -4
- data/README.md +18 -4
- data/docs/AdminApi.md +1 -1
- data/docs/ConsentRequestSession.md +2 -2
- data/docs/ContainerWaitOKBodyError.md +17 -0
- data/docs/FlushInactiveOAuth2TokensRequest.md +1 -1
- data/docs/JSONWebKey.md +12 -12
- data/docs/OAuth2TokenIntrospection.md +1 -1
- data/docs/Oauth2TokenResponse.md +6 -6
- data/docs/OpenIDConnectContext.md +1 -1
- data/docs/PluginConfig.md +47 -0
- data/docs/PluginConfigArgs.md +23 -0
- data/docs/PluginConfigInterface.md +19 -0
- data/docs/PluginConfigLinux.md +21 -0
- data/docs/PluginConfigNetwork.md +17 -0
- data/docs/PluginConfigRootfs.md +19 -0
- data/docs/PluginConfigUser.md +19 -0
- data/docs/PluginDevice.md +23 -0
- data/docs/PluginEnv.md +23 -0
- data/docs/PluginInterfaceType.md +21 -0
- data/docs/PluginMount.md +29 -0
- data/docs/PluginSettings.md +23 -0
- data/docs/PreviousConsentSession.md +3 -3
- data/docs/RejectRequest.md +5 -5
- data/docs/VolumeUsageData.md +19 -0
- data/lib/ory-hydra-client.rb +14 -0
- data/lib/ory-hydra-client/api/admin_api.rb +2 -2
- data/lib/ory-hydra-client/models/consent_request_session.rb +4 -8
- data/lib/ory-hydra-client/models/container_wait_ok_body_error.rb +208 -0
- data/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +1 -2
- data/lib/ory-hydra-client/models/health_not_ready_status.rb +0 -1
- data/lib/ory-hydra-client/models/health_status.rb +0 -1
- data/lib/ory-hydra-client/models/json_web_key.rb +1 -13
- data/lib/ory-hydra-client/models/json_web_key_set.rb +1 -1
- data/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb +0 -1
- data/lib/ory-hydra-client/models/o_auth2_token_introspection.rb +2 -4
- data/lib/ory-hydra-client/models/oauth2_token_response.rb +0 -6
- data/lib/ory-hydra-client/models/open_id_connect_context.rb +2 -4
- data/lib/ory-hydra-client/models/plugin_config.rb +422 -0
- data/lib/ory-hydra-client/models/plugin_config_args.rb +262 -0
- data/lib/ory-hydra-client/models/plugin_config_interface.rb +230 -0
- data/lib/ory-hydra-client/models/plugin_config_linux.rb +247 -0
- data/lib/ory-hydra-client/models/plugin_config_network.rb +213 -0
- data/lib/ory-hydra-client/models/plugin_config_rootfs.rb +220 -0
- data/lib/ory-hydra-client/models/plugin_config_user.rb +218 -0
- data/lib/ory-hydra-client/models/plugin_device.rb +260 -0
- data/lib/ory-hydra-client/models/plugin_env.rb +260 -0
- data/lib/ory-hydra-client/models/plugin_interface_type.rb +243 -0
- data/lib/ory-hydra-client/models/plugin_mount.rb +307 -0
- data/lib/ory-hydra-client/models/plugin_settings.rb +265 -0
- data/lib/ory-hydra-client/models/previous_consent_session.rb +1 -4
- data/lib/ory-hydra-client/models/reject_request.rb +0 -5
- data/lib/ory-hydra-client/models/version.rb +0 -1
- data/lib/ory-hydra-client/models/volume_usage_data.rb +228 -0
- data/lib/ory-hydra-client/version.rb +1 -1
- data/spec/models/container_wait_ok_body_error_spec.rb +41 -0
- data/spec/models/plugin_config_args_spec.rb +59 -0
- data/spec/models/plugin_config_interface_spec.rb +47 -0
- data/spec/models/plugin_config_linux_spec.rb +53 -0
- data/spec/models/plugin_config_network_spec.rb +41 -0
- data/spec/models/plugin_config_rootfs_spec.rb +47 -0
- data/spec/models/plugin_config_spec.rb +131 -0
- data/spec/models/plugin_config_user_spec.rb +47 -0
- data/spec/models/plugin_device_spec.rb +59 -0
- data/spec/models/plugin_env_spec.rb +59 -0
- data/spec/models/plugin_interface_type_spec.rb +53 -0
- data/spec/models/plugin_mount_spec.rb +77 -0
- data/spec/models/plugin_settings_spec.rb +59 -0
- data/spec/models/volume_usage_data_spec.rb +47 -0
- metadata +77 -21
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OryHydraClient
|
16
|
-
#
|
16
|
+
# It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec.
|
17
17
|
class JSONWebKeySet
|
18
18
|
# The value of the \"keys\" parameter is an array of JWK values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired.
|
19
19
|
attr_accessor :keys
|
@@ -13,7 +13,6 @@ OpenAPI Generator version: 4.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OryHydraClient
|
16
|
-
# JSONWebKeySetGeneratorRequest json web key set generator request
|
17
16
|
class JsonWebKeySetGeneratorRequest
|
18
17
|
# The algorithm to be used for creating the key. Supports \"RS256\", \"ES512\", \"HS512\", and \"HS256\"
|
19
18
|
attr_accessor :alg
|
@@ -80,7 +80,7 @@ module OryHydraClient
|
|
80
80
|
:'aud' => :'Array<String>',
|
81
81
|
:'client_id' => :'String',
|
82
82
|
:'exp' => :'Integer',
|
83
|
-
:'ext' => :'
|
83
|
+
:'ext' => :'Object',
|
84
84
|
:'iat' => :'Integer',
|
85
85
|
:'iss' => :'String',
|
86
86
|
:'nbf' => :'Integer',
|
@@ -132,9 +132,7 @@ module OryHydraClient
|
|
132
132
|
end
|
133
133
|
|
134
134
|
if attributes.key?(:'ext')
|
135
|
-
|
136
|
-
self.ext = value
|
137
|
-
end
|
135
|
+
self.ext = attributes[:'ext']
|
138
136
|
end
|
139
137
|
|
140
138
|
if attributes.key?(:'iat')
|
@@ -15,22 +15,16 @@ require 'date'
|
|
15
15
|
module OryHydraClient
|
16
16
|
# The Access Token Response
|
17
17
|
class Oauth2TokenResponse
|
18
|
-
# access token
|
19
18
|
attr_accessor :access_token
|
20
19
|
|
21
|
-
# expires in
|
22
20
|
attr_accessor :expires_in
|
23
21
|
|
24
|
-
# id token
|
25
22
|
attr_accessor :id_token
|
26
23
|
|
27
|
-
# refresh token
|
28
24
|
attr_accessor :refresh_token
|
29
25
|
|
30
|
-
# scope
|
31
26
|
attr_accessor :scope
|
32
27
|
|
33
|
-
# token type
|
34
28
|
attr_accessor :token_type
|
35
29
|
|
36
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -45,7 +45,7 @@ module OryHydraClient
|
|
45
45
|
{
|
46
46
|
:'acr_values' => :'Array<String>',
|
47
47
|
:'display' => :'String',
|
48
|
-
:'id_token_hint_claims' => :'
|
48
|
+
:'id_token_hint_claims' => :'Object',
|
49
49
|
:'login_hint' => :'String',
|
50
50
|
:'ui_locales' => :'Array<String>'
|
51
51
|
}
|
@@ -83,9 +83,7 @@ module OryHydraClient
|
|
83
83
|
end
|
84
84
|
|
85
85
|
if attributes.key?(:'id_token_hint_claims')
|
86
|
-
|
87
|
-
self.id_token_hint_claims = value
|
88
|
-
end
|
86
|
+
self.id_token_hint_claims = attributes[:'id_token_hint_claims']
|
89
87
|
end
|
90
88
|
|
91
89
|
if attributes.key?(:'login_hint')
|
@@ -0,0 +1,422 @@
|
|
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
|
+
class PluginConfig
|
17
|
+
attr_accessor :args
|
18
|
+
|
19
|
+
# description
|
20
|
+
attr_accessor :description
|
21
|
+
|
22
|
+
# Docker Version used to create the plugin
|
23
|
+
attr_accessor :docker_version
|
24
|
+
|
25
|
+
# documentation
|
26
|
+
attr_accessor :documentation
|
27
|
+
|
28
|
+
# entrypoint
|
29
|
+
attr_accessor :entrypoint
|
30
|
+
|
31
|
+
# env
|
32
|
+
attr_accessor :env
|
33
|
+
|
34
|
+
attr_accessor :interface
|
35
|
+
|
36
|
+
# ipc host
|
37
|
+
attr_accessor :ipc_host
|
38
|
+
|
39
|
+
attr_accessor :linux
|
40
|
+
|
41
|
+
# mounts
|
42
|
+
attr_accessor :mounts
|
43
|
+
|
44
|
+
attr_accessor :network
|
45
|
+
|
46
|
+
# pid host
|
47
|
+
attr_accessor :pid_host
|
48
|
+
|
49
|
+
# propagated mount
|
50
|
+
attr_accessor :propagated_mount
|
51
|
+
|
52
|
+
attr_accessor :user
|
53
|
+
|
54
|
+
# work dir
|
55
|
+
attr_accessor :work_dir
|
56
|
+
|
57
|
+
attr_accessor :rootfs
|
58
|
+
|
59
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
60
|
+
def self.attribute_map
|
61
|
+
{
|
62
|
+
:'args' => :'Args',
|
63
|
+
:'description' => :'Description',
|
64
|
+
:'docker_version' => :'DockerVersion',
|
65
|
+
:'documentation' => :'Documentation',
|
66
|
+
:'entrypoint' => :'Entrypoint',
|
67
|
+
:'env' => :'Env',
|
68
|
+
:'interface' => :'Interface',
|
69
|
+
:'ipc_host' => :'IpcHost',
|
70
|
+
:'linux' => :'Linux',
|
71
|
+
:'mounts' => :'Mounts',
|
72
|
+
:'network' => :'Network',
|
73
|
+
:'pid_host' => :'PidHost',
|
74
|
+
:'propagated_mount' => :'PropagatedMount',
|
75
|
+
:'user' => :'User',
|
76
|
+
:'work_dir' => :'WorkDir',
|
77
|
+
:'rootfs' => :'rootfs'
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
# Attribute type mapping.
|
82
|
+
def self.openapi_types
|
83
|
+
{
|
84
|
+
:'args' => :'PluginConfigArgs',
|
85
|
+
:'description' => :'String',
|
86
|
+
:'docker_version' => :'String',
|
87
|
+
:'documentation' => :'String',
|
88
|
+
:'entrypoint' => :'Array<String>',
|
89
|
+
:'env' => :'Array<PluginEnv>',
|
90
|
+
:'interface' => :'PluginConfigInterface',
|
91
|
+
:'ipc_host' => :'Boolean',
|
92
|
+
:'linux' => :'PluginConfigLinux',
|
93
|
+
:'mounts' => :'Array<PluginMount>',
|
94
|
+
:'network' => :'PluginConfigNetwork',
|
95
|
+
:'pid_host' => :'Boolean',
|
96
|
+
:'propagated_mount' => :'String',
|
97
|
+
:'user' => :'PluginConfigUser',
|
98
|
+
:'work_dir' => :'String',
|
99
|
+
:'rootfs' => :'PluginConfigRootfs'
|
100
|
+
}
|
101
|
+
end
|
102
|
+
|
103
|
+
# List of attributes with nullable: true
|
104
|
+
def self.openapi_nullable
|
105
|
+
Set.new([
|
106
|
+
])
|
107
|
+
end
|
108
|
+
|
109
|
+
# Initializes the object
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
def initialize(attributes = {})
|
112
|
+
if (!attributes.is_a?(Hash))
|
113
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginConfig` initialize method"
|
114
|
+
end
|
115
|
+
|
116
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
117
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
118
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
119
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
120
|
+
end
|
121
|
+
h[k.to_sym] = v
|
122
|
+
}
|
123
|
+
|
124
|
+
if attributes.key?(:'args')
|
125
|
+
self.args = attributes[:'args']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'description')
|
129
|
+
self.description = attributes[:'description']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'docker_version')
|
133
|
+
self.docker_version = attributes[:'docker_version']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'documentation')
|
137
|
+
self.documentation = attributes[:'documentation']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'entrypoint')
|
141
|
+
if (value = attributes[:'entrypoint']).is_a?(Array)
|
142
|
+
self.entrypoint = value
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.key?(:'env')
|
147
|
+
if (value = attributes[:'env']).is_a?(Array)
|
148
|
+
self.env = value
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.key?(:'interface')
|
153
|
+
self.interface = attributes[:'interface']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.key?(:'ipc_host')
|
157
|
+
self.ipc_host = attributes[:'ipc_host']
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.key?(:'linux')
|
161
|
+
self.linux = attributes[:'linux']
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.key?(:'mounts')
|
165
|
+
if (value = attributes[:'mounts']).is_a?(Array)
|
166
|
+
self.mounts = value
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.key?(:'network')
|
171
|
+
self.network = attributes[:'network']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.key?(:'pid_host')
|
175
|
+
self.pid_host = attributes[:'pid_host']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.key?(:'propagated_mount')
|
179
|
+
self.propagated_mount = attributes[:'propagated_mount']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.key?(:'user')
|
183
|
+
self.user = attributes[:'user']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.key?(:'work_dir')
|
187
|
+
self.work_dir = attributes[:'work_dir']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.key?(:'rootfs')
|
191
|
+
self.rootfs = attributes[:'rootfs']
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
196
|
+
# @return Array for valid properties with the reasons
|
197
|
+
def list_invalid_properties
|
198
|
+
invalid_properties = Array.new
|
199
|
+
if @args.nil?
|
200
|
+
invalid_properties.push('invalid value for "args", args cannot be nil.')
|
201
|
+
end
|
202
|
+
|
203
|
+
if @description.nil?
|
204
|
+
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
205
|
+
end
|
206
|
+
|
207
|
+
if @documentation.nil?
|
208
|
+
invalid_properties.push('invalid value for "documentation", documentation cannot be nil.')
|
209
|
+
end
|
210
|
+
|
211
|
+
if @entrypoint.nil?
|
212
|
+
invalid_properties.push('invalid value for "entrypoint", entrypoint cannot be nil.')
|
213
|
+
end
|
214
|
+
|
215
|
+
if @env.nil?
|
216
|
+
invalid_properties.push('invalid value for "env", env cannot be nil.')
|
217
|
+
end
|
218
|
+
|
219
|
+
if @interface.nil?
|
220
|
+
invalid_properties.push('invalid value for "interface", interface cannot be nil.')
|
221
|
+
end
|
222
|
+
|
223
|
+
if @ipc_host.nil?
|
224
|
+
invalid_properties.push('invalid value for "ipc_host", ipc_host cannot be nil.')
|
225
|
+
end
|
226
|
+
|
227
|
+
if @linux.nil?
|
228
|
+
invalid_properties.push('invalid value for "linux", linux cannot be nil.')
|
229
|
+
end
|
230
|
+
|
231
|
+
if @mounts.nil?
|
232
|
+
invalid_properties.push('invalid value for "mounts", mounts cannot be nil.')
|
233
|
+
end
|
234
|
+
|
235
|
+
if @network.nil?
|
236
|
+
invalid_properties.push('invalid value for "network", network cannot be nil.')
|
237
|
+
end
|
238
|
+
|
239
|
+
if @pid_host.nil?
|
240
|
+
invalid_properties.push('invalid value for "pid_host", pid_host cannot be nil.')
|
241
|
+
end
|
242
|
+
|
243
|
+
if @propagated_mount.nil?
|
244
|
+
invalid_properties.push('invalid value for "propagated_mount", propagated_mount cannot be nil.')
|
245
|
+
end
|
246
|
+
|
247
|
+
if @work_dir.nil?
|
248
|
+
invalid_properties.push('invalid value for "work_dir", work_dir cannot be nil.')
|
249
|
+
end
|
250
|
+
|
251
|
+
invalid_properties
|
252
|
+
end
|
253
|
+
|
254
|
+
# Check to see if the all the properties in the model are valid
|
255
|
+
# @return true if the model is valid
|
256
|
+
def valid?
|
257
|
+
return false if @args.nil?
|
258
|
+
return false if @description.nil?
|
259
|
+
return false if @documentation.nil?
|
260
|
+
return false if @entrypoint.nil?
|
261
|
+
return false if @env.nil?
|
262
|
+
return false if @interface.nil?
|
263
|
+
return false if @ipc_host.nil?
|
264
|
+
return false if @linux.nil?
|
265
|
+
return false if @mounts.nil?
|
266
|
+
return false if @network.nil?
|
267
|
+
return false if @pid_host.nil?
|
268
|
+
return false if @propagated_mount.nil?
|
269
|
+
return false if @work_dir.nil?
|
270
|
+
true
|
271
|
+
end
|
272
|
+
|
273
|
+
# Checks equality by comparing each attribute.
|
274
|
+
# @param [Object] Object to be compared
|
275
|
+
def ==(o)
|
276
|
+
return true if self.equal?(o)
|
277
|
+
self.class == o.class &&
|
278
|
+
args == o.args &&
|
279
|
+
description == o.description &&
|
280
|
+
docker_version == o.docker_version &&
|
281
|
+
documentation == o.documentation &&
|
282
|
+
entrypoint == o.entrypoint &&
|
283
|
+
env == o.env &&
|
284
|
+
interface == o.interface &&
|
285
|
+
ipc_host == o.ipc_host &&
|
286
|
+
linux == o.linux &&
|
287
|
+
mounts == o.mounts &&
|
288
|
+
network == o.network &&
|
289
|
+
pid_host == o.pid_host &&
|
290
|
+
propagated_mount == o.propagated_mount &&
|
291
|
+
user == o.user &&
|
292
|
+
work_dir == o.work_dir &&
|
293
|
+
rootfs == o.rootfs
|
294
|
+
end
|
295
|
+
|
296
|
+
# @see the `==` method
|
297
|
+
# @param [Object] Object to be compared
|
298
|
+
def eql?(o)
|
299
|
+
self == o
|
300
|
+
end
|
301
|
+
|
302
|
+
# Calculates hash code according to all attributes.
|
303
|
+
# @return [Integer] Hash code
|
304
|
+
def hash
|
305
|
+
[args, description, docker_version, documentation, entrypoint, env, interface, ipc_host, linux, mounts, network, pid_host, propagated_mount, user, work_dir, rootfs].hash
|
306
|
+
end
|
307
|
+
|
308
|
+
# Builds the object from hash
|
309
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
310
|
+
# @return [Object] Returns the model itself
|
311
|
+
def self.build_from_hash(attributes)
|
312
|
+
new.build_from_hash(attributes)
|
313
|
+
end
|
314
|
+
|
315
|
+
# Builds the object from hash
|
316
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
317
|
+
# @return [Object] Returns the model itself
|
318
|
+
def build_from_hash(attributes)
|
319
|
+
return nil unless attributes.is_a?(Hash)
|
320
|
+
self.class.openapi_types.each_pair do |key, type|
|
321
|
+
if type =~ /\AArray<(.*)>/i
|
322
|
+
# check to ensure the input is an array given that the attribute
|
323
|
+
# is documented as an array but the input is not
|
324
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
325
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
326
|
+
end
|
327
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
328
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
329
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
330
|
+
end
|
331
|
+
|
332
|
+
self
|
333
|
+
end
|
334
|
+
|
335
|
+
# Deserializes the data based on type
|
336
|
+
# @param string type Data type
|
337
|
+
# @param string value Value to be deserialized
|
338
|
+
# @return [Object] Deserialized data
|
339
|
+
def _deserialize(type, value)
|
340
|
+
case type.to_sym
|
341
|
+
when :DateTime
|
342
|
+
DateTime.parse(value)
|
343
|
+
when :Date
|
344
|
+
Date.parse(value)
|
345
|
+
when :String
|
346
|
+
value.to_s
|
347
|
+
when :Integer
|
348
|
+
value.to_i
|
349
|
+
when :Float
|
350
|
+
value.to_f
|
351
|
+
when :Boolean
|
352
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
353
|
+
true
|
354
|
+
else
|
355
|
+
false
|
356
|
+
end
|
357
|
+
when :Object
|
358
|
+
# generic object (usually a Hash), return directly
|
359
|
+
value
|
360
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
361
|
+
inner_type = Regexp.last_match[:inner_type]
|
362
|
+
value.map { |v| _deserialize(inner_type, v) }
|
363
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
364
|
+
k_type = Regexp.last_match[:k_type]
|
365
|
+
v_type = Regexp.last_match[:v_type]
|
366
|
+
{}.tap do |hash|
|
367
|
+
value.each do |k, v|
|
368
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
369
|
+
end
|
370
|
+
end
|
371
|
+
else # model
|
372
|
+
OryHydraClient.const_get(type).build_from_hash(value)
|
373
|
+
end
|
374
|
+
end
|
375
|
+
|
376
|
+
# Returns the string representation of the object
|
377
|
+
# @return [String] String presentation of the object
|
378
|
+
def to_s
|
379
|
+
to_hash.to_s
|
380
|
+
end
|
381
|
+
|
382
|
+
# to_body is an alias to to_hash (backward compatibility)
|
383
|
+
# @return [Hash] Returns the object in the form of hash
|
384
|
+
def to_body
|
385
|
+
to_hash
|
386
|
+
end
|
387
|
+
|
388
|
+
# Returns the object in the form of hash
|
389
|
+
# @return [Hash] Returns the object in the form of hash
|
390
|
+
def to_hash
|
391
|
+
hash = {}
|
392
|
+
self.class.attribute_map.each_pair do |attr, param|
|
393
|
+
value = self.send(attr)
|
394
|
+
if value.nil?
|
395
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
396
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
397
|
+
end
|
398
|
+
|
399
|
+
hash[param] = _to_hash(value)
|
400
|
+
end
|
401
|
+
hash
|
402
|
+
end
|
403
|
+
|
404
|
+
# Outputs non-array value in the form of hash
|
405
|
+
# For object, use to_hash. Otherwise, just return the value
|
406
|
+
# @param [Object] value Any valid value
|
407
|
+
# @return [Hash] Returns the value in the form of hash
|
408
|
+
def _to_hash(value)
|
409
|
+
if value.is_a?(Array)
|
410
|
+
value.compact.map { |v| _to_hash(v) }
|
411
|
+
elsif value.is_a?(Hash)
|
412
|
+
{}.tap do |hash|
|
413
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
414
|
+
end
|
415
|
+
elsif value.respond_to? :to_hash
|
416
|
+
value.to_hash
|
417
|
+
else
|
418
|
+
value
|
419
|
+
end
|
420
|
+
end
|
421
|
+
end
|
422
|
+
end
|