authentik-api 2026.5.5 → 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.
- checksums.yaml +4 -4
- data/README_API.md +105 -9
- 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 +21 -1
- data/lib/authentik/api/models/brand_request.rb +21 -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 +19 -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_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 +21 -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 +12 -0
- data/spec/models/brand_spec.rb +12 -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 +12 -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/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 +12 -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
|
@@ -0,0 +1,283 @@
|
|
|
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
|
+
# Mixin to validate that a valid enterprise license exists before allowing to save the object
|
|
12
|
+
class RequestRuleBindingRequest < ApiModelBase
|
|
13
|
+
attr_accessor :uuid
|
|
14
|
+
|
|
15
|
+
attr_accessor :policy_engine_mode
|
|
16
|
+
|
|
17
|
+
attr_accessor :rule
|
|
18
|
+
|
|
19
|
+
attr_accessor :target
|
|
20
|
+
|
|
21
|
+
# How long a request against this binding stays pending before it automatically lapses if not approved or denied.
|
|
22
|
+
attr_accessor :expiry_pending
|
|
23
|
+
|
|
24
|
+
# The maximum duration a grant approved against this binding can last.
|
|
25
|
+
attr_accessor :expiry_granted_max
|
|
26
|
+
|
|
27
|
+
class EnumAttributeValidator
|
|
28
|
+
attr_reader :datatype
|
|
29
|
+
attr_reader :allowable_values
|
|
30
|
+
|
|
31
|
+
def initialize(datatype, allowable_values)
|
|
32
|
+
@allowable_values = allowable_values.map do |value|
|
|
33
|
+
case datatype.to_s
|
|
34
|
+
when /Integer/i
|
|
35
|
+
value.to_i
|
|
36
|
+
when /Float/i
|
|
37
|
+
value.to_f
|
|
38
|
+
else
|
|
39
|
+
value
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def valid?(value)
|
|
45
|
+
!value || allowable_values.include?(value)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
50
|
+
def self.attribute_map
|
|
51
|
+
{
|
|
52
|
+
:'uuid' => :'uuid',
|
|
53
|
+
:'policy_engine_mode' => :'policy_engine_mode',
|
|
54
|
+
:'rule' => :'rule',
|
|
55
|
+
:'target' => :'target',
|
|
56
|
+
:'expiry_pending' => :'expiry_pending',
|
|
57
|
+
:'expiry_granted_max' => :'expiry_granted_max'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Returns attribute mapping this model knows about
|
|
62
|
+
def self.acceptable_attribute_map
|
|
63
|
+
attribute_map
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Returns all the JSON keys this model knows about
|
|
67
|
+
def self.acceptable_attributes
|
|
68
|
+
acceptable_attribute_map.values
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Attribute type mapping.
|
|
72
|
+
def self.openapi_types
|
|
73
|
+
{
|
|
74
|
+
:'uuid' => :'String',
|
|
75
|
+
:'policy_engine_mode' => :'PolicyEngineMode',
|
|
76
|
+
:'rule' => :'String',
|
|
77
|
+
:'target' => :'String',
|
|
78
|
+
:'expiry_pending' => :'String',
|
|
79
|
+
:'expiry_granted_max' => :'String'
|
|
80
|
+
}
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# List of attributes with nullable: true
|
|
84
|
+
def self.openapi_nullable
|
|
85
|
+
Set.new([
|
|
86
|
+
])
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Initializes the object
|
|
90
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
91
|
+
def initialize(attributes = {})
|
|
92
|
+
if (!attributes.is_a?(Hash))
|
|
93
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::RequestRuleBindingRequest` initialize method"
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
97
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
98
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
99
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
100
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::RequestRuleBindingRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
101
|
+
end
|
|
102
|
+
h[k.to_sym] = v
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'uuid')
|
|
106
|
+
self.uuid = attributes[:'uuid']
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'policy_engine_mode')
|
|
110
|
+
self.policy_engine_mode = attributes[:'policy_engine_mode']
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'rule')
|
|
114
|
+
self.rule = attributes[:'rule']
|
|
115
|
+
else
|
|
116
|
+
self.rule = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'target')
|
|
120
|
+
self.target = attributes[:'target']
|
|
121
|
+
else
|
|
122
|
+
self.target = nil
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'expiry_pending')
|
|
126
|
+
self.expiry_pending = attributes[:'expiry_pending']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'expiry_granted_max')
|
|
130
|
+
self.expiry_granted_max = attributes[:'expiry_granted_max']
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
135
|
+
# @return Array for valid properties with the reasons
|
|
136
|
+
def list_invalid_properties
|
|
137
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
138
|
+
invalid_properties = Array.new
|
|
139
|
+
if @rule.nil?
|
|
140
|
+
invalid_properties.push('invalid value for "rule", rule cannot be nil.')
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if @target.nil?
|
|
144
|
+
invalid_properties.push('invalid value for "target", target cannot be nil.')
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if !@expiry_pending.nil? && @expiry_pending.to_s.length < 1
|
|
148
|
+
invalid_properties.push('invalid value for "expiry_pending", the character length must be greater than or equal to 1.')
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if !@expiry_granted_max.nil? && @expiry_granted_max.to_s.length < 1
|
|
152
|
+
invalid_properties.push('invalid value for "expiry_granted_max", the character length must be greater than or equal to 1.')
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
invalid_properties
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Check to see if the all the properties in the model are valid
|
|
159
|
+
# @return true if the model is valid
|
|
160
|
+
def valid?
|
|
161
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
162
|
+
return false if @rule.nil?
|
|
163
|
+
return false if @target.nil?
|
|
164
|
+
return false if !@expiry_pending.nil? && @expiry_pending.to_s.length < 1
|
|
165
|
+
return false if !@expiry_granted_max.nil? && @expiry_granted_max.to_s.length < 1
|
|
166
|
+
true
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Custom attribute writer method with validation
|
|
170
|
+
# @param [Object] rule Value to be assigned
|
|
171
|
+
def rule=(rule)
|
|
172
|
+
if rule.nil?
|
|
173
|
+
fail ArgumentError, 'rule cannot be nil'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
@rule = rule
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Custom attribute writer method with validation
|
|
180
|
+
# @param [Object] target Value to be assigned
|
|
181
|
+
def target=(target)
|
|
182
|
+
if target.nil?
|
|
183
|
+
fail ArgumentError, 'target cannot be nil'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
@target = target
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Custom attribute writer method with validation
|
|
190
|
+
# @param [Object] expiry_pending Value to be assigned
|
|
191
|
+
def expiry_pending=(expiry_pending)
|
|
192
|
+
if expiry_pending.nil?
|
|
193
|
+
fail ArgumentError, 'expiry_pending cannot be nil'
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if expiry_pending.to_s.length < 1
|
|
197
|
+
fail ArgumentError, 'invalid value for "expiry_pending", the character length must be greater than or equal to 1.'
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
@expiry_pending = expiry_pending
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Custom attribute writer method with validation
|
|
204
|
+
# @param [Object] expiry_granted_max Value to be assigned
|
|
205
|
+
def expiry_granted_max=(expiry_granted_max)
|
|
206
|
+
if expiry_granted_max.nil?
|
|
207
|
+
fail ArgumentError, 'expiry_granted_max cannot be nil'
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if expiry_granted_max.to_s.length < 1
|
|
211
|
+
fail ArgumentError, 'invalid value for "expiry_granted_max", the character length must be greater than or equal to 1.'
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
@expiry_granted_max = expiry_granted_max
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Checks equality by comparing each attribute.
|
|
218
|
+
# @param [Object] Object to be compared
|
|
219
|
+
def ==(o)
|
|
220
|
+
return true if self.equal?(o)
|
|
221
|
+
self.class == o.class &&
|
|
222
|
+
uuid == o.uuid &&
|
|
223
|
+
policy_engine_mode == o.policy_engine_mode &&
|
|
224
|
+
rule == o.rule &&
|
|
225
|
+
target == o.target &&
|
|
226
|
+
expiry_pending == o.expiry_pending &&
|
|
227
|
+
expiry_granted_max == o.expiry_granted_max
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# @see the `==` method
|
|
231
|
+
# @param [Object] Object to be compared
|
|
232
|
+
def eql?(o)
|
|
233
|
+
self == o
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Calculates hash code according to all attributes.
|
|
237
|
+
# @return [Integer] Hash code
|
|
238
|
+
def hash
|
|
239
|
+
[uuid, policy_engine_mode, rule, target, expiry_pending, expiry_granted_max].hash
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Builds the object from hash
|
|
243
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
244
|
+
# @return [Object] Returns the model itself
|
|
245
|
+
def self.build_from_hash(attributes)
|
|
246
|
+
return nil unless attributes.is_a?(Hash)
|
|
247
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
248
|
+
transformed_hash = {}
|
|
249
|
+
openapi_types.each_pair do |key, type|
|
|
250
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
251
|
+
transformed_hash["#{key}"] = nil
|
|
252
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
253
|
+
# check to ensure the input is an array given that the attribute
|
|
254
|
+
# is documented as an array but the input is not
|
|
255
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
256
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
257
|
+
end
|
|
258
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
259
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
new(transformed_hash)
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Returns the object in the form of hash
|
|
266
|
+
# @return [Hash] Returns the object in the form of hash
|
|
267
|
+
def to_hash
|
|
268
|
+
hash = {}
|
|
269
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
270
|
+
value = self.send(attr)
|
|
271
|
+
if value.nil?
|
|
272
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
273
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
hash[param] = _to_hash(value)
|
|
277
|
+
end
|
|
278
|
+
hash
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
end
|
|
@@ -8,24 +8,19 @@ require 'date'
|
|
|
8
8
|
require 'time'
|
|
9
9
|
|
|
10
10
|
module Authentik::Api
|
|
11
|
-
class
|
|
12
|
-
attr_accessor :pk
|
|
13
|
-
|
|
11
|
+
class RequestRuleChildBinding < ApiModelBase
|
|
14
12
|
attr_accessor :uuid
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
attr_accessor :username
|
|
14
|
+
attr_accessor :binding
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
attr_accessor :name
|
|
16
|
+
attr_accessor :target
|
|
21
17
|
|
|
22
18
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
19
|
def self.attribute_map
|
|
24
20
|
{
|
|
25
|
-
:'pk' => :'pk',
|
|
26
21
|
:'uuid' => :'uuid',
|
|
27
|
-
:'
|
|
28
|
-
:'
|
|
22
|
+
:'binding' => :'binding',
|
|
23
|
+
:'target' => :'target'
|
|
29
24
|
}
|
|
30
25
|
end
|
|
31
26
|
|
|
@@ -42,10 +37,9 @@ module Authentik::Api
|
|
|
42
37
|
# Attribute type mapping.
|
|
43
38
|
def self.openapi_types
|
|
44
39
|
{
|
|
45
|
-
:'pk' => :'Integer',
|
|
46
40
|
:'uuid' => :'String',
|
|
47
|
-
:'
|
|
48
|
-
:'
|
|
41
|
+
:'binding' => :'String',
|
|
42
|
+
:'target' => :'String'
|
|
49
43
|
}
|
|
50
44
|
end
|
|
51
45
|
|
|
@@ -59,40 +53,32 @@ module Authentik::Api
|
|
|
59
53
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
54
|
def initialize(attributes = {})
|
|
61
55
|
if (!attributes.is_a?(Hash))
|
|
62
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::
|
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::RequestRuleChildBinding` initialize method"
|
|
63
57
|
end
|
|
64
58
|
|
|
65
59
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
60
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
61
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
62
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::RequestRuleChildBinding`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
64
|
end
|
|
71
65
|
h[k.to_sym] = v
|
|
72
66
|
}
|
|
73
67
|
|
|
74
|
-
if attributes.key?(:'pk')
|
|
75
|
-
self.pk = attributes[:'pk']
|
|
76
|
-
else
|
|
77
|
-
self.pk = nil
|
|
78
|
-
end
|
|
79
|
-
|
|
80
68
|
if attributes.key?(:'uuid')
|
|
81
69
|
self.uuid = attributes[:'uuid']
|
|
82
|
-
else
|
|
83
|
-
self.uuid = nil
|
|
84
70
|
end
|
|
85
71
|
|
|
86
|
-
if attributes.key?(:'
|
|
87
|
-
self.
|
|
72
|
+
if attributes.key?(:'binding')
|
|
73
|
+
self.binding = attributes[:'binding']
|
|
88
74
|
else
|
|
89
|
-
self.
|
|
75
|
+
self.binding = nil
|
|
90
76
|
end
|
|
91
77
|
|
|
92
|
-
if attributes.key?(:'
|
|
93
|
-
self.
|
|
78
|
+
if attributes.key?(:'target')
|
|
79
|
+
self.target = attributes[:'target']
|
|
94
80
|
else
|
|
95
|
-
self.
|
|
81
|
+
self.target = nil
|
|
96
82
|
end
|
|
97
83
|
end
|
|
98
84
|
|
|
@@ -101,29 +87,12 @@ module Authentik::Api
|
|
|
101
87
|
def list_invalid_properties
|
|
102
88
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
103
89
|
invalid_properties = Array.new
|
|
104
|
-
if @
|
|
105
|
-
invalid_properties.push('invalid value for "
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
if @uuid.nil?
|
|
109
|
-
invalid_properties.push('invalid value for "uuid", uuid cannot be nil.')
|
|
90
|
+
if @binding.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "binding", binding cannot be nil.')
|
|
110
92
|
end
|
|
111
93
|
|
|
112
|
-
if @
|
|
113
|
-
invalid_properties.push('invalid value for "
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
if @username.to_s.length > 150
|
|
117
|
-
invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 150.')
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
pattern = Regexp.new(/^[\w.@+-]+$/)
|
|
121
|
-
if @username !~ pattern
|
|
122
|
-
invalid_properties.push("invalid value for \"username\", must conform to the pattern #{pattern}.")
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
if @name.nil?
|
|
126
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
94
|
+
if @target.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "target", target cannot be nil.')
|
|
127
96
|
end
|
|
128
97
|
|
|
129
98
|
invalid_properties
|
|
@@ -133,62 +102,29 @@ module Authentik::Api
|
|
|
133
102
|
# @return true if the model is valid
|
|
134
103
|
def valid?
|
|
135
104
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
136
|
-
return false if @
|
|
137
|
-
return false if @
|
|
138
|
-
return false if @username.nil?
|
|
139
|
-
return false if @username.to_s.length > 150
|
|
140
|
-
return false if @username !~ Regexp.new(/^[\w.@+-]+$/)
|
|
141
|
-
return false if @name.nil?
|
|
105
|
+
return false if @binding.nil?
|
|
106
|
+
return false if @target.nil?
|
|
142
107
|
true
|
|
143
108
|
end
|
|
144
109
|
|
|
145
110
|
# Custom attribute writer method with validation
|
|
146
|
-
# @param [Object]
|
|
147
|
-
def
|
|
148
|
-
if
|
|
149
|
-
fail ArgumentError, '
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
@pk = pk
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
# Custom attribute writer method with validation
|
|
156
|
-
# @param [Object] uuid Value to be assigned
|
|
157
|
-
def uuid=(uuid)
|
|
158
|
-
if uuid.nil?
|
|
159
|
-
fail ArgumentError, 'uuid cannot be nil'
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
@uuid = uuid
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
# Custom attribute writer method with validation
|
|
166
|
-
# @param [Object] username Value to be assigned
|
|
167
|
-
def username=(username)
|
|
168
|
-
if username.nil?
|
|
169
|
-
fail ArgumentError, 'username cannot be nil'
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
if username.to_s.length > 150
|
|
173
|
-
fail ArgumentError, 'invalid value for "username", the character length must be smaller than or equal to 150.'
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
pattern = Regexp.new(/^[\w.@+-]+$/)
|
|
177
|
-
if username !~ pattern
|
|
178
|
-
fail ArgumentError, "invalid value for \"username\", must conform to the pattern #{pattern}."
|
|
111
|
+
# @param [Object] binding Value to be assigned
|
|
112
|
+
def binding=(binding)
|
|
113
|
+
if binding.nil?
|
|
114
|
+
fail ArgumentError, 'binding cannot be nil'
|
|
179
115
|
end
|
|
180
116
|
|
|
181
|
-
@
|
|
117
|
+
@binding = binding
|
|
182
118
|
end
|
|
183
119
|
|
|
184
120
|
# Custom attribute writer method with validation
|
|
185
|
-
# @param [Object]
|
|
186
|
-
def
|
|
187
|
-
if
|
|
188
|
-
fail ArgumentError, '
|
|
121
|
+
# @param [Object] target Value to be assigned
|
|
122
|
+
def target=(target)
|
|
123
|
+
if target.nil?
|
|
124
|
+
fail ArgumentError, 'target cannot be nil'
|
|
189
125
|
end
|
|
190
126
|
|
|
191
|
-
@
|
|
127
|
+
@target = target
|
|
192
128
|
end
|
|
193
129
|
|
|
194
130
|
# Checks equality by comparing each attribute.
|
|
@@ -196,10 +132,9 @@ module Authentik::Api
|
|
|
196
132
|
def ==(o)
|
|
197
133
|
return true if self.equal?(o)
|
|
198
134
|
self.class == o.class &&
|
|
199
|
-
pk == o.pk &&
|
|
200
135
|
uuid == o.uuid &&
|
|
201
|
-
|
|
202
|
-
|
|
136
|
+
binding == o.binding &&
|
|
137
|
+
target == o.target
|
|
203
138
|
end
|
|
204
139
|
|
|
205
140
|
# @see the `==` method
|
|
@@ -211,7 +146,7 @@ module Authentik::Api
|
|
|
211
146
|
# Calculates hash code according to all attributes.
|
|
212
147
|
# @return [Integer] Hash code
|
|
213
148
|
def hash
|
|
214
|
-
[
|
|
149
|
+
[uuid, binding, target].hash
|
|
215
150
|
end
|
|
216
151
|
|
|
217
152
|
# Builds the object from hash
|
|
@@ -0,0 +1,193 @@
|
|
|
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 RequestRuleChildBindingRequest < ApiModelBase
|
|
12
|
+
attr_accessor :uuid
|
|
13
|
+
|
|
14
|
+
attr_accessor :binding
|
|
15
|
+
|
|
16
|
+
attr_accessor :target
|
|
17
|
+
|
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
19
|
+
def self.attribute_map
|
|
20
|
+
{
|
|
21
|
+
:'uuid' => :'uuid',
|
|
22
|
+
:'binding' => :'binding',
|
|
23
|
+
:'target' => :'target'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'uuid' => :'String',
|
|
41
|
+
:'binding' => :'String',
|
|
42
|
+
:'target' => :'String'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# List of attributes with nullable: true
|
|
47
|
+
def self.openapi_nullable
|
|
48
|
+
Set.new([
|
|
49
|
+
])
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Initializes the object
|
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
54
|
+
def initialize(attributes = {})
|
|
55
|
+
if (!attributes.is_a?(Hash))
|
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::RequestRuleChildBindingRequest` initialize method"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::RequestRuleChildBindingRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
64
|
+
end
|
|
65
|
+
h[k.to_sym] = v
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'uuid')
|
|
69
|
+
self.uuid = attributes[:'uuid']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'binding')
|
|
73
|
+
self.binding = attributes[:'binding']
|
|
74
|
+
else
|
|
75
|
+
self.binding = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'target')
|
|
79
|
+
self.target = attributes[:'target']
|
|
80
|
+
else
|
|
81
|
+
self.target = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @binding.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "binding", binding cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @target.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "target", target cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @binding.nil?
|
|
106
|
+
return false if @target.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] binding Value to be assigned
|
|
112
|
+
def binding=(binding)
|
|
113
|
+
if binding.nil?
|
|
114
|
+
fail ArgumentError, 'binding cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@binding = binding
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] target Value to be assigned
|
|
122
|
+
def target=(target)
|
|
123
|
+
if target.nil?
|
|
124
|
+
fail ArgumentError, 'target cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@target = target
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
uuid == o.uuid &&
|
|
136
|
+
binding == o.binding &&
|
|
137
|
+
target == o.target
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# @see the `==` method
|
|
141
|
+
# @param [Object] Object to be compared
|
|
142
|
+
def eql?(o)
|
|
143
|
+
self == o
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Calculates hash code according to all attributes.
|
|
147
|
+
# @return [Integer] Hash code
|
|
148
|
+
def hash
|
|
149
|
+
[uuid, binding, target].hash
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Builds the object from hash
|
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
154
|
+
# @return [Object] Returns the model itself
|
|
155
|
+
def self.build_from_hash(attributes)
|
|
156
|
+
return nil unless attributes.is_a?(Hash)
|
|
157
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
158
|
+
transformed_hash = {}
|
|
159
|
+
openapi_types.each_pair do |key, type|
|
|
160
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
161
|
+
transformed_hash["#{key}"] = nil
|
|
162
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
163
|
+
# check to ensure the input is an array given that the attribute
|
|
164
|
+
# is documented as an array but the input is not
|
|
165
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
166
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
167
|
+
end
|
|
168
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
169
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
new(transformed_hash)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Returns the object in the form of hash
|
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
|
177
|
+
def to_hash
|
|
178
|
+
hash = {}
|
|
179
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
180
|
+
value = self.send(attr)
|
|
181
|
+
if value.nil?
|
|
182
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
183
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
hash[param] = _to_hash(value)
|
|
187
|
+
end
|
|
188
|
+
hash
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
end
|