ory-hydra-client 1.9.0.alpha2 → 1.10.2

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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -5
  3. data/docs/AcceptConsentRequest.md +18 -17
  4. data/docs/AcceptLoginRequest.md +18 -17
  5. data/docs/AdminApi.md +883 -304
  6. data/docs/CompletedRequest.md +8 -7
  7. data/docs/ConsentRequest.md +30 -29
  8. data/docs/ConsentRequestSession.md +10 -9
  9. data/docs/ContainerWaitOKBodyError.md +8 -7
  10. data/docs/FlushInactiveOAuth2TokensRequest.md +8 -7
  11. data/docs/GenericError.md +14 -13
  12. data/docs/HealthNotReadyStatus.md +8 -7
  13. data/docs/HealthStatus.md +8 -7
  14. data/docs/JSONWebKey.md +40 -39
  15. data/docs/JSONWebKeySet.md +8 -7
  16. data/docs/JsonWebKeySetGeneratorRequest.md +12 -11
  17. data/docs/LoginRequest.md +24 -23
  18. data/docs/LogoutRequest.md +16 -13
  19. data/docs/OAuth2Client.md +72 -71
  20. data/docs/OAuth2TokenIntrospection.md +34 -31
  21. data/docs/Oauth2TokenResponse.md +18 -17
  22. data/docs/OpenIDConnectContext.md +16 -15
  23. data/docs/PatchDocument.md +24 -0
  24. data/docs/PluginConfig.md +38 -37
  25. data/docs/PluginConfigArgs.md +14 -13
  26. data/docs/PluginConfigInterface.md +10 -9
  27. data/docs/PluginConfigLinux.md +12 -11
  28. data/docs/PluginConfigNetwork.md +8 -7
  29. data/docs/PluginConfigRootfs.md +10 -9
  30. data/docs/PluginConfigUser.md +10 -9
  31. data/docs/PluginDevice.md +14 -13
  32. data/docs/PluginEnv.md +14 -13
  33. data/docs/PluginInterfaceType.md +12 -11
  34. data/docs/PluginMount.md +20 -19
  35. data/docs/PluginSettings.md +14 -13
  36. data/docs/PreviousConsentSession.md +20 -19
  37. data/docs/PublicApi.md +201 -60
  38. data/docs/RejectRequest.md +16 -15
  39. data/docs/RequestWasHandledResponse.md +18 -0
  40. data/docs/UserinfoResponse.md +44 -43
  41. data/docs/Version.md +8 -7
  42. data/docs/Volume.md +34 -0
  43. data/docs/VolumeUsageData.md +10 -9
  44. data/docs/WellKnown.md +58 -55
  45. data/lib/ory-hydra-client.rb +5 -2
  46. data/lib/ory-hydra-client/api/admin_api.rb +197 -96
  47. data/lib/ory-hydra-client/api/public_api.rb +34 -26
  48. data/lib/ory-hydra-client/api_client.rb +51 -49
  49. data/lib/ory-hydra-client/api_error.rb +2 -2
  50. data/lib/ory-hydra-client/configuration.rb +40 -11
  51. data/lib/ory-hydra-client/models/accept_consent_request.rb +21 -9
  52. data/lib/ory-hydra-client/models/accept_login_request.rb +20 -8
  53. data/lib/ory-hydra-client/models/completed_request.rb +20 -8
  54. data/lib/ory-hydra-client/models/consent_request.rb +20 -8
  55. data/lib/ory-hydra-client/models/consent_request_session.rb +20 -8
  56. data/lib/ory-hydra-client/models/container_wait_ok_body_error.rb +20 -8
  57. data/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +21 -9
  58. data/lib/ory-hydra-client/models/generic_error.rb +20 -8
  59. data/lib/ory-hydra-client/models/health_not_ready_status.rb +20 -8
  60. data/lib/ory-hydra-client/models/health_status.rb +20 -8
  61. data/lib/ory-hydra-client/models/json_web_key.rb +20 -8
  62. data/lib/ory-hydra-client/models/json_web_key_set.rb +20 -8
  63. data/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb +20 -8
  64. data/lib/ory-hydra-client/models/login_request.rb +20 -8
  65. data/lib/ory-hydra-client/models/logout_request.rb +31 -9
  66. data/lib/ory-hydra-client/models/o_auth2_client.rb +22 -10
  67. data/lib/ory-hydra-client/models/o_auth2_token_introspection.rb +32 -10
  68. data/lib/ory-hydra-client/models/oauth2_token_response.rb +20 -8
  69. data/lib/ory-hydra-client/models/open_id_connect_context.rb +20 -8
  70. data/lib/ory-hydra-client/models/patch_document.rb +260 -0
  71. data/lib/ory-hydra-client/models/plugin_config.rb +20 -8
  72. data/lib/ory-hydra-client/models/plugin_config_args.rb +20 -8
  73. data/lib/ory-hydra-client/models/plugin_config_interface.rb +20 -8
  74. data/lib/ory-hydra-client/models/plugin_config_linux.rb +20 -8
  75. data/lib/ory-hydra-client/models/plugin_config_network.rb +20 -8
  76. data/lib/ory-hydra-client/models/plugin_config_rootfs.rb +20 -8
  77. data/lib/ory-hydra-client/models/plugin_config_user.rb +20 -8
  78. data/lib/ory-hydra-client/models/plugin_device.rb +20 -8
  79. data/lib/ory-hydra-client/models/plugin_env.rb +20 -8
  80. data/lib/ory-hydra-client/models/plugin_interface_type.rb +20 -8
  81. data/lib/ory-hydra-client/models/plugin_mount.rb +20 -8
  82. data/lib/ory-hydra-client/models/plugin_settings.rb +20 -8
  83. data/lib/ory-hydra-client/models/previous_consent_session.rb +21 -9
  84. data/lib/ory-hydra-client/models/reject_request.rb +20 -8
  85. data/lib/ory-hydra-client/models/request_was_handled_response.rb +224 -0
  86. data/lib/ory-hydra-client/models/userinfo_response.rb +20 -8
  87. data/lib/ory-hydra-client/models/version.rb +20 -8
  88. data/lib/ory-hydra-client/models/volume.rb +333 -0
  89. data/lib/ory-hydra-client/models/volume_usage_data.rb +20 -8
  90. data/lib/ory-hydra-client/models/well_known.rb +33 -9
  91. data/lib/ory-hydra-client/version.rb +3 -3
  92. data/ory-hydra-client.gemspec +4 -5
  93. data/spec/api_client_spec.rb +3 -3
  94. data/spec/configuration_spec.rb +2 -2
  95. data/spec/models/patch_document_spec.rb +52 -0
  96. data/spec/models/request_was_handled_response_spec.rb +34 -0
  97. data/spec/models/volume_spec.rb +82 -0
  98. data/spec/spec_helper.rb +2 -2
  99. metadata +45 -53
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
5
 
