authentik-api 2026.8.0.rc6 → 2026.8.0

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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/README_API.md +22 -5
  3. data/lib/authentik/api/api/agents_api.rb +410 -0
  4. data/lib/authentik/api/api/endpoints_api.rb +3 -0
  5. data/lib/authentik/api/api/requests_api.rb +72 -0
  6. data/lib/authentik/api/models/agent.rb +450 -0
  7. data/lib/authentik/api/models/agent_create_request.rb +203 -0
  8. data/lib/authentik/api/models/agent_created.rb +185 -0
  9. data/lib/authentik/api/models/agent_grant_request_create_request.rb +161 -0
  10. data/lib/authentik/api/models/agent_grant_request_created.rb +185 -0
  11. data/lib/authentik/api/models/agent_request.rb +303 -0
  12. data/lib/authentik/api/models/app_enum.rb +2 -2
  13. data/lib/authentik/api/models/capabilities_enum.rb +3 -1
  14. data/lib/authentik/api/models/endpoint_device.rb +1 -15
  15. data/lib/authentik/api/models/endpoint_device_details.rb +1 -15
  16. data/lib/authentik/api/models/grant_request.rb +14 -16
  17. data/lib/authentik/api/models/model_enum.rb +3 -1
  18. data/lib/authentik/api/models/paginated_agent_list.rb +214 -0
  19. data/lib/authentik/api/models/patched_agent_request.rb +289 -0
  20. data/lib/authentik/api/models/patched_source_stage_request.rb +16 -4
  21. data/lib/authentik/api/models/policy_behavior_enum.rb +35 -0
  22. data/lib/authentik/api/models/resume_on_match_failures_enum.rb +33 -0
  23. data/lib/authentik/api/models/source_stage.rb +16 -4
  24. data/lib/authentik/api/models/source_stage_request.rb +16 -4
  25. data/lib/authentik/api/version.rb +1 -1
  26. data/spec/api/agents_api_spec.rb +101 -0
  27. data/spec/api/endpoints_api_spec.rb +1 -0
  28. data/spec/api/requests_api_spec.rb +13 -0
  29. data/spec/models/agent_create_request_spec.rb +54 -0
  30. data/spec/models/agent_created_spec.rb +36 -0
  31. data/spec/models/agent_grant_request_create_request_spec.rb +30 -0
  32. data/spec/models/agent_grant_request_created_spec.rb +36 -0
  33. data/spec/models/agent_request_spec.rb +72 -0
  34. data/spec/models/agent_spec.rb +108 -0
  35. data/spec/models/grant_request_spec.rb +6 -0
  36. data/spec/models/paginated_agent_list_spec.rb +42 -0
  37. data/spec/models/patched_agent_request_spec.rb +72 -0
  38. data/spec/models/patched_source_stage_request_spec.rb +6 -0
  39. data/spec/models/policy_behavior_enum_spec.rb +24 -0
  40. data/spec/models/resume_on_match_failures_enum_spec.rb +24 -0
  41. data/spec/models/source_stage_request_spec.rb +6 -0
  42. data/spec/models/source_stage_spec.rb +6 -0
  43. metadata +34 -1
