ory-hydra-client 0.0.0.alpha63 → 1.2.0.alpha2

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 (103) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +37 -45
  4. data/docs/AcceptConsentRequest.md +2 -4
  5. data/docs/AcceptLoginRequest.md +1 -1
  6. data/docs/AdminApi.md +70 -110
  7. data/docs/AttributeTypeAndValue.md +19 -0
  8. data/docs/Certificate.md +101 -0
  9. data/docs/CompletedRequest.md +1 -1
  10. data/docs/ConsentRequest.md +4 -4
  11. data/docs/ConsentRequestSession.md +2 -2
  12. data/docs/Extension.md +21 -0
  13. data/docs/IPNet.md +19 -0
  14. data/docs/JSONWebKey.md +12 -12
  15. data/docs/LoginRequest.md +7 -7
  16. data/docs/Name.md +27 -0
  17. data/docs/OAuth2Client.md +11 -13
  18. data/docs/OAuth2TokenIntrospection.md +3 -5
  19. data/docs/Oauth2TokenResponse.md +6 -6
  20. data/docs/OpenIDConnectContext.md +1 -1
  21. data/docs/PreviousConsentSession.md +2 -4
  22. data/docs/PublicApi.md +15 -15
  23. data/docs/RejectRequest.md +5 -5
  24. data/docs/URL.md +33 -0
  25. data/docs/WellKnown.md +1 -3
  26. data/lib/ory-hydra-client.rb +9 -16
  27. data/lib/ory-hydra-client/api/admin_api.rb +47 -113
  28. data/lib/ory-hydra-client/api/public_api.rb +12 -12
  29. data/lib/ory-hydra-client/api_client.rb +7 -9
  30. data/lib/ory-hydra-client/api_error.rb +2 -2
  31. data/lib/ory-hydra-client/configuration.rb +2 -2
  32. data/lib/ory-hydra-client/models/accept_consent_request.rb +5 -12
  33. data/lib/ory-hydra-client/models/accept_login_request.rb +7 -4
  34. data/lib/ory-hydra-client/models/{plugin_config_rootfs.rb → attribute_type_and_value.rb} +21 -22
  35. data/lib/ory-hydra-client/models/certificate.rb +683 -0
  36. data/lib/ory-hydra-client/models/completed_request.rb +2 -7
  37. data/lib/ory-hydra-client/models/consent_request.rb +10 -10
  38. data/lib/ory-hydra-client/models/consent_request_session.rb +10 -6
  39. data/lib/ory-hydra-client/models/{plugin_config_network.rb → extension.rb} +37 -19
  40. data/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +2 -2
  41. data/lib/ory-hydra-client/models/generic_error.rb +2 -2
  42. data/lib/ory-hydra-client/models/health_not_ready_status.rb +2 -2
  43. data/lib/ory-hydra-client/models/health_status.rb +2 -2
  44. data/lib/ory-hydra-client/models/{plugin_config_user.rb → ip_net.rb} +23 -21
  45. data/lib/ory-hydra-client/models/json_web_key.rb +15 -3
  46. data/lib/ory-hydra-client/models/json_web_key_set.rb +3 -3
  47. data/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb +3 -2
  48. data/lib/ory-hydra-client/models/login_request.rb +5 -38
  49. data/lib/ory-hydra-client/models/logout_request.rb +2 -2
  50. data/lib/ory-hydra-client/models/{plugin_settings.rb → name.rb} +61 -58
  51. data/lib/ory-hydra-client/models/o_auth2_client.rb +14 -15
  52. data/lib/ory-hydra-client/models/o_auth2_token_introspection.rb +9 -17
  53. data/lib/ory-hydra-client/models/oauth2_token_response.rb +8 -2
  54. data/lib/ory-hydra-client/models/oauth_token_response.rb +2 -2
  55. data/lib/ory-hydra-client/models/open_id_connect_context.rb +6 -4
  56. data/lib/ory-hydra-client/models/previous_consent_session.rb +6 -13
  57. data/lib/ory-hydra-client/models/reject_request.rb +7 -7
  58. data/lib/ory-hydra-client/models/{plugin_device.rb → url.rb} +77 -49
  59. data/lib/ory-hydra-client/models/userinfo_response.rb +3 -3
  60. data/lib/ory-hydra-client/models/version.rb +3 -2
  61. data/lib/ory-hydra-client/models/well_known.rb +3 -15
  62. data/lib/ory-hydra-client/version.rb +3 -3
  63. data/ory-hydra-client.gemspec +2 -2
  64. data/spec/models/{plugin_config_rootfs_spec.rb → attribute_type_and_value_spec.rb} +9 -9
  65. data/spec/models/certificate_spec.rb +293 -0
  66. data/spec/models/{plugin_interface_type_spec.rb → extension_spec.rb} +10 -10
  67. data/spec/models/{plugin_config_user_spec.rb → ip_net_spec.rb} +9 -9
  68. data/spec/models/{plugin_mount_spec.rb → name_spec.rb} +13 -19
  69. data/spec/models/url_spec.rb +89 -0
  70. metadata +43 -75
  71. data/docs/ContainerWaitOKBodyError.md +0 -17
  72. data/docs/PluginConfig.md +0 -47
  73. data/docs/PluginConfigArgs.md +0 -23
  74. data/docs/PluginConfigInterface.md +0 -19
  75. data/docs/PluginConfigLinux.md +0 -21
  76. data/docs/PluginConfigNetwork.md +0 -17
  77. data/docs/PluginConfigRootfs.md +0 -19
  78. data/docs/PluginConfigUser.md +0 -19
  79. data/docs/PluginDevice.md +0 -23
  80. data/docs/PluginEnv.md +0 -23
  81. data/docs/PluginInterfaceType.md +0 -21
  82. data/docs/PluginMount.md +0 -29
  83. data/docs/PluginSettings.md +0 -23
  84. data/docs/VolumeUsageData.md +0 -19
  85. data/lib/ory-hydra-client/models/container_wait_ok_body_error.rb +0 -208
  86. data/lib/ory-hydra-client/models/plugin_config.rb +0 -422
  87. data/lib/ory-hydra-client/models/plugin_config_args.rb +0 -262
  88. data/lib/ory-hydra-client/models/plugin_config_interface.rb +0 -230
  89. data/lib/ory-hydra-client/models/plugin_config_linux.rb +0 -247
  90. data/lib/ory-hydra-client/models/plugin_env.rb +0 -260
  91. data/lib/ory-hydra-client/models/plugin_interface_type.rb +0 -243
  92. data/lib/ory-hydra-client/models/plugin_mount.rb +0 -307
  93. data/lib/ory-hydra-client/models/volume_usage_data.rb +0 -228
  94. data/spec/models/container_wait_ok_body_error_spec.rb +0 -41
  95. data/spec/models/plugin_config_args_spec.rb +0 -59
  96. data/spec/models/plugin_config_interface_spec.rb +0 -47
  97. data/spec/models/plugin_config_linux_spec.rb +0 -53
  98. data/spec/models/plugin_config_network_spec.rb +0 -41
  99. data/spec/models/plugin_config_spec.rb +0 -131
  100. data/spec/models/plugin_device_spec.rb +0 -59
  101. data/spec/models/plugin_env_spec.rb +0 -59
  102. data/spec/models/plugin_settings_spec.rb +0 -59
  103. data/spec/models/volume_usage_data_spec.rb +0 -47