6
- The version of the OpenAPI document: v1.9.0-alpha.2
6
+ The version of the OpenAPI document: v1.10.2
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.1.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  class JsonWebKeySetGeneratorRequest
@@ -32,6 +33,11 @@ module OryHydraClient
32
33
  }
33
34
  end
34
35
 
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
35
41
  # Attribute type mapping.
36
42
  def self.openapi_types
37
43
  {
@@ -138,7 +144,9 @@ module OryHydraClient
138
144
  def build_from_hash(attributes)
139
145
  return nil unless attributes.is_a?(Hash)
140
146
  self.class.openapi_types.each_pair do |key, type|
141
- if type =~ /\AArray<(.*)>/i
147
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
148
+ self.send("#{key}=", nil)
149
+ elsif type =~ /\AArray<(.*)>/i
142
150
  # check to ensure the input is an array given that the attribute
143
151
  # is documented as an array but the input is not
144
152
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -146,7 +154,7 @@ module OryHydraClient
146
154
  end
147
155
  elsif !attributes[self.class.attribute_map[key]].nil?
148
156
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
- end # or else data not found in attributes(hash), not an issue as the data can be optional
157
+ end
150
158
  end
151
159
 
152
160
  self
@@ -158,8 +166,8 @@ module OryHydraClient
158
166
  # @return [Object] Deserialized data
159
167
  def _deserialize(type, value)
160
168
  case type.to_sym
161
- when :DateTime
162
- DateTime.parse(value)
169
+ when :Time
170
+ Time.parse(value)
163
171
  when :Date
164
172
  Date.parse(value)
165
173
  when :String
@@ -189,7 +197,9 @@ module OryHydraClient
189
197
  end
190
198
  end
191
199
  else # model
192
- OryHydraClient.const_get(type).build_from_hash(value)
200
+ # models (e.g. Pet) or oneOf
201
+ klass = OryHydraClient.const_get(type)
202
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
193
203
  end
194
204
  end
195
205
 
@@ -215,7 +225,7 @@ module OryHydraClient
215
225
  is_nullable = self.class.openapi_nullable.include?(attr)
216
226
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
217
227
  end
218
-
228
+
219
229
  hash[param] = _to_hash(value)
220
230
  end
221
231
  hash
@@ -238,5 +248,7 @@ module OryHydraClient
238
248
  value
239
249
  end
240
250
  end
251
+
241
252
  end
253
+
242
254
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
5
 
6
- The version of the OpenAPI document: v1.9.0-alpha.2
6
+ The version of the OpenAPI document: v1.10.2
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.1.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  class LoginRequest
@@ -52,6 +53,11 @@ module OryHydraClient
52
53
  }
