authentik-api 2026.2.7 → 2026.5.0.rc1

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 (277) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/README_API.md +67 -15
  4. data/lib/authentik/api/api/admin_api.rb +4 -12
  5. data/lib/authentik/api/api/core_api.rb +143 -18
  6. data/lib/authentik/api/api/crypto_api.rb +2 -6
  7. data/lib/authentik/api/api/endpoints_api.rb +1577 -656
  8. data/lib/authentik/api/api/events_api.rb +121 -38
  9. data/lib/authentik/api/api/flows_api.rb +8 -90
  10. data/lib/authentik/api/api/lifecycle_api.rb +22 -13
  11. data/lib/authentik/api/api/managed_api.rb +73 -0
  12. data/lib/authentik/api/api/policies_api.rb +5 -6
  13. data/lib/authentik/api/api/providers_api.rb +46 -108
  14. data/lib/authentik/api/api/rbac_api.rb +0 -5
  15. data/lib/authentik/api/api/schema_api.rb +4 -12
  16. data/lib/authentik/api/api/sources_api.rb +35 -96
  17. data/lib/authentik/api/api/ssf_api.rb +63 -6
  18. data/lib/authentik/api/api/stages_api.rb +581 -102
  19. data/lib/authentik/api/api/tasks_api.rb +5 -13
  20. data/lib/authentik/api/models/account_lockdown_stage.rb +372 -0
  21. data/lib/authentik/api/models/account_lockdown_stage_request.rb +219 -0
  22. data/lib/authentik/api/models/app_enum.rb +3 -2
  23. data/lib/authentik/api/models/apple_independent_secure_enclave.rb +246 -0
  24. data/lib/authentik/api/models/apple_independent_secure_enclave_request.rb +273 -0
  25. data/lib/authentik/api/models/application.rb +14 -4
  26. data/lib/authentik/api/models/application_request.rb +14 -4
  27. data/lib/authentik/api/models/authenticated_session_user_agent_device.rb +2 -30
  28. data/lib/authentik/api/models/authenticated_session_user_agent_os.rb +4 -60
  29. data/lib/authentik/api/models/authentication_enum.rb +2 -1
  30. data/lib/authentik/api/models/authenticator_email_stage.rb +10 -1
  31. data/lib/authentik/api/models/authenticator_sms_stage.rb +36 -1
  32. data/lib/authentik/api/models/authenticator_validate_stage.rb +51 -4
  33. data/lib/authentik/api/models/authenticator_validate_stage_request.rb +51 -4
  34. data/lib/authentik/api/models/authenticator_web_authn_stage.rb +23 -2
  35. data/lib/authentik/api/models/authenticator_web_authn_stage_request.rb +23 -2
  36. data/lib/authentik/api/models/{flow_import_result.rb → blueprint_import_result.rb} +4 -4
  37. data/lib/authentik/api/models/brand.rb +11 -1
  38. data/lib/authentik/api/models/brand_request.rb +11 -1
  39. data/lib/authentik/api/models/certificate_key_pair.rb +1 -1
  40. data/lib/authentik/api/models/certificate_key_pair_key_type_enum.rb +37 -0
  41. data/lib/authentik/api/models/compatibility_mode_enum.rb +3 -1
  42. data/lib/authentik/api/models/{consent_stage_mode_enum.rb → consent_mode_enum.rb} +3 -3
  43. data/lib/authentik/api/models/consent_stage.rb +1 -1
  44. data/lib/authentik/api/models/consent_stage_request.rb +1 -1
  45. data/lib/authentik/api/models/country_code_enum.rb +3 -3
  46. data/lib/authentik/api/models/current_brand.rb +10 -1
  47. data/lib/authentik/api/models/current_brand_flags.rb +31 -27
  48. data/lib/authentik/api/models/delivery_method_enum.rb +3 -1
  49. data/lib/authentik/api/models/event_matcher_policy.rb +15 -5
  50. data/lib/authentik/api/models/event_matcher_policy_request.rb +30 -5
  51. data/lib/authentik/api/models/event_stats.rb +187 -0
  52. data/lib/authentik/api/models/event_volume.rb +1 -1
  53. data/lib/authentik/api/models/events_requested_enum.rb +7 -1
  54. data/lib/authentik/api/models/expiring_base_grant_model.rb +1 -1
  55. data/lib/authentik/api/models/force_binding_enum.rb +34 -0
  56. data/lib/authentik/api/models/{resident_key_requirement_enum.rb → format_enum.rb} +6 -7
  57. data/lib/authentik/api/models/geo_ip_policy.rb +1 -1
  58. data/lib/authentik/api/models/{detailed_country_field.rb → geo_ip_policy_countries_obj_inner.rb} +22 -26
  59. data/lib/authentik/api/models/google_chrome_connector.rb +326 -0
  60. data/lib/authentik/api/models/google_chrome_connector_request.rb +214 -0
  61. data/lib/authentik/api/models/grant_types_enum.rb +39 -0
  62. data/lib/authentik/api/models/group_kerberos_source_connection_request.rb +27 -1
  63. data/lib/authentik/api/models/group_ldap_source_connection.rb +30 -4
  64. data/lib/authentik/api/models/group_ldap_source_connection_request.rb +27 -1
  65. data/lib/authentik/api/models/group_o_auth_source_connection_request.rb +27 -1
  66. data/lib/authentik/api/models/group_plex_source_connection_request.rb +27 -1
  67. data/lib/authentik/api/models/group_saml_source_connection_request.rb +27 -1
  68. data/lib/authentik/api/models/group_source_connection_request.rb +27 -1
  69. data/lib/authentik/api/models/group_telegram_source_connection_request.rb +27 -1
  70. data/lib/authentik/api/models/iframe_logout_challenge.rb +1 -1
  71. data/lib/authentik/api/models/invitation_send_email_request.rb +213 -0
  72. data/lib/authentik/api/models/kerberos_source.rb +21 -1
  73. data/lib/authentik/api/models/key_type_enum.rb +3 -3
  74. data/lib/authentik/api/models/lang_enum.rb +131 -0
  75. data/lib/authentik/api/models/lifecycle_iteration.rb +30 -86
  76. data/lib/authentik/api/models/logout_url.rb +209 -0
  77. data/lib/authentik/api/models/microsoft_entra_provider.rb +27 -1
  78. data/lib/authentik/api/models/model_enum.rb +3 -1
  79. data/lib/authentik/api/models/native_logout_challenge.rb +68 -37
  80. data/lib/authentik/api/models/notification_transport.rb +13 -2
  81. data/lib/authentik/api/models/notification_transport_request.rb +13 -2
  82. data/lib/authentik/api/models/o_auth2_provider.rb +12 -1
  83. data/lib/authentik/api/models/o_auth2_provider_request.rb +12 -1
  84. data/lib/authentik/api/models/operating_system.rb +0 -17
  85. data/lib/authentik/api/models/operating_system_request.rb +2 -9
  86. data/lib/authentik/api/models/paginated_account_lockdown_stage_list.rb +214 -0
  87. data/lib/authentik/api/models/paginated_apple_independent_secure_enclave_list.rb +214 -0
  88. data/lib/authentik/api/models/paginated_extra_role_object_permission_list.rb +32 -4
  89. data/lib/authentik/api/models/paginated_google_chrome_connector_list.rb +214 -0
  90. data/lib/authentik/api/models/patched_account_lockdown_stage_request.rb +212 -0
  91. data/lib/authentik/api/models/patched_apple_independent_secure_enclave_request.rb +235 -0
  92. data/lib/authentik/api/models/patched_application_request.rb +14 -4
  93. data/lib/authentik/api/models/patched_authenticator_validate_stage_request.rb +51 -4
  94. data/lib/authentik/api/models/patched_authenticator_web_authn_stage_request.rb +23 -2
  95. data/lib/authentik/api/models/patched_brand_request.rb +11 -1
  96. data/lib/authentik/api/models/patched_consent_stage_request.rb +1 -1
  97. data/lib/authentik/api/models/patched_event_matcher_policy_request.rb +30 -5
  98. data/lib/authentik/api/models/patched_google_chrome_connector_request.rb +190 -0
  99. data/lib/authentik/api/models/patched_group_kerberos_source_connection_request.rb +10 -1
  100. data/lib/authentik/api/models/patched_group_ldap_source_connection_request.rb +10 -1
  101. data/lib/authentik/api/models/patched_group_o_auth_source_connection_request.rb +10 -1
  102. data/lib/authentik/api/models/patched_group_plex_source_connection_request.rb +10 -1
  103. data/lib/authentik/api/models/patched_group_saml_source_connection_request.rb +10 -1
  104. data/lib/authentik/api/models/patched_group_source_connection_request.rb +10 -1
  105. data/lib/authentik/api/models/patched_group_telegram_source_connection_request.rb +10 -1
  106. data/lib/authentik/api/models/patched_notification_transport_request.rb +13 -2
  107. data/lib/authentik/api/models/patched_o_auth2_provider_request.rb +12 -1
  108. data/lib/authentik/api/models/patched_saml_provider_request.rb +17 -27
  109. data/lib/authentik/api/models/patched_saml_source_request.rb +11 -1
  110. data/lib/authentik/api/models/patched_settings_request_flags.rb +31 -27
  111. data/lib/authentik/api/models/patched_ssf_provider_request.rb +13 -4
  112. data/lib/authentik/api/models/patched_user_kerberos_source_connection_request.rb +10 -1
  113. data/lib/authentik/api/models/patched_user_ldap_source_connection_request.rb +10 -1
  114. data/lib/authentik/api/models/patched_user_o_auth_source_connection_request.rb +10 -1
  115. data/lib/authentik/api/models/patched_user_plex_source_connection_request.rb +10 -1
  116. data/lib/authentik/api/models/patched_user_saml_source_connection_request.rb +10 -1
  117. data/lib/authentik/api/models/patched_user_source_connection_request.rb +10 -1
  118. data/lib/authentik/api/models/patched_user_telegram_source_connection_request.rb +10 -1
  119. data/lib/authentik/api/models/prompt_type_enum.rb +4 -1
  120. data/lib/authentik/api/models/provider_type_enum.rb +2 -2
  121. data/lib/authentik/api/models/redirect_challenge.rb +4 -15
  122. data/lib/authentik/api/models/redirect_uri.rb +13 -4
  123. data/lib/authentik/api/models/redirect_uri_request.rb +13 -4
  124. data/lib/authentik/api/models/redirect_uri_type_enum.rb +34 -0
  125. data/lib/authentik/api/models/related_rule.rb +250 -0
  126. data/lib/authentik/api/models/saml_provider.rb +98 -8
  127. data/lib/authentik/api/models/saml_provider_request.rb +17 -27
  128. data/lib/authentik/api/models/saml_source.rb +11 -1
  129. data/lib/authentik/api/models/saml_source_request.rb +11 -1
  130. data/lib/authentik/api/models/scim_provider.rb +11 -1
  131. data/lib/authentik/api/models/ssf_provider.rb +41 -4
  132. data/lib/authentik/api/models/ssf_provider_request.rb +13 -4
  133. data/lib/authentik/api/models/ssf_stream.rb +10 -1
  134. data/lib/authentik/api/models/ssf_stream_status_enum.rb +36 -0
  135. data/lib/authentik/api/models/task.rb +1 -1
  136. data/lib/authentik/api/models/{task_state_enum.rb → task_status_enum.rb} +3 -3
  137. data/lib/authentik/api/models/token_model.rb +1 -1
  138. data/lib/authentik/api/models/{notification_transport_mode_enum.rb → transport_mode_enum.rb} +3 -3
  139. data/lib/authentik/api/models/usage_enum.rb +33 -0
  140. data/lib/authentik/api/models/user_account_lockdown_request.rb +144 -0
  141. data/lib/authentik/api/models/user_kerberos_source_connection_request.rb +27 -1
  142. data/lib/authentik/api/models/user_ldap_source_connection.rb +30 -4
  143. data/lib/authentik/api/models/user_ldap_source_connection_request.rb +27 -1
  144. data/lib/authentik/api/models/user_o_auth_source_connection_request.rb +27 -1
  145. data/lib/authentik/api/models/user_password_hash_set_request.rb +168 -0
  146. data/lib/authentik/api/models/user_plex_source_connection_request.rb +27 -1
  147. data/lib/authentik/api/models/user_saml_source_connection_request.rb +27 -1
  148. data/lib/authentik/api/models/user_source_connection_request.rb +27 -1
  149. data/lib/authentik/api/models/user_telegram_source_connection_request.rb +27 -1
  150. data/lib/authentik/api/models/vendor_enum.rb +2 -1
  151. data/lib/authentik/api/models/web_authn_hint_enum.rb +35 -0
  152. data/lib/authentik/api/version.rb +1 -1
  153. data/spec/api/admin_api_spec.rb +2 -2
  154. data/spec/api/core_api_spec.rb +27 -3
  155. data/spec/api/crypto_api_spec.rb +1 -1
  156. data/spec/api/endpoints_api_spec.rb +167 -0
  157. data/spec/api/events_api_spec.rb +33 -7
  158. data/spec/api/flows_api_spec.rb +4 -16
  159. data/spec/api/lifecycle_api_spec.rb +6 -3
  160. data/spec/api/managed_api_spec.rb +13 -0
  161. data/spec/api/policies_api_spec.rb +2 -1
  162. data/spec/api/providers_api_spec.rb +21 -19
  163. data/spec/api/schema_api_spec.rb +2 -2
  164. data/spec/api/sources_api_spec.rb +17 -16
  165. data/spec/api/ssf_api_spec.rb +12 -1
  166. data/spec/api/stages_api_spec.rb +117 -18
  167. data/spec/api/tasks_api_spec.rb +2 -2
  168. data/spec/models/account_lockdown_stage_request_spec.rb +60 -0
  169. data/spec/models/account_lockdown_stage_spec.rb +96 -0
  170. data/spec/models/apple_independent_secure_enclave_request_spec.rb +54 -0
  171. data/spec/models/apple_independent_secure_enclave_spec.rb +54 -0
  172. data/spec/models/application_request_spec.rb +6 -0
  173. data/spec/models/application_spec.rb +6 -0
  174. data/spec/models/authenticator_email_stage_spec.rb +6 -0
  175. data/spec/models/authenticator_sms_stage_spec.rb +12 -0
  176. data/spec/models/authenticator_validate_stage_request_spec.rb +30 -0
  177. data/spec/models/authenticator_validate_stage_spec.rb +30 -0
  178. data/spec/models/authenticator_web_authn_stage_request_spec.rb +12 -0
  179. data/spec/models/authenticator_web_authn_stage_spec.rb +12 -0
  180. data/spec/models/{flow_import_result_spec.rb → blueprint_import_result_spec.rb} +6 -6
  181. data/spec/models/brand_request_spec.rb +6 -0
  182. data/spec/models/brand_spec.rb +6 -0
  183. data/spec/models/{notification_transport_mode_enum_spec.rb → certificate_key_pair_key_type_enum_spec.rb} +6 -6
  184. data/spec/models/{consent_stage_mode_enum_spec.rb → consent_mode_enum_spec.rb} +6 -6
  185. data/spec/models/current_brand_flags_spec.rb +2 -2
  186. data/spec/models/current_brand_spec.rb +6 -0
  187. data/spec/models/event_matcher_policy_request_spec.rb +6 -0
  188. data/spec/models/event_matcher_policy_spec.rb +6 -0
  189. data/spec/models/event_stats_spec.rb +36 -0
  190. data/spec/models/force_binding_enum_spec.rb +24 -0
  191. data/spec/models/format_enum_spec.rb +24 -0
  192. data/spec/models/{detailed_country_field_spec.rb → geo_ip_policy_countries_obj_inner_spec.rb} +6 -6
  193. data/spec/models/google_chrome_connector_request_spec.rb +48 -0
  194. data/spec/models/google_chrome_connector_spec.rb +78 -0
  195. data/spec/models/grant_types_enum_spec.rb +24 -0
  196. data/spec/models/group_kerberos_source_connection_request_spec.rb +6 -0
  197. data/spec/models/group_ldap_source_connection_request_spec.rb +6 -0
  198. data/spec/models/group_ldap_source_connection_spec.rb +6 -0
  199. data/spec/models/group_o_auth_source_connection_request_spec.rb +6 -0
  200. data/spec/models/group_plex_source_connection_request_spec.rb +6 -0
  201. data/spec/models/group_saml_source_connection_request_spec.rb +6 -0
  202. data/spec/models/group_source_connection_request_spec.rb +6 -0
  203. data/spec/models/group_telegram_source_connection_request_spec.rb +6 -0
  204. data/spec/models/invitation_send_email_request_spec.rb +48 -0
  205. data/spec/models/kerberos_source_spec.rb +12 -0
  206. data/spec/models/lang_enum_spec.rb +24 -0
  207. data/spec/models/lifecycle_iteration_spec.rb +2 -14
  208. data/spec/models/logout_url_spec.rb +60 -0
  209. data/spec/models/microsoft_entra_provider_spec.rb +6 -0
  210. data/spec/models/native_logout_challenge_spec.rb +13 -7
  211. data/spec/models/notification_transport_request_spec.rb +6 -0
  212. data/spec/models/notification_transport_spec.rb +6 -0
  213. data/spec/models/o_auth2_provider_request_spec.rb +6 -0
  214. data/spec/models/o_auth2_provider_spec.rb +6 -0
  215. data/spec/models/paginated_account_lockdown_stage_list_spec.rb +42 -0
  216. data/spec/models/paginated_apple_independent_secure_enclave_list_spec.rb +42 -0
  217. data/spec/models/paginated_extra_role_object_permission_list_spec.rb +6 -0
  218. data/spec/models/paginated_google_chrome_connector_list_spec.rb +42 -0
  219. data/spec/models/patched_account_lockdown_stage_request_spec.rb +60 -0
  220. data/spec/models/patched_apple_independent_secure_enclave_request_spec.rb +54 -0
  221. data/spec/models/patched_application_request_spec.rb +6 -0
  222. data/spec/models/patched_authenticator_validate_stage_request_spec.rb +30 -0
  223. data/spec/models/patched_authenticator_web_authn_stage_request_spec.rb +12 -0
  224. data/spec/models/patched_brand_request_spec.rb +6 -0
  225. data/spec/models/patched_event_matcher_policy_request_spec.rb +6 -0
  226. data/spec/models/patched_google_chrome_connector_request_spec.rb +48 -0
  227. data/spec/models/patched_group_kerberos_source_connection_request_spec.rb +6 -0
  228. data/spec/models/patched_group_ldap_source_connection_request_spec.rb +6 -0
  229. data/spec/models/patched_group_o_auth_source_connection_request_spec.rb +6 -0
  230. data/spec/models/patched_group_plex_source_connection_request_spec.rb +6 -0
  231. data/spec/models/patched_group_saml_source_connection_request_spec.rb +6 -0
  232. data/spec/models/patched_group_source_connection_request_spec.rb +6 -0
  233. data/spec/models/patched_group_telegram_source_connection_request_spec.rb +6 -0
  234. data/spec/models/patched_notification_transport_request_spec.rb +6 -0
  235. data/spec/models/patched_o_auth2_provider_request_spec.rb +6 -0
  236. data/spec/models/patched_saml_provider_request_spec.rb +7 -1
  237. data/spec/models/patched_saml_source_request_spec.rb +6 -0
  238. data/spec/models/patched_settings_request_flags_spec.rb +2 -2
  239. data/spec/models/patched_ssf_provider_request_spec.rb +6 -0
  240. data/spec/models/patched_user_kerberos_source_connection_request_spec.rb +6 -0
  241. data/spec/models/patched_user_ldap_source_connection_request_spec.rb +6 -0
  242. data/spec/models/patched_user_o_auth_source_connection_request_spec.rb +6 -0
  243. data/spec/models/patched_user_plex_source_connection_request_spec.rb +6 -0
  244. data/spec/models/patched_user_saml_source_connection_request_spec.rb +6 -0
  245. data/spec/models/patched_user_source_connection_request_spec.rb +6 -0
  246. data/spec/models/patched_user_telegram_source_connection_request_spec.rb +6 -0
  247. data/spec/models/redirect_challenge_spec.rb +0 -6
  248. data/spec/models/redirect_uri_request_spec.rb +6 -0
  249. data/spec/models/redirect_uri_spec.rb +6 -0
  250. data/spec/models/redirect_uri_type_enum_spec.rb +24 -0
  251. data/spec/models/related_rule_spec.rb +54 -0
  252. data/spec/models/saml_provider_request_spec.rb +7 -1
  253. data/spec/models/saml_provider_spec.rb +25 -1
  254. data/spec/models/saml_source_request_spec.rb +6 -0
  255. data/spec/models/saml_source_spec.rb +6 -0
  256. data/spec/models/scim_provider_spec.rb +6 -0
  257. data/spec/models/ssf_provider_request_spec.rb +6 -0
  258. data/spec/models/ssf_provider_spec.rb +12 -0
  259. data/spec/models/ssf_stream_spec.rb +6 -0
  260. data/spec/models/ssf_stream_status_enum_spec.rb +24 -0
  261. data/spec/models/{task_state_enum_spec.rb → task_status_enum_spec.rb} +6 -6
  262. data/spec/models/transport_mode_enum_spec.rb +24 -0
  263. data/spec/models/usage_enum_spec.rb +24 -0
  264. data/spec/models/user_account_lockdown_request_spec.rb +30 -0
  265. data/spec/models/user_kerberos_source_connection_request_spec.rb +6 -0
  266. data/spec/models/user_ldap_source_connection_request_spec.rb +6 -0
  267. data/spec/models/user_ldap_source_connection_spec.rb +6 -0
  268. data/spec/models/user_o_auth_source_connection_request_spec.rb +6 -0
  269. data/spec/models/user_password_hash_set_request_spec.rb +30 -0
  270. data/spec/models/user_plex_source_connection_request_spec.rb +6 -0
  271. data/spec/models/user_saml_source_connection_request_spec.rb +6 -0
  272. data/spec/models/user_source_connection_request_spec.rb +6 -0
  273. data/spec/models/user_telegram_source_connection_request_spec.rb +6 -0
  274. data/spec/models/web_authn_hint_enum_spec.rb +24 -0
  275. data/spec/zeitwerk_spec.rb +34 -0
  276. metadata +113 -32
  277. data/spec/models/resident_key_requirement_enum_spec.rb +0 -24
