ory-oathkeeper-client 0.35.5.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +103 -0
  4. data/Rakefile +10 -0
  5. data/docs/ApiApi.md +195 -0
  6. data/docs/CreateRuleCreated.md +17 -0
  7. data/docs/CreateRuleForbidden.md +17 -0
  8. data/docs/CreateRuleForbiddenBody.md +27 -0
  9. data/docs/CreateRuleInternalServerError.md +17 -0
  10. data/docs/CreateRuleInternalServerErrorBody.md +27 -0
  11. data/docs/CreateRuleUnauthorized.md +17 -0
  12. data/docs/CreateRuleUnauthorizedBody.md +27 -0
  13. data/docs/DecisionsForbidden.md +17 -0
  14. data/docs/DecisionsForbiddenBody.md +27 -0
  15. data/docs/DecisionsInternalServerError.md +17 -0
  16. data/docs/DecisionsInternalServerErrorBody.md +27 -0
  17. data/docs/DecisionsNotFound.md +17 -0
  18. data/docs/DecisionsNotFoundBody.md +27 -0
  19. data/docs/DecisionsUnauthorized.md +17 -0
  20. data/docs/DecisionsUnauthorizedBody.md +27 -0
  21. data/docs/DeleteRuleForbidden.md +17 -0
  22. data/docs/DeleteRuleForbiddenBody.md +27 -0
  23. data/docs/DeleteRuleInternalServerError.md +17 -0
  24. data/docs/DeleteRuleInternalServerErrorBody.md +27 -0
  25. data/docs/DeleteRuleNotFound.md +17 -0
  26. data/docs/DeleteRuleNotFoundBody.md +27 -0
  27. data/docs/DeleteRuleUnauthorized.md +17 -0
  28. data/docs/DeleteRuleUnauthorizedBody.md +27 -0
  29. data/docs/GetRuleForbidden.md +17 -0
  30. data/docs/GetRuleForbiddenBody.md +27 -0
  31. data/docs/GetRuleInternalServerError.md +17 -0
  32. data/docs/GetRuleInternalServerErrorBody.md +27 -0
  33. data/docs/GetRuleNotFound.md +17 -0
  34. data/docs/GetRuleNotFoundBody.md +27 -0
  35. data/docs/GetRuleOK.md +17 -0
  36. data/docs/GetRuleUnauthorized.md +17 -0
  37. data/docs/GetRuleUnauthorizedBody.md +27 -0
  38. data/docs/GetWellKnownForbidden.md +17 -0
  39. data/docs/GetWellKnownForbiddenBody.md +27 -0
  40. data/docs/GetWellKnownJSONWebKeysInternalServerError.md +17 -0
  41. data/docs/GetWellKnownJSONWebKeysInternalServerErrorBody.md +27 -0
  42. data/docs/GetWellKnownJSONWebKeysOK.md +17 -0
  43. data/docs/GetWellKnownOK.md +17 -0
  44. data/docs/GetWellKnownUnauthorized.md +17 -0
  45. data/docs/GetWellKnownUnauthorizedBody.md +27 -0
  46. data/docs/HealthApi.md +96 -0
  47. data/docs/HealthNotReadyStatus.md +17 -0
  48. data/docs/HealthStatus.md +17 -0
  49. data/docs/InlineResponse500.md +27 -0
  50. data/docs/IsInstanceAliveInternalServerError.md +17 -0
  51. data/docs/IsInstanceAliveInternalServerErrorBody.md +27 -0
  52. data/docs/IsInstanceAliveOK.md +17 -0
  53. data/docs/JsonWebKey.md +49 -0
  54. data/docs/JsonWebKeySet.md +17 -0
  55. data/docs/JudgeForbidden.md +17 -0
  56. data/docs/JudgeForbiddenBody.md +27 -0
  57. data/docs/JudgeInternalServerError.md +17 -0
  58. data/docs/JudgeInternalServerErrorBody.md +27 -0
  59. data/docs/JudgeNotFound.md +17 -0
  60. data/docs/JudgeNotFoundBody.md +27 -0
  61. data/docs/JudgeUnauthorized.md +17 -0
  62. data/docs/JudgeUnauthorizedBody.md +27 -0
  63. data/docs/ListRulesForbidden.md +17 -0
  64. data/docs/ListRulesForbiddenBody.md +27 -0
  65. data/docs/ListRulesInternalServerError.md +17 -0
  66. data/docs/ListRulesInternalServerErrorBody.md +27 -0
  67. data/docs/ListRulesOK.md +17 -0
  68. data/docs/ListRulesUnauthorized.md +17 -0
  69. data/docs/ListRulesUnauthorizedBody.md +27 -0
  70. data/docs/Rule.md +29 -0
  71. data/docs/RuleHandler.md +19 -0
  72. data/docs/RuleMatch.md +19 -0
  73. data/docs/SwaggerCreateRuleParameters.md +17 -0
  74. data/docs/SwaggerGetRuleParameters.md +17 -0
  75. data/docs/SwaggerHealthStatus.md +17 -0
  76. data/docs/SwaggerJSONWebKey.md +49 -0
  77. data/docs/SwaggerJSONWebKeySet.md +17 -0
  78. data/docs/SwaggerListRulesParameters.md +19 -0
  79. data/docs/SwaggerNotReadyStatus.md +17 -0
  80. data/docs/SwaggerRule.md +29 -0
  81. data/docs/SwaggerRuleHandler.md +19 -0
  82. data/docs/SwaggerRuleMatch.md +19 -0
  83. data/docs/SwaggerRuleResponse.md +17 -0
  84. data/docs/SwaggerRulesResponse.md +17 -0
  85. data/docs/SwaggerUpdateRuleParameters.md +19 -0
  86. data/docs/SwaggerVersion.md +17 -0
  87. data/docs/UpdateRuleForbidden.md +17 -0
  88. data/docs/UpdateRuleForbiddenBody.md +27 -0
  89. data/docs/UpdateRuleInternalServerError.md +17 -0
  90. data/docs/UpdateRuleInternalServerErrorBody.md +27 -0
  91. data/docs/UpdateRuleNotFound.md +17 -0
  92. data/docs/UpdateRuleNotFoundBody.md +27 -0
  93. data/docs/UpdateRuleOK.md +17 -0
  94. data/docs/UpdateRuleUnauthorized.md +17 -0
  95. data/docs/UpdateRuleUnauthorizedBody.md +27 -0
  96. data/docs/Upstream.md +21 -0
  97. data/docs/Version.md +17 -0
  98. data/docs/VersionApi.md +52 -0
  99. data/lib/ory-oathkeeper-client.rb +52 -0
  100. data/lib/ory-oathkeeper-client/api/api_api.rb +258 -0
  101. data/lib/ory-oathkeeper-client/api/health_api.rb +134 -0
  102. data/lib/ory-oathkeeper-client/api/version_api.rb +78 -0
  103. data/lib/ory-oathkeeper-client/api_client.rb +385 -0
  104. data/lib/ory-oathkeeper-client/api_error.rb +57 -0
  105. data/lib/ory-oathkeeper-client/configuration.rb +241 -0
  106. data/lib/ory-oathkeeper-client/models/create_rule_created.rb +207 -0
  107. data/lib/ory-oathkeeper-client/models/create_rule_forbidden.rb +207 -0
  108. data/lib/ory-oathkeeper-client/models/create_rule_forbidden_body.rb +260 -0
  109. data/lib/ory-oathkeeper-client/models/create_rule_internal_server_error.rb +207 -0
  110. data/lib/ory-oathkeeper-client/models/create_rule_internal_server_error_body.rb +260 -0
  111. data/lib/ory-oathkeeper-client/models/create_rule_unauthorized.rb +207 -0
  112. data/lib/ory-oathkeeper-client/models/create_rule_unauthorized_body.rb +260 -0
  113. data/lib/ory-oathkeeper-client/models/decisions_forbidden.rb +207 -0
  114. data/lib/ory-oathkeeper-client/models/decisions_forbidden_body.rb +260 -0
  115. data/lib/ory-oathkeeper-client/models/decisions_internal_server_error.rb +207 -0
  116. data/lib/ory-oathkeeper-client/models/decisions_internal_server_error_body.rb +260 -0
  117. data/lib/ory-oathkeeper-client/models/decisions_not_found.rb +207 -0
  118. data/lib/ory-oathkeeper-client/models/decisions_not_found_body.rb +260 -0
  119. data/lib/ory-oathkeeper-client/models/decisions_unauthorized.rb +207 -0
  120. data/lib/ory-oathkeeper-client/models/decisions_unauthorized_body.rb +260 -0
  121. data/lib/ory-oathkeeper-client/models/delete_rule_forbidden.rb +207 -0
  122. data/lib/ory-oathkeeper-client/models/delete_rule_forbidden_body.rb +260 -0
  123. data/lib/ory-oathkeeper-client/models/delete_rule_internal_server_error.rb +207 -0
  124. data/lib/ory-oathkeeper-client/models/delete_rule_internal_server_error_body.rb +260 -0
  125. data/lib/ory-oathkeeper-client/models/delete_rule_not_found.rb +207 -0
  126. data/lib/ory-oathkeeper-client/models/delete_rule_not_found_body.rb +260 -0
  127. data/lib/ory-oathkeeper-client/models/delete_rule_unauthorized.rb +207 -0
  128. data/lib/ory-oathkeeper-client/models/delete_rule_unauthorized_body.rb +260 -0
  129. data/lib/ory-oathkeeper-client/models/get_rule_forbidden.rb +207 -0
  130. data/lib/ory-oathkeeper-client/models/get_rule_forbidden_body.rb +260 -0
  131. data/lib/ory-oathkeeper-client/models/get_rule_internal_server_error.rb +207 -0
  132. data/lib/ory-oathkeeper-client/models/get_rule_internal_server_error_body.rb +260 -0
  133. data/lib/ory-oathkeeper-client/models/get_rule_not_found.rb +207 -0
  134. data/lib/ory-oathkeeper-client/models/get_rule_not_found_body.rb +260 -0
  135. data/lib/ory-oathkeeper-client/models/get_rule_ok.rb +207 -0
  136. data/lib/ory-oathkeeper-client/models/get_rule_unauthorized.rb +207 -0
  137. data/lib/ory-oathkeeper-client/models/get_rule_unauthorized_body.rb +260 -0
  138. data/lib/ory-oathkeeper-client/models/get_well_known_forbidden.rb +207 -0
  139. data/lib/ory-oathkeeper-client/models/get_well_known_forbidden_body.rb +260 -0
  140. data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_internal_server_error.rb +207 -0
  141. data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_internal_server_error_body.rb +260 -0
  142. data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_ok.rb +207 -0
  143. data/lib/ory-oathkeeper-client/models/get_well_known_ok.rb +207 -0
  144. data/lib/ory-oathkeeper-client/models/get_well_known_unauthorized.rb +207 -0
  145. data/lib/ory-oathkeeper-client/models/get_well_known_unauthorized_body.rb +260 -0
  146. data/lib/ory-oathkeeper-client/models/health_not_ready_status.rb +209 -0
  147. data/lib/ory-oathkeeper-client/models/health_status.rb +207 -0
  148. data/lib/ory-oathkeeper-client/models/inline_response500.rb +253 -0
  149. data/lib/ory-oathkeeper-client/models/is_instance_alive_internal_server_error.rb +207 -0
  150. data/lib/ory-oathkeeper-client/models/is_instance_alive_internal_server_error_body.rb +260 -0
  151. data/lib/ory-oathkeeper-client/models/is_instance_alive_ok.rb +207 -0
  152. data/lib/ory-oathkeeper-client/models/json_web_key.rb +357 -0
  153. data/lib/ory-oathkeeper-client/models/json_web_key_set.rb +209 -0
  154. data/lib/ory-oathkeeper-client/models/judge_forbidden.rb +207 -0
  155. data/lib/ory-oathkeeper-client/models/judge_forbidden_body.rb +260 -0
  156. data/lib/ory-oathkeeper-client/models/judge_internal_server_error.rb +207 -0
  157. data/lib/ory-oathkeeper-client/models/judge_internal_server_error_body.rb +260 -0
  158. data/lib/ory-oathkeeper-client/models/judge_not_found.rb +207 -0
  159. data/lib/ory-oathkeeper-client/models/judge_not_found_body.rb +260 -0
  160. data/lib/ory-oathkeeper-client/models/judge_unauthorized.rb +207 -0
  161. data/lib/ory-oathkeeper-client/models/judge_unauthorized_body.rb +260 -0
  162. data/lib/ory-oathkeeper-client/models/list_rules_forbidden.rb +207 -0
  163. data/lib/ory-oathkeeper-client/models/list_rules_forbidden_body.rb +260 -0
  164. data/lib/ory-oathkeeper-client/models/list_rules_internal_server_error.rb +207 -0
  165. data/lib/ory-oathkeeper-client/models/list_rules_internal_server_error_body.rb +260 -0
  166. data/lib/ory-oathkeeper-client/models/list_rules_ok.rb +210 -0
  167. data/lib/ory-oathkeeper-client/models/list_rules_unauthorized.rb +207 -0
  168. data/lib/ory-oathkeeper-client/models/list_rules_unauthorized_body.rb +260 -0
  169. data/lib/ory-oathkeeper-client/models/rule.rb +268 -0
  170. data/lib/ory-oathkeeper-client/models/rule_handler.rb +217 -0
  171. data/lib/ory-oathkeeper-client/models/rule_match.rb +219 -0
  172. data/lib/ory-oathkeeper-client/models/swagger_create_rule_parameters.rb +207 -0
  173. data/lib/ory-oathkeeper-client/models/swagger_get_rule_parameters.rb +213 -0
  174. data/lib/ory-oathkeeper-client/models/swagger_health_status.rb +208 -0
  175. data/lib/ory-oathkeeper-client/models/swagger_json_web_key.rb +370 -0
  176. data/lib/ory-oathkeeper-client/models/swagger_json_web_key_set.rb +210 -0
  177. data/lib/ory-oathkeeper-client/models/swagger_list_rules_parameters.rb +218 -0
  178. data/lib/ory-oathkeeper-client/models/swagger_not_ready_status.rb +210 -0
  179. data/lib/ory-oathkeeper-client/models/swagger_rule.rb +268 -0
  180. data/lib/ory-oathkeeper-client/models/swagger_rule_handler.rb +218 -0
  181. data/lib/ory-oathkeeper-client/models/swagger_rule_match.rb +220 -0
  182. data/lib/ory-oathkeeper-client/models/swagger_rule_response.rb +207 -0
  183. data/lib/ory-oathkeeper-client/models/swagger_rules_response.rb +210 -0
  184. data/lib/ory-oathkeeper-client/models/swagger_update_rule_parameters.rb +222 -0
  185. data/lib/ory-oathkeeper-client/models/swagger_version.rb +208 -0
  186. data/lib/ory-oathkeeper-client/models/update_rule_forbidden.rb +207 -0
  187. data/lib/ory-oathkeeper-client/models/update_rule_forbidden_body.rb +260 -0
  188. data/lib/ory-oathkeeper-client/models/update_rule_internal_server_error.rb +207 -0
  189. data/lib/ory-oathkeeper-client/models/update_rule_internal_server_error_body.rb +260 -0
  190. data/lib/ory-oathkeeper-client/models/update_rule_not_found.rb +207 -0
  191. data/lib/ory-oathkeeper-client/models/update_rule_not_found_body.rb +260 -0
  192. data/lib/ory-oathkeeper-client/models/update_rule_ok.rb +207 -0
  193. data/lib/ory-oathkeeper-client/models/update_rule_unauthorized.rb +207 -0
  194. data/lib/ory-oathkeeper-client/models/update_rule_unauthorized_body.rb +260 -0
  195. data/lib/ory-oathkeeper-client/models/upstream.rb +227 -0
  196. data/lib/ory-oathkeeper-client/models/version.rb +207 -0
  197. data/lib/ory-oathkeeper-client/version.rb +15 -0
  198. data/ory-oathkeeper-client.gemspec +39 -0
  199. data/spec/api/api_api_spec.rb +115 -0
  200. data/spec/api/health_api_spec.rb +57 -0
  201. data/spec/api/version_api_spec.rb +46 -0
  202. data/spec/api_client_spec.rb +226 -0
  203. data/spec/configuration_spec.rb +42 -0
  204. data/spec/models/create_rule_created_spec.rb +41 -0
  205. data/spec/models/create_rule_forbidden_body_spec.rb +71 -0
  206. data/spec/models/create_rule_forbidden_spec.rb +41 -0
  207. data/spec/models/create_rule_internal_server_error_body_spec.rb +71 -0
  208. data/spec/models/create_rule_internal_server_error_spec.rb +41 -0
  209. data/spec/models/create_rule_unauthorized_body_spec.rb +71 -0
  210. data/spec/models/create_rule_unauthorized_spec.rb +41 -0
  211. data/spec/models/decisions_forbidden_body_spec.rb +71 -0
  212. data/spec/models/decisions_forbidden_spec.rb +41 -0
  213. data/spec/models/decisions_internal_server_error_body_spec.rb +71 -0
  214. data/spec/models/decisions_internal_server_error_spec.rb +41 -0
  215. data/spec/models/decisions_not_found_body_spec.rb +71 -0
  216. data/spec/models/decisions_not_found_spec.rb +41 -0
  217. data/spec/models/decisions_unauthorized_body_spec.rb +71 -0
  218. data/spec/models/decisions_unauthorized_spec.rb +41 -0
  219. data/spec/models/delete_rule_forbidden_body_spec.rb +71 -0
  220. data/spec/models/delete_rule_forbidden_spec.rb +41 -0
  221. data/spec/models/delete_rule_internal_server_error_body_spec.rb +71 -0
  222. data/spec/models/delete_rule_internal_server_error_spec.rb +41 -0
  223. data/spec/models/delete_rule_not_found_body_spec.rb +71 -0
  224. data/spec/models/delete_rule_not_found_spec.rb +41 -0
  225. data/spec/models/delete_rule_unauthorized_body_spec.rb +71 -0
  226. data/spec/models/delete_rule_unauthorized_spec.rb +41 -0
  227. data/spec/models/get_rule_forbidden_body_spec.rb +71 -0
  228. data/spec/models/get_rule_forbidden_spec.rb +41 -0
  229. data/spec/models/get_rule_internal_server_error_body_spec.rb +71 -0
  230. data/spec/models/get_rule_internal_server_error_spec.rb +41 -0
  231. data/spec/models/get_rule_not_found_body_spec.rb +71 -0
  232. data/spec/models/get_rule_not_found_spec.rb +41 -0
  233. data/spec/models/get_rule_ok_spec.rb +41 -0
  234. data/spec/models/get_rule_unauthorized_body_spec.rb +71 -0
  235. data/spec/models/get_rule_unauthorized_spec.rb +41 -0
  236. data/spec/models/get_well_known_forbidden_body_spec.rb +71 -0
  237. data/spec/models/get_well_known_forbidden_spec.rb +41 -0
  238. data/spec/models/get_well_known_json_web_keys_internal_server_error_body_spec.rb +71 -0
  239. data/spec/models/get_well_known_json_web_keys_internal_server_error_spec.rb +41 -0
  240. data/spec/models/get_well_known_json_web_keys_ok_spec.rb +41 -0
  241. data/spec/models/get_well_known_ok_spec.rb +41 -0
  242. data/spec/models/get_well_known_unauthorized_body_spec.rb +71 -0
  243. data/spec/models/get_well_known_unauthorized_spec.rb +41 -0
  244. data/spec/models/health_not_ready_status_spec.rb +41 -0
  245. data/spec/models/health_status_spec.rb +41 -0
  246. data/spec/models/inline_response500_spec.rb +71 -0
  247. data/spec/models/is_instance_alive_internal_server_error_body_spec.rb +71 -0
  248. data/spec/models/is_instance_alive_internal_server_error_spec.rb +41 -0
  249. data/spec/models/is_instance_alive_ok_spec.rb +41 -0
  250. data/spec/models/json_web_key_set_spec.rb +41 -0
  251. data/spec/models/json_web_key_spec.rb +137 -0
  252. data/spec/models/judge_forbidden_body_spec.rb +71 -0
  253. data/spec/models/judge_forbidden_spec.rb +41 -0
  254. data/spec/models/judge_internal_server_error_body_spec.rb +71 -0
  255. data/spec/models/judge_internal_server_error_spec.rb +41 -0
  256. data/spec/models/judge_not_found_body_spec.rb +71 -0
  257. data/spec/models/judge_not_found_spec.rb +41 -0
  258. data/spec/models/judge_unauthorized_body_spec.rb +71 -0
  259. data/spec/models/judge_unauthorized_spec.rb +41 -0
  260. data/spec/models/list_rules_forbidden_body_spec.rb +71 -0
  261. data/spec/models/list_rules_forbidden_spec.rb +41 -0
  262. data/spec/models/list_rules_internal_server_error_body_spec.rb +71 -0
  263. data/spec/models/list_rules_internal_server_error_spec.rb +41 -0
  264. data/spec/models/list_rules_ok_spec.rb +41 -0
  265. data/spec/models/list_rules_unauthorized_body_spec.rb +71 -0
  266. data/spec/models/list_rules_unauthorized_spec.rb +41 -0
  267. data/spec/models/rule_handler_spec.rb +47 -0
  268. data/spec/models/rule_match_spec.rb +47 -0
  269. data/spec/models/rule_spec.rb +77 -0
  270. data/spec/models/swagger_create_rule_parameters_spec.rb +41 -0
  271. data/spec/models/swagger_get_rule_parameters_spec.rb +41 -0
  272. data/spec/models/swagger_health_status_spec.rb +41 -0
  273. data/spec/models/swagger_json_web_key_set_spec.rb +41 -0
  274. data/spec/models/swagger_json_web_key_spec.rb +137 -0
  275. data/spec/models/swagger_list_rules_parameters_spec.rb +47 -0
  276. data/spec/models/swagger_not_ready_status_spec.rb +41 -0
  277. data/spec/models/swagger_rule_handler_spec.rb +47 -0
  278. data/spec/models/swagger_rule_match_spec.rb +47 -0
  279. data/spec/models/swagger_rule_response_spec.rb +41 -0
  280. data/spec/models/swagger_rule_spec.rb +77 -0
  281. data/spec/models/swagger_rules_response_spec.rb +41 -0
  282. data/spec/models/swagger_update_rule_parameters_spec.rb +47 -0
  283. data/spec/models/swagger_version_spec.rb +41 -0
  284. data/spec/models/update_rule_forbidden_body_spec.rb +71 -0
  285. data/spec/models/update_rule_forbidden_spec.rb +41 -0
  286. data/spec/models/update_rule_internal_server_error_body_spec.rb +71 -0
  287. data/spec/models/update_rule_internal_server_error_spec.rb +41 -0
  288. data/spec/models/update_rule_not_found_body_spec.rb +71 -0
  289. data/spec/models/update_rule_not_found_spec.rb +41 -0
  290. data/spec/models/update_rule_ok_spec.rb +41 -0
  291. data/spec/models/update_rule_unauthorized_body_spec.rb +71 -0
  292. data/spec/models/update_rule_unauthorized_spec.rb +41 -0
  293. data/spec/models/upstream_spec.rb +53 -0
  294. data/spec/models/version_spec.rb +41 -0
  295. data/spec/spec_helper.rb +111 -0
  296. metadata +497 -0