53
54
  end
54
55
 
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
55
61
  # Attribute type mapping.
56
62
  def self.openapi_types
57
63
  {
@@ -218,7 +224,9 @@ module OryHydraClient
218
224
  def build_from_hash(attributes)
219
225
  return nil unless attributes.is_a?(Hash)
220
226
  self.class.openapi_types.each_pair do |key, type|
221
- if type =~ /\AArray<(.*)>/i
227
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
228
+ self.send("#{key}=", nil)
229
+ elsif type =~ /\AArray<(.*)>/i
222
230
  # check to ensure the input is an array given that the attribute
223
231
  # is documented as an array but the input is not
224
232
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -226,7 +234,7 @@ module OryHydraClient
226
234
  end
227
235
  elsif !attributes[self.class.attribute_map[key]].nil?
228
236
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
229
- end # or else data not found in attributes(hash), not an issue as the data can be optional
237
+ end
230
238
  end
231
239
 
232
240
  self
@@ -238,8 +246,8 @@ module OryHydraClient
238
246
  # @return [Object] Deserialized data
239
247
  def _deserialize(type, value)
240
248
  case type.to_sym
241
- when :DateTime
242
- DateTime.parse(value)
249
+ when :Time
250
+ Time.parse(value)
243
251
  when :Date
244
252
  Date.parse(value)
245
253
  when :String
@@ -269,7 +277,9 @@ module OryHydraClient
269
277
  end
270
278
  end
271
279
  else # model
272
- OryHydraClient.const_get(type).build_from_hash(value)
280
+ # models (e.g. Pet) or oneOf
281
+ klass = OryHydraClient.const_get(type)
282
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
273
283
  end
274
284
  end
275
285
 
@@ -295,7 +305,7 @@ module OryHydraClient
295
305
  is_nullable = self.class.openapi_nullable.include?(attr)
296
306
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
297
307
  end
298
-
308
+
299
309
  hash[param] = _to_hash(value)
300
310
  end
301
311
  hash
@@ -318,5 +328,7 @@ module OryHydraClient
318
328
  value
319
329
  end
320
330
  end
331
+
321
332
  end
333
+
322
334
  end
@@ -3,17 +3,21 @@
3
3
 
4
4
  #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
5
 
6
- The version of the OpenAPI document: v1.9.0-alpha.2
6
+ The version of the OpenAPI document: v1.10.2
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.1.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  class LogoutRequest
18
+ # Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session.
19
+ attr_accessor :challenge
20
+
17
21
  # RequestURL is the original Logout URL requested.
18
22
  attr_accessor :request_url
19
23
 
@@ -29,6 +33,7 @@ module OryHydraClient
29
33
  # Attribute mapping from ruby-style variable name to JSON key.
30
34
  def self.attribute_map
31
35
  {
36
+ :'challenge' => :'challenge',
32
37
  :'request_url' => :'request_url',
33
38
  :'rp_initiated' => :'rp_initiated',
34
39
  :'sid' => :'sid',
@@ -36,9 +41,15 @@ module OryHydraClient
36
41
  }
37
42
  end
38
43
 
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
39
49
  # Attribute type mapping.
40
50
  def self.openapi_types
41
51
  {
52
+ :'challenge' => :'String',
42
53
  :'request_url' => :'String',
43
54
  :'rp_initiated' => :'Boolean',
44
55
  :'sid' => :'String',
@@ -67,6 +78,10 @@ module OryHydraClient
67
78
  h[k.to_sym] = v
68
79
  }
69
80
 
81
+ if attributes.key?(:'challenge')
82
+ self.challenge = attributes[:'challenge']
83
+ end
84
+
70
85
  if attributes.key?(:'request_url')
71
86
  self.request_url = attributes[:'request_url']
72
87
  end
@@ -102,6 +117,7 @@ module OryHydraClient
102
117
  def ==(o)
103
118
  return true if self.equal?(o)
104
119
  self.class == o.class &&
120
+ challenge == o.challenge &&
105
121
  request_url == o.request_url &&
106
122
  rp_initiated == o.rp_initiated &&
107
123
  sid == o.sid &&
@@ -117,7 +133,7 @@ module OryHydraClient
117
133
  # Calculates hash code according to all attributes.
118
134
  # @return [Integer] Hash code
119
135
  def hash
120
- [request_url, rp_initiated, sid, subject].hash
136
+ [challenge, request_url, rp_initiated, sid, subject].hash
121
137
  end
122
138
 
123
139
  # Builds the object from hash
@@ -133,7 +149,9 @@ module OryHydraClient
133
149
  def build_from_hash(attributes)
134
150
  return nil unless attributes.is_a?(Hash)
135
151
  self.class.openapi_types.each_pair do |key, type|
136
- if type =~ /\AArray<(.*)>/i
152
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
153
+ self.send("#{key}=", nil)
154
+ elsif type =~ /\AArray<(.*)>/i
137
155
  # check to ensure the input is an array given that the attribute
138
156
  # is documented as an array but the input is not
139
157
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -141,7 +159,7 @@ module OryHydraClient
141
159
  end
142
160
  elsif !attributes[self.class.attribute_map[key]].nil?
143
161
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
- end # or else data not found in attributes(hash), not an issue as the data can be optional
162
+ end
145
163
  end
146
164
 
147
165
  self
@@ -153,8 +171,8 @@ module OryHydraClient
153
171
  # @return [Object] Deserialized data
154
172
  def _deserialize(type, value)
155
173
  case type.to_sym
156
- when :DateTime
157
- DateTime.parse(value)
174
+ when :Time
175
+ Time.parse(value)
158
176
  when :Date
159
177
  Date.parse(value)
160
178
  when :String
@@ -184,7 +202,9 @@ module OryHydraClient
184
202
  end
185
203
  end
186
204
  else # model
187
- OryHydraClient.const_get(type).build_from_hash(value)
205
+ # models (e.g. Pet) or oneOf
206
+ klass = OryHydraClient.const_get(type)
207
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
208
  end
189
209
  end
190
210
 
@@ -210,7 +230,7 @@ module OryHydraClient
210
230
  is_nullable = self.class.openapi_nullable.include?(attr)
211
231
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
232
  end
213
-
233
+
214
234
  hash[param] = _to_hash(value)
215
235
  end
216
236
  hash
@@ -233,5 +253,7 @@ module OryHydraClient
233
253
  value
234
254
  end
235
255
  end
256
+
236
257
  end
258
+
237
259
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
5
 
6
- The version of the OpenAPI document: v1.9.0-alpha.2
6
+ The version of the OpenAPI document: v1.10.2
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.1.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  class OAuth2Client
@@ -142,6 +143,11 @@ module OryHydraClient
142
143
  }
