ory-hydra-client 1.4.10 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +20 -6
  4. data/docs/AdminApi.md +4 -2
  5. data/docs/CompletedRequest.md +1 -1
  6. data/docs/ConsentRequest.md +1 -1
  7. data/docs/ConsentRequestSession.md +2 -2
  8. data/docs/ContainerWaitOKBodyError.md +17 -0
  9. data/docs/JSONWebKey.md +12 -12
  10. data/docs/LoginRequest.md +7 -7
  11. data/docs/OAuth2Client.md +3 -1
  12. data/docs/OAuth2TokenIntrospection.md +2 -2
  13. data/docs/Oauth2TokenResponse.md +6 -6
  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 +3 -3
  28. data/docs/RejectRequest.md +5 -5
  29. data/docs/VolumeUsageData.md +19 -0
  30. data/lib/ory-hydra-client.rb +16 -2
  31. data/lib/ory-hydra-client/api/admin_api.rb +7 -4
  32. data/lib/ory-hydra-client/api/public_api.rb +2 -2
  33. data/lib/ory-hydra-client/api_client.rb +9 -7
  34. data/lib/ory-hydra-client/api_error.rb +2 -2
  35. data/lib/ory-hydra-client/configuration.rb +2 -2
  36. data/lib/ory-hydra-client/models/accept_consent_request.rb +2 -2
  37. data/lib/ory-hydra-client/models/accept_login_request.rb +2 -2
  38. data/lib/ory-hydra-client/models/completed_request.rb +7 -2
  39. data/lib/ory-hydra-client/models/consent_request.rb +7 -2
  40. data/lib/ory-hydra-client/models/consent_request_session.rb +6 -10
  41. data/lib/ory-hydra-client/models/container_wait_ok_body_error.rb +208 -0
  42. data/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +2 -2
  43. data/lib/ory-hydra-client/models/generic_error.rb +2 -2
  44. data/lib/ory-hydra-client/models/health_not_ready_status.rb +2 -3
  45. data/lib/ory-hydra-client/models/health_status.rb +2 -2
  46. data/lib/ory-hydra-client/models/json_web_key.rb +3 -15
  47. data/lib/ory-hydra-client/models/json_web_key_set.rb +3 -3
  48. data/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb +2 -2
  49. data/lib/ory-hydra-client/models/login_request.rb +37 -2
  50. data/lib/ory-hydra-client/models/logout_request.rb +2 -2
  51. data/lib/ory-hydra-client/models/o_auth2_client.rb +14 -4
  52. data/lib/ory-hydra-client/models/o_auth2_token_introspection.rb +5 -7
  53. data/lib/ory-hydra-client/models/oauth2_token_response.rb +3 -9
  54. data/lib/ory-hydra-client/models/open_id_connect_context.rb +4 -6
  55. data/lib/ory-hydra-client/models/plugin_config.rb +422 -0
  56. data/lib/ory-hydra-client/models/plugin_config_args.rb +262 -0
  57. data/lib/ory-hydra-client/models/plugin_config_interface.rb +230 -0
  58. data/lib/ory-hydra-client/models/plugin_config_linux.rb +247 -0
  59. data/lib/ory-hydra-client/models/plugin_config_network.rb +213 -0
  60. data/lib/ory-hydra-client/models/plugin_config_rootfs.rb +220 -0
  61. data/lib/ory-hydra-client/models/plugin_config_user.rb +218 -0
  62. data/lib/ory-hydra-client/models/plugin_device.rb +260 -0
  63. data/lib/ory-hydra-client/models/plugin_env.rb +260 -0
  64. data/lib/ory-hydra-client/models/plugin_interface_type.rb +243 -0
  65. data/lib/ory-hydra-client/models/plugin_mount.rb +307 -0
  66. data/lib/ory-hydra-client/models/plugin_settings.rb +265 -0
  67. data/lib/ory-hydra-client/models/previous_consent_session.rb +3 -6
  68. data/lib/ory-hydra-client/models/reject_request.rb +7 -7
  69. data/lib/ory-hydra-client/models/userinfo_response.rb +3 -3
  70. data/lib/ory-hydra-client/models/version.rb +2 -3
  71. data/lib/ory-hydra-client/models/volume_usage_data.rb +228 -0
  72. data/lib/ory-hydra-client/models/well_known.rb +2 -2
  73. data/lib/ory-hydra-client/version.rb +3 -3
  74. data/ory-hydra-client.gemspec +2 -2
  75. data/spec/models/container_wait_ok_body_error_spec.rb +41 -0
  76. data/spec/models/plugin_config_args_spec.rb +59 -0
  77. data/spec/models/plugin_config_interface_spec.rb +47 -0
  78. data/spec/models/plugin_config_linux_spec.rb +53 -0
  79. data/spec/models/plugin_config_network_spec.rb +41 -0
  80. data/spec/models/plugin_config_rootfs_spec.rb +47 -0
  81. data/spec/models/plugin_config_spec.rb +131 -0
  82. data/spec/models/plugin_config_user_spec.rb +47 -0
  83. data/spec/models/plugin_device_spec.rb +59 -0
  84. data/spec/models/plugin_env_spec.rb +59 -0
  85. data/spec/models/plugin_interface_type_spec.rb +53 -0
  86. data/spec/models/plugin_mount_spec.rb +77 -0
  87. data/spec/models/plugin_settings_spec.rb +59 -0
  88. data/spec/models/volume_usage_data_spec.rb +47 -0
  89. metadata +74 -18