@@ -0,0 +1,214 @@
1
+ =begin
2
+ This file is automatically generated by: https://openapi-generator.tech.
3
+ Any manual changes will be lost when the OpenAPI scheme changes.
4
+
5
+ =end
6
+
7
+ require 'date'
8
+ require 'time'
9
+
10
+ module Authentik::Api
11
+ class PaginatedAgentList < ApiModelBase
12
+ attr_accessor :pagination
13
+
14
+ attr_accessor :results
15
+
16
+ attr_accessor :autocomplete
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'pagination' => :'pagination',
22
+ :'results' => :'results',
23
+ :'autocomplete' => :'autocomplete'
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
+ :'pagination' => :'Pagination',
41
+ :'results' => :'Array<Agent>',
42
+ :'autocomplete' => :'Hash<String, Object>'
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::PaginatedAgentList` 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::PaginatedAgentList`. 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?(:'pagination')
69
+ self.pagination = attributes[:'pagination']
70
+ else
71
+ self.pagination = nil
72
+ end
73
+
74
+ if attributes.key?(:'results')
75
+ if (value = attributes[:'results']).is_a?(Array)
76
+ self.results = value
77
+ end
78
+ else
79
+ self.results = nil
80
+ end
81
+
82
+ if attributes.key?(:'autocomplete')
83
+ if (value = attributes[:'autocomplete']).is_a?(Hash)
84
+ self.autocomplete = value
85
+ end
86
+ else
87
+ self.autocomplete = nil
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ if @pagination.nil?
97
+ invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
98
+ end
99
+
100
+ if @results.nil?
101
+ invalid_properties.push('invalid value for "results", results cannot be nil.')
102
+ end
103
+
104
+ if @autocomplete.nil?
105
+ invalid_properties.push('invalid value for "autocomplete", autocomplete cannot be nil.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ return false if @pagination.nil?
116
+ return false if @results.nil?
117
+ return false if @autocomplete.nil?
118
+ true
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] pagination Value to be assigned
123
+ def pagination=(pagination)
124
+ if pagination.nil?
125
+ fail ArgumentError, 'pagination cannot be nil'
126
+ end
127
+
128
+ @pagination = pagination
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] results Value to be assigned
133
+ def results=(results)
134
+ if results.nil?
135
+ fail ArgumentError, 'results cannot be nil'
136
+ end
137
+
138
+ @results = results
139
+ end
140
+
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] autocomplete Value to be assigned
143
+ def autocomplete=(autocomplete)
144
+ if autocomplete.nil?
145
+ fail ArgumentError, 'autocomplete cannot be nil'
146
+ end
147
+
148
+ @autocomplete = autocomplete
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] Object to be compared
153
+ def ==(o)
154
+ return true if self.equal?(o)
155
+ self.class == o.class &&
156
+ pagination == o.pagination &&
157
+ results == o.results &&
158
+ autocomplete == o.autocomplete
159
+ end
160
+
161
+ # @see the `==` method
162
+ # @param [Object] Object to be compared
163
+ def eql?(o)
164
+ self == o
165
+ end
166
+
167
+ # Calculates hash code according to all attributes.
168
+ # @return [Integer] Hash code
169
+ def hash
170
+ [pagination, results, autocomplete].hash
171
+ end
172
+
173
+ # Builds the object from hash
174
+ # @param [Hash] attributes Model attributes in the form of hash
175
+ # @return [Object] Returns the model itself
176
+ def self.build_from_hash(attributes)
177
+ return nil unless attributes.is_a?(Hash)
178
+ attributes = attributes.transform_keys(&:to_sym)
179
+ transformed_hash = {}
180
+ openapi_types.each_pair do |key, type|
181
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
182
+ transformed_hash["#{key}"] = nil
183
+ elsif type =~ /\AArray<(.*)>/i
184
+ # check to ensure the input is an array given that the attribute
185
+ # is documented as an array but the input is not
186
+ if attributes[attribute_map[key]].is_a?(Array)
187
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
188
+ end
189
+ elsif !attributes[attribute_map[key]].nil?
190
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
191
+ end
192
+ end
193
+ new(transformed_hash)
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ if value.nil?
203
+ is_nullable = self.class.openapi_nullable.include?(attr)
204
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
+ end
206
+
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ end
213
+
214
+ end
@@ -0,0 +1,289 @@
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 PatchedAgentRequest < ApiModelBase
13
+ # Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
14
+ attr_accessor :username
15
+
16
+ # User's display name.
17
+ attr_accessor :name
18
+
19
+ # Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
20
+ attr_accessor :is_active
21
+
22
+ attr_accessor :last_login
23
+
24
+ attr_accessor :email
25
+
26
+ attr_accessor :attributes
27
+
28
+ attr_accessor :expiring
29
+
30
+ attr_accessor :expires
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'username' => :'username',
36
+ :'name' => :'name',
37
+ :'is_active' => :'is_active',
38
+ :'last_login' => :'last_login',
39
+ :'email' => :'email',
40
+ :'attributes' => :'attributes',
41
+ :'expiring' => :'expiring',
42
+ :'expires' => :'expires'
43
+ }
44
+ end
45
+
46
+ # Returns attribute mapping this model knows about
47
+ def self.acceptable_attribute_map
48
+ attribute_map
49
+ end
50
+
51
+ # Returns all the JSON keys this model knows about
52
+ def self.acceptable_attributes
53
+ acceptable_attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'username' => :'String',
60
+ :'name' => :'String',
61
+ :'is_active' => :'Boolean',
62
+ :'last_login' => :'Time',
63
+ :'email' => :'String',
64
+ :'attributes' => :'Hash<String, Object>',
65
+ :'expiring' => :'Boolean',
66
+ :'expires' => :'Time'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ :'last_login',
74
+ :'expires'
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::PatchedAgentRequest` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ acceptable_attribute_map = self.class.acceptable_attribute_map
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!acceptable_attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::PatchedAgentRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'username')
95
+ self.username = attributes[:'username']
96
+ end
97
+
98
+ if attributes.key?(:'name')
99
+ self.name = attributes[:'name']
100
+ end
101
+
102
+ if attributes.key?(:'is_active')
103
+ self.is_active = attributes[:'is_active']
104
+ end
105
+
106
+ if attributes.key?(:'last_login')
107
+ self.last_login = attributes[:'last_login']
108
+ end
109
+
110
+ if attributes.key?(:'email')
111
+ self.email = attributes[:'email']
112
+ end
113
+
114
+ if attributes.key?(:'attributes')
115
+ if (value = attributes[:'attributes']).is_a?(Hash)
116
+ self.attributes = value
117
+ end
118
+ end
119
+
120
+ if attributes.key?(:'expiring')
121
+ self.expiring = attributes[:'expiring']
122
+ end
123
+
124
+ if attributes.key?(:'expires')
125
+ self.expires = attributes[:'expires']
126
+ end
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
133
+ invalid_properties = Array.new
134
+ if !@username.nil? && @username.to_s.length > 150
135
+ invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 150.')
136
+ end
137
+
138
+ if !@username.nil? && @username.to_s.length < 1
139
+ invalid_properties.push('invalid value for "username", the character length must be greater than or equal to 1.')
140
+ end
141
+
142
+ pattern = Regexp.new(/^[\w.@+-]+$/)
143
+ if !@username.nil? && @username !~ pattern
144
+ invalid_properties.push("invalid value for \"username\", must conform to the pattern #{pattern}.")
145
+ end
146
+
147
+ if !@name.nil? && @name.to_s.length < 1
148
+ invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
149
+ end
150
+
151
+ if !@email.nil? && @email.to_s.length > 254
152
+ invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 254.')
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 !@username.nil? && @username.to_s.length > 150
163
+ return false if !@username.nil? && @username.to_s.length < 1
164
+ return false if !@username.nil? && @username !~ Regexp.new(/^[\w.@+-]+$/)
165
+ return false if !@name.nil? && @name.to_s.length < 1
166
+ return false if !@email.nil? && @email.to_s.length > 254
167
+ true
168
+ end
169
+
170
+ # Custom attribute writer method with validation
171
+ # @param [Object] username Value to be assigned
172
+ def username=(username)
173
+ if username.nil?
174
+ fail ArgumentError, 'username cannot be nil'
175
+ end
176
+
177
+ if username.to_s.length > 150
178
+ fail ArgumentError, 'invalid value for "username", the character length must be smaller than or equal to 150.'
179
+ end
180
+
181
+ if username.to_s.length < 1
182
+ fail ArgumentError, 'invalid value for "username", the character length must be greater than or equal to 1.'
183
+ end
184
+
185
+ pattern = Regexp.new(/^[\w.@+-]+$/)
186
+ if username !~ pattern
187
+ fail ArgumentError, "invalid value for \"username\", must conform to the pattern #{pattern}."
188
+ end
189
+
190
+ @username = username
191
+ end
192
+
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] name Value to be assigned
195
+ def name=(name)
196
+ if name.nil?
197
+ fail ArgumentError, 'name cannot be nil'
198
+ end
199
+
200
+ if name.to_s.length < 1
201
+ fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.'
202
+ end
203
+
204
+ @name = name
205
+ end
206
+
207
+ # Custom attribute writer method with validation
208
+ # @param [Object] email Value to be assigned
209
+ def email=(email)
210
+ if email.nil?
211
+ fail ArgumentError, 'email cannot be nil'
212
+ end
213
+
214
+ if email.to_s.length > 254
215
+ fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 254.'
216
+ end
217
+
218
+ @email = email
219
+ end
220
+
221
+ # Checks equality by comparing each attribute.
222
+ # @param [Object] Object to be compared
223
+ def ==(o)
224
+ return true if self.equal?(o)
225
+ self.class == o.class &&
226
+ username == o.username &&
227
+ name == o.name &&
228
+ is_active == o.is_active &&
229
+ last_login == o.last_login &&
230
+ email == o.email &&
231
+ attributes == o.attributes &&
232
+ expiring == o.expiring &&
233
+ expires == o.expires
234
+ end
235
+
236
+ # @see the `==` method
237
+ # @param [Object] Object to be compared
238
+ def eql?(o)
239
+ self == o
240
+ end
241
+
242
+ # Calculates hash code according to all attributes.
243
+ # @return [Integer] Hash code
244
+ def hash
245
+ [username, name, is_active, last_login, email, attributes, expiring, expires].hash
246
+ end
247
+
248
+ # Builds the object from hash
249
+ # @param [Hash] attributes Model attributes in the form of hash
250
+ # @return [Object] Returns the model itself
251
+ def self.build_from_hash(attributes)
252
+ return nil unless attributes.is_a?(Hash)
253
+ attributes = attributes.transform_keys(&:to_sym)
254
+ transformed_hash = {}
255
+ openapi_types.each_pair do |key, type|
256
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
257
+ transformed_hash["#{key}"] = nil
258
+ elsif type =~ /\AArray<(.*)>/i
259
+ # check to ensure the input is an array given that the attribute
260
+ # is documented as an array but the input is not
261
+ if attributes[attribute_map[key]].is_a?(Array)
262
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
263
+ end
264
+ elsif !attributes[attribute_map[key]].nil?
265
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
266
+ end
267
+ end
268
+ new(transformed_hash)
269
+ end
270
+
271
+ # Returns the object in the form of hash
272
+ # @return [Hash] Returns the object in the form of hash
273
+ def to_hash
274
+ hash = {}
275
+ self.class.attribute_map.each_pair do |attr, param|
276
+ value = self.send(attr)
277
+ if value.nil?
278
+ is_nullable = self.class.openapi_nullable.include?(attr)
279
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
280
+ end
281
+
282
+ hash[param] = _to_hash(value)
283
+ end
284
+ hash
285
+ end
286
+
287
+ end
288
+
289
+ end
@@ -17,12 +17,16 @@ module Authentik::Api
17
17
  # Amount of time a user can take to return from the source to continue the flow (Format: hours=-1;minutes=-2;seconds=-3)
18
18
  attr_accessor :resume_timeout
19
19
 
20
+ # Source matching failure reasons for which the flow should resume.
21
+ attr_accessor :resume_on_match_failures
22
+
20
23
  # Attribute mapping from ruby-style variable name to JSON key.
21
24
  def self.attribute_map
22
25
  {
23
26
  :'name' => :'name',
24
27
  :'source' => :'source',
25
- :'resume_timeout' => :'resume_timeout'
28
+ :'resume_timeout' => :'resume_timeout',
29
+ :'resume_on_match_failures' => :'resume_on_match_failures'
26
30
  }
27
31
  end
28
32
 
@@ -41,7 +45,8 @@ module Authentik::Api
41
45
  {
42
46
  :'name' => :'String',
43
47
  :'source' => :'String',
44
- :'resume_timeout' => :'String'
48
+ :'resume_timeout' => :'String',
49
+ :'resume_on_match_failures' => :'Array<ResumeOnMatchFailuresEnum>'
45
50
  }
46
51
  end
47
52
 
@@ -78,6 +83,12 @@ module Authentik::Api
78
83
  if attributes.key?(:'resume_timeout')
79
84
  self.resume_timeout = attributes[:'resume_timeout']
80
85
  end
86
+
87
+ if attributes.key?(:'resume_on_match_failures')
88
+ if (value = attributes[:'resume_on_match_failures']).is_a?(Array)
89
+ self.resume_on_match_failures = value
90
+ end
91
+ end
81
92
  end
82
93
 
83
94
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -140,7 +151,8 @@ module Authentik::Api
140
151
  self.class == o.class &&
141
152
  name == o.name &&
142
153
  source == o.source &&
143
- resume_timeout == o.resume_timeout
154
+ resume_timeout == o.resume_timeout &&
155
+ resume_on_match_failures == o.resume_on_match_failures
144
156
  end
145
157
 
146
158
  # @see the `==` method
@@ -152,7 +164,7 @@ module Authentik::Api
152
164
  # Calculates hash code according to all attributes.
153
165
  # @return [Integer] Hash code
154
166
  def hash
155
- [name, source, resume_timeout].hash
167
+ [name, source, resume_timeout, resume_on_match_failures].hash
156
168
  end
157
169
 
158
170
  # Builds the object from hash
@@ -0,0 +1,35 @@
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 PolicyBehaviorEnum
12
+ MIRROR = "mirror".freeze
13
+ COPY = "copy".freeze
14
+ NONE = "none".freeze
15
+
16
+ def self.all_vars
17
+ @all_vars ||= [MIRROR, COPY, NONE].freeze
18
+ end
19
+
20
+ # Builds the enum from string
21
+ # @param [String] The enum value in the form of the string
22
+ # @return [String] The enum value
23
+ def self.build_from_hash(value)
24
+ new.build_from_hash(value)
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def build_from_hash(value)
31
+ return value if PolicyBehaviorEnum.all_vars.include?(value)
32
+ raise "Invalid ENUM value #{value} for class #PolicyBehaviorEnum"
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,33 @@
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 ResumeOnMatchFailuresEnum
12
+ MISSING_PROPERTY = "missing_property".freeze
13
+
14
+ def self.all_vars
15
+ @all_vars ||= [MISSING_PROPERTY].freeze
16
+ end
17
+
18
+ # Builds the enum from string
19
+ # @param [String] The enum value in the form of the string
20
+ # @return [String] The enum value
21
+ def self.build_from_hash(value)
22
+ new.build_from_hash(value)
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def build_from_hash(value)
29
+ return value if ResumeOnMatchFailuresEnum.all_vars.include?(value)
30
+ raise "Invalid ENUM value #{value} for class #ResumeOnMatchFailuresEnum"
31
+ end
32
+ end
33
+ end
@@ -33,6 +33,9 @@ module Authentik::Api
33
33
  # Amount of time a user can take to return from the source to continue the flow (Format: hours=-1;minutes=-2;seconds=-3)
34
34
  attr_accessor :resume_timeout
35
35
 
36
+ # Source matching failure reasons for which the flow should resume.
37
+ attr_accessor :resume_on_match_failures
38
+
36
39
  # Attribute mapping from ruby-style variable name to JSON key.
37
40
  def self.attribute_map
38
41
  {
@@ -44,7 +47,8 @@ module Authentik::Api
44
47
  :'meta_model_name' => :'meta_model_name',
45
48
  :'flow_set' => :'flow_set',
46
49
  :'source' => :'source',
47
- :'resume_timeout' => :'resume_timeout'
50
+ :'resume_timeout' => :'resume_timeout',
51
+ :'resume_on_match_failures' => :'resume_on_match_failures'
48
52
  }
49
53
  end
50
54
 
@@ -69,7 +73,8 @@ module Authentik::Api
69
73
  :'meta_model_name' => :'String',
70
74
  :'flow_set' => :'Array<FlowSet>',
71
75
  :'source' => :'String',
72
- :'resume_timeout' => :'String'
76
+ :'resume_timeout' => :'String',
77
+ :'resume_on_match_failures' => :'Array<ResumeOnMatchFailuresEnum>'
73
78
  }
74
79
  end
75
80
 
@@ -148,6 +153,12 @@ module Authentik::Api
148
153
  if attributes.key?(:'resume_timeout')
149
154
  self.resume_timeout = attributes[:'resume_timeout']
150
155
  end
156
+
157
+ if attributes.key?(:'resume_on_match_failures')
158
+ if (value = attributes[:'resume_on_match_failures']).is_a?(Array)
159
+ self.resume_on_match_failures = value
160
+ end
161
+ end
151
162
  end
152
163
 
153
164
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -298,7 +309,8 @@ module Authentik::Api
298
309
  meta_model_name == o.meta_model_name &&
299
310
  flow_set == o.flow_set &&
300
311
  source == o.source &&
301
- resume_timeout == o.resume_timeout
312
+ resume_timeout == o.resume_timeout &&
313
+ resume_on_match_failures == o.resume_on_match_failures
302
314
  end
303
315
 
304
316
  # @see the `==` method
@@ -310,7 +322,7 @@ module Authentik::Api
310
322
  # Calculates hash code according to all attributes.
311
323
  # @return [Integer] Hash code
312
324
  def hash
313
- [pk, name, component, verbose_name, verbose_name_plural, meta_model_name, flow_set, source, resume_timeout].hash
325
+ [pk, name, component, verbose_name, verbose_name_plural, meta_model_name, flow_set, source, resume_timeout, resume_on_match_failures].hash
314
326
  end
315
327
 
316
328
  # Builds the object from hash