143
144
  end
144
145
 
146
+ # Returns all the JSON keys this model knows about
147
+ def self.acceptable_attributes
148
+ attribute_map.values
149
+ end
150
+
145
151
  # Attribute type mapping.
146
152
  def self.openapi_types
147
153
  {
@@ -155,7 +161,7 @@ module OryHydraClient
155
161
  :'client_secret_expires_at' => :'Integer',
156
162
  :'client_uri' => :'String',
157
163
  :'contacts' => :'Array<String>',
158
- :'created_at' => :'DateTime',
164
+ :'created_at' => :'Time',
159
165
  :'frontchannel_logout_session_required' => :'Boolean',
160
166
  :'frontchannel_logout_uri' => :'String',
161
167
  :'grant_types' => :'Array<String>',
@@ -176,7 +182,7 @@ module OryHydraClient
176
182
  :'token_endpoint_auth_method' => :'String',
177
183
  :'token_endpoint_auth_signing_alg' => :'String',
178
184
  :'tos_uri' => :'String',
179
- :'updated_at' => :'DateTime',
185
+ :'updated_at' => :'Time',
180
186
  :'userinfo_signed_response_alg' => :'String'
181
187
  }
182
188
  end
@@ -446,7 +452,9 @@ module OryHydraClient
446
452
  def build_from_hash(attributes)