@@ -0,0 +1,187 @@
1
+ =begin
2
+ This file is automatically generated by: https://openapi-generator.tech.
3
+ Any manual changes will be lost when the OpenAPI scheme changes.
4
+
5
+ =end
6
+
7
+ require 'date'
8
+ require 'time'
9
+
10
+ module Authentik::Api
11
+ # Count of unique users in events and aggregated counts per specified deltas
12
+ class EventStats < ApiModelBase
13
+ attr_accessor :unique_users
14
+
15
+ attr_accessor :count_step
16
+
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ :'unique_users' => :'unique_users',
21
+ :'count_step' => :'count_step'
22
+ }
23
+ end
24
+
25
+ # Returns attribute mapping this model knows about
26
+ def self.acceptable_attribute_map
27
+ attribute_map
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ acceptable_attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'unique_users' => :'Integer',
39
+ :'count_step' => :'Hash<String, Object>'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::EventStats` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ acceptable_attribute_map = self.class.acceptable_attribute_map
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!acceptable_attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::EventStats`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'unique_users')
66
+ self.unique_users = attributes[:'unique_users']
67
+ else
68
+ self.unique_users = nil
69
+ end
70
+
71
+ if attributes.key?(:'count_step')
72
+ if (value = attributes[:'count_step']).is_a?(Hash)
73
+ self.count_step = value
74
+ end
75
+ else
76
+ self.count_step = nil
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
84
+ invalid_properties = Array.new
85
+ if @unique_users.nil?
86
+ invalid_properties.push('invalid value for "unique_users", unique_users cannot be nil.')
87
+ end
88
+
89
+ if @count_step.nil?
90
+ invalid_properties.push('invalid value for "count_step", count_step cannot be nil.')
91
+ end
92
+
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
100
+ return false if @unique_users.nil?
101
+ return false if @count_step.nil?
102
+ true
103
+ end
104
+
105
+ # Custom attribute writer method with validation
106
+ # @param [Object] unique_users Value to be assigned
107
+ def unique_users=(unique_users)
108
+ if unique_users.nil?
109
+ fail ArgumentError, 'unique_users cannot be nil'
110
+ end
111
+
112
+ @unique_users = unique_users
113
+ end
114
+
115
+ # Custom attribute writer method with validation
116
+ # @param [Object] count_step Value to be assigned
117
+ def count_step=(count_step)
118
+ if count_step.nil?
119
+ fail ArgumentError, 'count_step cannot be nil'
120
+ end
121
+
122
+ @count_step = count_step
123
+ end
124
+
125
+ # Checks equality by comparing each attribute.
126
+ # @param [Object] Object to be compared
127
+ def ==(o)
128
+ return true if self.equal?(o)
129
+ self.class == o.class &&
130
+ unique_users == o.unique_users &&
131
+ count_step == o.count_step
132
+ end
133
+
134
+ # @see the `==` method
135
+ # @param [Object] Object to be compared
136
+ def eql?(o)
137
+ self == o
138
+ end
139
+
140
+ # Calculates hash code according to all attributes.
141
+ # @return [Integer] Hash code
142
+ def hash
143
+ [unique_users, count_step].hash
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def self.build_from_hash(attributes)
150
+ return nil unless attributes.is_a?(Hash)
151
+ attributes = attributes.transform_keys(&:to_sym)
152
+ transformed_hash = {}
153
+ openapi_types.each_pair do |key, type|
154
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
155
+ transformed_hash["#{key}"] = nil
156
+ elsif type =~ /\AArray<(.*)>/i
157
+ # check to ensure the input is an array given that the attribute
158
+ # is documented as an array but the input is not
159
+ if attributes[attribute_map[key]].is_a?(Array)
160
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
161
+ end
162
+ elsif !attributes[attribute_map[key]].nil?
163
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
164
+ end
165
+ end
166
+ new(transformed_hash)
167
+ end
168
+
169
+ # Returns the object in the form of hash
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_hash
172
+ hash = {}
173
+ self.class.attribute_map.each_pair do |attr, param|
174
+ value = self.send(attr)
175
+ if value.nil?
176
+ is_nullable = self.class.openapi_nullable.include?(attr)
177
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
178
+ end
179
+
180
+ hash[param] = _to_hash(value)
181
+ end
182
+ hash
183
+ end
184
+
185
+ end
186
+
187
+ end
@@ -8,7 +8,7 @@ require 'date'
8
8
  require 'time'