@@ -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: v0.0.0-alpha.63
6
+ The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 4.2.2
10
10
 
11
11
  =end
12
12
 
@@ -19,7 +19,7 @@ module OryHydraClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # OpenID Connect Front-Backchannel Enabled Logout
22
+ # OpenID Connect Front-Backchannel enabled Logout
23
23
  # This endpoint initiates and completes user logout at ORY Hydra and initiates OpenID Connect Front-/Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @return [nil]
@@ -28,7 +28,7 @@ module OryHydraClient
28
28
  nil
29
29
  end
30
30
 
31
- # OpenID Connect Front-Backchannel Enabled Logout
31
+ # OpenID Connect Front-Backchannel enabled Logout
32
32
  # This endpoint initiates and completes user logout at ORY Hydra and initiates OpenID Connect Front-/Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html
33
33
  # @param [Hash] opts the optional parameters
34
34
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -129,7 +129,7 @@ module OryHydraClient
129
129
  return data, status_code, headers
130
130
  end
131
131
 
132
- # Check Readiness Status
132
+ # Check readiness status
133
133
  # This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
134
134
  # @param [Hash] opts the optional parameters
135
135
  # @return [HealthStatus]
@@ -138,7 +138,7 @@ module OryHydraClient
138
138
  data
139
139
  end
140
140
 
141
- # Check Readiness Status
141
+ # Check readiness status
142
142
  # This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the &#x60;X-Forwarded-Proto&#x60; header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
143
143
  # @param [Hash] opts the optional parameters
144
144
  # @return [Array<(HealthStatus, Integer, Hash)>] HealthStatus data, response status code and response headers
@@ -185,7 +185,7 @@ module OryHydraClient
185
185
  return data, status_code, headers
186
186
  end
187
187
 
188
- # The OAuth 2.0 Token Endpoint
188
+ # The OAuth 2.0 token endpoint
189
189
  # The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above!
190
190
  # @param grant_type [String]
191
191
  # @param [Hash] opts the optional parameters
@@ -199,7 +199,7 @@ module OryHydraClient
199
199
  data
200
200
  end
201
201
 
202
- # The OAuth 2.0 Token Endpoint
202
+ # The OAuth 2.0 token endpoint
203
203
  # The client makes a request to the token endpoint by sending the following parameters using the \&quot;application/x-www-form-urlencoded\&quot; HTTP request entity-body. &gt; Do not implement a client for this endpoint yourself. Use a library. There are many libraries &gt; available for any programming language. You can find a list of libraries here: https://oauth.net/code/ &gt; &gt; Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above!
204
204
  # @param grant_type [String]
205
205
  # @param [Hash] opts the optional parameters
@@ -262,7 +262,7 @@ module OryHydraClient
262
262
  return data, status_code, headers
263
263
  end
264
264
 
265
- # The OAuth 2.0 Authorize Endpoint
265
+ # The OAuth 2.0 authorize endpoint
266
266
  # This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749
267
267
  # @param [Hash] opts the optional parameters
268
268
  # @return [nil]
@@ -271,7 +271,7 @@ module OryHydraClient
271
271
  nil
272
272
  end
273
273
 
274
- # The OAuth 2.0 Authorize Endpoint
274
+ # The OAuth 2.0 authorize endpoint
275
275
  # This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749
276
276
  # @param [Hash] opts the optional parameters
277
277
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -318,7 +318,7 @@ module OryHydraClient
318
318
  return data, status_code, headers
319
319
  end
320
320
 
321
- # Revoke OAuth2 Tokens
321
+ # Revoke OAuth2 tokens
322
322
  # Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for.
323
323
  # @param token [String]
324
324
  # @param [Hash] opts the optional parameters
@@ -328,7 +328,7 @@ module OryHydraClient
328
328
  nil
329
329
  end
330
330
 
331
- # Revoke OAuth2 Tokens
331
+ # Revoke OAuth2 tokens
332
332
  # Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for.
333
333
  # @param token [String]
334
334
  # @param [Hash] opts the optional parameters
@@ -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: v0.0.0-alpha.63
6
+ The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 4.2.2
10
10
 
11
11
  =end
12
12
 
@@ -269,13 +269,11 @@ module OryHydraClient
269
269
  tempfile.write(chunk)
270
270
  end
271
271
  request.on_complete do |response|
272
- if tempfile
273
- tempfile.close
274
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
275
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
276
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
277
- "explicitly with `tempfile.delete`"
278
- end
272
+ tempfile.close if tempfile
273
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
274
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
275
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
276
+ "explicitly with `tempfile.delete`"
279
277
  end
280
278
  end