447
453
  return nil unless attributes.is_a?(Hash)
448
454
  self.class.openapi_types.each_pair do |key, type|
449
- if type =~ /\AArray<(.*)>/i
455
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
456
+ self.send("#{key}=", nil)
457
+ elsif type =~ /\AArray<(.*)>/i
450
458
  # check to ensure the input is an array given that the attribute
451
459
  # is documented as an array but the input is not
452
460
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -454,7 +462,7 @@ module OryHydraClient
454
462
  end
455
463
  elsif !attributes[self.class.attribute_map[key]].nil?
456
464
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
457
- end # or else data not found in attributes(hash), not an issue as the data can be optional
465
+ end
458
466
  end
459
467
 
460
468
  self
@@ -466,8 +474,8 @@ module OryHydraClient
466
474
  # @return [Object] Deserialized data
467
475
  def _deserialize(type, value)
468
476
  case type.to_sym
469
- when :DateTime
470
- DateTime.parse(value)
477
+ when :Time
478
+ Time.parse(value)
471
479
  when :Date
472
480
  Date.parse(value)
473
481
  when :String
@@ -497,7 +505,9 @@ module OryHydraClient
497
505
  end
498
506
  end
499
507
  else # model
500
- OryHydraClient.const_get(type).build_from_hash(value)
508
+ # models (e.g. Pet) or oneOf
509
+ klass = OryHydraClient.const_get(type)
510
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
501
511
  end
502
512
  end
503
513
 
@@ -523,7 +533,7 @@ module OryHydraClient
523
533
  is_nullable = self.class.openapi_nullable.include?(attr)
524
534
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
525
535
  end
526
-
536
+
527
537
  hash[param] = _to_hash(value)
528
538
  end
529
539
  hash
@@ -546,5 +556,7 @@ module OryHydraClient
546
556
  value
547
557
  end
548
558
  end
559
+
549
560
  end
561
+
550
562
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
5
 
6
- The version of the OpenAPI document: v1.9.0-alpha.2
6
+ The version of the OpenAPI document: v1.10.2
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.1.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  # https://tools.ietf.org/html/rfc7662
@@ -48,9 +49,12 @@ module OryHydraClient
48
49
  # Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token.
49
50
  attr_accessor :sub
50
51
 
51
- # TokenType is the introspected token's type, for example `access_token` or `refresh_token`.
52
+ # TokenType is the introspected token's type, typically `Bearer`.
52
53
  attr_accessor :token_type
53
54
 
55
+ # TokenUse is the introspected token's use, for example `access_token` or `refresh_token`.
56
+ attr_accessor :token_use
57
+
54
58
  # Username is a human-readable identifier for the resource owner who authorized this token.
55
59
  attr_accessor :username
56
60
 
