authentik-api 2025.12.4 → 2026.2.1.1
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 +59 -7
- data/lib/authentik/api/api/core_api.rb +109 -12
- data/lib/authentik/api/api/crypto_api.rb +0 -3
- data/lib/authentik/api/api/endpoints_api.rb +459 -0
- data/lib/authentik/api/api/events_api.rb +3 -3
- data/lib/authentik/api/api/lifecycle_api.rb +681 -0
- data/lib/authentik/api/api/policies_api.rb +1 -1
- data/lib/authentik/api/api/providers_api.rb +705 -3
- data/lib/authentik/api/api/rbac_api.rb +6 -9
- data/lib/authentik/api/api/stages_api.rb +1 -1
- data/lib/authentik/api/models/alg_enum.rb +3 -1
- data/lib/authentik/api/models/app_enum.rb +4 -1
- data/lib/authentik/api/models/bulk_delete_session_response.rb +158 -0
- data/lib/authentik/api/models/certificate_key_pair.rb +5 -4
- data/lib/authentik/api/models/content_type_enum.rb +35 -0
- data/lib/authentik/api/models/contextual_flow_info_layout_enum.rb +3 -1
- data/lib/authentik/api/models/current_brand_flags.rb +27 -1
- data/lib/authentik/api/models/device_access_group.rb +15 -4
- data/lib/authentik/api/models/device_access_group_request.rb +15 -4
- data/lib/authentik/api/models/device_fact_snapshot.rb +53 -5
- data/lib/authentik/api/models/event_actions.rb +6 -1
- data/lib/authentik/api/models/fleet_connector.rb +349 -0
- data/lib/authentik/api/models/fleet_connector_request.rb +294 -0
- data/lib/authentik/api/models/flow_layout_enum.rb +3 -1
- data/lib/authentik/api/models/identification_challenge.rb +11 -1
- data/lib/authentik/api/models/lifecycle_iteration.rb +525 -0
- data/lib/authentik/api/models/lifecycle_iteration_request.rb +181 -0
- data/lib/authentik/api/models/lifecycle_iteration_state_enum.rb +36 -0
- data/lib/authentik/api/models/lifecycle_rule.rb +440 -0
- data/lib/authentik/api/models/lifecycle_rule_request.rb +394 -0
- data/lib/authentik/api/models/model_enum.rb +6 -1
- data/lib/authentik/api/models/model_request.rb +4 -2
- data/lib/authentik/api/models/operating_system.rb +3 -0
- data/lib/authentik/api/models/operating_system_request.rb +3 -0
- data/lib/authentik/api/models/paginated_fleet_connector_list.rb +214 -0
- data/lib/authentik/api/models/paginated_lifecycle_iteration_list.rb +214 -0
- data/lib/authentik/api/models/paginated_lifecycle_rule_list.rb +214 -0
- data/lib/authentik/api/models/paginated_ws_federation_provider_list.rb +214 -0
- data/lib/authentik/api/models/patched_device_access_group_request.rb +15 -4
- data/lib/authentik/api/models/patched_fleet_connector_request.rb +273 -0
- data/lib/authentik/api/models/patched_lifecycle_rule_request.rb +353 -0
- data/lib/authentik/api/models/patched_role_request.rb +0 -9
- data/lib/authentik/api/models/patched_saml_provider_request.rb +1 -1
- data/lib/authentik/api/models/patched_scim_provider_request.rb +13 -11
- data/lib/authentik/api/models/patched_settings_request_flags.rb +27 -1
- data/lib/authentik/api/models/patched_ws_federation_provider_request.rb +457 -0
- data/lib/authentik/api/models/provider_model_enum.rb +2 -1
- data/lib/authentik/api/models/review.rb +247 -0
- data/lib/authentik/api/models/review_request.rb +184 -0
- data/lib/authentik/api/models/reviewer_group.rb +184 -0
- data/lib/authentik/api/models/reviewer_user.rb +258 -0
- data/lib/authentik/api/models/role.rb +0 -9
- data/lib/authentik/api/models/role_request.rb +0 -9
- data/lib/authentik/api/models/{saml_provider_logout_method_enum.rb → saml_logout_methods.rb} +3 -3
- data/lib/authentik/api/models/saml_provider.rb +1 -1
- data/lib/authentik/api/models/saml_provider_request.rb +1 -1
- data/lib/authentik/api/models/scim_provider.rb +13 -11
- data/lib/authentik/api/models/scim_provider_request.rb +13 -11
- data/lib/authentik/api/models/task.rb +1 -1
- data/lib/authentik/api/models/{state_enum.rb → task_state_enum.rb} +3 -3
- data/lib/authentik/api/models/user_recovery_email_request.rb +187 -0
- data/lib/authentik/api/models/user_recovery_link_request.rb +161 -0
- data/lib/authentik/api/models/vendor_enum.rb +35 -0
- data/lib/authentik/api/models/ws_federation_provider.rb +668 -0
- data/lib/authentik/api/models/ws_federation_provider_request.rb +512 -0
- data/lib/authentik/api/version.rb +1 -1
- data/spec/api/core_api_spec.rb +21 -1
- data/spec/api/crypto_api_spec.rb +0 -1
- data/spec/api/endpoints_api_spec.rb +83 -0
- data/spec/api/lifecycle_api_spec.rb +144 -0
- data/spec/api/providers_api_spec.rb +137 -1
- data/spec/api/rbac_api_spec.rb +2 -3
- data/spec/models/bulk_delete_session_response_spec.rb +30 -0
- data/spec/models/content_type_enum_spec.rb +24 -0
- data/spec/models/current_brand_flags_spec.rb +6 -0
- data/spec/models/device_access_group_request_spec.rb +6 -0
- data/spec/models/device_access_group_spec.rb +6 -0
- data/spec/models/device_fact_snapshot_spec.rb +6 -0
- data/spec/models/fleet_connector_request_spec.rb +72 -0
- data/spec/models/fleet_connector_spec.rb +90 -0
- data/spec/models/identification_challenge_spec.rb +6 -0
- data/spec/models/lifecycle_iteration_request_spec.rb +30 -0
- data/spec/models/lifecycle_iteration_spec.rb +108 -0
- data/spec/models/lifecycle_iteration_state_enum_spec.rb +24 -0
- data/spec/models/lifecycle_rule_request_spec.rb +84 -0
- data/spec/models/lifecycle_rule_spec.rb +108 -0
- data/spec/models/paginated_fleet_connector_list_spec.rb +42 -0
- data/spec/models/paginated_lifecycle_iteration_list_spec.rb +42 -0
- data/spec/models/paginated_lifecycle_rule_list_spec.rb +42 -0
- data/spec/models/paginated_ws_federation_provider_list_spec.rb +42 -0
- data/spec/models/patched_device_access_group_request_spec.rb +6 -0
- data/spec/models/patched_fleet_connector_request_spec.rb +72 -0
- data/spec/models/patched_lifecycle_rule_request_spec.rb +84 -0
- data/spec/models/patched_scim_provider_request_spec.rb +3 -3
- data/spec/models/patched_settings_request_flags_spec.rb +6 -0
- data/spec/models/patched_ws_federation_provider_request_spec.rb +138 -0
- data/spec/models/review_request_spec.rb +36 -0
- data/spec/models/review_spec.rb +54 -0
- data/spec/models/reviewer_group_spec.rb +36 -0
- data/spec/models/reviewer_user_spec.rb +48 -0
- data/spec/models/saml_logout_methods_spec.rb +24 -0
- data/spec/models/scim_provider_request_spec.rb +3 -3
- data/spec/models/scim_provider_spec.rb +3 -3
- data/spec/models/task_state_enum_spec.rb +24 -0
- data/spec/models/user_recovery_email_request_spec.rb +36 -0
- data/spec/models/user_recovery_link_request_spec.rb +30 -0
- data/spec/models/{state_enum_spec.rb → vendor_enum_spec.rb} +6 -6
- data/spec/models/ws_federation_provider_request_spec.rb +138 -0
- data/spec/models/ws_federation_provider_spec.rb +204 -0
- metadata +85 -7
- data/spec/models/saml_provider_logout_method_enum_spec.rb +0 -24
|
@@ -0,0 +1,525 @@
|
|
|
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 LifecycleIteration < ApiModelBase
|
|
13
|
+
attr_accessor :id
|
|
14
|
+
|
|
15
|
+
attr_accessor :content_type
|
|
16
|
+
|
|
17
|
+
attr_accessor :obj_id
|
|
18
|
+
|
|
19
|
+
attr_accessor :object_verbose
|
|
20
|
+
|
|
21
|
+
attr_accessor :object_admin_url
|
|
22
|
+
|
|
23
|
+
attr_accessor :state
|
|
24
|
+
|
|
25
|
+
attr_accessor :opened_on
|
|
26
|
+
|
|
27
|
+
attr_accessor :grace_period_end
|
|
28
|
+
|
|
29
|
+
attr_accessor :next_review_date
|
|
30
|
+
|
|
31
|
+
attr_accessor :reviews
|
|
32
|
+
|
|
33
|
+
attr_accessor :user_can_review
|
|
34
|
+
|
|
35
|
+
attr_accessor :reviewer_groups
|
|
36
|
+
|
|
37
|
+
attr_accessor :min_reviewers
|
|
38
|
+
|
|
39
|
+
attr_accessor :reviewers
|
|
40
|
+
|
|
41
|
+
class EnumAttributeValidator
|
|
42
|
+
attr_reader :datatype
|
|
43
|
+
attr_reader :allowable_values
|
|
44
|
+
|
|
45
|
+
def initialize(datatype, allowable_values)
|
|
46
|
+
@allowable_values = allowable_values.map do |value|
|
|
47
|
+
case datatype.to_s
|
|
48
|
+
when /Integer/i
|
|
49
|
+
value.to_i
|
|
50
|
+
when /Float/i
|
|
51
|
+
value.to_f
|
|
52
|
+
else
|
|
53
|
+
value
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def valid?(value)
|
|
59
|
+
!value || allowable_values.include?(value)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
64
|
+
def self.attribute_map
|
|
65
|
+
{
|
|
66
|
+
:'id' => :'id',
|
|
67
|
+
:'content_type' => :'content_type',
|
|
68
|
+
:'obj_id' => :'object_id',
|
|
69
|
+
:'object_verbose' => :'object_verbose',
|
|
70
|
+
:'object_admin_url' => :'object_admin_url',
|
|
71
|
+
:'state' => :'state',
|
|
72
|
+
:'opened_on' => :'opened_on',
|
|
73
|
+
:'grace_period_end' => :'grace_period_end',
|
|
74
|
+
:'next_review_date' => :'next_review_date',
|
|
75
|
+
:'reviews' => :'reviews',
|
|
76
|
+
:'user_can_review' => :'user_can_review',
|
|
77
|
+
:'reviewer_groups' => :'reviewer_groups',
|
|
78
|
+
:'min_reviewers' => :'min_reviewers',
|
|
79
|
+
:'reviewers' => :'reviewers'
|
|
80
|
+
}
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Returns attribute mapping this model knows about
|
|
84
|
+
def self.acceptable_attribute_map
|
|
85
|
+
attribute_map
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Returns all the JSON keys this model knows about
|
|
89
|
+
def self.acceptable_attributes
|
|
90
|
+
acceptable_attribute_map.values
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Attribute type mapping.
|
|
94
|
+
def self.openapi_types
|
|
95
|
+
{
|
|
96
|
+
:'id' => :'String',
|
|
97
|
+
:'content_type' => :'ContentTypeEnum',
|
|
98
|
+
:'obj_id' => :'String',
|
|
99
|
+
:'object_verbose' => :'String',
|
|
100
|
+
:'object_admin_url' => :'String',
|
|
101
|
+
:'state' => :'LifecycleIterationStateEnum',
|
|
102
|
+
:'opened_on' => :'Time',
|
|
103
|
+
:'grace_period_end' => :'Time',
|
|
104
|
+
:'next_review_date' => :'Time',
|
|
105
|
+
:'reviews' => :'Array<Review>',
|
|
106
|
+
:'user_can_review' => :'Boolean',
|
|
107
|
+
:'reviewer_groups' => :'Array<ReviewerGroup>',
|
|
108
|
+
:'min_reviewers' => :'Integer',
|
|
109
|
+
:'reviewers' => :'Array<ReviewerUser>'
|
|
110
|
+
}
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# List of attributes with nullable: true
|
|
114
|
+
def self.openapi_nullable
|
|
115
|
+
Set.new([
|
|
116
|
+
])
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Initializes the object
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
def initialize(attributes = {})
|
|
122
|
+
if (!attributes.is_a?(Hash))
|
|
123
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::LifecycleIteration` initialize method"
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
127
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
128
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
129
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
130
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::LifecycleIteration`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
131
|
+
end
|
|
132
|
+
h[k.to_sym] = v
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'id')
|
|
136
|
+
self.id = attributes[:'id']
|
|
137
|
+
else
|
|
138
|
+
self.id = nil
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'content_type')
|
|
142
|
+
self.content_type = attributes[:'content_type']
|
|
143
|
+
else
|
|
144
|
+
self.content_type = nil
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'obj_id')
|
|
148
|
+
self.obj_id = attributes[:'obj_id']
|
|
149
|
+
else
|
|
150
|
+
self.obj_id = nil
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'object_verbose')
|
|
154
|
+
self.object_verbose = attributes[:'object_verbose']
|
|
155
|
+
else
|
|
156
|
+
self.object_verbose = nil
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'object_admin_url')
|
|
160
|
+
self.object_admin_url = attributes[:'object_admin_url']
|
|
161
|
+
else
|
|
162
|
+
self.object_admin_url = nil
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'state')
|
|
166
|
+
self.state = attributes[:'state']
|
|
167
|
+
else
|
|
168
|
+
self.state = nil
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'opened_on')
|
|
172
|
+
self.opened_on = attributes[:'opened_on']
|
|
173
|
+
else
|
|
174
|
+
self.opened_on = nil
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'grace_period_end')
|
|
178
|
+
self.grace_period_end = attributes[:'grace_period_end']
|
|
179
|
+
else
|
|
180
|
+
self.grace_period_end = nil
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'next_review_date')
|
|
184
|
+
self.next_review_date = attributes[:'next_review_date']
|
|
185
|
+
else
|
|
186
|
+
self.next_review_date = nil
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if attributes.key?(:'reviews')
|
|
190
|
+
if (value = attributes[:'reviews']).is_a?(Array)
|
|
191
|
+
self.reviews = value
|
|
192
|
+
end
|
|
193
|
+
else
|
|
194
|
+
self.reviews = nil
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
if attributes.key?(:'user_can_review')
|
|
198
|
+
self.user_can_review = attributes[:'user_can_review']
|
|
199
|
+
else
|
|
200
|
+
self.user_can_review = nil
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if attributes.key?(:'reviewer_groups')
|
|
204
|
+
if (value = attributes[:'reviewer_groups']).is_a?(Array)
|
|
205
|
+
self.reviewer_groups = value
|
|
206
|
+
end
|
|
207
|
+
else
|
|
208
|
+
self.reviewer_groups = nil
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if attributes.key?(:'min_reviewers')
|
|
212
|
+
self.min_reviewers = attributes[:'min_reviewers']
|
|
213
|
+
else
|
|
214
|
+
self.min_reviewers = nil
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
if attributes.key?(:'reviewers')
|
|
218
|
+
if (value = attributes[:'reviewers']).is_a?(Array)
|
|
219
|
+
self.reviewers = value
|
|
220
|
+
end
|
|
221
|
+
else
|
|
222
|
+
self.reviewers = nil
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
227
|
+
# @return Array for valid properties with the reasons
|
|
228
|
+
def list_invalid_properties
|
|
229
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
230
|
+
invalid_properties = Array.new
|
|
231
|
+
if @id.nil?
|
|
232
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if @content_type.nil?
|
|
236
|
+
invalid_properties.push('invalid value for "content_type", content_type cannot be nil.')
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if @obj_id.nil?
|
|
240
|
+
invalid_properties.push('invalid value for "obj_id", obj_id cannot be nil.')
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if @object_verbose.nil?
|
|
244
|
+
invalid_properties.push('invalid value for "object_verbose", object_verbose cannot be nil.')
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if @object_admin_url.nil?
|
|
248
|
+
invalid_properties.push('invalid value for "object_admin_url", object_admin_url cannot be nil.')
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
if @state.nil?
|
|
252
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
if @opened_on.nil?
|
|
256
|
+
invalid_properties.push('invalid value for "opened_on", opened_on cannot be nil.')
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if @grace_period_end.nil?
|
|
260
|
+
invalid_properties.push('invalid value for "grace_period_end", grace_period_end cannot be nil.')
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
if @next_review_date.nil?
|
|
264
|
+
invalid_properties.push('invalid value for "next_review_date", next_review_date cannot be nil.')
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if @reviews.nil?
|
|
268
|
+
invalid_properties.push('invalid value for "reviews", reviews cannot be nil.')
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
if @user_can_review.nil?
|
|
272
|
+
invalid_properties.push('invalid value for "user_can_review", user_can_review cannot be nil.')
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
if @reviewer_groups.nil?
|
|
276
|
+
invalid_properties.push('invalid value for "reviewer_groups", reviewer_groups cannot be nil.')
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
if @min_reviewers.nil?
|
|
280
|
+
invalid_properties.push('invalid value for "min_reviewers", min_reviewers cannot be nil.')
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
if @reviewers.nil?
|
|
284
|
+
invalid_properties.push('invalid value for "reviewers", reviewers cannot be nil.')
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
invalid_properties
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Check to see if the all the properties in the model are valid
|
|
291
|
+
# @return true if the model is valid
|
|
292
|
+
def valid?
|
|
293
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
294
|
+
return false if @id.nil?
|
|
295
|
+
return false if @content_type.nil?
|
|
296
|
+
return false if @obj_id.nil?
|
|
297
|
+
return false if @object_verbose.nil?
|
|
298
|
+
return false if @object_admin_url.nil?
|
|
299
|
+
return false if @state.nil?
|
|
300
|
+
return false if @opened_on.nil?
|
|
301
|
+
return false if @grace_period_end.nil?
|
|
302
|
+
return false if @next_review_date.nil?
|
|
303
|
+
return false if @reviews.nil?
|
|
304
|
+
return false if @user_can_review.nil?
|
|
305
|
+
return false if @reviewer_groups.nil?
|
|
306
|
+
return false if @min_reviewers.nil?
|
|
307
|
+
return false if @reviewers.nil?
|
|
308
|
+
true
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
# Custom attribute writer method with validation
|
|
312
|
+
# @param [Object] id Value to be assigned
|
|
313
|
+
def id=(id)
|
|
314
|
+
if id.nil?
|
|
315
|
+
fail ArgumentError, 'id cannot be nil'
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
@id = id
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# Custom attribute writer method with validation
|
|
322
|
+
# @param [Object] content_type Value to be assigned
|
|
323
|
+
def content_type=(content_type)
|
|
324
|
+
if content_type.nil?
|
|
325
|
+
fail ArgumentError, 'content_type cannot be nil'
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
@content_type = content_type
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# Custom attribute writer method with validation
|
|
332
|
+
# @param [Object] obj_id Value to be assigned
|
|
333
|
+
def obj_id=(obj_id)
|
|
334
|
+
if obj_id.nil?
|
|
335
|
+
fail ArgumentError, 'obj_id cannot be nil'
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
@obj_id = obj_id
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
# Custom attribute writer method with validation
|
|
342
|
+
# @param [Object] object_verbose Value to be assigned
|
|
343
|
+
def object_verbose=(object_verbose)
|
|
344
|
+
if object_verbose.nil?
|
|
345
|
+
fail ArgumentError, 'object_verbose cannot be nil'
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
@object_verbose = object_verbose
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
# Custom attribute writer method with validation
|
|
352
|
+
# @param [Object] object_admin_url Value to be assigned
|
|
353
|
+
def object_admin_url=(object_admin_url)
|
|
354
|
+
if object_admin_url.nil?
|
|
355
|
+
fail ArgumentError, 'object_admin_url cannot be nil'
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
@object_admin_url = object_admin_url
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
# Custom attribute writer method with validation
|
|
362
|
+
# @param [Object] state Value to be assigned
|
|
363
|
+
def state=(state)
|
|
364
|
+
if state.nil?
|
|
365
|
+
fail ArgumentError, 'state cannot be nil'
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
@state = state
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# Custom attribute writer method with validation
|
|
372
|
+
# @param [Object] opened_on Value to be assigned
|
|
373
|
+
def opened_on=(opened_on)
|
|
374
|
+
if opened_on.nil?
|
|
375
|
+
fail ArgumentError, 'opened_on cannot be nil'
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
@opened_on = opened_on
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
# Custom attribute writer method with validation
|
|
382
|
+
# @param [Object] grace_period_end Value to be assigned
|
|
383
|
+
def grace_period_end=(grace_period_end)
|
|
384
|
+
if grace_period_end.nil?
|
|
385
|
+
fail ArgumentError, 'grace_period_end cannot be nil'
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
@grace_period_end = grace_period_end
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
# Custom attribute writer method with validation
|
|
392
|
+
# @param [Object] next_review_date Value to be assigned
|
|
393
|
+
def next_review_date=(next_review_date)
|
|
394
|
+
if next_review_date.nil?
|
|
395
|
+
fail ArgumentError, 'next_review_date cannot be nil'
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
@next_review_date = next_review_date
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# Custom attribute writer method with validation
|
|
402
|
+
# @param [Object] reviews Value to be assigned
|
|
403
|
+
def reviews=(reviews)
|
|
404
|
+
if reviews.nil?
|
|
405
|
+
fail ArgumentError, 'reviews cannot be nil'
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
@reviews = reviews
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# Custom attribute writer method with validation
|
|
412
|
+
# @param [Object] user_can_review Value to be assigned
|
|
413
|
+
def user_can_review=(user_can_review)
|
|
414
|
+
if user_can_review.nil?
|
|
415
|
+
fail ArgumentError, 'user_can_review cannot be nil'
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
@user_can_review = user_can_review
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
# Custom attribute writer method with validation
|
|
422
|
+
# @param [Object] reviewer_groups Value to be assigned
|
|
423
|
+
def reviewer_groups=(reviewer_groups)
|
|
424
|
+
if reviewer_groups.nil?
|
|
425
|
+
fail ArgumentError, 'reviewer_groups cannot be nil'
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
@reviewer_groups = reviewer_groups
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
# Custom attribute writer method with validation
|
|
432
|
+
# @param [Object] min_reviewers Value to be assigned
|
|
433
|
+
def min_reviewers=(min_reviewers)
|
|
434
|
+
if min_reviewers.nil?
|
|
435
|
+
fail ArgumentError, 'min_reviewers cannot be nil'
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
@min_reviewers = min_reviewers
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
# Custom attribute writer method with validation
|
|
442
|
+
# @param [Object] reviewers Value to be assigned
|
|
443
|
+
def reviewers=(reviewers)
|
|
444
|
+
if reviewers.nil?
|
|
445
|
+
fail ArgumentError, 'reviewers cannot be nil'
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
@reviewers = reviewers
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
# Checks equality by comparing each attribute.
|
|
452
|
+
# @param [Object] Object to be compared
|
|
453
|
+
def ==(o)
|
|
454
|
+
return true if self.equal?(o)
|
|
455
|
+
self.class == o.class &&
|
|
456
|
+
id == o.id &&
|
|
457
|
+
content_type == o.content_type &&
|
|
458
|
+
obj_id == o.obj_id &&
|
|
459
|
+
object_verbose == o.object_verbose &&
|
|
460
|
+
object_admin_url == o.object_admin_url &&
|
|
461
|
+
state == o.state &&
|
|
462
|
+
opened_on == o.opened_on &&
|
|
463
|
+
grace_period_end == o.grace_period_end &&
|
|
464
|
+
next_review_date == o.next_review_date &&
|
|
465
|
+
reviews == o.reviews &&
|
|
466
|
+
user_can_review == o.user_can_review &&
|
|
467
|
+
reviewer_groups == o.reviewer_groups &&
|
|
468
|
+
min_reviewers == o.min_reviewers &&
|
|
469
|
+
reviewers == o.reviewers
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
# @see the `==` method
|
|
473
|
+
# @param [Object] Object to be compared
|
|
474
|
+
def eql?(o)
|
|
475
|
+
self == o
|
|
476
|
+
end
|
|
477
|
+
|
|
478
|
+
# Calculates hash code according to all attributes.
|
|
479
|
+
# @return [Integer] Hash code
|
|
480
|
+
def hash
|
|
481
|
+
[id, content_type, obj_id, object_verbose, object_admin_url, state, opened_on, grace_period_end, next_review_date, reviews, user_can_review, reviewer_groups, min_reviewers, reviewers].hash
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
# Builds the object from hash
|
|
485
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
486
|
+
# @return [Object] Returns the model itself
|
|
487
|
+
def self.build_from_hash(attributes)
|
|
488
|
+
return nil unless attributes.is_a?(Hash)
|
|
489
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
490
|
+
transformed_hash = {}
|
|
491
|
+
openapi_types.each_pair do |key, type|
|
|
492
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
493
|
+
transformed_hash["#{key}"] = nil
|
|
494
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
495
|
+
# check to ensure the input is an array given that the attribute
|
|
496
|
+
# is documented as an array but the input is not
|
|
497
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
498
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
499
|
+
end
|
|
500
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
501
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
502
|
+
end
|
|
503
|
+
end
|
|
504
|
+
new(transformed_hash)
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
# Returns the object in the form of hash
|
|
508
|
+
# @return [Hash] Returns the object in the form of hash
|
|
509
|
+
def to_hash
|
|
510
|
+
hash = {}
|
|
511
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
512
|
+
value = self.send(attr)
|
|
513
|
+
if value.nil?
|
|
514
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
515
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
hash[param] = _to_hash(value)
|
|
519
|
+
end
|
|
520
|
+
hash
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
end
|
|
@@ -0,0 +1,181 @@
|
|
|
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 LifecycleIterationRequest < ApiModelBase
|
|
13
|
+
attr_accessor :content_type
|
|
14
|
+
|
|
15
|
+
class EnumAttributeValidator
|
|
16
|
+
attr_reader :datatype
|
|
17
|
+
attr_reader :allowable_values
|
|
18
|
+
|
|
19
|
+
def initialize(datatype, allowable_values)
|
|
20
|
+
@allowable_values = allowable_values.map do |value|
|
|
21
|
+
case datatype.to_s
|
|
22
|
+
when /Integer/i
|
|
23
|
+
value.to_i
|
|
24
|
+
when /Float/i
|
|
25
|
+
value.to_f
|
|
26
|
+
else
|
|
27
|
+
value
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def valid?(value)
|
|
33
|
+
!value || allowable_values.include?(value)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'content_type' => :'content_type'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns attribute mapping this model knows about
|
|
45
|
+
def self.acceptable_attribute_map
|
|
46
|
+
attribute_map
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns all the JSON keys this model knows about
|
|
50
|
+
def self.acceptable_attributes
|
|
51
|
+
acceptable_attribute_map.values
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Attribute type mapping.
|
|
55
|
+
def self.openapi_types
|
|
56
|
+
{
|
|
57
|
+
:'content_type' => :'ContentTypeEnum'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# List of attributes with nullable: true
|
|
62
|
+
def self.openapi_nullable
|
|
63
|
+
Set.new([
|
|
64
|
+
])
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Initializes the object
|
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
|
+
def initialize(attributes = {})
|
|
70
|
+
if (!attributes.is_a?(Hash))
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::LifecycleIterationRequest` initialize method"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
77
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::LifecycleIterationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
79
|
+
end
|
|
80
|
+
h[k.to_sym] = v
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'content_type')
|
|
84
|
+
self.content_type = attributes[:'content_type']
|
|
85
|
+
else
|
|
86
|
+
self.content_type = nil
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
91
|
+
# @return Array for valid properties with the reasons
|
|
92
|
+
def list_invalid_properties
|
|
93
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
94
|
+
invalid_properties = Array.new
|
|
95
|
+
if @content_type.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "content_type", content_type cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
106
|
+
return false if @content_type.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] content_type Value to be assigned
|
|
112
|
+
def content_type=(content_type)
|
|
113
|
+
if content_type.nil?
|
|
114
|
+
fail ArgumentError, 'content_type cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@content_type = content_type
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Checks equality by comparing each attribute.
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def ==(o)
|
|
123
|
+
return true if self.equal?(o)
|
|
124
|
+
self.class == o.class &&
|
|
125
|
+
content_type == o.content_type
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# @see the `==` method
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def eql?(o)
|
|
131
|
+
self == o
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Calculates hash code according to all attributes.
|
|
135
|
+
# @return [Integer] Hash code
|
|
136
|
+
def hash
|
|
137
|
+
[content_type].hash
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Builds the object from hash
|
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
142
|
+
# @return [Object] Returns the model itself
|
|
143
|
+
def self.build_from_hash(attributes)
|
|
144
|
+
return nil unless attributes.is_a?(Hash)
|
|
145
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
146
|
+
transformed_hash = {}
|
|
147
|
+
openapi_types.each_pair do |key, type|
|
|
148
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
149
|
+
transformed_hash["#{key}"] = nil
|
|
150
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
151
|
+
# check to ensure the input is an array given that the attribute
|
|
152
|
+
# is documented as an array but the input is not
|
|
153
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
154
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
155
|
+
end
|
|
156
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
157
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
new(transformed_hash)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Returns the object in the form of hash
|
|
164
|
+
# @return [Hash] Returns the object in the form of hash
|
|
165
|
+
def to_hash
|
|
166
|
+
hash = {}
|
|
167
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
168
|
+
value = self.send(attr)
|
|
169
|
+
if value.nil?
|
|
170
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
171
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
hash[param] = _to_hash(value)
|
|
175
|
+
end
|
|
176
|
+
hash
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
end
|