281
279
 
@@ -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: v0.0.0-alpha.63
6
+ The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 4.2.2
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: v0.0.0-alpha.63
6
+ The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 4.2.2
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: v0.0.0-alpha.63
6
+ The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 4.2.2
10
10
 
11
11
  =end
12
12
 
@@ -14,12 +14,12 @@ require 'date'
14
14
 
15
15
  module OryHydraClient
16
16
  class AcceptConsentRequest
17
+ # GrantedAudience sets the audience the user authorized the client to use. Should be a subset of `requested_access_token_audience`.
17
18
  attr_accessor :grant_access_token_audience
18
19
 
20
+ # GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope`.
19
21
  attr_accessor :grant_scope
20
22
 
21
- attr_accessor :handled_at
22
-
23
23
  # Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.
24
24
  attr_accessor :remember
25
25
 
@@ -33,7 +33,6 @@ module OryHydraClient
33
33
  {
34
34
  :'grant_access_token_audience' => :'grant_access_token_audience',
35
35
  :'grant_scope' => :'grant_scope',
36
- :'handled_at' => :'handled_at',
37
36
  :'remember' => :'remember',
38
37
  :'remember_for' => :'remember_for',
39
38
  :'session' => :'session'
@@ -45,7 +44,6 @@ module OryHydraClient
45
44
  {
46
45
  :'grant_access_token_audience' => :'Array<String>',
47
46
  :'grant_scope' => :'Array<String>',
48
- :'handled_at' => :'DateTime',
49
47
  :'remember' => :'Boolean',
50
48
  :'remember_for' => :'Integer',
51
49
  :'session' => :'ConsentRequestSession'
@@ -85,10 +83,6 @@ module OryHydraClient
85
83
  end
86
84
  end
87
85
 
88
- if attributes.key?(:'handled_at')
89
- self.handled_at = attributes[:'handled_at']
90
- end
91
-
92
86
  if attributes.key?(:'remember')
93
87
  self.remember = attributes[:'remember']
94
88
  end
@@ -122,7 +116,6 @@ module OryHydraClient
122
116
  self.class == o.class &&
123
117
  grant_access_token_audience == o.grant_access_token_audience &&
124
118
  grant_scope == o.grant_scope &&
125
- handled_at == o.handled_at &&
126
119
  remember == o.remember &&
127
120
  remember_for == o.remember_for &&
128
121
  session == o.session
@@ -137,7 +130,7 @@ module OryHydraClient
137
130
  # Calculates hash code according to all attributes.
138
131
  # @return [Integer] Hash code
139
132
  def hash
140
- [grant_access_token_audience, grant_scope, handled_at, remember, remember_for, session].hash
133
+ [grant_access_token_audience, grant_scope, remember, remember_for, session].hash
141
134
  end
142
135
 
143
136
  # 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: v0.0.0-alpha.63
6
+ The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 4.2.2
10
10
 
11
11
  =end
12
12
 
@@ -17,6 +17,7 @@ module OryHydraClient
17
17
  # ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.
18
18
  attr_accessor :acr
19
19
 
20
+ # Context is an optional object which can hold arbitrary data. The data will be made available when fetching the consent request under the \"context\" field. This is useful in scenarios where login and consent endpoints share data.
20
21
  attr_accessor :context
21
22
 
22
23
  # ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail.
@@ -47,7 +48,7 @@ module OryHydraClient
47
48
  def self.openapi_types
48
49
  {
49
50
  :'acr' => :'String',
50
- :'context' => :'Object',
51
+ :'context' => :'Hash<String, Object>',
51
52
  :'force_subject_identifier' => :'String',
52
53
  :'remember' => :'Boolean',
53
54
  :'remember_for' => :'Integer',
@@ -81,7 +82,9 @@ module OryHydraClient
81
82
  end
82
83
 
83
84
  if attributes.key?(:'context')
84
- self.context = attributes[:'context']
85
+ if (value = attributes[:'context']).is_a?(Hash)
86
+ self.context = value
87
+ end
85
88
  end
86
89
 
87
90
  if attributes.key?(:'force_subject_identifier')
@@ -3,37 +3,36 @@
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: v0.0.0-alpha.63
6
+ The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 4.2.2
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module OryHydraClient
16
- # PluginConfigRootfs plugin config rootfs
17
- class PluginConfigRootfs
18
- # diff ids
19
- attr_accessor :diff_ids
20
-
21
- # type
16
+ # AttributeTypeAndValue AttributeTypeAndValue AttributeTypeAndValue AttributeTypeAndValue mirrors the ASN.1 structure of the same name in RFC 5280, Section 4.1.2.4.
17
+ class AttributeTypeAndValue
22
18
  attr_accessor :type
23
19
 
20
+ # value
21
+ attr_accessor :value
22
+
24
23
  # Attribute mapping from ruby-style variable name to JSON key.
25
24
  def self.attribute_map
26
25
  {
27
- :'diff_ids' => :'diff_ids',
28
- :'type' => :'type'
26
+ :'type' => :'Type',
27
+ :'value' => :'Value'
29
28
  }
30
29
  end
31
30
 
32
31
  # Attribute type mapping.
33
32
  def self.openapi_types
34
33
  {
35
- :'diff_ids' => :'Array<String>',
36
- :'type' => :'String'
34
+ :'type' => :'Array<Integer>',
35
+ :'value' => :'Object'
37
36
  }
38
37
  end
39
38
 
@@ -47,25 +46,25 @@ module OryHydraClient
47
46
  # @param [Hash] attributes Model attributes in the form of hash
48
47
  def initialize(attributes = {})
49
48
  if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginConfigRootfs` initialize method"
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::AttributeTypeAndValue` initialize method"
51
50
  end
52
51
 
53
52
  # check to see if the attribute exists and convert string to symbol for hash key
54
53
  attributes = attributes.each_with_object({}) { |(k, v), h|
55
54
  if (!self.class.attribute_map.key?(k.to_sym))
56
- fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginConfigRootfs`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::AttributeTypeAndValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
56
  end
58
57
  h[k.to_sym] = v
59
58
  }
60
59
 
61
- if attributes.key?(:'diff_ids')
62
- if (value = attributes[:'diff_ids']).is_a?(Array)
63
- self.diff_ids = value
60
+ if attributes.key?(:'type')
61
+ if (value = attributes[:'type']).is_a?(Array)
62
+ self.type = value
64
63
  end
65
64
  end
66
65
 
67
- if attributes.key?(:'type')
68
- self.type = attributes[:'type']
66
+ if attributes.key?(:'value')
67
+ self.value = attributes[:'value']
69
68
  end
70
69
  end
71
70
 
@@ -87,8 +86,8 @@ module OryHydraClient
87
86
  def ==(o)
88
87
  return true if self.equal?(o)
89
88
  self.class == o.class &&
90
- diff_ids == o.diff_ids &&
91
- type == o.type
89
+ type == o.type &&
90
+ value == o.value
92
91
  end
93
92
 
94
93
  # @see the `==` method
@@ -100,7 +99,7 @@ module OryHydraClient
100
99
  # Calculates hash code according to all attributes.
101
100
  # @return [Integer] Hash code
102
101
  def hash
103
- [diff_ids, type].hash
102
+ [type, value].hash
104
103
  end
105
104
 
106
105
  # Builds the object from hash
@@ -0,0 +1,683 @@
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.2
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module OryHydraClient
16
+ class Certificate
17
+ # authority key Id
18
+ attr_accessor :authority_key_id
19
+
20
+ # BasicConstraintsValid indicates whether IsCA, MaxPathLen, and MaxPathLenZero are valid.
21
+ attr_accessor :basic_constraints_valid
22
+
23
+ # CRL Distribution Points
24
+ attr_accessor :crl_distribution_points
25
+
26
+ # Subject Alternate Name values. (Note that these values may not be valid if invalid values were contained within a parsed certificate. For example, an element of DNSNames may not be a valid DNS domain name.)
27
+ attr_accessor :dns_names
28
+
29
+ # email addresses
30
+ attr_accessor :email_addresses
31
+
32
+ # excluded DNS domains
33
+ attr_accessor :excluded_dns_domains
34
+
35
+ # excluded email addresses
36
+ attr_accessor :excluded_email_addresses
37
+
38
+ # excluded IP ranges
39
+ attr_accessor :excluded_ip_ranges
40
+
41
+ # excluded URI domains
42
+ attr_accessor :excluded_uri_domains
43
+
44
+ # ext key usage
45
+ attr_accessor :ext_key_usage
46
+
47
+ # Extensions contains raw X.509 extensions. When parsing certificates, this can be used to extract non-critical extensions that are not parsed by this package. When marshaling certificates, the Extensions field is ignored, see ExtraExtensions.
48
+ attr_accessor :extensions
49
+
50
+ # ExtraExtensions contains extensions to be copied, raw, into any marshaled certificates. Values override any extensions that would otherwise be produced based on the other fields. The ExtraExtensions field is not populated when parsing certificates, see Extensions.
51
+ attr_accessor :extra_extensions
52
+
53
+ # IP addresses
54
+ attr_accessor :ip_addresses
55
+
56
+ # is c a
57
+ attr_accessor :is_ca
58
+
59
+ attr_accessor :issuer
60
+
61
+ # issuing certificate URL
62
+ attr_accessor :issuing_certificate_url
63
+
64
+ # KeyUsage KeyUsage KeyUsage KeyUsage represents the set of actions that are valid for a given key. It's a bitmap of the KeyUsage* constants.
65
+ attr_accessor :key_usage
66
+
67
+ # MaxPathLen and MaxPathLenZero indicate the presence and value of the BasicConstraints' \"pathLenConstraint\". When parsing a certificate, a positive non-zero MaxPathLen means that the field was specified, -1 means it was unset, and MaxPathLenZero being true mean that the field was explicitly set to zero. The case of MaxPathLen==0 with MaxPathLenZero==false should be treated equivalent to -1 (unset). When generating a certificate, an unset pathLenConstraint can be requested with either MaxPathLen == -1 or using the zero value for both MaxPathLen and MaxPathLenZero.
68
+ attr_accessor :max_path_len
69
+
70
+ # MaxPathLenZero indicates that BasicConstraintsValid==true and MaxPathLen==0 should be interpreted as an actual maximum path length of zero. Otherwise, that combination is interpreted as MaxPathLen not being set.
71
+ attr_accessor :max_path_len_zero
72
+
73
+ # not before Format: date-time Format: date-time Format: date-time
74
+ attr_accessor :not_before
75
+
76
+ # RFC 5280, 4.2.2.1 (Authority Information Access)
77
+ attr_accessor :ocsp_server
78
+
79
+ # permitted DNS domains
80
+ attr_accessor :permitted_dns_domains
81
+
82
+ # Name constraints
83
+ attr_accessor :permitted_dns_domains_critical
84
+
85
+ # permitted email addresses
86
+ attr_accessor :permitted_email_addresses
87
+
88
+ # permitted IP ranges
89
+ attr_accessor :permitted_ip_ranges
90
+
91
+ # permitted URI domains
92
+ attr_accessor :permitted_uri_domains
93
+
94
+ # policy identifiers
95
+ attr_accessor :policy_identifiers
96
+
97
+ # public key
98
+ attr_accessor :public_key
99
+
100
+ # PublicKeyAlgorithm PublicKeyAlgorithm PublicKeyAlgorithm public key algorithm
101
+ attr_accessor :public_key_algorithm
102
+
103
+ # raw
104
+ attr_accessor :raw
105
+
106
+ # raw issuer
107
+ attr_accessor :raw_issuer
108
+
109
+ # raw subject
110
+ attr_accessor :raw_subject
111
+
112
+ # raw subject public key info
113
+ attr_accessor :raw_subject_public_key_info
114
+
115
+ # raw t b s certificate
116
+ attr_accessor :raw_tbs_certificate
117
+
118
+ # Operations always take pointer arguments (*Int) rather than Int values, and each unique Int value requires its own unique *Int pointer. To \"copy\" an Int value, an existing (or newly allocated) Int must be set to a new value using the Int.Set method; shallow copies of Ints are not supported and may lead to errors.
119
+ attr_accessor :serial_number
120
+
121
+ # signature
122
+ attr_accessor :signature
123
+
124
+ # SignatureAlgorithm SignatureAlgorithm SignatureAlgorithm signature algorithm
125
+ attr_accessor :signature_algorithm
126
+
127
+ attr_accessor :subject
128
+
129
+ # subject key Id
130
+ attr_accessor :subject_key_id
131
+
132
+ # u r is
133
+ attr_accessor :ur_is
134
+
135
+ # UnhandledCriticalExtensions contains a list of extension IDs that were not (fully) processed when parsing. Verify will fail if this slice is non-empty, unless verification is delegated to an OS library which understands all the critical extensions. Users can access these extensions using Extensions and can remove elements from this slice if they believe that they have been handled.
136
+ attr_accessor :unhandled_critical_extensions
137
+
138
+ # unknown ext key usage
139
+ attr_accessor :unknown_ext_key_usage
140
+
141
+ # version
142
+ attr_accessor :version
143
+
144
+ # Attribute mapping from ruby-style variable name to JSON key.
145
+ def self.attribute_map
146
+ {
147
+ :'authority_key_id' => :'AuthorityKeyId',
148
+ :'basic_constraints_valid' => :'BasicConstraintsValid',
149
+ :'crl_distribution_points' => :'CRLDistributionPoints',
150
+ :'dns_names' => :'DNSNames',
151
+ :'email_addresses' => :'EmailAddresses',
152
+ :'excluded_dns_domains' => :'ExcludedDNSDomains',
153
+ :'excluded_email_addresses' => :'ExcludedEmailAddresses',
154
+ :'excluded_ip_ranges' => :'ExcludedIPRanges',
155
+ :'excluded_uri_domains' => :'ExcludedURIDomains',
156
+ :'ext_key_usage' => :'ExtKeyUsage',
157
+ :'extensions' => :'Extensions',
158
+ :'extra_extensions' => :'ExtraExtensions',
159
+ :'ip_addresses' => :'IPAddresses',
160
+ :'is_ca' => :'IsCA',
161
+ :'issuer' => :'Issuer',
162
+ :'issuing_certificate_url' => :'IssuingCertificateURL',
163
+ :'key_usage' => :'KeyUsage',
164
+ :'max_path_len' => :'MaxPathLen',
165
+ :'max_path_len_zero' => :'MaxPathLenZero',
166
+ :'not_before' => :'NotBefore',
167
+ :'ocsp_server' => :'OCSPServer',
168
+ :'permitted_dns_domains' => :'PermittedDNSDomains',
169
+ :'permitted_dns_domains_critical' => :'PermittedDNSDomainsCritical',
170
+ :'permitted_email_addresses' => :'PermittedEmailAddresses',
171
+ :'permitted_ip_ranges' => :'PermittedIPRanges',
172
+ :'permitted_uri_domains' => :'PermittedURIDomains',
173
+ :'policy_identifiers' => :'PolicyIdentifiers',
174
+ :'public_key' => :'PublicKey',
175
+ :'public_key_algorithm' => :'PublicKeyAlgorithm',
176
+ :'raw' => :'Raw',
177
+ :'raw_issuer' => :'RawIssuer',
178
+ :'raw_subject' => :'RawSubject',
179
+ :'raw_subject_public_key_info' => :'RawSubjectPublicKeyInfo',
180
+ :'raw_tbs_certificate' => :'RawTBSCertificate',
181
+ :'serial_number' => :'SerialNumber',
182
+ :'signature' => :'Signature',
183
+ :'signature_algorithm' => :'SignatureAlgorithm',
184
+ :'subject' => :'Subject',
185
+ :'subject_key_id' => :'SubjectKeyId',
186
+ :'ur_is' => :'URIs',
187
+ :'unhandled_critical_extensions' => :'UnhandledCriticalExtensions',
188
+ :'unknown_ext_key_usage' => :'UnknownExtKeyUsage',
189
+ :'version' => :'Version'
190
+ }
191
+ end
192
+
193
+ # Attribute type mapping.
194
+ def self.openapi_types
195
+ {
196
+ :'authority_key_id' => :'Array<Integer>',
197
+ :'basic_constraints_valid' => :'Boolean',
198
+ :'crl_distribution_points' => :'Array<String>',
199
+ :'dns_names' => :'Array<String>',
200
+ :'email_addresses' => :'Array<String>',
201
+ :'excluded_dns_domains' => :'Array<String>',
202
+ :'excluded_email_addresses' => :'Array<String>',
203
+ :'excluded_ip_ranges' => :'Array<IPNet>',
204
+ :'excluded_uri_domains' => :'Array<String>',
205
+ :'ext_key_usage' => :'Array<Integer>',
206
+ :'extensions' => :'Array<Extension>',
207
+ :'extra_extensions' => :'Array<Extension>',
208
+ :'ip_addresses' => :'Array<Array>',
209
+ :'is_ca' => :'Boolean',
210
+ :'issuer' => :'Name',
211
+ :'issuing_certificate_url' => :'Array<String>',
212
+ :'key_usage' => :'Integer',
213
+ :'max_path_len' => :'Integer',
214
+ :'max_path_len_zero' => :'Boolean',
215
+ :'not_before' => :'DateTime',
216
+ :'ocsp_server' => :'Array<String>',
217
+ :'permitted_dns_domains' => :'Array<String>',
218
+ :'permitted_dns_domains_critical' => :'Boolean',
219
+ :'permitted_email_addresses' => :'Array<String>',
220
+ :'permitted_ip_ranges' => :'Array<IPNet>',
221
+ :'permitted_uri_domains' => :'Array<String>',
222
+ :'policy_identifiers' => :'Array<Array>',
223
+ :'public_key' => :'Object',
224
+ :'public_key_algorithm' => :'Integer',
225
+ :'raw' => :'Array<Integer>',
226
+ :'raw_issuer' => :'Array<Integer>',
227
+ :'raw_subject' => :'Array<Integer>',
228
+ :'raw_subject_public_key_info' => :'Array<Integer>',
229
+ :'raw_tbs_certificate' => :'Array<Integer>',
230
+ :'serial_number' => :'Object',
231
+ :'signature' => :'Array<Integer>',
232
+ :'signature_algorithm' => :'Integer',
233
+ :'subject' => :'Name',
234
+ :'subject_key_id' => :'Array<Integer>',
235
+ :'ur_is' => :'Array<URL>',
236
+ :'unhandled_critical_extensions' => :'Array<Array>',
237
+ :'unknown_ext_key_usage' => :'Array<Array>',
238
+ :'version' => :'Integer'
239
+ }
240
+ end
241
+
242
+ # List of attributes with nullable: true
243
+ def self.openapi_nullable
244
+ Set.new([
245
+ ])
246
+ end
247
+
248
+ # Initializes the object
249
+ # @param [Hash] attributes Model attributes in the form of hash
250
+ def initialize(attributes = {})
251
+ if (!attributes.is_a?(Hash))
252
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::Certificate` initialize method"
253
+ end
254
+
255
+ # check to see if the attribute exists and convert string to symbol for hash key
256
+ attributes = attributes.each_with_object({}) { |(k, v), h|
257
+ if (!self.class.attribute_map.key?(k.to_sym))
258
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::Certificate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
259
+ end
260
+ h[k.to_sym] = v
261
+ }
262
+
263
+ if attributes.key?(:'authority_key_id')
264
+ if (value = attributes[:'authority_key_id']).is_a?(Array)
265
+ self.authority_key_id = value
266
+ end
267
+ end
268
+
269
+ if attributes.key?(:'basic_constraints_valid')
270
+ self.basic_constraints_valid = attributes[:'basic_constraints_valid']
271
+ end
272
+
273
+ if attributes.key?(:'crl_distribution_points')
274
+ if (value = attributes[:'crl_distribution_points']).is_a?(Array)
275
+ self.crl_distribution_points = value
276
+ end
277
+ end
278
+
279
+ if attributes.key?(:'dns_names')
280
+ if (value = attributes[:'dns_names']).is_a?(Array)
281
+ self.dns_names = value
282
+ end
283
+ end
284
+
285
+ if attributes.key?(:'email_addresses')
286
+ if (value = attributes[:'email_addresses']).is_a?(Array)
287
+ self.email_addresses = value
288
+ end
289
+ end
290
+
291
+ if attributes.key?(:'excluded_dns_domains')
292
+ if (value = attributes[:'excluded_dns_domains']).is_a?(Array)
293
+ self.excluded_dns_domains = value
294
+ end
295
+ end
296
+
297
+ if attributes.key?(:'excluded_email_addresses')
298
+ if (value = attributes[:'excluded_email_addresses']).is_a?(Array)
299
+ self.excluded_email_addresses = value
300
+ end
301
+ end
302
+
303
+ if attributes.key?(:'excluded_ip_ranges')
304
+ if (value = attributes[:'excluded_ip_ranges']).is_a?(Array)
305
+ self.excluded_ip_ranges = value
306
+ end
307
+ end
308
+
309
+ if attributes.key?(:'excluded_uri_domains')
310
+ if (value = attributes[:'excluded_uri_domains']).is_a?(Array)
311
+ self.excluded_uri_domains = value
312
+ end
313
+ end
314
+
315
+ if attributes.key?(:'ext_key_usage')
316
+ if (value = attributes[:'ext_key_usage']).is_a?(Array)
317
+ self.ext_key_usage = value
318
+ end
319
+ end
320
+
321
+ if attributes.key?(:'extensions')
322
+ if (value = attributes[:'extensions']).is_a?(Array)
323
+ self.extensions = value
324
+ end
325
+ end
326
+
327
+ if attributes.key?(:'extra_extensions')
328
+ if (value = attributes[:'extra_extensions']).is_a?(Array)
329
+ self.extra_extensions = value
330
+ end
331
+ end
332
+
333
+ if attributes.key?(:'ip_addresses')
334
+ if (value = attributes[:'ip_addresses']).is_a?(Array)
335
+ self.ip_addresses = value
336
+ end
337
+ end
338
+
339
+ if attributes.key?(:'is_ca')
340
+ self.is_ca = attributes[:'is_ca']
341
+ end
342
+
343
+ if attributes.key?(:'issuer')
344
+ self.issuer = attributes[:'issuer']
345
+ end
346
+
347
+ if attributes.key?(:'issuing_certificate_url')
348
+ if (value = attributes[:'issuing_certificate_url']).is_a?(Array)
349
+ self.issuing_certificate_url = value
350
+ end
351
+ end
352
+
353
+ if attributes.key?(:'key_usage')
354
+ self.key_usage = attributes[:'key_usage']
355
+ end
356
+
357
+ if attributes.key?(:'max_path_len')
358
+ self.max_path_len = attributes[:'max_path_len']
359
+ end
360
+
361
+ if attributes.key?(:'max_path_len_zero')
362
+ self.max_path_len_zero = attributes[:'max_path_len_zero']
363
+ end
364
+
365
+ if attributes.key?(:'not_before')
366
+ self.not_before = attributes[:'not_before']
367
+ end
368
+
369
+ if attributes.key?(:'ocsp_server')
370
+ if (value = attributes[:'ocsp_server']).is_a?(Array)
371
+ self.ocsp_server = value
372
+ end
373
+ end
374
+
375
+ if attributes.key?(:'permitted_dns_domains')
376
+ if (value = attributes[:'permitted_dns_domains']).is_a?(Array)
377
+ self.permitted_dns_domains = value
378
+ end
379
+ end
380
+
381
+ if attributes.key?(:'permitted_dns_domains_critical')
382
+ self.permitted_dns_domains_critical = attributes[:'permitted_dns_domains_critical']
383
+ end
384
+
385
+ if attributes.key?(:'permitted_email_addresses')
386
+ if (value = attributes[:'permitted_email_addresses']).is_a?(Array)
387
+ self.permitted_email_addresses = value
388
+ end
389
+ end
390
+
391
+ if attributes.key?(:'permitted_ip_ranges')
392
+ if (value = attributes[:'permitted_ip_ranges']).is_a?(Array)
393
+ self.permitted_ip_ranges = value
394
+ end
395
+ end
396
+
397
+ if attributes.key?(:'permitted_uri_domains')
398
+ if (value = attributes[:'permitted_uri_domains']).is_a?(Array)
399
+ self.permitted_uri_domains = value
400
+ end
401
+ end
402
+
403
+ if attributes.key?(:'policy_identifiers')
404
+ if (value = attributes[:'policy_identifiers']).is_a?(Array)
405
+ self.policy_identifiers = value
406
+ end
407
+ end
408
+
409
+ if attributes.key?(:'public_key')
410
+ self.public_key = attributes[:'public_key']
411
+ end
412
+
413
+ if attributes.key?(:'public_key_algorithm')
414
+ self.public_key_algorithm = attributes[:'public_key_algorithm']
415
+ end
416
+
417
+ if attributes.key?(:'raw')
418
+ if (value = attributes[:'raw']).is_a?(Array)
419
+ self.raw = value
420
+ end
421
+ end
422
+
423
+ if attributes.key?(:'raw_issuer')
424
+ if (value = attributes[:'raw_issuer']).is_a?(Array)
425
+ self.raw_issuer = value
426
+ end
427
+ end
428
+
429
+ if attributes.key?(:'raw_subject')
430
+ if (value = attributes[:'raw_subject']).is_a?(Array)
431
+ self.raw_subject = value
432
+ end
433
+ end
434
+
435
+ if attributes.key?(:'raw_subject_public_key_info')
436
+ if (value = attributes[:'raw_subject_public_key_info']).is_a?(Array)
437
+ self.raw_subject_public_key_info = value
438
+ end
439
+ end
440
+
441
+ if attributes.key?(:'raw_tbs_certificate')
442
+ if (value = attributes[:'raw_tbs_certificate']).is_a?(Array)
443
+ self.raw_tbs_certificate = value
444
+ end
445
+ end
446
+
447
+ if attributes.key?(:'serial_number')
448
+ self.serial_number = attributes[:'serial_number']
449
+ end
450
+
451
+ if attributes.key?(:'signature')
452
+ if (value = attributes[:'signature']).is_a?(Array)
453
+ self.signature = value
454
+ end
455
+ end
456
+
457
+ if attributes.key?(:'signature_algorithm')
458
+ self.signature_algorithm = attributes[:'signature_algorithm']
459
+ end
460
+
461
+ if attributes.key?(:'subject')
462
+ self.subject = attributes[:'subject']
463
+ end
464
+
465
+ if attributes.key?(:'subject_key_id')
466
+ if (value = attributes[:'subject_key_id']).is_a?(Array)
467
+ self.subject_key_id = value
468
+ end
469
+ end
470
+
471
+ if attributes.key?(:'ur_is')
472
+ if (value = attributes[:'ur_is']).is_a?(Array)
473
+ self.ur_is = value
474
+ end
475
+ end
476
+
477
+ if attributes.key?(:'unhandled_critical_extensions')
478
+ if (value = attributes[:'unhandled_critical_extensions']).is_a?(Array)
479
+ self.unhandled_critical_extensions = value
480
+ end
481
+ end
482
+
483
+ if attributes.key?(:'unknown_ext_key_usage')
484
+ if (value = attributes[:'unknown_ext_key_usage']).is_a?(Array)
485
+ self.unknown_ext_key_usage = value
486
+ end
487
+ end
488
+
489
+ if attributes.key?(:'version')
490
+ self.version = attributes[:'version']
491
+ end
492
+ end
493
+
494
+ # Show invalid properties with the reasons. Usually used together with valid?
495
+ # @return Array for valid properties with the reasons
496
+ def list_invalid_properties
497
+ invalid_properties = Array.new
498
+ invalid_properties
499
+ end
500
+
501
+ # Check to see if the all the properties in the model are valid
502
+ # @return true if the model is valid
503
+ def valid?
504
+ true
505
+ end
506
+
507
+ # Checks equality by comparing each attribute.
508
+ # @param [Object] Object to be compared
509
+ def ==(o)
510
+ return true if self.equal?(o)
511
+ self.class == o.class &&
512
+ authority_key_id == o.authority_key_id &&
513
+ basic_constraints_valid == o.basic_constraints_valid &&
514
+ crl_distribution_points == o.crl_distribution_points &&
515
+ dns_names == o.dns_names &&
516
+ email_addresses == o.email_addresses &&
517
+ excluded_dns_domains == o.excluded_dns_domains &&
518
+ excluded_email_addresses == o.excluded_email_addresses &&
519
+ excluded_ip_ranges == o.excluded_ip_ranges &&
520
+ excluded_uri_domains == o.excluded_uri_domains &&
521
+ ext_key_usage == o.ext_key_usage &&
522
+ extensions == o.extensions &&
523
+ extra_extensions == o.extra_extensions &&
524
+ ip_addresses == o.ip_addresses &&
525
+ is_ca == o.is_ca &&
526
+ issuer == o.issuer &&
527
+ issuing_certificate_url == o.issuing_certificate_url &&
528
+ key_usage == o.key_usage &&
529
+ max_path_len == o.max_path_len &&
530
+ max_path_len_zero == o.max_path_len_zero &&
531
+ not_before == o.not_before &&
532
+ ocsp_server == o.ocsp_server &&
533
+ permitted_dns_domains == o.permitted_dns_domains &&
534
+ permitted_dns_domains_critical == o.permitted_dns_domains_critical &&
535
+ permitted_email_addresses == o.permitted_email_addresses &&
536
+ permitted_ip_ranges == o.permitted_ip_ranges &&
537
+ permitted_uri_domains == o.permitted_uri_domains &&
538
+ policy_identifiers == o.policy_identifiers &&
539
+ public_key == o.public_key &&
540
+ public_key_algorithm == o.public_key_algorithm &&
541
+ raw == o.raw &&
542
+ raw_issuer == o.raw_issuer &&
543
+ raw_subject == o.raw_subject &&
544
+ raw_subject_public_key_info == o.raw_subject_public_key_info &&
545
+ raw_tbs_certificate == o.raw_tbs_certificate &&
546
+ serial_number == o.serial_number &&
547
+ signature == o.signature &&
548
+ signature_algorithm == o.signature_algorithm &&
549
+ subject == o.subject &&
550
+ subject_key_id == o.subject_key_id &&
551
+ ur_is == o.ur_is &&
552
+ unhandled_critical_extensions == o.unhandled_critical_extensions &&
553
+ unknown_ext_key_usage == o.unknown_ext_key_usage &&
554
+ version == o.version
555
+ end
556
+
557
+ # @see the `==` method
558
+ # @param [Object] Object to be compared
559
+ def eql?(o)
560
+ self == o
561
+ end
562
+
563
+ # Calculates hash code according to all attributes.
564
+ # @return [Integer] Hash code
565
+ def hash
566
+ [authority_key_id, basic_constraints_valid, crl_distribution_points, dns_names, email_addresses, excluded_dns_domains, excluded_email_addresses, excluded_ip_ranges, excluded_uri_domains, ext_key_usage, extensions, extra_extensions, ip_addresses, is_ca, issuer, issuing_certificate_url, key_usage, max_path_len, max_path_len_zero, not_before, ocsp_server, permitted_dns_domains, permitted_dns_domains_critical, permitted_email_addresses, permitted_ip_ranges, permitted_uri_domains, policy_identifiers, public_key, public_key_algorithm, raw, raw_issuer, raw_subject, raw_subject_public_key_info, raw_tbs_certificate, serial_number, signature, signature_algorithm, subject, subject_key_id, ur_is, unhandled_critical_extensions, unknown_ext_key_usage, version].hash
567
+ end
568
+
569
+ # Builds the object from hash
570
+ # @param [Hash] attributes Model attributes in the form of hash
571
+ # @return [Object] Returns the model itself
572
+ def self.build_from_hash(attributes)
573
+ new.build_from_hash(attributes)
574
+ end
575
+
576
+ # Builds the object from hash
577
+ # @param [Hash] attributes Model attributes in the form of hash
578
+ # @return [Object] Returns the model itself
579
+ def build_from_hash(attributes)
580
+ return nil unless attributes.is_a?(Hash)
581
+ self.class.openapi_types.each_pair do |key, type|
582
+ if type =~ /\AArray<(.*)>/i
583
+ # check to ensure the input is an array given that the attribute
584
+ # is documented as an array but the input is not
585
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
586
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
587
+ end
588
+ elsif !attributes[self.class.attribute_map[key]].nil?
589
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
590
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
591
+ end
592
+
593
+ self
594
+ end
595
+
596
+ # Deserializes the data based on type
597
+ # @param string type Data type
598
+ # @param string value Value to be deserialized
599
+ # @return [Object] Deserialized data
600
+ def _deserialize(type, value)
601
+ case type.to_sym
602
+ when :DateTime
603
+ DateTime.parse(value)
604
+ when :Date
605
+ Date.parse(value)
606
+ when :String
607
+ value.to_s
608
+ when :Integer
609
+ value.to_i
610
+ when :Float
611
+ value.to_f
612
+ when :Boolean
613
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
614
+ true
615
+ else
616
+ false
617
+ end
618
+ when :Object
619
+ # generic object (usually a Hash), return directly
620
+ value
621
+ when /\AArray<(?<inner_type>.+)>\z/
622
+ inner_type = Regexp.last_match[:inner_type]
623
+ value.map { |v| _deserialize(inner_type, v) }
624
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
625
+ k_type = Regexp.last_match[:k_type]
626
+ v_type = Regexp.last_match[:v_type]
627
+ {}.tap do |hash|
628
+ value.each do |k, v|
629
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
630
+ end
631
+ end
632
+ else # model
633
+ OryHydraClient.const_get(type).build_from_hash(value)
634
+ end
635
+ end
636
+
637
+ # Returns the string representation of the object
638
+ # @return [String] String presentation of the object
639
+ def to_s
640
+ to_hash.to_s
641
+ end
642
+
643
+ # to_body is an alias to to_hash (backward compatibility)
644
+ # @return [Hash] Returns the object in the form of hash
645
+ def to_body
646
+ to_hash
647
+ end
648
+
649
+ # Returns the object in the form of hash
650
+ # @return [Hash] Returns the object in the form of hash
651
+ def to_hash
652
+ hash = {}
653
+ self.class.attribute_map.each_pair do |attr, param|
654
+ value = self.send(attr)
655
+ if value.nil?
656
+ is_nullable = self.class.openapi_nullable.include?(attr)
657
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
658
+ end
659
+
660
+ hash[param] = _to_hash(value)
661
+ end
662
+ hash
663
+ end
664
+
665
+ # Outputs non-array value in the form of hash
666
+ # For object, use to_hash. Otherwise, just return the value
667
+ # @param [Object] value Any valid value
668
+ # @return [Hash] Returns the value in the form of hash
669
+ def _to_hash(value)
670
+ if value.is_a?(Array)
671
+ value.compact.map { |v| _to_hash(v) }
672
+ elsif value.is_a?(Hash)
673
+ {}.tap do |hash|
674
+ value.each { |k, v| hash[k] = _to_hash(v) }
675
+ end
676
+ elsif value.respond_to? :to_hash
677
+ value.to_hash
678
+ else
679
+ value
680
+ end
681
+ end
682
+ end
683
+ end