ory-oathkeeper-client 0.0.0.alpha38

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 +184 -0
  4. data/Rakefile +10 -0
  5. data/docs/ApiApi.md +450 -0
  6. data/docs/CreateRuleCreated.md +18 -0
  7. data/docs/CreateRuleForbidden.md +18 -0
  8. data/docs/CreateRuleForbiddenBody.md +28 -0
  9. data/docs/CreateRuleInternalServerError.md +18 -0
  10. data/docs/CreateRuleInternalServerErrorBody.md +28 -0
  11. data/docs/CreateRuleUnauthorized.md +18 -0
  12. data/docs/CreateRuleUnauthorizedBody.md +28 -0
  13. data/docs/DecisionsForbidden.md +18 -0
  14. data/docs/DecisionsForbiddenBody.md +28 -0
  15. data/docs/DecisionsInternalServerError.md +18 -0
  16. data/docs/DecisionsInternalServerErrorBody.md +28 -0
  17. data/docs/DecisionsNotFound.md +18 -0
  18. data/docs/DecisionsNotFoundBody.md +28 -0
  19. data/docs/DecisionsUnauthorized.md +18 -0
  20. data/docs/DecisionsUnauthorizedBody.md +28 -0
  21. data/docs/DeleteRuleForbidden.md +18 -0
  22. data/docs/DeleteRuleForbiddenBody.md +28 -0
  23. data/docs/DeleteRuleInternalServerError.md +18 -0
  24. data/docs/DeleteRuleInternalServerErrorBody.md +28 -0
  25. data/docs/DeleteRuleNotFound.md +18 -0
  26. data/docs/DeleteRuleNotFoundBody.md +28 -0
  27. data/docs/DeleteRuleUnauthorized.md +18 -0
  28. data/docs/DeleteRuleUnauthorizedBody.md +28 -0
  29. data/docs/GetRuleForbidden.md +18 -0
  30. data/docs/GetRuleForbiddenBody.md +28 -0
  31. data/docs/GetRuleInternalServerError.md +18 -0
  32. data/docs/GetRuleInternalServerErrorBody.md +28 -0
  33. data/docs/GetRuleNotFound.md +18 -0
  34. data/docs/GetRuleNotFoundBody.md +28 -0
  35. data/docs/GetRuleOK.md +18 -0
  36. data/docs/GetRuleUnauthorized.md +18 -0
  37. data/docs/GetRuleUnauthorizedBody.md +28 -0
  38. data/docs/GetWellKnownForbidden.md +18 -0
  39. data/docs/GetWellKnownForbiddenBody.md +28 -0
  40. data/docs/GetWellKnownJSONWebKeysInternalServerError.md +18 -0
  41. data/docs/GetWellKnownJSONWebKeysInternalServerErrorBody.md +28 -0
  42. data/docs/GetWellKnownJSONWebKeysOK.md +18 -0
  43. data/docs/GetWellKnownOK.md +18 -0
  44. data/docs/GetWellKnownUnauthorized.md +18 -0
  45. data/docs/GetWellKnownUnauthorizedBody.md +28 -0
  46. data/docs/HealthApi.md +96 -0
  47. data/docs/HealthNotReadyStatus.md +18 -0
  48. data/docs/HealthStatus.md +18 -0
  49. data/docs/InlineResponse500.md +28 -0
  50. data/docs/IsInstanceAliveInternalServerError.md +18 -0
  51. data/docs/IsInstanceAliveInternalServerErrorBody.md +28 -0
  52. data/docs/IsInstanceAliveOK.md +18 -0
  53. data/docs/JsonWebKey.md +50 -0
  54. data/docs/JsonWebKeySet.md +18 -0
  55. data/docs/JudgeForbidden.md +18 -0
  56. data/docs/JudgeForbiddenBody.md +28 -0
  57. data/docs/JudgeInternalServerError.md +18 -0
  58. data/docs/JudgeInternalServerErrorBody.md +28 -0
  59. data/docs/JudgeNotFound.md +18 -0
  60. data/docs/JudgeNotFoundBody.md +28 -0
  61. data/docs/JudgeUnauthorized.md +18 -0
  62. data/docs/JudgeUnauthorizedBody.md +28 -0
  63. data/docs/ListRulesForbidden.md +18 -0
  64. data/docs/ListRulesForbiddenBody.md +28 -0
  65. data/docs/ListRulesInternalServerError.md +18 -0
  66. data/docs/ListRulesInternalServerErrorBody.md +28 -0
  67. data/docs/ListRulesOK.md +18 -0
  68. data/docs/ListRulesUnauthorized.md +18 -0
  69. data/docs/ListRulesUnauthorizedBody.md +28 -0
  70. data/docs/Rule.md +30 -0
  71. data/docs/RuleHandler.md +20 -0
  72. data/docs/RuleMatch.md +20 -0
  73. data/docs/SwaggerCreateRuleParameters.md +18 -0
  74. data/docs/SwaggerGetRuleParameters.md +18 -0
  75. data/docs/SwaggerHealthStatus.md +18 -0
  76. data/docs/SwaggerJSONWebKey.md +50 -0
  77. data/docs/SwaggerJSONWebKeySet.md +18 -0
  78. data/docs/SwaggerListRulesParameters.md +20 -0
  79. data/docs/SwaggerNotReadyStatus.md +18 -0
  80. data/docs/SwaggerRule.md +30 -0
  81. data/docs/SwaggerRuleHandler.md +20 -0
  82. data/docs/SwaggerRuleMatch.md +20 -0
  83. data/docs/SwaggerRuleResponse.md +18 -0
  84. data/docs/SwaggerRulesResponse.md +18 -0
  85. data/docs/SwaggerUpdateRuleParameters.md +20 -0
  86. data/docs/SwaggerVersion.md +18 -0
  87. data/docs/UpdateRuleForbidden.md +18 -0
  88. data/docs/UpdateRuleForbiddenBody.md +28 -0
  89. data/docs/UpdateRuleInternalServerError.md +18 -0
  90. data/docs/UpdateRuleInternalServerErrorBody.md +28 -0
  91. data/docs/UpdateRuleNotFound.md +18 -0
  92. data/docs/UpdateRuleNotFoundBody.md +28 -0
  93. data/docs/UpdateRuleOK.md +18 -0
  94. data/docs/UpdateRuleUnauthorized.md +18 -0
  95. data/docs/UpdateRuleUnauthorizedBody.md +28 -0
  96. data/docs/Upstream.md +22 -0
  97. data/docs/Version.md +18 -0
  98. data/docs/VersionApi.md +52 -0
  99. data/lib/ory-oathkeeper-client.rb +131 -0
  100. data/lib/ory-oathkeeper-client/api/api_api.rb +433 -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 +389 -0
  104. data/lib/ory-oathkeeper-client/api_error.rb +57 -0
  105. data/lib/ory-oathkeeper-client/configuration.rb +270 -0
  106. data/lib/ory-oathkeeper-client/models/create_rule_created.rb +219 -0
  107. data/lib/ory-oathkeeper-client/models/create_rule_forbidden.rb +219 -0
  108. data/lib/ory-oathkeeper-client/models/create_rule_forbidden_body.rb +272 -0
  109. data/lib/ory-oathkeeper-client/models/create_rule_internal_server_error.rb +219 -0
  110. data/lib/ory-oathkeeper-client/models/create_rule_internal_server_error_body.rb +272 -0
  111. data/lib/ory-oathkeeper-client/models/create_rule_unauthorized.rb +219 -0
  112. data/lib/ory-oathkeeper-client/models/create_rule_unauthorized_body.rb +272 -0
  113. data/lib/ory-oathkeeper-client/models/decisions_forbidden.rb +219 -0
  114. data/lib/ory-oathkeeper-client/models/decisions_forbidden_body.rb +272 -0
  115. data/lib/ory-oathkeeper-client/models/decisions_internal_server_error.rb +219 -0
  116. data/lib/ory-oathkeeper-client/models/decisions_internal_server_error_body.rb +272 -0
  117. data/lib/ory-oathkeeper-client/models/decisions_not_found.rb +219 -0
  118. data/lib/ory-oathkeeper-client/models/decisions_not_found_body.rb +272 -0
  119. data/lib/ory-oathkeeper-client/models/decisions_unauthorized.rb +219 -0
  120. data/lib/ory-oathkeeper-client/models/decisions_unauthorized_body.rb +272 -0
  121. data/lib/ory-oathkeeper-client/models/delete_rule_forbidden.rb +219 -0
  122. data/lib/ory-oathkeeper-client/models/delete_rule_forbidden_body.rb +272 -0
  123. data/lib/ory-oathkeeper-client/models/delete_rule_internal_server_error.rb +219 -0
  124. data/lib/ory-oathkeeper-client/models/delete_rule_internal_server_error_body.rb +272 -0
  125. data/lib/ory-oathkeeper-client/models/delete_rule_not_found.rb +219 -0
  126. data/lib/ory-oathkeeper-client/models/delete_rule_not_found_body.rb +272 -0
  127. data/lib/ory-oathkeeper-client/models/delete_rule_unauthorized.rb +219 -0
  128. data/lib/ory-oathkeeper-client/models/delete_rule_unauthorized_body.rb +272 -0
  129. data/lib/ory-oathkeeper-client/models/get_rule_forbidden.rb +219 -0
  130. data/lib/ory-oathkeeper-client/models/get_rule_forbidden_body.rb +272 -0
  131. data/lib/ory-oathkeeper-client/models/get_rule_internal_server_error.rb +219 -0
  132. data/lib/ory-oathkeeper-client/models/get_rule_internal_server_error_body.rb +272 -0
  133. data/lib/ory-oathkeeper-client/models/get_rule_not_found.rb +219 -0
  134. data/lib/ory-oathkeeper-client/models/get_rule_not_found_body.rb +272 -0
  135. data/lib/ory-oathkeeper-client/models/get_rule_ok.rb +219 -0
  136. data/lib/ory-oathkeeper-client/models/get_rule_unauthorized.rb +219 -0
  137. data/lib/ory-oathkeeper-client/models/get_rule_unauthorized_body.rb +272 -0
  138. data/lib/ory-oathkeeper-client/models/get_well_known_forbidden.rb +219 -0
  139. data/lib/ory-oathkeeper-client/models/get_well_known_forbidden_body.rb +272 -0
  140. data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_internal_server_error.rb +219 -0
  141. data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_internal_server_error_body.rb +272 -0
  142. data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_ok.rb +219 -0
  143. data/lib/ory-oathkeeper-client/models/get_well_known_ok.rb +219 -0
  144. data/lib/ory-oathkeeper-client/models/get_well_known_unauthorized.rb +219 -0
  145. data/lib/ory-oathkeeper-client/models/get_well_known_unauthorized_body.rb +272 -0
  146. data/lib/ory-oathkeeper-client/models/health_not_ready_status.rb +221 -0
  147. data/lib/ory-oathkeeper-client/models/health_status.rb +219 -0
  148. data/lib/ory-oathkeeper-client/models/inline_response500.rb +265 -0
  149. data/lib/ory-oathkeeper-client/models/is_instance_alive_internal_server_error.rb +219 -0
  150. data/lib/ory-oathkeeper-client/models/is_instance_alive_internal_server_error_body.rb +272 -0
  151. data/lib/ory-oathkeeper-client/models/is_instance_alive_ok.rb +219 -0
  152. data/lib/ory-oathkeeper-client/models/json_web_key.rb +369 -0
  153. data/lib/ory-oathkeeper-client/models/json_web_key_set.rb +221 -0
  154. data/lib/ory-oathkeeper-client/models/judge_forbidden.rb +219 -0
  155. data/lib/ory-oathkeeper-client/models/judge_forbidden_body.rb +272 -0
  156. data/lib/ory-oathkeeper-client/models/judge_internal_server_error.rb +219 -0
  157. data/lib/ory-oathkeeper-client/models/judge_internal_server_error_body.rb +272 -0
  158. data/lib/ory-oathkeeper-client/models/judge_not_found.rb +219 -0
  159. data/lib/ory-oathkeeper-client/models/judge_not_found_body.rb +272 -0
  160. data/lib/ory-oathkeeper-client/models/judge_unauthorized.rb +219 -0
  161. data/lib/ory-oathkeeper-client/models/judge_unauthorized_body.rb +272 -0
  162. data/lib/ory-oathkeeper-client/models/list_rules_forbidden.rb +219 -0
  163. data/lib/ory-oathkeeper-client/models/list_rules_forbidden_body.rb +272 -0
  164. data/lib/ory-oathkeeper-client/models/list_rules_internal_server_error.rb +219 -0
  165. data/lib/ory-oathkeeper-client/models/list_rules_internal_server_error_body.rb +272 -0
  166. data/lib/ory-oathkeeper-client/models/list_rules_ok.rb +222 -0
  167. data/lib/ory-oathkeeper-client/models/list_rules_unauthorized.rb +219 -0
  168. data/lib/ory-oathkeeper-client/models/list_rules_unauthorized_body.rb +272 -0
  169. data/lib/ory-oathkeeper-client/models/rule.rb +280 -0
  170. data/lib/ory-oathkeeper-client/models/rule_handler.rb +229 -0
  171. data/lib/ory-oathkeeper-client/models/rule_match.rb +231 -0
  172. data/lib/ory-oathkeeper-client/models/swagger_create_rule_parameters.rb +219 -0
  173. data/lib/ory-oathkeeper-client/models/swagger_get_rule_parameters.rb +225 -0
  174. data/lib/ory-oathkeeper-client/models/swagger_health_status.rb +220 -0
  175. data/lib/ory-oathkeeper-client/models/swagger_json_web_key.rb +382 -0
  176. data/lib/ory-oathkeeper-client/models/swagger_json_web_key_set.rb +222 -0
  177. data/lib/ory-oathkeeper-client/models/swagger_list_rules_parameters.rb +230 -0
  178. data/lib/ory-oathkeeper-client/models/swagger_not_ready_status.rb +222 -0
  179. data/lib/ory-oathkeeper-client/models/swagger_rule.rb +280 -0
  180. data/lib/ory-oathkeeper-client/models/swagger_rule_handler.rb +230 -0
  181. data/lib/ory-oathkeeper-client/models/swagger_rule_match.rb +232 -0
  182. data/lib/ory-oathkeeper-client/models/swagger_rule_response.rb +219 -0
  183. data/lib/ory-oathkeeper-client/models/swagger_rules_response.rb +222 -0
  184. data/lib/ory-oathkeeper-client/models/swagger_update_rule_parameters.rb +234 -0
  185. data/lib/ory-oathkeeper-client/models/swagger_version.rb +220 -0
  186. data/lib/ory-oathkeeper-client/models/update_rule_forbidden.rb +219 -0
  187. data/lib/ory-oathkeeper-client/models/update_rule_forbidden_body.rb +272 -0
  188. data/lib/ory-oathkeeper-client/models/update_rule_internal_server_error.rb +219 -0
  189. data/lib/ory-oathkeeper-client/models/update_rule_internal_server_error_body.rb +272 -0
  190. data/lib/ory-oathkeeper-client/models/update_rule_not_found.rb +219 -0
  191. data/lib/ory-oathkeeper-client/models/update_rule_not_found_body.rb +272 -0
  192. data/lib/ory-oathkeeper-client/models/update_rule_ok.rb +219 -0
  193. data/lib/ory-oathkeeper-client/models/update_rule_unauthorized.rb +219 -0
  194. data/lib/ory-oathkeeper-client/models/update_rule_unauthorized_body.rb +272 -0
  195. data/lib/ory-oathkeeper-client/models/upstream.rb +240 -0
  196. data/lib/ory-oathkeeper-client/models/version.rb +219 -0
  197. data/lib/ory-oathkeeper-client/version.rb +15 -0
  198. data/ory-oathkeeper-client.gemspec +38 -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 +477 -0