@@ -3,10 +3,10 @@
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: latest
6
+ The version of the OpenAPI document: v1.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
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: latest
6
+ The version of the OpenAPI document: v1.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -24,7 +24,7 @@ module OryHydraClient
24
24
  # RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.
25
25
  attr_accessor :backchannel_logout_uri
26
26
 
27
- # ClientID is the id for this client.
27
+ # ID is the id for this client.
28
28
  attr_accessor :client_id
29
29
 
30
30
  # Name is the human-readable string name of the client to be presented to the end-user during authorization.
@@ -91,6 +91,9 @@ module OryHydraClient
91
91
  # Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none.
92
92
  attr_accessor :token_endpoint_auth_method
93
93
 
94
+ # Requested Client Authentication signing algorithm for the Token Endpoint.
95
+ attr_accessor :token_endpoint_auth_signing_alg
96
+
94
97
  # TermsOfServiceURI is a URL string that points to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.
95
98
  attr_accessor :tos_uri
96
99
 
@@ -132,6 +135,7 @@ module OryHydraClient
132
135
  :'sector_identifier_uri' => :'sector_identifier_uri',
133
136
  :'subject_type' => :'subject_type',
134
137
  :'token_endpoint_auth_method' => :'token_endpoint_auth_method',
138
+ :'token_endpoint_auth_signing_alg' => :'token_endpoint_auth_signing_alg',
135
139
  :'tos_uri' => :'tos_uri',
136
140
  :'updated_at' => :'updated_at',
137
141
  :'userinfo_signed_response_alg' => :'userinfo_signed_response_alg'
@@ -170,6 +174,7 @@ module OryHydraClient
170
174
  :'sector_identifier_uri' => :'String',
171
175
  :'subject_type' => :'String',
172
176
  :'token_endpoint_auth_method' => :'String',
177
+ :'token_endpoint_auth_signing_alg' => :'String',
173
178
  :'tos_uri' => :'String',
174
179
  :'updated_at' => :'DateTime',
175
180
  :'userinfo_signed_response_alg' => :'String'
@@ -329,6 +334,10 @@ module OryHydraClient
329
334
  self.token_endpoint_auth_method = attributes[:'token_endpoint_auth_method']
330
335
  end
331
336
 
