authentik-api 2026.2.2 → 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 (218) 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 +5 -13
  5. data/lib/authentik/api/api/authenticators_api.rb +60 -60
  6. data/lib/authentik/api/api/core_api.rb +188 -63
  7. data/lib/authentik/api/api/crypto_api.rb +9 -13
  8. data/lib/authentik/api/api/endpoints_api.rb +1600 -679
  9. data/lib/authentik/api/api/enterprise_api.rb +5 -5
  10. data/lib/authentik/api/api/events_api.rb +141 -58
  11. data/lib/authentik/api/api/flows_api.rb +24 -106
  12. data/lib/authentik/api/api/lifecycle_api.rb +27 -18
  13. data/lib/authentik/api/api/managed_api.rb +79 -6
  14. data/lib/authentik/api/api/oauth2_api.rb +9 -9
  15. data/lib/authentik/api/api/outposts_api.rb +22 -22
  16. data/lib/authentik/api/api/policies_api.rb +57 -58
  17. data/lib/authentik/api/api/propertymappings_api.rb +79 -79
  18. data/lib/authentik/api/api/providers_api.rb +134 -196
  19. data/lib/authentik/api/api/rac_api.rb +10 -10
  20. data/lib/authentik/api/api/rbac_api.rb +15 -20
  21. data/lib/authentik/api/api/reports_api.rb +2 -2
  22. data/lib/authentik/api/api/schema_api.rb +4 -12
  23. data/lib/authentik/api/api/sources_api.rb +158 -219
  24. data/lib/authentik/api/api/ssf_api.rb +64 -7
  25. data/lib/authentik/api/api/stages_api.rb +723 -244
  26. data/lib/authentik/api/api/tasks_api.rb +11 -19
  27. data/lib/authentik/api/api/tenants_api.rb +10 -10
  28. data/lib/authentik/api/models/account_lockdown_stage.rb +372 -0
  29. data/lib/authentik/api/models/account_lockdown_stage_request.rb +219 -0
  30. data/lib/authentik/api/models/app_enum.rb +3 -2
  31. data/lib/authentik/api/models/apple_independent_secure_enclave.rb +246 -0
  32. data/lib/authentik/api/models/apple_independent_secure_enclave_request.rb +273 -0
  33. data/lib/authentik/api/models/application.rb +14 -4
  34. data/lib/authentik/api/models/application_request.rb +14 -4
  35. data/lib/authentik/api/models/authenticated_session_user_agent_device.rb +2 -30
  36. data/lib/authentik/api/models/authenticated_session_user_agent_os.rb +4 -60
  37. data/lib/authentik/api/models/authentication_enum.rb +2 -1
  38. data/lib/authentik/api/models/authenticator_validate_stage.rb +51 -4
  39. data/lib/authentik/api/models/authenticator_validate_stage_request.rb +51 -4
  40. data/lib/authentik/api/models/authenticator_web_authn_stage.rb +23 -2
  41. data/lib/authentik/api/models/authenticator_web_authn_stage_request.rb +23 -2
  42. data/lib/authentik/api/models/{flow_import_result.rb → blueprint_import_result.rb} +4 -4
  43. data/lib/authentik/api/models/brand.rb +11 -1
  44. data/lib/authentik/api/models/brand_request.rb +11 -1
  45. data/lib/authentik/api/models/certificate_key_pair.rb +1 -1
  46. data/lib/authentik/api/models/certificate_key_pair_key_type_enum.rb +37 -0
  47. data/lib/authentik/api/models/compatibility_mode_enum.rb +3 -1
  48. data/lib/authentik/api/models/{consent_stage_mode_enum.rb → consent_mode_enum.rb} +3 -3
  49. data/lib/authentik/api/models/consent_stage.rb +1 -1
  50. data/lib/authentik/api/models/consent_stage_request.rb +1 -1
  51. data/lib/authentik/api/models/country_code_enum.rb +3 -3
  52. data/lib/authentik/api/models/current_brand.rb +10 -1
  53. data/lib/authentik/api/models/current_brand_flags.rb +31 -27
  54. data/lib/authentik/api/models/delivery_method_enum.rb +3 -1
  55. data/lib/authentik/api/models/device_user_binding.rb +3 -45
  56. data/lib/authentik/api/models/event_matcher_policy.rb +15 -5
  57. data/lib/authentik/api/models/event_matcher_policy_request.rb +30 -5
  58. data/lib/authentik/api/models/event_stats.rb +187 -0
  59. data/lib/authentik/api/models/event_volume.rb +1 -1
  60. data/lib/authentik/api/models/events_requested_enum.rb +7 -1
  61. data/lib/authentik/api/models/force_binding_enum.rb +34 -0
  62. data/lib/authentik/api/models/{resident_key_requirement_enum.rb → format_enum.rb} +6 -7
  63. data/lib/authentik/api/models/geo_ip_policy.rb +1 -1
  64. data/lib/authentik/api/models/{detailed_country_field.rb → geo_ip_policy_countries_obj_inner.rb} +22 -26
  65. data/lib/authentik/api/models/google_chrome_connector.rb +326 -0
  66. data/lib/authentik/api/models/google_chrome_connector_request.rb +214 -0
  67. data/lib/authentik/api/models/grant_types_enum.rb +39 -0
  68. data/lib/authentik/api/models/group_ldap_source_connection.rb +30 -4
  69. data/lib/authentik/api/models/iframe_logout_challenge.rb +1 -1
  70. data/lib/authentik/api/models/invitation_send_email_request.rb +213 -0
  71. data/lib/authentik/api/models/key_type_enum.rb +3 -3
  72. data/lib/authentik/api/models/lang_enum.rb +131 -0
  73. data/lib/authentik/api/models/lifecycle_iteration.rb +30 -86
  74. data/lib/authentik/api/models/logout_url.rb +209 -0
  75. data/lib/authentik/api/models/model_enum.rb +3 -1
  76. data/lib/authentik/api/models/native_logout_challenge.rb +68 -37
  77. data/lib/authentik/api/models/notification_rule.rb +1 -15
  78. data/lib/authentik/api/models/notification_transport.rb +13 -2
  79. data/lib/authentik/api/models/notification_transport_request.rb +13 -2
  80. data/lib/authentik/api/models/o_auth2_provider.rb +12 -1
  81. data/lib/authentik/api/models/o_auth2_provider_request.rb +12 -1
  82. data/lib/authentik/api/models/operating_system.rb +0 -17
  83. data/lib/authentik/api/models/operating_system_request.rb +2 -9
  84. data/lib/authentik/api/models/paginated_account_lockdown_stage_list.rb +214 -0
  85. data/lib/authentik/api/models/paginated_apple_independent_secure_enclave_list.rb +214 -0
  86. data/lib/authentik/api/models/paginated_extra_role_object_permission_list.rb +32 -4
  87. data/lib/authentik/api/models/paginated_google_chrome_connector_list.rb +214 -0
  88. data/lib/authentik/api/models/patched_account_lockdown_stage_request.rb +212 -0
  89. data/lib/authentik/api/models/patched_apple_independent_secure_enclave_request.rb +235 -0
  90. data/lib/authentik/api/models/patched_application_request.rb +14 -4
  91. data/lib/authentik/api/models/patched_authenticator_validate_stage_request.rb +51 -4
  92. data/lib/authentik/api/models/patched_authenticator_web_authn_stage_request.rb +23 -2
  93. data/lib/authentik/api/models/patched_brand_request.rb +11 -1
  94. data/lib/authentik/api/models/patched_consent_stage_request.rb +1 -1
  95. data/lib/authentik/api/models/patched_event_matcher_policy_request.rb +30 -5
  96. data/lib/authentik/api/models/patched_google_chrome_connector_request.rb +190 -0
  97. data/lib/authentik/api/models/patched_notification_transport_request.rb +13 -2
  98. data/lib/authentik/api/models/patched_o_auth2_provider_request.rb +12 -1
  99. data/lib/authentik/api/models/patched_saml_provider_request.rb +17 -27
  100. data/lib/authentik/api/models/patched_saml_source_request.rb +11 -1
  101. data/lib/authentik/api/models/patched_settings_request_flags.rb +31 -27
  102. data/lib/authentik/api/models/patched_ssf_provider_request.rb +13 -4
  103. data/lib/authentik/api/models/policy_binding.rb +3 -45
  104. data/lib/authentik/api/models/prompt_type_enum.rb +4 -1
  105. data/lib/authentik/api/models/redirect_uri.rb +13 -4
  106. data/lib/authentik/api/models/redirect_uri_request.rb +13 -4
  107. data/lib/authentik/api/models/redirect_uri_type_enum.rb +34 -0
  108. data/lib/authentik/api/models/related_rule.rb +250 -0
  109. data/lib/authentik/api/models/saml_metadata.rb +0 -2
  110. data/lib/authentik/api/models/saml_provider.rb +98 -8
  111. data/lib/authentik/api/models/saml_provider_request.rb +17 -27
  112. data/lib/authentik/api/models/saml_source.rb +11 -1
  113. data/lib/authentik/api/models/saml_source_request.rb +11 -1
  114. data/lib/authentik/api/models/ssf_provider.rb +41 -4
  115. data/lib/authentik/api/models/ssf_provider_request.rb +13 -4
  116. data/lib/authentik/api/models/ssf_stream.rb +10 -1
  117. data/lib/authentik/api/models/ssf_stream_status_enum.rb +36 -0
  118. data/lib/authentik/api/models/task.rb +1 -1
  119. data/lib/authentik/api/models/{task_state_enum.rb → task_status_enum.rb} +3 -3
  120. data/lib/authentik/api/models/{notification_transport_mode_enum.rb → transport_mode_enum.rb} +3 -3
  121. data/lib/authentik/api/models/usage_enum.rb +33 -0
  122. data/lib/authentik/api/models/user_account_lockdown_request.rb +144 -0
  123. data/lib/authentik/api/models/user_ldap_source_connection.rb +30 -4
  124. data/lib/authentik/api/models/user_password_hash_set_request.rb +168 -0
  125. data/lib/authentik/api/models/vendor_enum.rb +2 -1
  126. data/lib/authentik/api/models/web_authn_hint_enum.rb +35 -0
  127. data/lib/authentik/api/version.rb +1 -1
  128. data/spec/api/admin_api_spec.rb +2 -2
  129. data/spec/api/core_api_spec.rb +27 -3
  130. data/spec/api/crypto_api_spec.rb +1 -1
  131. data/spec/api/endpoints_api_spec.rb +167 -0
  132. data/spec/api/events_api_spec.rb +33 -7
  133. data/spec/api/flows_api_spec.rb +4 -16
  134. data/spec/api/lifecycle_api_spec.rb +6 -3
  135. data/spec/api/managed_api_spec.rb +13 -0
  136. data/spec/api/policies_api_spec.rb +2 -1
  137. data/spec/api/providers_api_spec.rb +21 -19
  138. data/spec/api/schema_api_spec.rb +2 -2
  139. data/spec/api/sources_api_spec.rb +17 -16
  140. data/spec/api/ssf_api_spec.rb +12 -1
  141. data/spec/api/stages_api_spec.rb +117 -18
  142. data/spec/api/tasks_api_spec.rb +2 -2
  143. data/spec/models/account_lockdown_stage_request_spec.rb +60 -0
  144. data/spec/models/account_lockdown_stage_spec.rb +96 -0
  145. data/spec/models/apple_independent_secure_enclave_request_spec.rb +54 -0
  146. data/spec/models/apple_independent_secure_enclave_spec.rb +54 -0
  147. data/spec/models/application_request_spec.rb +6 -0
  148. data/spec/models/application_spec.rb +6 -0
  149. data/spec/models/authenticator_validate_stage_request_spec.rb +30 -0
  150. data/spec/models/authenticator_validate_stage_spec.rb +30 -0
  151. data/spec/models/authenticator_web_authn_stage_request_spec.rb +12 -0
  152. data/spec/models/authenticator_web_authn_stage_spec.rb +12 -0
  153. data/spec/models/{flow_import_result_spec.rb → blueprint_import_result_spec.rb} +6 -6
  154. data/spec/models/brand_request_spec.rb +6 -0
  155. data/spec/models/brand_spec.rb +6 -0
  156. data/spec/models/{notification_transport_mode_enum_spec.rb → certificate_key_pair_key_type_enum_spec.rb} +6 -6
  157. data/spec/models/{consent_stage_mode_enum_spec.rb → consent_mode_enum_spec.rb} +6 -6
  158. data/spec/models/current_brand_flags_spec.rb +2 -2
  159. data/spec/models/current_brand_spec.rb +6 -0
  160. data/spec/models/event_matcher_policy_request_spec.rb +6 -0
  161. data/spec/models/event_matcher_policy_spec.rb +6 -0
  162. data/spec/models/event_stats_spec.rb +36 -0
  163. data/spec/models/force_binding_enum_spec.rb +24 -0
  164. data/spec/models/format_enum_spec.rb +24 -0
  165. data/spec/models/{detailed_country_field_spec.rb → geo_ip_policy_countries_obj_inner_spec.rb} +6 -6
  166. data/spec/models/google_chrome_connector_request_spec.rb +48 -0
  167. data/spec/models/google_chrome_connector_spec.rb +78 -0
  168. data/spec/models/grant_types_enum_spec.rb +24 -0
  169. data/spec/models/group_ldap_source_connection_spec.rb +6 -0
  170. data/spec/models/invitation_send_email_request_spec.rb +48 -0
  171. data/spec/models/lang_enum_spec.rb +24 -0
  172. data/spec/models/lifecycle_iteration_spec.rb +2 -14
  173. data/spec/models/logout_url_spec.rb +60 -0
  174. data/spec/models/native_logout_challenge_spec.rb +13 -7
  175. data/spec/models/notification_transport_request_spec.rb +6 -0
  176. data/spec/models/notification_transport_spec.rb +6 -0
  177. data/spec/models/o_auth2_provider_request_spec.rb +6 -0
  178. data/spec/models/o_auth2_provider_spec.rb +6 -0
  179. data/spec/models/paginated_account_lockdown_stage_list_spec.rb +42 -0
  180. data/spec/models/paginated_apple_independent_secure_enclave_list_spec.rb +42 -0
  181. data/spec/models/paginated_extra_role_object_permission_list_spec.rb +6 -0
  182. data/spec/models/paginated_google_chrome_connector_list_spec.rb +42 -0
  183. data/spec/models/patched_account_lockdown_stage_request_spec.rb +60 -0
  184. data/spec/models/patched_apple_independent_secure_enclave_request_spec.rb +54 -0
  185. data/spec/models/patched_application_request_spec.rb +6 -0
  186. data/spec/models/patched_authenticator_validate_stage_request_spec.rb +30 -0
  187. data/spec/models/patched_authenticator_web_authn_stage_request_spec.rb +12 -0
  188. data/spec/models/patched_brand_request_spec.rb +6 -0
  189. data/spec/models/patched_event_matcher_policy_request_spec.rb +6 -0
  190. data/spec/models/patched_google_chrome_connector_request_spec.rb +48 -0
  191. data/spec/models/patched_notification_transport_request_spec.rb +6 -0
  192. data/spec/models/patched_o_auth2_provider_request_spec.rb +6 -0
  193. data/spec/models/patched_saml_provider_request_spec.rb +7 -1
  194. data/spec/models/patched_saml_source_request_spec.rb +6 -0
  195. data/spec/models/patched_settings_request_flags_spec.rb +2 -2
  196. data/spec/models/patched_ssf_provider_request_spec.rb +6 -0
  197. data/spec/models/redirect_uri_request_spec.rb +6 -0
  198. data/spec/models/redirect_uri_spec.rb +6 -0
  199. data/spec/models/redirect_uri_type_enum_spec.rb +24 -0
  200. data/spec/models/related_rule_spec.rb +54 -0
  201. data/spec/models/saml_provider_request_spec.rb +7 -1
  202. data/spec/models/saml_provider_spec.rb +25 -1
  203. data/spec/models/saml_source_request_spec.rb +6 -0
  204. data/spec/models/saml_source_spec.rb +6 -0
  205. data/spec/models/ssf_provider_request_spec.rb +6 -0
  206. data/spec/models/ssf_provider_spec.rb +12 -0
  207. data/spec/models/ssf_stream_spec.rb +6 -0
  208. data/spec/models/ssf_stream_status_enum_spec.rb +24 -0
  209. data/spec/models/{task_state_enum_spec.rb → task_status_enum_spec.rb} +6 -6
  210. data/spec/models/transport_mode_enum_spec.rb +24 -0
  211. data/spec/models/usage_enum_spec.rb +24 -0
  212. data/spec/models/user_account_lockdown_request_spec.rb +30 -0
  213. data/spec/models/user_ldap_source_connection_spec.rb +6 -0
  214. data/spec/models/user_password_hash_set_request_spec.rb +30 -0
  215. data/spec/models/web_authn_hint_enum_spec.rb +24 -0
  216. data/spec/zeitwerk_spec.rb +34 -0
  217. metadata +113 -32
  218. data/spec/models/resident_key_requirement_enum_spec.rb +0 -24