@@ -0,0 +1,240 @@
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.38
7
+ Contact: hi@ory.am
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OryOathkeeperClient
17
+ # Upstream Upstream Upstream Upstream Upstream Upstream Upstream upstream
18
+ class Upstream
19
+ # PreserveHost, if false (the default), tells ORY Oathkeeper to set the upstream request's Host header to the hostname of the API's upstream's URL. Setting this flag to true instructs ORY Oathkeeper not to do so.
20
+ attr_accessor :preserve_host
21
+
22
+ # StripPath if set, replaces the provided path prefix when forwarding the requested URL to the upstream URL.
23
+ attr_accessor :strip_path
24
+
25
+ # URL is the URL the request will be proxied to.
26
+ attr_accessor :url
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'preserve_host' => :'preserve_host',
32
+ :'strip_path' => :'strip_path',
33
+ :'url' => :'url'
34
+ }
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'preserve_host' => :'Boolean',
46
+ :'strip_path' => :'String',
47
+ :'url' => :'String'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryOathkeeperClient::Upstream` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryOathkeeperClient::Upstream`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'preserve_host')
73
+ self.preserve_host = attributes[:'preserve_host']
74
+ end
75
+
76
+ if attributes.key?(:'strip_path')
77
+ self.strip_path = attributes[:'strip_path']
78
+ end
79
+
80
+ if attributes.key?(:'url')
81
+ self.url = attributes[:'url']
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ invalid_properties = Array.new
89
+ invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ preserve_host == o.preserve_host &&
104
+ strip_path == o.strip_path &&
105
+ url == o.url
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ def hash
117
+ [preserve_host, strip_path, url].hash
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def self.build_from_hash(attributes)
124
+ new.build_from_hash(attributes)
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = OryOathkeeperClient.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -0,0 +1,219 @@
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.38
7
+ Contact: hi@ory.am
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OryOathkeeperClient
17
+ class Version
18
+ # Version is the service's version.
19
+ attr_accessor :version
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'version' => :'version'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'version' => :'String'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryOathkeeperClient::Version` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryOathkeeperClient::Version`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'version')
62
+ self.version = attributes[:'version']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ version == o.version
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [version].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ new.build_from_hash(attributes)
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ self.class.openapi_types.each_pair do |key, type|
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :Time
135
+ Time.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :Boolean
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ # models (e.g. Pet) or oneOf
166
+ klass = OryOathkeeperClient.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+
217
+ end
218
+
219
+ end