337
+ if attributes.key?(:'token_endpoint_auth_signing_alg')
338
+ self.token_endpoint_auth_signing_alg = attributes[:'token_endpoint_auth_signing_alg']
339
+ end
340
+
332
341
  if attributes.key?(:'tos_uri')
333
342
  self.tos_uri = attributes[:'tos_uri']
334
343
  end
@@ -406,6 +415,7 @@ module OryHydraClient
406
415
  sector_identifier_uri == o.sector_identifier_uri &&
407
416
  subject_type == o.subject_type &&
408
417
  token_endpoint_auth_method == o.token_endpoint_auth_method &&
418
+ token_endpoint_auth_signing_alg == o.token_endpoint_auth_signing_alg &&
409
419
  tos_uri == o.tos_uri &&
410
420
  updated_at == o.updated_at &&
411
421
  userinfo_signed_response_alg == o.userinfo_signed_response_alg
@@ -420,7 +430,7 @@ module OryHydraClient
420
430
  # Calculates hash code according to all attributes.
421
431
  # @return [Integer] Hash code
422
432
  def hash
423
- [allowed_cors_origins, audience, backchannel_logout_session_required, backchannel_logout_uri, client_id, client_name, client_secret, client_secret_expires_at, client_uri, contacts, created_at, frontchannel_logout_session_required, frontchannel_logout_uri, grant_types, jwks, jwks_uri, logo_uri, metadata, owner, policy_uri, post_logout_redirect_uris, redirect_uris, request_object_signing_alg, request_uris, response_types, scope, sector_identifier_uri, subject_type, token_endpoint_auth_method, tos_uri, updated_at, userinfo_signed_response_alg].hash
433
+ [allowed_cors_origins, audience, backchannel_logout_session_required, backchannel_logout_uri, client_id, client_name, client_secret, client_secret_expires_at, client_uri, contacts, created_at, frontchannel_logout_session_required, frontchannel_logout_uri, grant_types, jwks, jwks_uri, logo_uri, metadata, owner, policy_uri, post_logout_redirect_uris, redirect_uris, request_object_signing_alg, request_uris, response_types, scope, sector_identifier_uri, subject_type, token_endpoint_auth_method, token_endpoint_auth_signing_alg, tos_uri, updated_at, userinfo_signed_response_alg].hash
424
434
  end
425
435
 
426
436
  # Builds the object from hash
@@ -3,10 +3,10 @@
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: latest
6
+ The version of the OpenAPI document: v1.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -21,7 +21,7 @@ module OryHydraClient
21
21
  # Audience contains a list of the token's intended audiences.
22
22
  attr_accessor :aud
23
23
 
24
- # ClientID is aclient identifier for the OAuth 2.0 client that requested this token.
24
+ # ID is aclient identifier for the OAuth 2.0 client that requested this token.
25
25
  attr_accessor :client_id
26
26
 
27
27
  # Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire.
@@ -80,7 +80,7 @@ module OryHydraClient
80
80
  :'aud' => :'Array<String>',
81
81
  :'client_id' => :'String',
82
82
  :'exp' => :'Integer',
83
- :'ext' => :'Hash<String, Object>',
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
- if (value = attributes[:'ext']).is_a?(Hash)
136
- self.ext = value
137
- end
135
+ self.ext = attributes[:'ext']
138
136
  end
139
137
 
140
138
  if attributes.key?(:'iat')
@@ -3,34 +3,28 @@
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: latest
6
+ The version of the OpenAPI document: v1.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module OryHydraClient
16
- # Oauth2TokenResponse Oauth2TokenResponse The Access Token Response
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.
@@ -3,10 +3,10 @@
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: latest
6
+ The version of the OpenAPI document: v1.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -45,7 +45,7 @@ module OryHydraClient
45
45
  {
46
46
  :'acr_values' => :'Array<String>',
47
47
  :'display' => :'String',
48
- :'id_token_hint_claims' => :'Hash<String, Object>',
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
- if (value = attributes[:'id_token_hint_claims']).is_a?(Hash)
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: v1.7.0
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
+ 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