authentik-api 2026.5.6 → 2026.8.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 (182) hide show
  1. checksums.yaml +4 -4
  2. data/README_API.md +104 -8
  3. data/lib/authentik/api/api/admin_api.rb +3 -0
  4. data/lib/authentik/api/api/core_api.rb +651 -27
  5. data/lib/authentik/api/api/endpoints_api.rb +7 -7
  6. data/lib/authentik/api/api/events_api.rb +35 -2
  7. data/lib/authentik/api/api/lifecycle_api.rb +258 -0
  8. data/lib/authentik/api/api/providers_api.rb +401 -0
  9. data/lib/authentik/api/api/requests_api.rb +1858 -0
  10. data/lib/authentik/api/api/sources_api.rb +6 -3
  11. data/lib/authentik/api/configuration.rb +14 -0
  12. data/lib/authentik/api/inflector.rb +2 -1
  13. data/lib/authentik/api/models/app_enum.rb +3 -1
  14. data/lib/authentik/api/models/application.rb +27 -1
  15. data/lib/authentik/api/models/authenticator_web_authn_stage.rb +1 -11
  16. data/lib/authentik/api/models/authenticator_web_authn_stage_request.rb +1 -11
  17. data/lib/authentik/api/models/brand.rb +21 -1
  18. data/lib/authentik/api/models/brand_request.rb +21 -1
  19. data/lib/authentik/api/models/captcha_stage.rb +32 -1
  20. data/lib/authentik/api/models/captcha_stage_request.rb +32 -1
  21. data/lib/authentik/api/models/compatibility_mode_enum.rb +2 -1
  22. data/lib/authentik/api/models/content_type.rb +30 -4
  23. data/lib/authentik/api/models/current_brand.rb +19 -1
  24. data/lib/authentik/api/models/current_brand_flags.rb +1 -55
  25. data/lib/authentik/api/models/device_user_binding.rb +39 -1
  26. data/lib/authentik/api/models/event_actions.rb +6 -1
  27. data/lib/authentik/api/models/grant_request.rb +382 -0
  28. data/lib/authentik/api/models/{reviewer_group.rb → grant_request_create_request.rb} +29 -42
  29. data/lib/authentik/api/models/{grant_types_enum.rb → grant_type_enum.rb} +5 -4
  30. data/lib/authentik/api/models/last_task_status_enum.rb +2 -1
  31. data/lib/authentik/api/models/ldap_outpost_config.rb +1 -1
  32. data/lib/authentik/api/models/ldap_source.rb +14 -4
  33. data/lib/authentik/api/models/ldap_source_request.rb +14 -4
  34. data/lib/authentik/api/models/lifecycle_rule.rb +2 -2
  35. data/lib/authentik/api/models/model_enum.rb +8 -1
  36. data/lib/authentik/api/models/notification_mode_enum.rb +35 -0
  37. data/lib/authentik/api/models/o_auth2_dynamic_client_registration.rb +291 -0
  38. data/lib/authentik/api/models/o_auth2_dynamic_client_registration_request.rb +303 -0
  39. data/lib/authentik/api/models/o_auth2_provider.rb +1 -1
  40. data/lib/authentik/api/models/o_auth2_provider_request.rb +1 -1
  41. data/lib/authentik/api/models/o_auth_source.rb +0 -60
  42. data/lib/authentik/api/models/o_auth_source_request.rb +0 -60
  43. data/lib/authentik/api/models/object_attribute.rb +420 -0
  44. data/lib/authentik/api/models/object_attribute_request.rb +358 -0
  45. data/lib/authentik/api/models/object_attribute_type_enum.rb +35 -0
  46. data/lib/authentik/api/models/offboarding_action_enum.rb +34 -0
  47. data/lib/authentik/api/models/offboarding_status_enum.rb +36 -0
  48. data/lib/authentik/api/models/paginated_grant_request_list.rb +214 -0
  49. data/lib/authentik/api/models/paginated_o_auth2_dynamic_client_registration_list.rb +214 -0
  50. data/lib/authentik/api/models/paginated_object_attribute_list.rb +214 -0
  51. data/lib/authentik/api/models/paginated_request_rule_binding_list.rb +214 -0
  52. data/lib/authentik/api/models/paginated_request_rule_child_binding_list.rb +214 -0
  53. data/lib/authentik/api/models/paginated_request_rule_list.rb +214 -0
  54. data/lib/authentik/api/models/paginated_requestable_target_list.rb +214 -0
  55. data/lib/authentik/api/models/paginated_user_offboarding_list.rb +214 -0
  56. data/lib/authentik/api/models/patched_authenticator_web_authn_stage_request.rb +1 -11
  57. data/lib/authentik/api/models/patched_brand_request.rb +21 -1
  58. data/lib/authentik/api/models/patched_captcha_stage_request.rb +32 -1
  59. data/lib/authentik/api/models/patched_grant_request_fulfill_request.rb +175 -0
  60. data/lib/authentik/api/models/patched_ldap_source_request.rb +14 -4
  61. data/lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb +286 -0
  62. data/lib/authentik/api/models/patched_o_auth2_provider_request.rb +1 -1
  63. data/lib/authentik/api/models/patched_o_auth_source_request.rb +0 -60
  64. data/lib/authentik/api/models/patched_object_attribute_request.rb +320 -0
  65. data/lib/authentik/api/models/patched_request_rule_binding_request.rb +249 -0
  66. data/lib/authentik/api/models/patched_request_rule_child_binding_request.rb +159 -0
  67. data/lib/authentik/api/models/patched_request_rule_request.rb +277 -0
  68. data/lib/authentik/api/models/patched_saml_source_request.rb +8 -8
  69. data/lib/authentik/api/models/patched_settings_request.rb +30 -1
  70. data/lib/authentik/api/models/patched_settings_request_flags.rb +1 -1
  71. data/lib/authentik/api/models/patched_ws_federation_provider_request.rb +11 -1
  72. data/lib/authentik/api/models/policy_binding.rb +42 -4
  73. data/lib/authentik/api/models/provider_type_enum.rb +2 -3
  74. data/lib/authentik/api/models/related_rule.rb +2 -2
  75. data/lib/authentik/api/models/related_target.rb +266 -0
  76. data/lib/authentik/api/models/request_content_type_enum.rb +34 -0
  77. data/lib/authentik/api/models/request_rule.rb +329 -0
  78. data/lib/authentik/api/models/request_rule_binding.rb +353 -0
  79. data/lib/authentik/api/models/request_rule_binding_request.rb +283 -0
  80. data/lib/authentik/api/models/{reviewer_user.rb → request_rule_child_binding.rb} +34 -99
  81. data/lib/authentik/api/models/request_rule_child_binding_request.rb +193 -0
  82. data/lib/authentik/api/models/request_rule_request.rb +284 -0
  83. data/lib/authentik/api/models/request_status.rb +36 -0
  84. data/lib/authentik/api/models/requestable_target.rb +278 -0
  85. data/lib/authentik/api/models/review.rb +1 -1
  86. data/lib/authentik/api/models/saml_source.rb +35 -8
  87. data/lib/authentik/api/models/saml_source_request.rb +8 -8
  88. data/lib/authentik/api/models/saml_version_enum.rb +34 -0
  89. data/lib/authentik/api/models/session_user.rb +32 -4
  90. data/lib/authentik/api/models/settings.rb +30 -1
  91. data/lib/authentik/api/models/settings_request.rb +30 -1
  92. data/lib/authentik/api/models/system_info.rb +31 -4
  93. data/lib/authentik/api/models/task_aggregated_status_enum.rb +2 -1
  94. data/lib/authentik/api/models/task_status_enum.rb +2 -1
  95. data/lib/authentik/api/models/user_offboarding.rb +379 -0
  96. data/lib/authentik/api/models/user_offboarding_request.rb +237 -0
  97. data/lib/authentik/api/models/user_self.rb +28 -1
  98. data/lib/authentik/api/models/user_switch_action_enum.rb +34 -0
  99. data/lib/authentik/api/models/user_switch_request.rb +173 -0
  100. data/lib/authentik/api/models/user_switch_response.rb +159 -0
  101. data/lib/authentik/api/models/ws_federation_provider.rb +41 -4
  102. data/lib/authentik/api/models/ws_federation_provider_request.rb +11 -1
  103. data/lib/authentik/api/version.rb +1 -1
  104. data/spec/api/admin_api_spec.rb +1 -0
  105. data/spec/api/core_api_spec.rb +119 -0
  106. data/spec/api/events_api_spec.rb +11 -0
  107. data/spec/api/lifecycle_api_spec.rb +47 -0
  108. data/spec/api/providers_api_spec.rb +73 -0
  109. data/spec/api/requests_api_spec.rb +365 -0
  110. data/spec/api/sources_api_spec.rb +2 -1
  111. data/spec/models/application_spec.rb +6 -0
  112. data/spec/models/authenticator_web_authn_stage_request_spec.rb +0 -6
  113. data/spec/models/authenticator_web_authn_stage_spec.rb +0 -6
  114. data/spec/models/brand_request_spec.rb +12 -0
  115. data/spec/models/brand_spec.rb +12 -0
  116. data/spec/models/captcha_stage_request_spec.rb +6 -0
  117. data/spec/models/captcha_stage_spec.rb +6 -0
  118. data/spec/models/content_type_spec.rb +6 -0
  119. data/spec/models/current_brand_flags_spec.rb +0 -12
  120. data/spec/models/current_brand_spec.rb +12 -0
  121. data/spec/models/device_user_binding_spec.rb +12 -0
  122. data/spec/models/grant_request_create_request_spec.rb +36 -0
  123. data/spec/models/grant_request_spec.rb +90 -0
  124. data/spec/models/{grant_types_enum_spec.rb → grant_type_enum_spec.rb} +6 -6
  125. data/spec/models/ldap_source_request_spec.rb +6 -0
  126. data/spec/models/ldap_source_spec.rb +6 -0
  127. data/spec/models/notification_mode_enum_spec.rb +24 -0
  128. data/spec/models/o_auth2_dynamic_client_registration_request_spec.rb +78 -0
  129. data/spec/models/o_auth2_dynamic_client_registration_spec.rb +84 -0
  130. data/spec/models/object_attribute_request_spec.rb +84 -0
  131. data/spec/models/object_attribute_spec.rb +108 -0
  132. data/spec/models/object_attribute_type_enum_spec.rb +24 -0
  133. data/spec/models/offboarding_action_enum_spec.rb +24 -0
  134. data/spec/models/offboarding_status_enum_spec.rb +24 -0
  135. data/spec/models/paginated_grant_request_list_spec.rb +42 -0
  136. data/spec/models/paginated_o_auth2_dynamic_client_registration_list_spec.rb +42 -0
  137. data/spec/models/paginated_object_attribute_list_spec.rb +42 -0
  138. data/spec/models/paginated_request_rule_binding_list_spec.rb +42 -0
  139. data/spec/models/paginated_request_rule_child_binding_list_spec.rb +42 -0
  140. data/spec/models/paginated_request_rule_list_spec.rb +42 -0
  141. data/spec/models/paginated_requestable_target_list_spec.rb +42 -0
  142. data/spec/models/paginated_user_offboarding_list_spec.rb +42 -0
  143. data/spec/models/patched_authenticator_web_authn_stage_request_spec.rb +0 -6
  144. data/spec/models/patched_brand_request_spec.rb +12 -0
  145. data/spec/models/patched_captcha_stage_request_spec.rb +6 -0
  146. data/spec/models/patched_grant_request_fulfill_request_spec.rb +36 -0
  147. data/spec/models/patched_ldap_source_request_spec.rb +6 -0
  148. data/spec/models/patched_o_auth2_dynamic_client_registration_request_spec.rb +78 -0
  149. data/spec/models/patched_object_attribute_request_spec.rb +84 -0
  150. data/spec/models/patched_request_rule_binding_request_spec.rb +60 -0
  151. data/spec/models/patched_request_rule_child_binding_request_spec.rb +42 -0
  152. data/spec/models/patched_request_rule_request_spec.rb +72 -0
  153. data/spec/models/patched_saml_source_request_spec.rb +1 -1
  154. data/spec/models/patched_settings_request_spec.rb +6 -0
  155. data/spec/models/patched_ws_federation_provider_request_spec.rb +6 -0
  156. data/spec/models/policy_binding_spec.rb +12 -0
  157. data/spec/models/related_target_spec.rb +54 -0
  158. data/spec/models/request_content_type_enum_spec.rb +24 -0
  159. data/spec/models/request_rule_binding_request_spec.rb +60 -0
  160. data/spec/models/request_rule_binding_spec.rb +84 -0
  161. data/spec/models/request_rule_child_binding_request_spec.rb +42 -0
  162. data/spec/models/{reviewer_user_spec.rb → request_rule_child_binding_spec.rb} +8 -14
  163. data/spec/models/request_rule_request_spec.rb +72 -0
  164. data/spec/models/request_rule_spec.rb +84 -0
  165. data/spec/models/request_status_spec.rb +24 -0
  166. data/spec/models/requestable_target_spec.rb +60 -0
  167. data/spec/models/saml_source_request_spec.rb +1 -1
  168. data/spec/models/saml_source_spec.rb +7 -1
  169. data/spec/models/saml_version_enum_spec.rb +24 -0
  170. data/spec/models/session_user_spec.rb +6 -0
  171. data/spec/models/settings_request_spec.rb +6 -0
  172. data/spec/models/settings_spec.rb +6 -0
  173. data/spec/models/system_info_spec.rb +6 -0
  174. data/spec/models/user_offboarding_request_spec.rb +54 -0
  175. data/spec/models/user_offboarding_spec.rb +90 -0
  176. data/spec/models/user_self_spec.rb +6 -0
  177. data/spec/models/user_switch_action_enum_spec.rb +24 -0
  178. data/spec/models/{reviewer_group_spec.rb → user_switch_request_spec.rb} +8 -8
  179. data/spec/models/user_switch_response_spec.rb +30 -0
  180. data/spec/models/ws_federation_provider_request_spec.rb +6 -0
  181. data/spec/models/ws_federation_provider_spec.rb +12 -0
  182. metadata +127 -10