9
9
 
10
10
  module Authentik::Api
11
- # Count of events of action created on day
11
+ # Count of events of action created on day for a single event action
12
12
  class EventVolume < ApiModelBase
13
13
  attr_accessor :action
14
14
 
@@ -10,11 +10,17 @@ require 'time'
10
10
  module Authentik::Api
11
11
  class EventsRequestedEnum
12
12
  HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_SESSION_REVOKED = "https://schemas.openid.net/secevent/caep/event-type/session-revoked".freeze
13
+ HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_TOKEN_CLAIMS_CHANGE = "https://schemas.openid.net/secevent/caep/event-type/token-claims-change".freeze
13
14
  HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_CREDENTIAL_CHANGE = "https://schemas.openid.net/secevent/caep/event-type/credential-change".freeze
15
+ HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_ASSURANCE_LEVEL_CHANGE = "https://schemas.openid.net/secevent/caep/event-type/assurance-level-change".freeze
16
+ HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_DEVICE_COMPLIANCE_CHANGE = "https://schemas.openid.net/secevent/caep/event-type/device-compliance-change".freeze
17
+ HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_SESSION_ESTABLISHED = "https://schemas.openid.net/secevent/caep/event-type/session-established".freeze
18
+ HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_SESSION_PRESENTED = "https://schemas.openid.net/secevent/caep/event-type/session-presented".freeze
19
+ HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_RISK_LEVEL_CHANGE = "https://schemas.openid.net/secevent/caep/event-type/risk-level-change".freeze
14
20
  HTTPS___SCHEMAS_OPENID_NET_SECEVENT_SSF_EVENT_TYPE_VERIFICATION = "https://schemas.openid.net/secevent/ssf/event-type/verification".freeze