@@ -0,0 +1,208 @@
1
+ =begin
2
+ #ORY Oathkeeper
3
+
4
+ #ORY Oathkeeper is a reverse proxy that checks the HTTP Authorization for validity against a set of rules. This service uses Hydra to validate access tokens and policies.
5
+
6
+ The version of the OpenAPI document: v0.0.0-alpha.37
7
+ Contact: hi@ory.am
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
+ # SwaggerHealthStatus swagger health status
17
+ class SwaggerHealthStatus
18
+ # Status always contains \"ok\".
19
+ attr_accessor :status
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'status' => :'status'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.openapi_types
30
+ {
31
+ :'status' => :'String'
32
+ }
33
+ end
34
+
35
+ # List of attributes with nullable: true
36
+ def self.openapi_nullable
37
+ Set.new([
38
+ ])
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ if (!attributes.is_a?(Hash))
45
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::SwaggerHealthStatus` initialize method"
46
+ end
47
+
48
+ # check to see if the attribute exists and convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h|
50
+ if (!self.class.attribute_map.key?(k.to_sym))
51
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::SwaggerHealthStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
52
+ end
53
+ h[k.to_sym] = v
54
+ }
55
+
56
+ if attributes.key?(:'status')
57
+ self.status = attributes[:'status']
58
+ end
59
+ end
60
+
61
+ # Show invalid properties with the reasons. Usually used together with valid?
62
+ # @return Array for valid properties with the reasons
63
+ def list_invalid_properties
64
+ invalid_properties = Array.new
65
+ invalid_properties
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ true
72
+ end
73
+
74
+ # Checks equality by comparing each attribute.
75
+ # @param [Object] Object to be compared
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ status == o.status
80
+ end
81
+
82
+ # @see the `==` method
83
+ # @param [Object] Object to be compared
84
+ def eql?(o)
85
+ self == o
86
+ end
87
+
88
+ # Calculates hash code according to all attributes.
89
+ # @return [Integer] Hash code
90
+ def hash
91
+ [status].hash
92
+ end
93
+
94
+ # Builds the object from hash
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ # @return [Object] Returns the model itself
97
+ def self.build_from_hash(attributes)
98
+ new.build_from_hash(attributes)
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+ self.class.openapi_types.each_pair do |key, type|
107
+ if type =~ /\AArray<(.*)>/i
108
+ # check to ensure the input is an array given that the attribute
109
+ # is documented as an array but the input is not
110
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
111
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
112
+ end
113
+ elsif !attributes[self.class.attribute_map[key]].nil?
114
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
116
+ end
117
+
118
+ self
119
+ end
120
+
121
+ # Deserializes the data based on type
122
+ # @param string type Data type
123
+ # @param string value Value to be deserialized
124
+ # @return [Object] Deserialized data
125
+ def _deserialize(type, value)
126
+ case type.to_sym
127
+ when :DateTime
128
+ DateTime.parse(value)
129
+ when :Date
130
+ Date.parse(value)
131
+ when :String
132
+ value.to_s
133
+ when :Integer
134
+ value.to_i
135
+ when :Float
136
+ value.to_f
137
+ when :Boolean
138
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
139
+ true
140
+ else
141
+ false
142
+ end
143
+ when :Object
144
+ # generic object (usually a Hash), return directly
145
+ value
146
+ when /\AArray<(?<inner_type>.+)>\z/
147
+ inner_type = Regexp.last_match[:inner_type]
148
+ value.map { |v| _deserialize(inner_type, v) }
149
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
+ k_type = Regexp.last_match[:k_type]
151
+ v_type = Regexp.last_match[:v_type]
152
+ {}.tap do |hash|
153
+ value.each do |k, v|
154
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
+ end
156
+ end
157
+ else # model
158
+ OryHydraClient.const_get(type).build_from_hash(value)
159
+ end
160
+ end
161
+
162
+ # Returns the string representation of the object
163
+ # @return [String] String presentation of the object
164
+ def to_s
165
+ to_hash.to_s
166
+ end
167
+
168
+ # to_body is an alias to to_hash (backward compatibility)
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_body
171
+ to_hash
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ # Outputs non-array value in the form of hash
191
+ # For object, use to_hash. Otherwise, just return the value
192
+ # @param [Object] value Any valid value
193
+ # @return [Hash] Returns the value in the form of hash
194
+ def _to_hash(value)
195
+ if value.is_a?(Array)
196
+ value.compact.map { |v| _to_hash(v) }
197
+ elsif value.is_a?(Hash)
198
+ {}.tap do |hash|
199
+ value.each { |k, v| hash[k] = _to_hash(v) }
200
+ end
201
+ elsif value.respond_to? :to_hash
202
+ value.to_hash
203
+ else
204
+ value
205
+ end
206
+ end
207
+ end
208
+ end
@@ -0,0 +1,370 @@
1
+ =begin
2
+ #ORY Oathkeeper
3
+
4
+ #ORY Oathkeeper is a reverse proxy that checks the HTTP Authorization for validity against a set of rules. This service uses Hydra to validate access tokens and policies.
5
+
6
+ The version of the OpenAPI document: v0.0.0-alpha.37
7
+ Contact: hi@ory.am
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
+ # SwaggerJSONWebKey swagger JSON web key
17
+ class SwaggerJSONWebKey
18
+ # The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name.
19
+ attr_accessor :alg
20
+
21
+ # crv
22
+ attr_accessor :crv
23
+
24
+ # d
25
+ attr_accessor :d
26
+
27
+ # dp
28
+ attr_accessor :dp
29
+
30
+ # dq
31
+ attr_accessor :dq
32
+
33
+ # e
34
+ attr_accessor :e
35
+
36
+ # k
37
+ attr_accessor :k
38
+
39
+ # The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string.
40
+ attr_accessor :kid
41
+
42
+ # The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string.
43
+ attr_accessor :kty
44
+
45
+ # n
46
+ attr_accessor :n
47
+
48
+ # p
49
+ attr_accessor :p
50
+
51
+ # q
52
+ attr_accessor :q
53
+
54
+ # qi
55
+ attr_accessor :qi
56
+
57
+ # The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).
58
+ attr_accessor :use
59
+
60
+ # x
61
+ attr_accessor :x
62
+
63
+ # The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.
64
+ attr_accessor :x5c
65
+
66
+ # y
67
+ attr_accessor :y
68
+
69
+ # Attribute mapping from ruby-style variable name to JSON key.
70
+ def self.attribute_map
71
+ {
72
+ :'alg' => :'alg',
73
+ :'crv' => :'crv',
74
+ :'d' => :'d',
75
+ :'dp' => :'dp',
76
+ :'dq' => :'dq',
77
+ :'e' => :'e',
78
+ :'k' => :'k',
79
+ :'kid' => :'kid',
80
+ :'kty' => :'kty',
81
+ :'n' => :'n',
82
+ :'p' => :'p',
83
+ :'q' => :'q',
84
+ :'qi' => :'qi',
85
+ :'use' => :'use',
86
+ :'x' => :'x',
87
+ :'x5c' => :'x5c',
88
+ :'y' => :'y'
89
+ }
90
+ end
91
+
92
+ # Attribute type mapping.
93
+ def self.openapi_types
94
+ {
95
+ :'alg' => :'String',
96
+ :'crv' => :'String',
97
+ :'d' => :'String',
98
+ :'dp' => :'String',
99
+ :'dq' => :'String',
100
+ :'e' => :'String',
101
+ :'k' => :'String',
102
+ :'kid' => :'String',
103
+ :'kty' => :'String',
104
+ :'n' => :'String',
105
+ :'p' => :'String',
106
+ :'q' => :'String',
107
+ :'qi' => :'String',
108
+ :'use' => :'String',
109
+ :'x' => :'String',
110
+ :'x5c' => :'Array<String>',
111
+ :'y' => :'String'
112
+ }
113
+ end
114
+
115
+ # List of attributes with nullable: true
116
+ def self.openapi_nullable
117
+ Set.new([
118
+ ])
119
+ end
120
+
121
+ # Initializes the object
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ def initialize(attributes = {})
124
+ if (!attributes.is_a?(Hash))
125
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::SwaggerJSONWebKey` initialize method"
126
+ end
127
+
128
+ # check to see if the attribute exists and convert string to symbol for hash key
129
+ attributes = attributes.each_with_object({}) { |(k, v), h|
130
+ if (!self.class.attribute_map.key?(k.to_sym))
131
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::SwaggerJSONWebKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
132
+ end
133
+ h[k.to_sym] = v
134
+ }
135
+
136
+ if attributes.key?(:'alg')
137
+ self.alg = attributes[:'alg']
138
+ end
139
+
140
+ if attributes.key?(:'crv')
141
+ self.crv = attributes[:'crv']
142
+ end
143
+
144
+ if attributes.key?(:'d')
145
+ self.d = attributes[:'d']
146
+ end
147
+
148
+ if attributes.key?(:'dp')
149
+ self.dp = attributes[:'dp']
150
+ end
151
+
152
+ if attributes.key?(:'dq')
153
+ self.dq = attributes[:'dq']
154
+ end
155
+
156
+ if attributes.key?(:'e')
157
+ self.e = attributes[:'e']
158
+ end
159
+
160
+ if attributes.key?(:'k')
161
+ self.k = attributes[:'k']
162
+ end
163
+
164
+ if attributes.key?(:'kid')
165
+ self.kid = attributes[:'kid']
166
+ end
167
+
168
+ if attributes.key?(:'kty')
169
+ self.kty = attributes[:'kty']
170
+ end
171
+
172
+ if attributes.key?(:'n')
173
+ self.n = attributes[:'n']
174
+ end
175
+
176
+ if attributes.key?(:'p')
177
+ self.p = attributes[:'p']
178
+ end
179
+
180
+ if attributes.key?(:'q')
181
+ self.q = attributes[:'q']
182
+ end
183
+
184
+ if attributes.key?(:'qi')
185
+ self.qi = attributes[:'qi']
186
+ end
187
+
188
+ if attributes.key?(:'use')
189
+ self.use = attributes[:'use']
190
+ end
191
+
192
+ if attributes.key?(:'x')
193
+ self.x = attributes[:'x']
194
+ end
195
+
196
+ if attributes.key?(:'x5c')
197
+ if (value = attributes[:'x5c']).is_a?(Array)
198
+ self.x5c = value
199
+ end
200
+ end
201
+
202
+ if attributes.key?(:'y')
203
+ self.y = attributes[:'y']
204
+ end
205
+ end
206
+
207
+ # Show invalid properties with the reasons. Usually used together with valid?
208
+ # @return Array for valid properties with the reasons
209
+ def list_invalid_properties
210
+ invalid_properties = Array.new
211
+ invalid_properties
212
+ end
213
+
214
+ # Check to see if the all the properties in the model are valid
215
+ # @return true if the model is valid
216
+ def valid?
217
+ true
218
+ end
219
+
220
+ # Checks equality by comparing each attribute.
221
+ # @param [Object] Object to be compared
222
+ def ==(o)
223
+ return true if self.equal?(o)
224
+ self.class == o.class &&
225
+ alg == o.alg &&
226
+ crv == o.crv &&
227
+ d == o.d &&
228
+ dp == o.dp &&
229
+ dq == o.dq &&
230
+ e == o.e &&
231
+ k == o.k &&
232
+ kid == o.kid &&
233
+ kty == o.kty &&
234
+ n == o.n &&
235
+ p == o.p &&
236
+ q == o.q &&
237
+ qi == o.qi &&
238
+ use == o.use &&
239
+ x == o.x &&
240
+ x5c == o.x5c &&
241
+ y == o.y
242
+ end
243
+
244
+ # @see the `==` method
245
+ # @param [Object] Object to be compared
246
+ def eql?(o)
247
+ self == o
248
+ end
249
+
250
+ # Calculates hash code according to all attributes.
251
+ # @return [Integer] Hash code
252
+ def hash
253
+ [alg, crv, d, dp, dq, e, k, kid, kty, n, p, q, qi, use, x, x5c, y].hash
254
+ end
255
+
256
+ # Builds the object from hash
257
+ # @param [Hash] attributes Model attributes in the form of hash
258
+ # @return [Object] Returns the model itself
259
+ def self.build_from_hash(attributes)
260
+ new.build_from_hash(attributes)
261
+ end
262
+
263
+ # Builds the object from hash
264
+ # @param [Hash] attributes Model attributes in the form of hash
265
+ # @return [Object] Returns the model itself
266
+ def build_from_hash(attributes)
267
+ return nil unless attributes.is_a?(Hash)
268
+ self.class.openapi_types.each_pair do |key, type|
269
+ if type =~ /\AArray<(.*)>/i
270
+ # check to ensure the input is an array given that the attribute
271
+ # is documented as an array but the input is not
272
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
273
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
274
+ end
275
+ elsif !attributes[self.class.attribute_map[key]].nil?
276
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
277
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
278
+ end
279
+
280
+ self
281
+ end
282
+
283
+ # Deserializes the data based on type
284
+ # @param string type Data type
285
+ # @param string value Value to be deserialized
286
+ # @return [Object] Deserialized data
287
+ def _deserialize(type, value)
288
+ case type.to_sym
289
+ when :DateTime
290
+ DateTime.parse(value)
291
+ when :Date
292
+ Date.parse(value)
293
+ when :String
294
+ value.to_s
295
+ when :Integer
296
+ value.to_i
297
+ when :Float
298
+ value.to_f
299
+ when :Boolean
300
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
301
+ true
302
+ else
303
+ false
304
+ end
305
+ when :Object
306
+ # generic object (usually a Hash), return directly
307
+ value
308
+ when /\AArray<(?<inner_type>.+)>\z/
309
+ inner_type = Regexp.last_match[:inner_type]
310
+ value.map { |v| _deserialize(inner_type, v) }
311
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
312
+ k_type = Regexp.last_match[:k_type]
313
+ v_type = Regexp.last_match[:v_type]
314
+ {}.tap do |hash|
315
+ value.each do |k, v|
316
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
317
+ end
318
+ end
319
+ else # model
320
+ OryHydraClient.const_get(type).build_from_hash(value)
321
+ end
322
+ end
323
+
324
+ # Returns the string representation of the object
325
+ # @return [String] String presentation of the object
326
+ def to_s
327
+ to_hash.to_s
328
+ end
329
+
330
+ # to_body is an alias to to_hash (backward compatibility)
331
+ # @return [Hash] Returns the object in the form of hash
332
+ def to_body
333
+ to_hash
334
+ end
335
+
336
+ # Returns the object in the form of hash
337
+ # @return [Hash] Returns the object in the form of hash
338
+ def to_hash
339
+ hash = {}
340
+ self.class.attribute_map.each_pair do |attr, param|
341
+ value = self.send(attr)
342
+ if value.nil?
343
+ is_nullable = self.class.openapi_nullable.include?(attr)
344
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
345
+ end
346
+
347
+ hash[param] = _to_hash(value)
348
+ end
349
+ hash
350
+ end
351
+
352
+ # Outputs non-array value in the form of hash
353
+ # For object, use to_hash. Otherwise, just return the value
354
+ # @param [Object] value Any valid value
355
+ # @return [Hash] Returns the value in the form of hash
356
+ def _to_hash(value)
357
+ if value.is_a?(Array)
358
+ value.compact.map { |v| _to_hash(v) }
359
+ elsif value.is_a?(Hash)
360
+ {}.tap do |hash|
361
+ value.each { |k, v| hash[k] = _to_hash(v) }
362
+ end
363
+ elsif value.respond_to? :to_hash
364
+ value.to_hash
365
+ else
366
+ value
367
+ end
368
+ end
369
+ end
370
+ end