@@ -0,0 +1,303 @@
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
+ # Serializer for OAuth2DynamicClientRegistration
12
+ class OAuth2DynamicClientRegistrationRequest < ApiModelBase
13
+ attr_accessor :provider
14
+
15
+ # Group to assign to automatically created applications.
16
+ attr_accessor :default_application_group
17
+
18
+ # Authorization flow applied to dynamically registered clients.
19
+ attr_accessor :override_authorization_flow
20
+
21
+ attr_accessor :override_invalidation_flow
22
+
23
+ # Scope mappings applied to dynamically registered clients.
24
+ attr_accessor :override_property_mappings
25
+
26
+ # Maximum access token validity for registered clients (Format: hours=1;minutes=2;seconds=3).
27
+ attr_accessor :access_token_validity
28
+
29
+ # Maximum refresh token validity for registered clients (Format: hours=1;minutes=2;seconds=3).
30
+ attr_accessor :refresh_token_validity
31
+
32
+ # If empty, all grant types are allowed.
33
+ attr_accessor :allowed_grant_types
34
+
35
+ attr_accessor :policy_engine_mode
36
+
37
+ class EnumAttributeValidator
38
+ attr_reader :datatype
39
+ attr_reader :allowable_values
40
+
41
+ def initialize(datatype, allowable_values)
42
+ @allowable_values = allowable_values.map do |value|
43
+ case datatype.to_s
44
+ when /Integer/i
45
+ value.to_i
46
+ when /Float/i
47
+ value.to_f
48
+ else
49
+ value
50
+ end
51
+ end
52
+ end
53
+
54
+ def valid?(value)
55
+ !value || allowable_values.include?(value)
56
+ end
57
+ end
58
+
59
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ {
62
+ :'provider' => :'provider',
63
+ :'default_application_group' => :'default_application_group',
64
+ :'override_authorization_flow' => :'override_authorization_flow',
65
+ :'override_invalidation_flow' => :'override_invalidation_flow',
66
+ :'override_property_mappings' => :'override_property_mappings',
67
+ :'access_token_validity' => :'access_token_validity',
68
+ :'refresh_token_validity' => :'refresh_token_validity',
69
+ :'allowed_grant_types' => :'allowed_grant_types',
70
+ :'policy_engine_mode' => :'policy_engine_mode'
71
+ }
72
+ end
73
+
74
+ # Returns attribute mapping this model knows about
75
+ def self.acceptable_attribute_map
76
+ attribute_map
77
+ end
78
+
79
+ # Returns all the JSON keys this model knows about
80
+ def self.acceptable_attributes
81
+ acceptable_attribute_map.values
82
+ end
83
+
84
+ # Attribute type mapping.
85
+ def self.openapi_types
86
+ {
87
+ :'provider' => :'Integer',
88
+ :'default_application_group' => :'String',
89
+ :'override_authorization_flow' => :'String',
90
+ :'override_invalidation_flow' => :'String',
91
+ :'override_property_mappings' => :'Array<String>',
92
+ :'access_token_validity' => :'String',
93
+ :'refresh_token_validity' => :'String',
94
+ :'allowed_grant_types' => :'Array<GrantTypeEnum>',
95
+ :'policy_engine_mode' => :'PolicyEngineMode'
96
+ }
97
+ end
98
+
99
+ # List of attributes with nullable: true
100
+ def self.openapi_nullable
101
+ Set.new([
102
+ :'override_authorization_flow',
103
+ :'override_invalidation_flow',
104
+ ])
105
+ end
106
+
107
+ # Initializes the object
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ def initialize(attributes = {})
110
+ if (!attributes.is_a?(Hash))
111
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::OAuth2DynamicClientRegistrationRequest` initialize method"
112
+ end
113
+
114
+ # check to see if the attribute exists and convert string to symbol for hash key
115
+ acceptable_attribute_map = self.class.acceptable_attribute_map
116
+ attributes = attributes.each_with_object({}) { |(k, v), h|
117
+ if (!acceptable_attribute_map.key?(k.to_sym))
118
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::OAuth2DynamicClientRegistrationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
119
+ end
120
+ h[k.to_sym] = v
121
+ }
122
+
123
+ if attributes.key?(:'provider')
124
+ self.provider = attributes[:'provider']
125
+ else
126
+ self.provider = nil
127
+ end
128
+
129
+ if attributes.key?(:'default_application_group')
130
+ self.default_application_group = attributes[:'default_application_group']
131
+ end
132
+
133
+ if attributes.key?(:'override_authorization_flow')
134
+ self.override_authorization_flow = attributes[:'override_authorization_flow']
135
+ end
136
+
137
+ if attributes.key?(:'override_invalidation_flow')
138
+ self.override_invalidation_flow = attributes[:'override_invalidation_flow']
139
+ end
140
+
141
+ if attributes.key?(:'override_property_mappings')
142
+ if (value = attributes[:'override_property_mappings']).is_a?(Array)
143
+ self.override_property_mappings = value
144
+ end
145
+ end
146
+
147
+ if attributes.key?(:'access_token_validity')
148
+ self.access_token_validity = attributes[:'access_token_validity']
149
+ end
150
+
151
+ if attributes.key?(:'refresh_token_validity')
152
+ self.refresh_token_validity = attributes[:'refresh_token_validity']
153
+ end
154
+
155
+ if attributes.key?(:'allowed_grant_types')
156
+ if (value = attributes[:'allowed_grant_types']).is_a?(Array)
157
+ self.allowed_grant_types = value
158
+ end
159
+ end
160
+
161
+ if attributes.key?(:'policy_engine_mode')
162
+ self.policy_engine_mode = attributes[:'policy_engine_mode']
163
+ end
164
+ end
165
+
166
+ # Show invalid properties with the reasons. Usually used together with valid?
167
+ # @return Array for valid properties with the reasons
168
+ def list_invalid_properties
169
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
170
+ invalid_properties = Array.new
171
+ if @provider.nil?
172
+ invalid_properties.push('invalid value for "provider", provider cannot be nil.')
173
+ end
174
+
175
+ if !@access_token_validity.nil? && @access_token_validity.to_s.length < 1
176
+ invalid_properties.push('invalid value for "access_token_validity", the character length must be greater than or equal to 1.')
177
+ end
178
+
179
+ if !@refresh_token_validity.nil? && @refresh_token_validity.to_s.length < 1
180
+ invalid_properties.push('invalid value for "refresh_token_validity", the character length must be greater than or equal to 1.')
181
+ end
182
+
183
+ invalid_properties
184
+ end
185
+
186
+ # Check to see if the all the properties in the model are valid
187
+ # @return true if the model is valid
188
+ def valid?
189
+ warn '[DEPRECATED] the `valid?` method is obsolete'
190
+ return false if @provider.nil?
191
+ return false if !@access_token_validity.nil? && @access_token_validity.to_s.length < 1
192
+ return false if !@refresh_token_validity.nil? && @refresh_token_validity.to_s.length < 1
193
+ true
194
+ end
195
+
196
+ # Custom attribute writer method with validation
197
+ # @param [Object] provider Value to be assigned
198
+ def provider=(provider)
199
+ if provider.nil?
200
+ fail ArgumentError, 'provider cannot be nil'
201
+ end
202
+
203
+ @provider = provider
204
+ end
205
+
206
+ # Custom attribute writer method with validation
207
+ # @param [Object] access_token_validity Value to be assigned
208
+ def access_token_validity=(access_token_validity)
209
+ if access_token_validity.nil?
210
+ fail ArgumentError, 'access_token_validity cannot be nil'
211
+ end
212
+
213
+ if access_token_validity.to_s.length < 1
214
+ fail ArgumentError, 'invalid value for "access_token_validity", the character length must be greater than or equal to 1.'
215
+ end
216
+
217
+ @access_token_validity = access_token_validity
218
+ end
219
+
220
+ # Custom attribute writer method with validation
221
+ # @param [Object] refresh_token_validity Value to be assigned
222
+ def refresh_token_validity=(refresh_token_validity)
223
+ if refresh_token_validity.nil?
224
+ fail ArgumentError, 'refresh_token_validity cannot be nil'
225
+ end
226
+
227
+ if refresh_token_validity.to_s.length < 1
228
+ fail ArgumentError, 'invalid value for "refresh_token_validity", the character length must be greater than or equal to 1.'
229
+ end
230
+
231
+ @refresh_token_validity = refresh_token_validity
232
+ end
233
+
234
+ # Checks equality by comparing each attribute.
235
+ # @param [Object] Object to be compared
236
+ def ==(o)
237
+ return true if self.equal?(o)
238
+ self.class == o.class &&
239
+ provider == o.provider &&
240
+ default_application_group == o.default_application_group &&
241
+ override_authorization_flow == o.override_authorization_flow &&
242
+ override_invalidation_flow == o.override_invalidation_flow &&
243
+ override_property_mappings == o.override_property_mappings &&
244
+ access_token_validity == o.access_token_validity &&
245
+ refresh_token_validity == o.refresh_token_validity &&
246
+ allowed_grant_types == o.allowed_grant_types &&
247
+ policy_engine_mode == o.policy_engine_mode
248
+ end
249
+
250
+ # @see the `==` method
251
+ # @param [Object] Object to be compared
252
+ def eql?(o)
253
+ self == o
254
+ end
255
+
256
+ # Calculates hash code according to all attributes.
257
+ # @return [Integer] Hash code
258
+ def hash
259
+ [provider, default_application_group, override_authorization_flow, override_invalidation_flow, override_property_mappings, access_token_validity, refresh_token_validity, allowed_grant_types, policy_engine_mode].hash
260
+ end
261
+
262
+ # Builds the object from hash
263
+ # @param [Hash] attributes Model attributes in the form of hash
264
+ # @return [Object] Returns the model itself
265
+ def self.build_from_hash(attributes)
266
+ return nil unless attributes.is_a?(Hash)
267
+ attributes = attributes.transform_keys(&:to_sym)
268
+ transformed_hash = {}
269
+ openapi_types.each_pair do |key, type|
270
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
271
+ transformed_hash["#{key}"] = nil
272
+ elsif type =~ /\AArray<(.*)>/i
273
+ # check to ensure the input is an array given that the attribute
274
+ # is documented as an array but the input is not
275
+ if attributes[attribute_map[key]].is_a?(Array)
276
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
277
+ end
278
+ elsif !attributes[attribute_map[key]].nil?
279
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
280
+ end
281
+ end
282
+ new(transformed_hash)
283
+ end
284
+
285
+ # Returns the object in the form of hash
286
+ # @return [Hash] Returns the object in the form of hash
287
+ def to_hash
288
+ hash = {}
289
+ self.class.attribute_map.each_pair do |attr, param|
290
+ value = self.send(attr)
291
+ if value.nil?
292
+ is_nullable = self.class.openapi_nullable.include?(attr)
293
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
294
+ end
295
+
296
+ hash[param] = _to_hash(value)
297
+ end
298
+ hash
299
+ end
300
+
301
+ end
302
+
303
+ end
@@ -184,7 +184,7 @@ module Authentik::Api
184
184
  :'verbose_name_plural' => :'String',
185
185
  :'meta_model_name' => :'String',
186
186
  :'client_type' => :'ClientTypeEnum',
187
- :'grant_types' => :'Array<GrantTypesEnum>',
187
+ :'grant_types' => :'Array<GrantTypeEnum>',
188
188
  :'client_id' => :'String',
189
189
  :'client_secret' => :'String',
190
190
  :'access_code_validity' => :'String',
@@ -140,7 +140,7 @@ module Authentik::Api
140
140
  :'invalidation_flow' => :'String',
141
141
  :'property_mappings' => :'Array<String>',
142
142
  :'client_type' => :'ClientTypeEnum',
143
- :'grant_types' => :'Array<GrantTypesEnum>',
143
+ :'grant_types' => :'Array<GrantTypeEnum>',
144
144
  :'client_id' => :'String',
145
145
  :'client_secret' => :'String',
146
146
  :'access_code_validity' => :'String',
@@ -460,22 +460,6 @@ module Authentik::Api
460
460
  invalid_properties.push('invalid value for "provider_type", provider_type cannot be nil.')
461
461
  end
462
462
 
463
- if !@request_token_url.nil? && @request_token_url.to_s.length > 255
464
- invalid_properties.push('invalid value for "request_token_url", the character length must be smaller than or equal to 255.')
465
- end
466
-
467
- if !@authorization_url.nil? && @authorization_url.to_s.length > 255
468
- invalid_properties.push('invalid value for "authorization_url", the character length must be smaller than or equal to 255.')
469
- end
470
-
471
- if !@access_token_url.nil? && @access_token_url.to_s.length > 255
472
- invalid_properties.push('invalid value for "access_token_url", the character length must be smaller than or equal to 255.')
473
- end
474
-
475
- if !@profile_url.nil? && @profile_url.to_s.length > 255
476
- invalid_properties.push('invalid value for "profile_url", the character length must be smaller than or equal to 255.')
477
- end
478
-
479
463
  if @consumer_key.nil?
480
464
  invalid_properties.push('invalid value for "consumer_key", consumer_key cannot be nil.')
481
465
  end
@@ -504,10 +488,6 @@ module Authentik::Api
504
488
  return false if @verbose_name_plural.nil?
505
489
  return false if @meta_model_name.nil?
506
490
  return false if @provider_type.nil?
507
- return false if !@request_token_url.nil? && @request_token_url.to_s.length > 255
508
- return false if !@authorization_url.nil? && @authorization_url.to_s.length > 255
509
- return false if !@access_token_url.nil? && @access_token_url.to_s.length > 255
510
- return false if !@profile_url.nil? && @profile_url.to_s.length > 255
511
491
  return false if @consumer_key.nil?
512
492
  return false if @callback_url.nil?
513
493
  return false if @type.nil?
@@ -599,46 +579,6 @@ module Authentik::Api
599
579
  @provider_type = provider_type
600
580
  end
601
581
 
602
- # Custom attribute writer method with validation
603
- # @param [Object] request_token_url Value to be assigned
604
- def request_token_url=(request_token_url)
605
- if !request_token_url.nil? && request_token_url.to_s.length > 255
606
- fail ArgumentError, 'invalid value for "request_token_url", the character length must be smaller than or equal to 255.'
607
- end
608
-
609
- @request_token_url = request_token_url
610
- end
611
-
612
- # Custom attribute writer method with validation
613
- # @param [Object] authorization_url Value to be assigned
614
- def authorization_url=(authorization_url)
615
- if !authorization_url.nil? && authorization_url.to_s.length > 255
616
- fail ArgumentError, 'invalid value for "authorization_url", the character length must be smaller than or equal to 255.'
617
- end
618
-
619
- @authorization_url = authorization_url
620
- end
621
-
622
- # Custom attribute writer method with validation
623
- # @param [Object] access_token_url Value to be assigned
624
- def access_token_url=(access_token_url)
625
- if !access_token_url.nil? && access_token_url.to_s.length > 255
626
- fail ArgumentError, 'invalid value for "access_token_url", the character length must be smaller than or equal to 255.'
627
- end
628
-
629
- @access_token_url = access_token_url
630
- end
631
-
632
- # Custom attribute writer method with validation
633
- # @param [Object] profile_url Value to be assigned
634
- def profile_url=(profile_url)
635
- if !profile_url.nil? && profile_url.to_s.length > 255
636
- fail ArgumentError, 'invalid value for "profile_url", the character length must be smaller than or equal to 255.'
637
- end
638
-
639
- @profile_url = profile_url
640
- end
641
-
642
582
  # Custom attribute writer method with validation
643
583
  # @param [Object] consumer_key Value to be assigned
644
584
  def consumer_key=(consumer_key)
@@ -353,22 +353,6 @@ module Authentik::Api
353
353
  invalid_properties.push('invalid value for "provider_type", provider_type cannot be nil.')
354
354
  end
355
355
 
356
- if !@request_token_url.nil? && @request_token_url.to_s.length > 255
357
- invalid_properties.push('invalid value for "request_token_url", the character length must be smaller than or equal to 255.')
358
- end
359
-
360
- if !@authorization_url.nil? && @authorization_url.to_s.length > 255
361
- invalid_properties.push('invalid value for "authorization_url", the character length must be smaller than or equal to 255.')
362
- end
363
-
364
- if !@access_token_url.nil? && @access_token_url.to_s.length > 255
365
- invalid_properties.push('invalid value for "access_token_url", the character length must be smaller than or equal to 255.')
366
- end
367
-
368
- if !@profile_url.nil? && @profile_url.to_s.length > 255
369
- invalid_properties.push('invalid value for "profile_url", the character length must be smaller than or equal to 255.')
370
- end
371
-
372
356
  if @consumer_key.nil?
373
357
  invalid_properties.push('invalid value for "consumer_key", consumer_key cannot be nil.')
374
358
  end
@@ -399,10 +383,6 @@ module Authentik::Api
399
383
  return false if @slug !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
400
384
  return false if !@user_path_template.nil? && @user_path_template.to_s.length < 1
401
385
  return false if @provider_type.nil?
402
- return false if !@request_token_url.nil? && @request_token_url.to_s.length > 255
403
- return false if !@authorization_url.nil? && @authorization_url.to_s.length > 255
404
- return false if !@access_token_url.nil? && @access_token_url.to_s.length > 255
405
- return false if !@profile_url.nil? && @profile_url.to_s.length > 255
406
386
  return false if @consumer_key.nil?
407
387
  return false if @consumer_key.to_s.length < 1
408
388
  return false if @consumer_secret.nil?
@@ -467,46 +447,6 @@ module Authentik::Api
467
447
  @provider_type = provider_type
468
448
  end
469
449
 
470
- # Custom attribute writer method with validation
471
- # @param [Object] request_token_url Value to be assigned
472
- def request_token_url=(request_token_url)
473
- if !request_token_url.nil? && request_token_url.to_s.length > 255
474
- fail ArgumentError, 'invalid value for "request_token_url", the character length must be smaller than or equal to 255.'
475
- end
476
-
477
- @request_token_url = request_token_url
478
- end
479
-
480
- # Custom attribute writer method with validation
481
- # @param [Object] authorization_url Value to be assigned
482
- def authorization_url=(authorization_url)
483
- if !authorization_url.nil? && authorization_url.to_s.length > 255
484
- fail ArgumentError, 'invalid value for "authorization_url", the character length must be smaller than or equal to 255.'
485
- end
486
-
487
- @authorization_url = authorization_url
488
- end
489
-
490
- # Custom attribute writer method with validation
491
- # @param [Object] access_token_url Value to be assigned
492
- def access_token_url=(access_token_url)
493
- if !access_token_url.nil? && access_token_url.to_s.length > 255
494
- fail ArgumentError, 'invalid value for "access_token_url", the character length must be smaller than or equal to 255.'
495
- end
496
-
497
- @access_token_url = access_token_url
498
- end
499
-
500
- # Custom attribute writer method with validation
501
- # @param [Object] profile_url Value to be assigned
502
- def profile_url=(profile_url)
503
- if !profile_url.nil? && profile_url.to_s.length > 255
504
- fail ArgumentError, 'invalid value for "profile_url", the character length must be smaller than or equal to 255.'
505
- end
506
-
507
- @profile_url = profile_url
508
- end
509
-
510
450
  # Custom attribute writer method with validation
511
451
  # @param [Object] consumer_key Value to be assigned
512
452
  def consumer_key=(consumer_key)