@@ -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
 
@@ -0,0 +1,326 @@
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
+ # GoogleChromeConnector Serializer
12
+ class GoogleChromeConnector < ApiModelBase
13
+ attr_accessor :connector_uuid
14
+
15
+ attr_accessor :name
16
+
17
+ attr_accessor :enabled
18
+
19
+ # Get object component so that we know how to edit the object
20
+ attr_accessor :component
21
+
22
+ # Return object's verbose_name
23
+ attr_accessor :verbose_name
24
+
25
+ # Return object's plural verbose_name
26
+ attr_accessor :verbose_name_plural
27
+
28
+ # Return internal model name
29
+ attr_accessor :meta_model_name
30
+
31
+ attr_accessor :credentials
32
+
33
+ # Full URL to be used in Google Workspace configuration
34
+ attr_accessor :chrome_url
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'connector_uuid' => :'connector_uuid',
40
+ :'name' => :'name',
41
+ :'enabled' => :'enabled',
42
+ :'component' => :'component',
43
+ :'verbose_name' => :'verbose_name',
44
+ :'verbose_name_plural' => :'verbose_name_plural',
45
+ :'meta_model_name' => :'meta_model_name',
46
+ :'credentials' => :'credentials',
47
+ :'chrome_url' => :'chrome_url'
48
+ }
49
+ end
50
+
51
+ # Returns attribute mapping this model knows about
52
+ def self.acceptable_attribute_map
53
+ attribute_map
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ acceptable_attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'connector_uuid' => :'String',
65
+ :'name' => :'String',
66
+ :'enabled' => :'Boolean',
67
+ :'component' => :'String',
68
+ :'verbose_name' => :'String',
69
+ :'verbose_name_plural' => :'String',
70
+ :'meta_model_name' => :'String',
71
+ :'credentials' => :'Hash<String, Object>',
72
+ :'chrome_url' => :'String'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ :'chrome_url'
80
+ ])
81
+ end
82
+
83
+ # Initializes the object
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ def initialize(attributes = {})
86
+ if (!attributes.is_a?(Hash))
87
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::GoogleChromeConnector` initialize method"
88
+ end
89
+
90
+ # check to see if the attribute exists and convert string to symbol for hash key
91
+ acceptable_attribute_map = self.class.acceptable_attribute_map
92
+ attributes = attributes.each_with_object({}) { |(k, v), h|
93
+ if (!acceptable_attribute_map.key?(k.to_sym))
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::GoogleChromeConnector`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
95
+ end
96
+ h[k.to_sym] = v
97
+ }
98
+
99
+ if attributes.key?(:'connector_uuid')
100
+ self.connector_uuid = attributes[:'connector_uuid']
101
+ end
102
+
103
+ if attributes.key?(:'name')
104
+ self.name = attributes[:'name']
105
+ else
106
+ self.name = nil
107
+ end
108
+
109
+ if attributes.key?(:'enabled')
110
+ self.enabled = attributes[:'enabled']
111
+ end
112
+
113
+ if attributes.key?(:'component')
114
+ self.component = attributes[:'component']
115
+ else
116
+ self.component = nil
117
+ end
118
+
119
+ if attributes.key?(:'verbose_name')
120
+ self.verbose_name = attributes[:'verbose_name']
121
+ else
122
+ self.verbose_name = nil
123
+ end
124
+
125
+ if attributes.key?(:'verbose_name_plural')
126
+ self.verbose_name_plural = attributes[:'verbose_name_plural']
127
+ else
128
+ self.verbose_name_plural = nil
129
+ end
130
+
131
+ if attributes.key?(:'meta_model_name')
132
+ self.meta_model_name = attributes[:'meta_model_name']
133
+ else
134
+ self.meta_model_name = nil
135
+ end
136
+
137
+ if attributes.key?(:'credentials')
138
+ if (value = attributes[:'credentials']).is_a?(Hash)
139
+ self.credentials = value
140
+ end
141
+ else
142
+ self.credentials = nil
143
+ end
144
+
145
+ if attributes.key?(:'chrome_url')
146
+ self.chrome_url = attributes[:'chrome_url']
147
+ else
148
+ self.chrome_url = nil
149
+ end
150
+ end
151
+
152
+ # Show invalid properties with the reasons. Usually used together with valid?
153
+ # @return Array for valid properties with the reasons
154
+ def list_invalid_properties
155
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
156
+ invalid_properties = Array.new
157
+ if @name.nil?
158
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
159
+ end
160
+
161
+ if @component.nil?
162
+ invalid_properties.push('invalid value for "component", component cannot be nil.')
163
+ end
164
+
165
+ if @verbose_name.nil?
166
+ invalid_properties.push('invalid value for "verbose_name", verbose_name cannot be nil.')
167
+ end
168
+
169
+ if @verbose_name_plural.nil?
170
+ invalid_properties.push('invalid value for "verbose_name_plural", verbose_name_plural cannot be nil.')
171
+ end
172
+
173
+ if @meta_model_name.nil?
174
+ invalid_properties.push('invalid value for "meta_model_name", meta_model_name cannot be nil.')
175
+ end
176
+
177
+ if @credentials.nil?
178
+ invalid_properties.push('invalid value for "credentials", credentials cannot be nil.')
179
+ end
180
+
181
+ invalid_properties
182
+ end
183
+
184
+ # Check to see if the all the properties in the model are valid
185
+ # @return true if the model is valid
186
+ def valid?
187
+ warn '[DEPRECATED] the `valid?` method is obsolete'
188
+ return false if @name.nil?
189
+ return false if @component.nil?
190
+ return false if @verbose_name.nil?
191
+ return false if @verbose_name_plural.nil?
192
+ return false if @meta_model_name.nil?
193
+ return false if @credentials.nil?
194
+ true
195
+ end
196
+
197
+ # Custom attribute writer method with validation
198
+ # @param [Object] name Value to be assigned
199
+ def name=(name)
200
+ if name.nil?
201
+ fail ArgumentError, 'name cannot be nil'
202
+ end
203
+
204
+ @name = name
205
+ end
206
+
207
+ # Custom attribute writer method with validation
208
+ # @param [Object] component Value to be assigned
209
+ def component=(component)
210
+ if component.nil?
211
+ fail ArgumentError, 'component cannot be nil'
212
+ end
213
+
214
+ @component = component
215
+ end
216
+
217
+ # Custom attribute writer method with validation
218
+ # @param [Object] verbose_name Value to be assigned
219
+ def verbose_name=(verbose_name)
220
+ if verbose_name.nil?
221
+ fail ArgumentError, 'verbose_name cannot be nil'
222
+ end
223
+
224
+ @verbose_name = verbose_name
225
+ end
226
+
227
+ # Custom attribute writer method with validation
228
+ # @param [Object] verbose_name_plural Value to be assigned
229
+ def verbose_name_plural=(verbose_name_plural)
230
+ if verbose_name_plural.nil?
231
+ fail ArgumentError, 'verbose_name_plural cannot be nil'
232
+ end
233
+
234
+ @verbose_name_plural = verbose_name_plural
235
+ end
236
+
237
+ # Custom attribute writer method with validation
238
+ # @param [Object] meta_model_name Value to be assigned
239
+ def meta_model_name=(meta_model_name)
240
+ if meta_model_name.nil?
241
+ fail ArgumentError, 'meta_model_name cannot be nil'
242
+ end
243
+
244
+ @meta_model_name = meta_model_name
245
+ end
246
+
247
+ # Custom attribute writer method with validation
248
+ # @param [Object] credentials Value to be assigned
249
+ def credentials=(credentials)
250
+ if credentials.nil?
251
+ fail ArgumentError, 'credentials cannot be nil'
252
+ end
253
+
254
+ @credentials = credentials
255
+ end
256
+
257
+ # Checks equality by comparing each attribute.
258
+ # @param [Object] Object to be compared
259
+ def ==(o)
260
+ return true if self.equal?(o)
261
+ self.class == o.class &&
262
+ connector_uuid == o.connector_uuid &&
263
+ name == o.name &&
264
+ enabled == o.enabled &&
265
+ component == o.component &&
266
+ verbose_name == o.verbose_name &&
267
+ verbose_name_plural == o.verbose_name_plural &&
268
+ meta_model_name == o.meta_model_name &&
269
+ credentials == o.credentials &&
270
+ chrome_url == o.chrome_url
271
+ end
272
+
273
+ # @see the `==` method
274
+ # @param [Object] Object to be compared
275
+ def eql?(o)
276
+ self == o
277
+ end
278
+
279
+ # Calculates hash code according to all attributes.
280
+ # @return [Integer] Hash code
281
+ def hash
282
+ [connector_uuid, name, enabled, component, verbose_name, verbose_name_plural, meta_model_name, credentials, chrome_url].hash
283
+ end
284
+
285
+ # Builds the object from hash
286
+ # @param [Hash] attributes Model attributes in the form of hash
287
+ # @return [Object] Returns the model itself
288
+ def self.build_from_hash(attributes)
289
+ return nil unless attributes.is_a?(Hash)
290
+ attributes = attributes.transform_keys(&:to_sym)
291
+ transformed_hash = {}
292
+ openapi_types.each_pair do |key, type|
293
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
294
+ transformed_hash["#{key}"] = nil
295
+ elsif type =~ /\AArray<(.*)>/i
296
+ # check to ensure the input is an array given that the attribute
297
+ # is documented as an array but the input is not
298
+ if attributes[attribute_map[key]].is_a?(Array)
299
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
300
+ end
301
+ elsif !attributes[attribute_map[key]].nil?
302
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
303
+ end
304
+ end
305
+ new(transformed_hash)
306
+ end
307
+
308
+ # Returns the object in the form of hash
309
+ # @return [Hash] Returns the object in the form of hash
310
+ def to_hash
311
+ hash = {}
312
+ self.class.attribute_map.each_pair do |attr, param|
313
+ value = self.send(attr)
314
+ if value.nil?
315
+ is_nullable = self.class.openapi_nullable.include?(attr)
316
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
317
+ end
318
+
319
+ hash[param] = _to_hash(value)
320
+ end
321
+ hash
322
+ end
323
+
324
+ end
325
+
326
+ end
@@ -0,0 +1,214 @@
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
+ # GoogleChromeConnector Serializer
12
+ class GoogleChromeConnectorRequest < ApiModelBase
13
+ attr_accessor :connector_uuid
14
+
15
+ attr_accessor :name
16
+
17
+ attr_accessor :enabled
18
+
19
+ attr_accessor :credentials
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'connector_uuid' => :'connector_uuid',
25
+ :'name' => :'name',
26
+ :'enabled' => :'enabled',
27
+ :'credentials' => :'credentials'
28
+ }
29
+ end
30
+
31
+ # Returns attribute mapping this model knows about
32
+ def self.acceptable_attribute_map
33
+ attribute_map
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ acceptable_attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'connector_uuid' => :'String',
45
+ :'name' => :'String',
46
+ :'enabled' => :'Boolean',
47
+ :'credentials' => :'Hash<String, Object>'
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 `Authentik::Api::GoogleChromeConnectorRequest` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ acceptable_attribute_map = self.class.acceptable_attribute_map
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!acceptable_attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::GoogleChromeConnectorRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'connector_uuid')
74
+ self.connector_uuid = attributes[:'connector_uuid']
75
+ end
76
+
77
+ if attributes.key?(:'name')
78
+ self.name = attributes[:'name']
79
+ else
80
+ self.name = nil
81
+ end
82
+
83
+ if attributes.key?(:'enabled')
84
+ self.enabled = attributes[:'enabled']
85
+ end
86
+
87
+ if attributes.key?(:'credentials')
88
+ if (value = attributes[:'credentials']).is_a?(Hash)
89
+ self.credentials = value
90
+ end
91
+ else
92
+ self.credentials = nil
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
+ invalid_properties = Array.new
101
+ if @name.nil?
102
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
103
+ end
104
+
105
+ if @name.to_s.length < 1
106
+ invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
107
+ end
108
+
109
+ if @credentials.nil?
110
+ invalid_properties.push('invalid value for "credentials", credentials cannot be nil.')
111
+ end
112
+
113
+ invalid_properties
114
+ end
115
+
116
+ # Check to see if the all the properties in the model are valid
117
+ # @return true if the model is valid
118
+ def valid?
119
+ warn '[DEPRECATED] the `valid?` method is obsolete'
120
+ return false if @name.nil?
121
+ return false if @name.to_s.length < 1
122
+ return false if @credentials.nil?
123
+ true
124
+ end
125
+
126
+ # Custom attribute writer method with validation
127
+ # @param [Object] name Value to be assigned
128
+ def name=(name)
129
+ if name.nil?
130
+ fail ArgumentError, 'name cannot be nil'
131
+ end
132
+
133
+ if name.to_s.length < 1
134
+ fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.'
135
+ end
136
+
137
+ @name = name
138
+ end
139
+
140
+ # Custom attribute writer method with validation
141
+ # @param [Object] credentials Value to be assigned
142
+ def credentials=(credentials)
143
+ if credentials.nil?
144
+ fail ArgumentError, 'credentials cannot be nil'
145
+ end
146
+
147
+ @credentials = credentials
148
+ end
149
+
150
+ # Checks equality by comparing each attribute.
151
+ # @param [Object] Object to be compared
152
+ def ==(o)
153
+ return true if self.equal?(o)
154
+ self.class == o.class &&
155
+ connector_uuid == o.connector_uuid &&
156
+ name == o.name &&
157
+ enabled == o.enabled &&
158
+ credentials == o.credentials
159
+ end
160
+
161
+ # @see the `==` method
162
+ # @param [Object] Object to be compared
163
+ def eql?(o)
164
+ self == o
165
+ end
166
+
167
+ # Calculates hash code according to all attributes.
168
+ # @return [Integer] Hash code
169
+ def hash
170
+ [connector_uuid, name, enabled, credentials].hash
171
+ end
172
+
173
+ # Builds the object from hash
174
+ # @param [Hash] attributes Model attributes in the form of hash
175
+ # @return [Object] Returns the model itself
176
+ def self.build_from_hash(attributes)
177
+ return nil unless attributes.is_a?(Hash)
178
+ attributes = attributes.transform_keys(&:to_sym)
179
+ transformed_hash = {}
180
+ openapi_types.each_pair do |key, type|
181
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
182
+ transformed_hash["#{key}"] = nil
183
+ elsif type =~ /\AArray<(.*)>/i
184
+ # check to ensure the input is an array given that the attribute
185
+ # is documented as an array but the input is not
186
+ if attributes[attribute_map[key]].is_a?(Array)
187
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
188
+ end
189
+ elsif !attributes[attribute_map[key]].nil?
190
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
191
+ end
192
+ end
193
+ new(transformed_hash)
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ if value.nil?
203
+ is_nullable = self.class.openapi_nullable.include?(attr)
204
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
+ end
206
+
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ end
213
+
214
+ end
@@ -0,0 +1,39 @@
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 GrantTypesEnum
12
+ AUTHORIZATION_CODE = "authorization_code".freeze
13
+ IMPLICIT = "implicit".freeze
14
+ HYBRID = "hybrid".freeze
15
+ REFRESH_TOKEN = "refresh_token".freeze
16
+ CLIENT_CREDENTIALS = "client_credentials".freeze
17
+ PASSWORD = "password".freeze
18
+ URN_IETF_PARAMS_OAUTH_GRANT_TYPE_DEVICE_CODE = "urn:ietf:params:oauth:grant-type:device_code".freeze
19
+
20
+ def self.all_vars
21
+ @all_vars ||= [AUTHORIZATION_CODE, IMPLICIT, HYBRID, REFRESH_TOKEN, CLIENT_CREDENTIALS, PASSWORD, URN_IETF_PARAMS_OAUTH_GRANT_TYPE_DEVICE_CODE].freeze
22
+ end
23
+
24
+ # Builds the enum from string
25
+ # @param [String] The enum value in the form of the string
26
+ # @return [String] The enum value
27
+ def self.build_from_hash(value)
28
+ new.build_from_hash(value)
29
+ end
30
+
31
+ # Builds the enum from string
32
+ # @param [String] The enum value in the form of the string
33
+ # @return [String] The enum value
34
+ def build_from_hash(value)
35
+ return value if GrantTypesEnum.all_vars.include?(value)
36
+ raise "Invalid ENUM value #{value} for class #GrantTypesEnum"
37
+ end
38
+ end
39
+ end