15
21
 
16
22
  def self.all_vars
17
- @all_vars ||= [HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_SESSION_REVOKED, HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_CREDENTIAL_CHANGE, HTTPS___SCHEMAS_OPENID_NET_SECEVENT_SSF_EVENT_TYPE_VERIFICATION].freeze
23
+ @all_vars ||= [HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_SESSION_REVOKED, HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_TOKEN_CLAIMS_CHANGE, HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_CREDENTIAL_CHANGE, HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_ASSURANCE_LEVEL_CHANGE, HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_DEVICE_COMPLIANCE_CHANGE, HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_SESSION_ESTABLISHED, HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_SESSION_PRESENTED, HTTPS___SCHEMAS_OPENID_NET_SECEVENT_CAEP_EVENT_TYPE_RISK_LEVEL_CHANGE, HTTPS___SCHEMAS_OPENID_NET_SECEVENT_SSF_EVENT_TYPE_VERIFICATION].freeze
18
24
  end
19
25
 
20
26
  # Builds the enum from string
@@ -49,7 +49,7 @@ module Authentik::Api
49
49
  def self.openapi_types
50
50
  {
51
51
  :'pk' => :'Integer',
52
- :'provider' => :'Provider',
52
+ :'provider' => :'OAuth2Provider',
53
53
  :'user' => :'User',
54
54
  :'is_expired' => :'Boolean',
55
55
  :'expires' => :'Time',
@@ -0,0 +1,34 @@
1
+ =begin
2
+ This file is automatically generated by: https://openapi-generator.tech.
3
+ Any manual changes will be lost when the OpenAPI scheme changes.
4
+
5
+ =end
6
+
7
+ require 'date'
8
+ require 'time'
9
+
10
+ module Authentik::Api
11
+ class ForceBindingEnum
12
+ URN_OASIS_NAMES_TC_SAML_2_0_BINDINGS_HTTP_POST = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST".freeze
13
+ URN_OASIS_NAMES_TC_SAML_2_0_BINDINGS_HTTP_REDIRECT = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect".freeze
14
+
15
+ def self.all_vars
16
+ @all_vars ||= [URN_OASIS_NAMES_TC_SAML_2_0_BINDINGS_HTTP_POST, URN_OASIS_NAMES_TC_SAML_2_0_BINDINGS_HTTP_REDIRECT].freeze
17
+ end
18
+
19
+ # Builds the enum from string
20
+ # @param [String] The enum value in the form of the string
21
+ # @return [String] The enum value
22
+ def self.build_from_hash(value)
23
+ new.build_from_hash(value)
24
+ end
25
+
26
+ # Builds the enum from string
27
+ # @param [String] The enum value in the form of the string
28
+ # @return [String] The enum value
29
+ def build_from_hash(value)
30
+ return value if ForceBindingEnum.all_vars.include?(value)
31
+ raise "Invalid ENUM value #{value} for class #ForceBindingEnum"
32
+ end
33
+ end
34
+ end
@@ -8,13 +8,12 @@ require 'date'
8
8
  require 'time'
9
9
 
10
10
  module Authentik::Api
11
- class ResidentKeyRequirementEnum
12
- DISCOURAGED = "discouraged".freeze
13
- PREFERRED = "preferred".freeze
14
- REQUIRED = "required".freeze
11
+ class FormatEnum
12
+ JSON = "json".freeze
13
+ YAML = "yaml".freeze
15
14
 
16
15
  def self.all_vars
17
- @all_vars ||= [DISCOURAGED, PREFERRED, REQUIRED].freeze
16
+ @all_vars ||= [JSON, YAML].freeze
18
17
  end
19
18
 
20
19
  # Builds the enum from string
@@ -28,8 +27,8 @@ module Authentik::Api
28
27
  # @param [String] The enum value in the form of the string
29
28
  # @return [String] The enum value
30
29
  def build_from_hash(value)
31
- return value if ResidentKeyRequirementEnum.all_vars.include?(value)
32
- raise "Invalid ENUM value #{value} for class #ResidentKeyRequirementEnum"
30
+ return value if FormatEnum.all_vars.include?(value)
31
+ raise "Invalid ENUM value #{value} for class #FormatEnum"
33
32
  end
34
33
  end
35
34
  end
@@ -96,7 +96,7 @@ module Authentik::Api
96
96
  :'bound_to' => :'Integer',
97
97
  :'asns' => :'Array<Integer>',
98
98
  :'countries' => :'Array<CountryCodeEnum>',
99
- :'countries_obj' => :'Array<DetailedCountryField>',
99
+ :'countries_obj' => :'Array<GeoIPPolicyCountriesObjInner>',
100
100
  :'check_history_distance' => :'Boolean',
101
101
  :'history_max_distance_km' => :'Integer',
102
102
  :'distance_tolerance_km' => :'Integer',
@@ -8,33 +8,11 @@ require 'date'
8
8
  require 'time'
9
9
 
10
10
  module Authentik::Api
11
- class DetailedCountryField < ApiModelBase
11
+ class GeoIPPolicyCountriesObjInner < ApiModelBase
12
12
  attr_accessor :code
13
13
 
14
14
  attr_accessor :name
15
15
 
16
- class EnumAttributeValidator
17
- attr_reader :datatype
18
- attr_reader :allowable_values
19
-
20
- def initialize(datatype, allowable_values)
21
- @allowable_values = allowable_values.map do |value|
22
- case datatype.to_s
23
- when /Integer/i
24
- value.to_i
25
- when /Float/i
26
- value.to_f
27
- else
28
- value
29
- end
30
- end
31
- end
32
-
33
- def valid?(value)
34
- !value || allowable_values.include?(value)
35
- end
36
- end
37
-
38
16
  # Attribute mapping from ruby-style variable name to JSON key.
39
17
  def self.attribute_map
40
18
  {
@@ -56,7 +34,7 @@ module Authentik::Api
56
34
  # Attribute type mapping.
57
35
  def self.openapi_types
58
36
  {
59
- :'code' => :'CountryCodeEnum',
37
+ :'code' => :'String',
60
38
  :'name' => :'String'
61
39
  }
62
40
  end
@@ -71,14 +49,14 @@ module Authentik::Api
71
49
  # @param [Hash] attributes Model attributes in the form of hash
72
50
  def initialize(attributes = {})
73
51
  if (!attributes.is_a?(Hash))
74
- fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::DetailedCountryField` initialize method"
52
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::GeoIPPolicyCountriesObjInner` initialize method"
75
53
  end
76
54
 
77
55
  # check to see if the attribute exists and convert string to symbol for hash key
78
56
  acceptable_attribute_map = self.class.acceptable_attribute_map
79
57
  attributes = attributes.each_with_object({}) { |(k, v), h|
80
58
  if (!acceptable_attribute_map.key?(k.to_sym))
81
- fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::DetailedCountryField`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::GeoIPPolicyCountriesObjInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
60
  end
83
61
  h[k.to_sym] = v
84
62
  }
@@ -105,6 +83,14 @@ module Authentik::Api
105
83
  invalid_properties.push('invalid value for "code", code cannot be nil.')
106
84
  end
107
85
 
86
+ if @code.to_s.length > 2
87
+ invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 2.')
88
+ end
89
+
90
+ if @code.to_s.length < 2
91
+ invalid_properties.push('invalid value for "code", the character length must be greater than or equal to 2.')
92
+ end
93
+
108
94
  if @name.nil?
109
95
  invalid_properties.push('invalid value for "name", name cannot be nil.')
110
96
  end
@@ -117,6 +103,8 @@ module Authentik::Api
117
103
  def valid?
118
104
  warn '[DEPRECATED] the `valid?` method is obsolete'
119
105
  return false if @code.nil?
106
+ return false if @code.to_s.length > 2
107
+ return false if @code.to_s.length < 2
120
108
  return false if @name.nil?
121
109
  true
122
110
  end
@@ -128,6 +116,14 @@ module Authentik::Api
128
116
  fail ArgumentError, 'code cannot be nil'
129
117
  end
130
118
 
119
+ if code.to_s.length > 2
120
+ fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 2.'
121
+ end
122
+
123
+ if code.to_s.length < 2
124
+ fail ArgumentError, 'invalid value for "code", the character length must be greater than or equal to 2.'
125
+ end
126
+
131
127
  @code = code
132
128
  end
133
129