authentik-api 2026.5.6 → 2026.8.0.rc2
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.
- checksums.yaml +4 -4
- data/README_API.md +104 -8
- data/lib/authentik/api/api/admin_api.rb +3 -0
- data/lib/authentik/api/api/core_api.rb +651 -27
- data/lib/authentik/api/api/endpoints_api.rb +7 -7
- data/lib/authentik/api/api/events_api.rb +35 -2
- data/lib/authentik/api/api/lifecycle_api.rb +258 -0
- data/lib/authentik/api/api/providers_api.rb +401 -0
- data/lib/authentik/api/api/requests_api.rb +1858 -0
- data/lib/authentik/api/api/sources_api.rb +6 -3
- data/lib/authentik/api/configuration.rb +14 -0
- data/lib/authentik/api/inflector.rb +2 -1
- data/lib/authentik/api/models/app_enum.rb +3 -1
- data/lib/authentik/api/models/application.rb +27 -1
- data/lib/authentik/api/models/authenticator_web_authn_stage.rb +1 -11
- data/lib/authentik/api/models/authenticator_web_authn_stage_request.rb +1 -11
- data/lib/authentik/api/models/brand.rb +31 -1
- data/lib/authentik/api/models/brand_request.rb +31 -1
- data/lib/authentik/api/models/captcha_stage.rb +32 -1
- data/lib/authentik/api/models/captcha_stage_request.rb +32 -1
- data/lib/authentik/api/models/compatibility_mode_enum.rb +2 -1
- data/lib/authentik/api/models/content_type.rb +30 -4
- data/lib/authentik/api/models/current_brand.rb +45 -1
- data/lib/authentik/api/models/current_brand_flags.rb +1 -55
- data/lib/authentik/api/models/device_user_binding.rb +39 -1
- data/lib/authentik/api/models/event_actions.rb +6 -1
- data/lib/authentik/api/models/grant_request.rb +382 -0
- data/lib/authentik/api/models/{reviewer_group.rb → grant_request_create_request.rb} +29 -42
- data/lib/authentik/api/models/{grant_types_enum.rb → grant_type_enum.rb} +5 -4
- data/lib/authentik/api/models/last_task_status_enum.rb +2 -1
- data/lib/authentik/api/models/ldap_outpost_config.rb +1 -1
- data/lib/authentik/api/models/ldap_source.rb +14 -4
- data/lib/authentik/api/models/ldap_source_request.rb +14 -4
- data/lib/authentik/api/models/lifecycle_rule.rb +2 -2
- data/lib/authentik/api/models/model_enum.rb +8 -1
- data/lib/authentik/api/models/notification_mode_enum.rb +35 -0
- data/lib/authentik/api/models/o_auth2_dynamic_client_registration.rb +291 -0
- data/lib/authentik/api/models/o_auth2_dynamic_client_registration_request.rb +303 -0
- data/lib/authentik/api/models/o_auth2_provider.rb +1 -1
- data/lib/authentik/api/models/o_auth2_provider_request.rb +1 -1
- data/lib/authentik/api/models/o_auth2_provider_setup_urls.rb +16 -4
- data/lib/authentik/api/models/o_auth_source.rb +0 -60
- data/lib/authentik/api/models/o_auth_source_request.rb +0 -60
- data/lib/authentik/api/models/object_attribute.rb +420 -0
- data/lib/authentik/api/models/object_attribute_request.rb +358 -0
- data/lib/authentik/api/models/object_attribute_type_enum.rb +35 -0
- data/lib/authentik/api/models/offboarding_action_enum.rb +34 -0
- data/lib/authentik/api/models/offboarding_status_enum.rb +36 -0
- data/lib/authentik/api/models/paginated_grant_request_list.rb +214 -0
- data/lib/authentik/api/models/paginated_o_auth2_dynamic_client_registration_list.rb +214 -0
- data/lib/authentik/api/models/paginated_object_attribute_list.rb +214 -0
- data/lib/authentik/api/models/paginated_request_rule_binding_list.rb +214 -0
- data/lib/authentik/api/models/paginated_request_rule_child_binding_list.rb +214 -0
- data/lib/authentik/api/models/paginated_request_rule_list.rb +214 -0
- data/lib/authentik/api/models/paginated_requestable_target_list.rb +214 -0
- data/lib/authentik/api/models/paginated_user_offboarding_list.rb +214 -0
- data/lib/authentik/api/models/patched_authenticator_web_authn_stage_request.rb +1 -11
- data/lib/authentik/api/models/patched_brand_request.rb +31 -1
- data/lib/authentik/api/models/patched_captcha_stage_request.rb +32 -1
- data/lib/authentik/api/models/patched_grant_request_fulfill_request.rb +175 -0
- data/lib/authentik/api/models/patched_ldap_source_request.rb +14 -4
- data/lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb +286 -0
- data/lib/authentik/api/models/patched_o_auth2_provider_request.rb +1 -1
- data/lib/authentik/api/models/patched_o_auth_source_request.rb +0 -60
- data/lib/authentik/api/models/patched_object_attribute_request.rb +320 -0
- data/lib/authentik/api/models/patched_request_rule_binding_request.rb +249 -0
- data/lib/authentik/api/models/patched_request_rule_child_binding_request.rb +159 -0
- data/lib/authentik/api/models/patched_request_rule_request.rb +277 -0
- data/lib/authentik/api/models/patched_saml_source_request.rb +8 -8
- data/lib/authentik/api/models/patched_settings_request.rb +30 -1
- data/lib/authentik/api/models/patched_settings_request_flags.rb +1 -1
- data/lib/authentik/api/models/patched_ws_federation_provider_request.rb +11 -1
- data/lib/authentik/api/models/policy_binding.rb +42 -4
- data/lib/authentik/api/models/provider_type_enum.rb +2 -3
- data/lib/authentik/api/models/related_rule.rb +2 -2
- data/lib/authentik/api/models/related_target.rb +266 -0
- data/lib/authentik/api/models/request_content_type_enum.rb +34 -0
- data/lib/authentik/api/models/request_rule.rb +329 -0
- data/lib/authentik/api/models/request_rule_binding.rb +353 -0
- data/lib/authentik/api/models/request_rule_binding_request.rb +283 -0
- data/lib/authentik/api/models/{reviewer_user.rb → request_rule_child_binding.rb} +34 -99
- data/lib/authentik/api/models/request_rule_child_binding_request.rb +193 -0
- data/lib/authentik/api/models/request_rule_request.rb +284 -0
- data/lib/authentik/api/models/request_status.rb +36 -0
- data/lib/authentik/api/models/requestable_target.rb +278 -0
- data/lib/authentik/api/models/review.rb +1 -1
- data/lib/authentik/api/models/saml_source.rb +35 -8
- data/lib/authentik/api/models/saml_source_request.rb +8 -8
- data/lib/authentik/api/models/saml_version_enum.rb +34 -0
- data/lib/authentik/api/models/session_user.rb +32 -4
- data/lib/authentik/api/models/settings.rb +30 -1
- data/lib/authentik/api/models/settings_request.rb +30 -1
- data/lib/authentik/api/models/system_info.rb +31 -4
- data/lib/authentik/api/models/task_aggregated_status_enum.rb +2 -1
- data/lib/authentik/api/models/task_status_enum.rb +2 -1
- data/lib/authentik/api/models/user_offboarding.rb +379 -0
- data/lib/authentik/api/models/user_offboarding_request.rb +237 -0
- data/lib/authentik/api/models/user_self.rb +28 -1
- data/lib/authentik/api/models/user_switch_action_enum.rb +34 -0
- data/lib/authentik/api/models/user_switch_request.rb +173 -0
- data/lib/authentik/api/models/user_switch_response.rb +159 -0
- data/lib/authentik/api/models/ws_federation_provider.rb +41 -4
- data/lib/authentik/api/models/ws_federation_provider_request.rb +11 -1
- data/lib/authentik/api/version.rb +1 -1
- data/spec/api/admin_api_spec.rb +1 -0
- data/spec/api/core_api_spec.rb +119 -0
- data/spec/api/events_api_spec.rb +11 -0
- data/spec/api/lifecycle_api_spec.rb +47 -0
- data/spec/api/providers_api_spec.rb +73 -0
- data/spec/api/requests_api_spec.rb +365 -0
- data/spec/api/sources_api_spec.rb +2 -1
- data/spec/models/application_spec.rb +6 -0
- data/spec/models/authenticator_web_authn_stage_request_spec.rb +0 -6
- data/spec/models/authenticator_web_authn_stage_spec.rb +0 -6
- data/spec/models/brand_request_spec.rb +18 -0
- data/spec/models/brand_spec.rb +18 -0
- data/spec/models/captcha_stage_request_spec.rb +6 -0
- data/spec/models/captcha_stage_spec.rb +6 -0
- data/spec/models/content_type_spec.rb +6 -0
- data/spec/models/current_brand_flags_spec.rb +0 -12
- data/spec/models/current_brand_spec.rb +18 -0
- data/spec/models/device_user_binding_spec.rb +12 -0
- data/spec/models/grant_request_create_request_spec.rb +36 -0
- data/spec/models/grant_request_spec.rb +90 -0
- data/spec/models/{grant_types_enum_spec.rb → grant_type_enum_spec.rb} +6 -6
- data/spec/models/ldap_source_request_spec.rb +6 -0
- data/spec/models/ldap_source_spec.rb +6 -0
- data/spec/models/notification_mode_enum_spec.rb +24 -0
- data/spec/models/o_auth2_dynamic_client_registration_request_spec.rb +78 -0
- data/spec/models/o_auth2_dynamic_client_registration_spec.rb +84 -0
- data/spec/models/o_auth2_provider_setup_urls_spec.rb +6 -0
- data/spec/models/object_attribute_request_spec.rb +84 -0
- data/spec/models/object_attribute_spec.rb +108 -0
- data/spec/models/object_attribute_type_enum_spec.rb +24 -0
- data/spec/models/offboarding_action_enum_spec.rb +24 -0
- data/spec/models/offboarding_status_enum_spec.rb +24 -0
- data/spec/models/paginated_grant_request_list_spec.rb +42 -0
- data/spec/models/paginated_o_auth2_dynamic_client_registration_list_spec.rb +42 -0
- data/spec/models/paginated_object_attribute_list_spec.rb +42 -0
- data/spec/models/paginated_request_rule_binding_list_spec.rb +42 -0
- data/spec/models/paginated_request_rule_child_binding_list_spec.rb +42 -0
- data/spec/models/paginated_request_rule_list_spec.rb +42 -0
- data/spec/models/paginated_requestable_target_list_spec.rb +42 -0
- data/spec/models/paginated_user_offboarding_list_spec.rb +42 -0
- data/spec/models/patched_authenticator_web_authn_stage_request_spec.rb +0 -6
- data/spec/models/patched_brand_request_spec.rb +18 -0
- data/spec/models/patched_captcha_stage_request_spec.rb +6 -0
- data/spec/models/patched_grant_request_fulfill_request_spec.rb +36 -0
- data/spec/models/patched_ldap_source_request_spec.rb +6 -0
- data/spec/models/patched_o_auth2_dynamic_client_registration_request_spec.rb +78 -0
- data/spec/models/patched_object_attribute_request_spec.rb +84 -0
- data/spec/models/patched_request_rule_binding_request_spec.rb +60 -0
- data/spec/models/patched_request_rule_child_binding_request_spec.rb +42 -0
- data/spec/models/patched_request_rule_request_spec.rb +72 -0
- data/spec/models/patched_saml_source_request_spec.rb +1 -1
- data/spec/models/patched_settings_request_spec.rb +6 -0
- data/spec/models/patched_ws_federation_provider_request_spec.rb +6 -0
- data/spec/models/policy_binding_spec.rb +12 -0
- data/spec/models/related_target_spec.rb +54 -0
- data/spec/models/request_content_type_enum_spec.rb +24 -0
- data/spec/models/request_rule_binding_request_spec.rb +60 -0
- data/spec/models/request_rule_binding_spec.rb +84 -0
- data/spec/models/request_rule_child_binding_request_spec.rb +42 -0
- data/spec/models/{reviewer_user_spec.rb → request_rule_child_binding_spec.rb} +8 -14
- data/spec/models/request_rule_request_spec.rb +72 -0
- data/spec/models/request_rule_spec.rb +84 -0
- data/spec/models/request_status_spec.rb +24 -0
- data/spec/models/requestable_target_spec.rb +60 -0
- data/spec/models/saml_source_request_spec.rb +1 -1
- data/spec/models/saml_source_spec.rb +7 -1
- data/spec/models/saml_version_enum_spec.rb +24 -0
- data/spec/models/session_user_spec.rb +6 -0
- data/spec/models/settings_request_spec.rb +6 -0
- data/spec/models/settings_spec.rb +6 -0
- data/spec/models/system_info_spec.rb +6 -0
- data/spec/models/user_offboarding_request_spec.rb +54 -0
- data/spec/models/user_offboarding_spec.rb +90 -0
- data/spec/models/user_self_spec.rb +6 -0
- data/spec/models/user_switch_action_enum_spec.rb +24 -0
- data/spec/models/{reviewer_group_spec.rb → user_switch_request_spec.rb} +8 -8
- data/spec/models/user_switch_response_spec.rb +30 -0
- data/spec/models/ws_federation_provider_request_spec.rb +6 -0
- data/spec/models/ws_federation_provider_spec.rb +12 -0
- metadata +127 -10
|
@@ -39,6 +39,10 @@ module Authentik::Api
|
|
|
39
39
|
# Result if the Policy execution fails.
|
|
40
40
|
attr_accessor :failure_result
|
|
41
41
|
|
|
42
|
+
attr_accessor :expires
|
|
43
|
+
|
|
44
|
+
attr_accessor :expiring
|
|
45
|
+
|
|
42
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
47
|
def self.attribute_map
|
|
44
48
|
{
|
|
@@ -54,7 +58,9 @@ module Authentik::Api
|
|
|
54
58
|
:'enabled' => :'enabled',
|
|
55
59
|
:'order' => :'order',
|
|
56
60
|
:'timeout' => :'timeout',
|
|
57
|
-
:'failure_result' => :'failure_result'
|
|
61
|
+
:'failure_result' => :'failure_result',
|
|
62
|
+
:'expires' => :'expires',
|
|
63
|
+
:'expiring' => :'expiring'
|
|
58
64
|
}
|
|
59
65
|
end
|
|
60
66
|
|
|
@@ -83,7 +89,9 @@ module Authentik::Api
|
|
|
83
89
|
:'enabled' => :'Boolean',
|
|
84
90
|
:'order' => :'Integer',
|
|
85
91
|
:'timeout' => :'Integer',
|
|
86
|
-
:'failure_result' => :'Boolean'
|
|
92
|
+
:'failure_result' => :'Boolean',
|
|
93
|
+
:'expires' => :'Time',
|
|
94
|
+
:'expiring' => :'Boolean'
|
|
87
95
|
}
|
|
88
96
|
end
|
|
89
97
|
|
|
@@ -96,6 +104,7 @@ module Authentik::Api
|
|
|
96
104
|
:'policy_obj',
|
|
97
105
|
:'group_obj',
|
|
98
106
|
:'user_obj',
|
|
107
|
+
:'expires',
|
|
99
108
|
])
|
|
100
109
|
end
|
|
101
110
|
|
|
@@ -178,6 +187,18 @@ module Authentik::Api
|
|
|
178
187
|
if attributes.key?(:'failure_result')
|
|
179
188
|
self.failure_result = attributes[:'failure_result']
|
|
180
189
|
end
|
|
190
|
+
|
|
191
|
+
if attributes.key?(:'expires')
|
|
192
|
+
self.expires = attributes[:'expires']
|
|
193
|
+
else
|
|
194
|
+
self.expires = nil
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
if attributes.key?(:'expiring')
|
|
198
|
+
self.expiring = attributes[:'expiring']
|
|
199
|
+
else
|
|
200
|
+
self.expiring = nil
|
|
201
|
+
end
|
|
181
202
|
end
|
|
182
203
|
|
|
183
204
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -213,6 +234,10 @@ module Authentik::Api
|
|
|
213
234
|
invalid_properties.push('invalid value for "timeout", must be greater than or equal to 0.')
|
|
214
235
|
end
|
|
215
236
|
|
|
237
|
+
if @expiring.nil?
|
|
238
|
+
invalid_properties.push('invalid value for "expiring", expiring cannot be nil.')
|
|
239
|
+
end
|
|
240
|
+
|
|
216
241
|
invalid_properties
|
|
217
242
|
end
|
|
218
243
|
|
|
@@ -227,6 +252,7 @@ module Authentik::Api
|
|
|
227
252
|
return false if @order < -2147483648
|
|
228
253
|
return false if !@timeout.nil? && @timeout > 2147483647
|
|
229
254
|
return false if !@timeout.nil? && @timeout < 0
|
|
255
|
+
return false if @expiring.nil?
|
|
230
256
|
true
|
|
231
257
|
end
|
|
232
258
|
|
|
@@ -286,6 +312,16 @@ module Authentik::Api
|
|
|
286
312
|
@timeout = timeout
|
|
287
313
|
end
|
|
288
314
|
|
|
315
|
+
# Custom attribute writer method with validation
|
|
316
|
+
# @param [Object] expiring Value to be assigned
|
|
317
|
+
def expiring=(expiring)
|
|
318
|
+
if expiring.nil?
|
|
319
|
+
fail ArgumentError, 'expiring cannot be nil'
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
@expiring = expiring
|
|
323
|
+
end
|
|
324
|
+
|
|
289
325
|
# Checks equality by comparing each attribute.
|
|
290
326
|
# @param [Object] Object to be compared
|
|
291
327
|
def ==(o)
|
|
@@ -303,7 +339,9 @@ module Authentik::Api
|
|
|
303
339
|
enabled == o.enabled &&
|
|
304
340
|
order == o.order &&
|
|
305
341
|
timeout == o.timeout &&
|
|
306
|
-
failure_result == o.failure_result
|
|
342
|
+
failure_result == o.failure_result &&
|
|
343
|
+
expires == o.expires &&
|
|
344
|
+
expiring == o.expiring
|
|
307
345
|
end
|
|
308
346
|
|
|
309
347
|
# @see the `==` method
|
|
@@ -315,7 +353,7 @@ module Authentik::Api
|
|
|
315
353
|
# Calculates hash code according to all attributes.
|
|
316
354
|
# @return [Integer] Hash code
|
|
317
355
|
def hash
|
|
318
|
-
[pk, policy, group, user, policy_obj, group_obj, user_obj, target, negate, enabled, order, timeout, failure_result].hash
|
|
356
|
+
[pk, policy, group, user, policy_obj, group_obj, user_obj, target, negate, enabled, order, timeout, failure_result, expires, expiring].hash
|
|
319
357
|
end
|
|
320
358
|
|
|
321
359
|
# Builds the object from hash
|
|
@@ -11,9 +11,8 @@ module Authentik::Api
|
|
|
11
11
|
class ProviderTypeEnum
|
|
12
12
|
OPENIDCONNECT = "openidconnect".freeze
|
|
13
13
|
APPLE = "apple".freeze
|
|
14
|
-
ENTRAID = "entraid".freeze
|
|
15
|
-
AZUREAD = "azuread".freeze
|
|
16
14
|
DISCORD = "discord".freeze
|
|
15
|
+
ENTRAID = "entraid".freeze
|
|
17
16
|
FACEBOOK = "facebook".freeze
|
|
18
17
|
GITHUB = "github".freeze
|
|
19
18
|
GITLAB = "gitlab".freeze
|
|
@@ -28,7 +27,7 @@ module Authentik::Api
|
|
|
28
27
|
WECHAT = "wechat".freeze
|
|
29
28
|
|
|
30
29
|
def self.all_vars
|
|
31
|
-
@all_vars ||= [OPENIDCONNECT, APPLE,
|
|
30
|
+
@all_vars ||= [OPENIDCONNECT, APPLE, DISCORD, ENTRAID, FACEBOOK, GITHUB, GITLAB, GOOGLE, MAILCOW, OKTA, PATREON, REDDIT, SLACK, TWITCH, TWITTER, WECHAT].freeze
|
|
32
31
|
end
|
|
33
32
|
|
|
34
33
|
# Builds the enum from string
|
|
@@ -46,9 +46,9 @@ module Authentik::Api
|
|
|
46
46
|
{
|
|
47
47
|
:'id' => :'String',
|
|
48
48
|
:'name' => :'String',
|
|
49
|
-
:'reviewer_groups' => :'Array<
|
|
49
|
+
:'reviewer_groups' => :'Array<PartialGroup>',
|
|
50
50
|
:'min_reviewers' => :'Integer',
|
|
51
|
-
:'reviewers' => :'Array<
|
|
51
|
+
:'reviewers' => :'Array<PartialUser>'
|
|
52
52
|
}
|
|
53
53
|
end
|
|
54
54
|
|
|
@@ -0,0 +1,266 @@
|
|
|
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
|
+
# Simplified related target object
|
|
12
|
+
class RelatedTarget < ApiModelBase
|
|
13
|
+
# Return object's verbose_name
|
|
14
|
+
attr_accessor :verbose_name
|
|
15
|
+
|
|
16
|
+
# Return object's plural verbose_name
|
|
17
|
+
attr_accessor :verbose_name_plural
|
|
18
|
+
|
|
19
|
+
# Return internal model name
|
|
20
|
+
attr_accessor :meta_model_name
|
|
21
|
+
|
|
22
|
+
attr_accessor :pbm_uuid
|
|
23
|
+
|
|
24
|
+
attr_accessor :label
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'verbose_name' => :'verbose_name',
|
|
30
|
+
:'verbose_name_plural' => :'verbose_name_plural',
|
|
31
|
+
:'meta_model_name' => :'meta_model_name',
|
|
32
|
+
:'pbm_uuid' => :'pbm_uuid',
|
|
33
|
+
:'label' => :'label'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
|
43
|
+
def self.acceptable_attributes
|
|
44
|
+
acceptable_attribute_map.values
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.openapi_types
|
|
49
|
+
{
|
|
50
|
+
:'verbose_name' => :'String',
|
|
51
|
+
:'verbose_name_plural' => :'String',
|
|
52
|
+
:'meta_model_name' => :'String',
|
|
53
|
+
:'pbm_uuid' => :'String',
|
|
54
|
+
:'label' => :'String'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# List of attributes with nullable: true
|
|
59
|
+
def self.openapi_nullable
|
|
60
|
+
Set.new([
|
|
61
|
+
])
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Initializes the object
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
def initialize(attributes = {})
|
|
67
|
+
if (!attributes.is_a?(Hash))
|
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::RelatedTarget` initialize method"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
72
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::RelatedTarget`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
76
|
+
end
|
|
77
|
+
h[k.to_sym] = v
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'verbose_name')
|
|
81
|
+
self.verbose_name = attributes[:'verbose_name']
|
|
82
|
+
else
|
|
83
|
+
self.verbose_name = nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'verbose_name_plural')
|
|
87
|
+
self.verbose_name_plural = attributes[:'verbose_name_plural']
|
|
88
|
+
else
|
|
89
|
+
self.verbose_name_plural = nil
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'meta_model_name')
|
|
93
|
+
self.meta_model_name = attributes[:'meta_model_name']
|
|
94
|
+
else
|
|
95
|
+
self.meta_model_name = nil
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'pbm_uuid')
|
|
99
|
+
self.pbm_uuid = attributes[:'pbm_uuid']
|
|
100
|
+
else
|
|
101
|
+
self.pbm_uuid = nil
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'label')
|
|
105
|
+
self.label = attributes[:'label']
|
|
106
|
+
else
|
|
107
|
+
self.label = nil
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
112
|
+
# @return Array for valid properties with the reasons
|
|
113
|
+
def list_invalid_properties
|
|
114
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
115
|
+
invalid_properties = Array.new
|
|
116
|
+
if @verbose_name.nil?
|
|
117
|
+
invalid_properties.push('invalid value for "verbose_name", verbose_name cannot be nil.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if @verbose_name_plural.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "verbose_name_plural", verbose_name_plural cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @meta_model_name.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "meta_model_name", meta_model_name cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if @pbm_uuid.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "pbm_uuid", pbm_uuid cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if @label.nil?
|
|
133
|
+
invalid_properties.push('invalid value for "label", label cannot be nil.')
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
invalid_properties
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Check to see if the all the properties in the model are valid
|
|
140
|
+
# @return true if the model is valid
|
|
141
|
+
def valid?
|
|
142
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
143
|
+
return false if @verbose_name.nil?
|
|
144
|
+
return false if @verbose_name_plural.nil?
|
|
145
|
+
return false if @meta_model_name.nil?
|
|
146
|
+
return false if @pbm_uuid.nil?
|
|
147
|
+
return false if @label.nil?
|
|
148
|
+
true
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Custom attribute writer method with validation
|
|
152
|
+
# @param [Object] verbose_name Value to be assigned
|
|
153
|
+
def verbose_name=(verbose_name)
|
|
154
|
+
if verbose_name.nil?
|
|
155
|
+
fail ArgumentError, 'verbose_name cannot be nil'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
@verbose_name = verbose_name
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Custom attribute writer method with validation
|
|
162
|
+
# @param [Object] verbose_name_plural Value to be assigned
|
|
163
|
+
def verbose_name_plural=(verbose_name_plural)
|
|
164
|
+
if verbose_name_plural.nil?
|
|
165
|
+
fail ArgumentError, 'verbose_name_plural cannot be nil'
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
@verbose_name_plural = verbose_name_plural
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Custom attribute writer method with validation
|
|
172
|
+
# @param [Object] meta_model_name Value to be assigned
|
|
173
|
+
def meta_model_name=(meta_model_name)
|
|
174
|
+
if meta_model_name.nil?
|
|
175
|
+
fail ArgumentError, 'meta_model_name cannot be nil'
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
@meta_model_name = meta_model_name
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Custom attribute writer method with validation
|
|
182
|
+
# @param [Object] pbm_uuid Value to be assigned
|
|
183
|
+
def pbm_uuid=(pbm_uuid)
|
|
184
|
+
if pbm_uuid.nil?
|
|
185
|
+
fail ArgumentError, 'pbm_uuid cannot be nil'
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
@pbm_uuid = pbm_uuid
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Custom attribute writer method with validation
|
|
192
|
+
# @param [Object] label Value to be assigned
|
|
193
|
+
def label=(label)
|
|
194
|
+
if label.nil?
|
|
195
|
+
fail ArgumentError, 'label cannot be nil'
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
@label = label
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Checks equality by comparing each attribute.
|
|
202
|
+
# @param [Object] Object to be compared
|
|
203
|
+
def ==(o)
|
|
204
|
+
return true if self.equal?(o)
|
|
205
|
+
self.class == o.class &&
|
|
206
|
+
verbose_name == o.verbose_name &&
|
|
207
|
+
verbose_name_plural == o.verbose_name_plural &&
|
|
208
|
+
meta_model_name == o.meta_model_name &&
|
|
209
|
+
pbm_uuid == o.pbm_uuid &&
|
|
210
|
+
label == o.label
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# @see the `==` method
|
|
214
|
+
# @param [Object] Object to be compared
|
|
215
|
+
def eql?(o)
|
|
216
|
+
self == o
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Calculates hash code according to all attributes.
|
|
220
|
+
# @return [Integer] Hash code
|
|
221
|
+
def hash
|
|
222
|
+
[verbose_name, verbose_name_plural, meta_model_name, pbm_uuid, label].hash
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Builds the object from hash
|
|
226
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
227
|
+
# @return [Object] Returns the model itself
|
|
228
|
+
def self.build_from_hash(attributes)
|
|
229
|
+
return nil unless attributes.is_a?(Hash)
|
|
230
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
231
|
+
transformed_hash = {}
|
|
232
|
+
openapi_types.each_pair do |key, type|
|
|
233
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
234
|
+
transformed_hash["#{key}"] = nil
|
|
235
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
236
|
+
# check to ensure the input is an array given that the attribute
|
|
237
|
+
# is documented as an array but the input is not
|
|
238
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
239
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
240
|
+
end
|
|
241
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
242
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
new(transformed_hash)
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Returns the object in the form of hash
|
|
249
|
+
# @return [Hash] Returns the object in the form of hash
|
|
250
|
+
def to_hash
|
|
251
|
+
hash = {}
|
|
252
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
253
|
+
value = self.send(attr)
|
|
254
|
+
if value.nil?
|
|
255
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
256
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
hash[param] = _to_hash(value)
|
|
260
|
+
end
|
|
261
|
+
hash
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
end
|
|
@@ -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 RequestContentTypeEnum
|
|
12
|
+
APPLICATION_X_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded".freeze
|
|
13
|
+
APPLICATION_JSON = "application/json".freeze
|
|
14
|
+
|
|
15
|
+
def self.all_vars
|
|
16
|
+
@all_vars ||= [APPLICATION_X_WWW_FORM_URLENCODED, APPLICATION_JSON].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 RequestContentTypeEnum.all_vars.include?(value)
|
|
31
|
+
raise "Invalid ENUM value #{value} for class #RequestContentTypeEnum"
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|