@@ -69,10 +73,16 @@ module OryHydraClient
69
73
  :'scope' => :'scope',
70
74
  :'sub' => :'sub',
71
75
  :'token_type' => :'token_type',
76
+ :'token_use' => :'token_use',
72
77
  :'username' => :'username'
73
78
  }
74
79
  end
75
80
 
81
+ # Returns all the JSON keys this model knows about
82
+ def self.acceptable_attributes
83
+ attribute_map.values
84
+ end
85
+
76
86
  # Attribute type mapping.
77
87
  def self.openapi_types
78
88
  {
@@ -88,6 +98,7 @@ module OryHydraClient
88
98
  :'scope' => :'String',
89
99
  :'sub' => :'String',
90
100
  :'token_type' => :'String',
101
+ :'token_use' => :'String',
91
102
  :'username' => :'String'
92
103
  }
93
104
  end
@@ -163,6 +174,10 @@ module OryHydraClient
163
174
  self.token_type = attributes[:'token_type']
164
175
  end
165
176
 
177
+ if attributes.key?(:'token_use')
178
+ self.token_use = attributes[:'token_use']
179
+ end
180
+
166
181
  if attributes.key?(:'username')
167
182
  self.username = attributes[:'username']
168
183
  end
@@ -203,6 +218,7 @@ module OryHydraClient
203
218
  scope == o.scope &&
204
219
  sub == o.sub &&
205
220
  token_type == o.token_type &&
221
+ token_use == o.token_use &&
206
222
  username == o.username
207
223
  end
208
224
 
@@ -215,7 +231,7 @@ module OryHydraClient
215
231
  # Calculates hash code according to all attributes.
216
232
  # @return [Integer] Hash code
217
233
  def hash
218
- [active, aud, client_id, exp, ext, iat, iss, nbf, obfuscated_subject, scope, sub, token_type, username].hash
234
+ [active, aud, client_id, exp, ext, iat, iss, nbf, obfuscated_subject, scope, sub, token_type, token_use, username].hash
219
235
  end
220
236
 
221
237
  # Builds the object from hash
@@ -231,7 +247,9 @@ module OryHydraClient
231
247
  def build_from_hash(attributes)
232
248
  return nil unless attributes.is_a?(Hash)
233
249
  self.class.openapi_types.each_pair do |key, type|
234
- if type =~ /\AArray<(.*)>/i
250
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
251
+ self.send("#{key}=", nil)
252
+ elsif type =~ /\AArray<(.*)>/i
235
253
  # check to ensure the input is an array given that the attribute
236
254
  # is documented as an array but the input is not
237
255
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -239,7 +257,7 @@ module OryHydraClient
239
257
  end
240
258
  elsif !attributes[self.class.attribute_map[key]].nil?
241
259
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
242
- end # or else data not found in attributes(hash), not an issue as the data can be optional
260
+ end
243
261
  end
244
262
 
245
263
  self
@@ -251,8 +269,8 @@ module OryHydraClient
251
269
  # @return [Object] Deserialized data
252
270
  def _deserialize(type, value)
253
271
  case type.to_sym
254
- when :DateTime
255
- DateTime.parse(value)
272
+ when :Time
273
+ Time.parse(value)
256
274
  when :Date
257
275
  Date.parse(value)
258
276
  when :String
@@ -282,7 +300,9 @@ module OryHydraClient
282
300
  end
283
301
  end
284
302
  else # model
285
- OryHydraClient.const_get(type).build_from_hash(value)
303
+ # models (e.g. Pet) or oneOf
304
+ klass = OryHydraClient.const_get(type)
305
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
286
306
  end
287
307
  end
288
308
 
@@ -308,7 +328,7 @@ module OryHydraClient
308
328
  is_nullable = self.class.openapi_nullable.include?(attr)
309
329
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
310
330
  end
311
-
331
+
312
332
  hash[param] = _to_hash(value)
313
333
  end
314
334
  hash
@@ -331,5 +351,7 @@ module OryHydraClient
331
351
  value
332
352
  end
333
353
  end
354
+
334
355
  end
356
+
335
357
  end