authentik-api 2026.5.6 → 2026.8.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/README_API.md +104 -8
  3. data/lib/authentik/api/api/admin_api.rb +3 -0
  4. data/lib/authentik/api/api/core_api.rb +651 -27
  5. data/lib/authentik/api/api/endpoints_api.rb +7 -7
  6. data/lib/authentik/api/api/events_api.rb +35 -2
  7. data/lib/authentik/api/api/lifecycle_api.rb +258 -0
  8. data/lib/authentik/api/api/providers_api.rb +401 -0
  9. data/lib/authentik/api/api/requests_api.rb +1858 -0
  10. data/lib/authentik/api/api/sources_api.rb +6 -3
  11. data/lib/authentik/api/configuration.rb +14 -0
  12. data/lib/authentik/api/inflector.rb +2 -1
  13. data/lib/authentik/api/models/app_enum.rb +3 -1
  14. data/lib/authentik/api/models/application.rb +27 -1
  15. data/lib/authentik/api/models/authenticator_web_authn_stage.rb +1 -11
  16. data/lib/authentik/api/models/authenticator_web_authn_stage_request.rb +1 -11
  17. data/lib/authentik/api/models/brand.rb +21 -1
  18. data/lib/authentik/api/models/brand_request.rb +21 -1
  19. data/lib/authentik/api/models/captcha_stage.rb +32 -1
  20. data/lib/authentik/api/models/captcha_stage_request.rb +32 -1
  21. data/lib/authentik/api/models/compatibility_mode_enum.rb +2 -1
  22. data/lib/authentik/api/models/content_type.rb +30 -4
  23. data/lib/authentik/api/models/current_brand.rb +19 -1
  24. data/lib/authentik/api/models/current_brand_flags.rb +1 -55
  25. data/lib/authentik/api/models/device_user_binding.rb +39 -1
  26. data/lib/authentik/api/models/event_actions.rb +6 -1
  27. data/lib/authentik/api/models/grant_request.rb +382 -0
  28. data/lib/authentik/api/models/{reviewer_group.rb → grant_request_create_request.rb} +29 -42
  29. data/lib/authentik/api/models/{grant_types_enum.rb → grant_type_enum.rb} +5 -4
  30. data/lib/authentik/api/models/last_task_status_enum.rb +2 -1
  31. data/lib/authentik/api/models/ldap_outpost_config.rb +1 -1
  32. data/lib/authentik/api/models/ldap_source.rb +14 -4
  33. data/lib/authentik/api/models/ldap_source_request.rb +14 -4
  34. data/lib/authentik/api/models/lifecycle_rule.rb +2 -2
  35. data/lib/authentik/api/models/model_enum.rb +8 -1
  36. data/lib/authentik/api/models/notification_mode_enum.rb +35 -0
  37. data/lib/authentik/api/models/o_auth2_dynamic_client_registration.rb +291 -0
  38. data/lib/authentik/api/models/o_auth2_dynamic_client_registration_request.rb +303 -0
  39. data/lib/authentik/api/models/o_auth2_provider.rb +1 -1
  40. data/lib/authentik/api/models/o_auth2_provider_request.rb +1 -1
  41. data/lib/authentik/api/models/o_auth_source.rb +0 -60
  42. data/lib/authentik/api/models/o_auth_source_request.rb +0 -60
  43. data/lib/authentik/api/models/object_attribute.rb +420 -0
  44. data/lib/authentik/api/models/object_attribute_request.rb +358 -0
  45. data/lib/authentik/api/models/object_attribute_type_enum.rb +35 -0
  46. data/lib/authentik/api/models/offboarding_action_enum.rb +34 -0
  47. data/lib/authentik/api/models/offboarding_status_enum.rb +36 -0
  48. data/lib/authentik/api/models/paginated_grant_request_list.rb +214 -0
  49. data/lib/authentik/api/models/paginated_o_auth2_dynamic_client_registration_list.rb +214 -0
  50. data/lib/authentik/api/models/paginated_object_attribute_list.rb +214 -0
  51. data/lib/authentik/api/models/paginated_request_rule_binding_list.rb +214 -0
  52. data/lib/authentik/api/models/paginated_request_rule_child_binding_list.rb +214 -0
  53. data/lib/authentik/api/models/paginated_request_rule_list.rb +214 -0
  54. data/lib/authentik/api/models/paginated_requestable_target_list.rb +214 -0
  55. data/lib/authentik/api/models/paginated_user_offboarding_list.rb +214 -0
  56. data/lib/authentik/api/models/patched_authenticator_web_authn_stage_request.rb +1 -11
  57. data/lib/authentik/api/models/patched_brand_request.rb +21 -1
  58. data/lib/authentik/api/models/patched_captcha_stage_request.rb +32 -1
  59. data/lib/authentik/api/models/patched_grant_request_fulfill_request.rb +175 -0
  60. data/lib/authentik/api/models/patched_ldap_source_request.rb +14 -4
  61. data/lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb +286 -0
  62. data/lib/authentik/api/models/patched_o_auth2_provider_request.rb +1 -1
  63. data/lib/authentik/api/models/patched_o_auth_source_request.rb +0 -60
  64. data/lib/authentik/api/models/patched_object_attribute_request.rb +320 -0
  65. data/lib/authentik/api/models/patched_request_rule_binding_request.rb +249 -0
  66. data/lib/authentik/api/models/patched_request_rule_child_binding_request.rb +159 -0
  67. data/lib/authentik/api/models/patched_request_rule_request.rb +277 -0
  68. data/lib/authentik/api/models/patched_saml_source_request.rb +8 -8
  69. data/lib/authentik/api/models/patched_settings_request.rb +30 -1
  70. data/lib/authentik/api/models/patched_settings_request_flags.rb +1 -1
  71. data/lib/authentik/api/models/patched_ws_federation_provider_request.rb +11 -1
  72. data/lib/authentik/api/models/policy_binding.rb +42 -4
  73. data/lib/authentik/api/models/provider_type_enum.rb +2 -3
  74. data/lib/authentik/api/models/related_rule.rb +2 -2
  75. data/lib/authentik/api/models/related_target.rb +266 -0
  76. data/lib/authentik/api/models/request_content_type_enum.rb +34 -0
  77. data/lib/authentik/api/models/request_rule.rb +329 -0
  78. data/lib/authentik/api/models/request_rule_binding.rb +353 -0
  79. data/lib/authentik/api/models/request_rule_binding_request.rb +283 -0
  80. data/lib/authentik/api/models/{reviewer_user.rb → request_rule_child_binding.rb} +34 -99
  81. data/lib/authentik/api/models/request_rule_child_binding_request.rb +193 -0
  82. data/lib/authentik/api/models/request_rule_request.rb +284 -0
  83. data/lib/authentik/api/models/request_status.rb +36 -0
  84. data/lib/authentik/api/models/requestable_target.rb +278 -0
  85. data/lib/authentik/api/models/review.rb +1 -1
  86. data/lib/authentik/api/models/saml_source.rb +35 -8
  87. data/lib/authentik/api/models/saml_source_request.rb +8 -8
  88. data/lib/authentik/api/models/saml_version_enum.rb +34 -0
  89. data/lib/authentik/api/models/session_user.rb +32 -4
  90. data/lib/authentik/api/models/settings.rb +30 -1
  91. data/lib/authentik/api/models/settings_request.rb +30 -1
  92. data/lib/authentik/api/models/system_info.rb +31 -4
  93. data/lib/authentik/api/models/task_aggregated_status_enum.rb +2 -1
  94. data/lib/authentik/api/models/task_status_enum.rb +2 -1
  95. data/lib/authentik/api/models/user_offboarding.rb +379 -0
  96. data/lib/authentik/api/models/user_offboarding_request.rb +237 -0
  97. data/lib/authentik/api/models/user_self.rb +28 -1
  98. data/lib/authentik/api/models/user_switch_action_enum.rb +34 -0
  99. data/lib/authentik/api/models/user_switch_request.rb +173 -0
  100. data/lib/authentik/api/models/user_switch_response.rb +159 -0
  101. data/lib/authentik/api/models/ws_federation_provider.rb +41 -4
  102. data/lib/authentik/api/models/ws_federation_provider_request.rb +11 -1
  103. data/lib/authentik/api/version.rb +1 -1
  104. data/spec/api/admin_api_spec.rb +1 -0
  105. data/spec/api/core_api_spec.rb +119 -0
  106. data/spec/api/events_api_spec.rb +11 -0
  107. data/spec/api/lifecycle_api_spec.rb +47 -0
  108. data/spec/api/providers_api_spec.rb +73 -0
  109. data/spec/api/requests_api_spec.rb +365 -0
  110. data/spec/api/sources_api_spec.rb +2 -1
  111. data/spec/models/application_spec.rb +6 -0
  112. data/spec/models/authenticator_web_authn_stage_request_spec.rb +0 -6
  113. data/spec/models/authenticator_web_authn_stage_spec.rb +0 -6
  114. data/spec/models/brand_request_spec.rb +12 -0
  115. data/spec/models/brand_spec.rb +12 -0
  116. data/spec/models/captcha_stage_request_spec.rb +6 -0
  117. data/spec/models/captcha_stage_spec.rb +6 -0
  118. data/spec/models/content_type_spec.rb +6 -0
  119. data/spec/models/current_brand_flags_spec.rb +0 -12
  120. data/spec/models/current_brand_spec.rb +12 -0
  121. data/spec/models/device_user_binding_spec.rb +12 -0
  122. data/spec/models/grant_request_create_request_spec.rb +36 -0
  123. data/spec/models/grant_request_spec.rb +90 -0
  124. data/spec/models/{grant_types_enum_spec.rb → grant_type_enum_spec.rb} +6 -6
  125. data/spec/models/ldap_source_request_spec.rb +6 -0
  126. data/spec/models/ldap_source_spec.rb +6 -0
  127. data/spec/models/notification_mode_enum_spec.rb +24 -0
  128. data/spec/models/o_auth2_dynamic_client_registration_request_spec.rb +78 -0
  129. data/spec/models/o_auth2_dynamic_client_registration_spec.rb +84 -0
  130. data/spec/models/object_attribute_request_spec.rb +84 -0
  131. data/spec/models/object_attribute_spec.rb +108 -0
  132. data/spec/models/object_attribute_type_enum_spec.rb +24 -0
  133. data/spec/models/offboarding_action_enum_spec.rb +24 -0
  134. data/spec/models/offboarding_status_enum_spec.rb +24 -0
  135. data/spec/models/paginated_grant_request_list_spec.rb +42 -0
  136. data/spec/models/paginated_o_auth2_dynamic_client_registration_list_spec.rb +42 -0
  137. data/spec/models/paginated_object_attribute_list_spec.rb +42 -0
  138. data/spec/models/paginated_request_rule_binding_list_spec.rb +42 -0
  139. data/spec/models/paginated_request_rule_child_binding_list_spec.rb +42 -0
  140. data/spec/models/paginated_request_rule_list_spec.rb +42 -0
  141. data/spec/models/paginated_requestable_target_list_spec.rb +42 -0
  142. data/spec/models/paginated_user_offboarding_list_spec.rb +42 -0
  143. data/spec/models/patched_authenticator_web_authn_stage_request_spec.rb +0 -6
  144. data/spec/models/patched_brand_request_spec.rb +12 -0
  145. data/spec/models/patched_captcha_stage_request_spec.rb +6 -0
  146. data/spec/models/patched_grant_request_fulfill_request_spec.rb +36 -0
  147. data/spec/models/patched_ldap_source_request_spec.rb +6 -0
  148. data/spec/models/patched_o_auth2_dynamic_client_registration_request_spec.rb +78 -0
  149. data/spec/models/patched_object_attribute_request_spec.rb +84 -0
  150. data/spec/models/patched_request_rule_binding_request_spec.rb +60 -0
  151. data/spec/models/patched_request_rule_child_binding_request_spec.rb +42 -0
  152. data/spec/models/patched_request_rule_request_spec.rb +72 -0
  153. data/spec/models/patched_saml_source_request_spec.rb +1 -1
  154. data/spec/models/patched_settings_request_spec.rb +6 -0
  155. data/spec/models/patched_ws_federation_provider_request_spec.rb +6 -0
  156. data/spec/models/policy_binding_spec.rb +12 -0
  157. data/spec/models/related_target_spec.rb +54 -0
  158. data/spec/models/request_content_type_enum_spec.rb +24 -0
  159. data/spec/models/request_rule_binding_request_spec.rb +60 -0
  160. data/spec/models/request_rule_binding_spec.rb +84 -0
  161. data/spec/models/request_rule_child_binding_request_spec.rb +42 -0
  162. data/spec/models/{reviewer_user_spec.rb → request_rule_child_binding_spec.rb} +8 -14
  163. data/spec/models/request_rule_request_spec.rb +72 -0
  164. data/spec/models/request_rule_spec.rb +84 -0
  165. data/spec/models/request_status_spec.rb +24 -0
  166. data/spec/models/requestable_target_spec.rb +60 -0
  167. data/spec/models/saml_source_request_spec.rb +1 -1
  168. data/spec/models/saml_source_spec.rb +7 -1
  169. data/spec/models/saml_version_enum_spec.rb +24 -0
  170. data/spec/models/session_user_spec.rb +6 -0
  171. data/spec/models/settings_request_spec.rb +6 -0
  172. data/spec/models/settings_spec.rb +6 -0
  173. data/spec/models/system_info_spec.rb +6 -0
  174. data/spec/models/user_offboarding_request_spec.rb +54 -0
  175. data/spec/models/user_offboarding_spec.rb +90 -0
  176. data/spec/models/user_self_spec.rb +6 -0
  177. data/spec/models/user_switch_action_enum_spec.rb +24 -0
  178. data/spec/models/{reviewer_group_spec.rb → user_switch_request_spec.rb} +8 -8
  179. data/spec/models/user_switch_response_spec.rb +30 -0
  180. data/spec/models/ws_federation_provider_request_spec.rb +6 -0
  181. data/spec/models/ws_federation_provider_spec.rb +12 -0
  182. metadata +127 -10
@@ -0,0 +1,284 @@
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 RequestRuleRequest < ApiModelBase
13
+ attr_accessor :uuid
14
+
15
+ attr_accessor :policy_engine_mode
16
+
17
+ attr_accessor :name
18
+
19
+ attr_accessor :notification_transports
20
+
21
+ attr_accessor :notification_mode
22
+
23
+ attr_accessor :min_reviewers
24
+
25
+ attr_accessor :min_reviewers_is_per_group
26
+
27
+ attr_accessor :request_flow
28
+
29
+ class EnumAttributeValidator
30
+ attr_reader :datatype
31
+ attr_reader :allowable_values
32
+
33
+ def initialize(datatype, allowable_values)
34
+ @allowable_values = allowable_values.map do |value|
35
+ case datatype.to_s
36
+ when /Integer/i
37
+ value.to_i
38
+ when /Float/i
39
+ value.to_f
40
+ else
41
+ value
42
+ end
43
+ end
44
+ end
45
+
46
+ def valid?(value)
47
+ !value || allowable_values.include?(value)
48
+ end
49
+ end
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'uuid' => :'uuid',
55
+ :'policy_engine_mode' => :'policy_engine_mode',
56
+ :'name' => :'name',
57
+ :'notification_transports' => :'notification_transports',
58
+ :'notification_mode' => :'notification_mode',
59
+ :'min_reviewers' => :'min_reviewers',
60
+ :'min_reviewers_is_per_group' => :'min_reviewers_is_per_group',
61
+ :'request_flow' => :'request_flow'
62
+ }
63
+ end
64
+
65
+ # Returns attribute mapping this model knows about
66
+ def self.acceptable_attribute_map
67
+ attribute_map
68
+ end
69
+
70
+ # Returns all the JSON keys this model knows about
71
+ def self.acceptable_attributes
72
+ acceptable_attribute_map.values
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.openapi_types
77
+ {
78
+ :'uuid' => :'String',
79
+ :'policy_engine_mode' => :'PolicyEngineMode',
80
+ :'name' => :'String',
81
+ :'notification_transports' => :'Array<String>',
82
+ :'notification_mode' => :'NotificationModeEnum',
83
+ :'min_reviewers' => :'Integer',
84
+ :'min_reviewers_is_per_group' => :'Boolean',
85
+ :'request_flow' => :'String'
86
+ }
87
+ end
88
+
89
+ # List of attributes with nullable: true
90
+ def self.openapi_nullable
91
+ Set.new([
92
+ :'request_flow'
93
+ ])
94
+ end
95
+
96
+ # Initializes the object
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ def initialize(attributes = {})
99
+ if (!attributes.is_a?(Hash))
100
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::RequestRuleRequest` initialize method"
101
+ end
102
+
103
+ # check to see if the attribute exists and convert string to symbol for hash key
104
+ acceptable_attribute_map = self.class.acceptable_attribute_map
105
+ attributes = attributes.each_with_object({}) { |(k, v), h|
106
+ if (!acceptable_attribute_map.key?(k.to_sym))
107
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::RequestRuleRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
108
+ end
109
+ h[k.to_sym] = v
110
+ }
111
+
112
+ if attributes.key?(:'uuid')
113
+ self.uuid = attributes[:'uuid']
114
+ end
115
+
116
+ if attributes.key?(:'policy_engine_mode')
117
+ self.policy_engine_mode = attributes[:'policy_engine_mode']
118
+ end
119
+
120
+ if attributes.key?(:'name')
121
+ self.name = attributes[:'name']
122
+ else
123
+ self.name = nil
124
+ end
125
+
126
+ if attributes.key?(:'notification_transports')
127
+ if (value = attributes[:'notification_transports']).is_a?(Array)
128
+ self.notification_transports = value
129
+ end
130
+ end
131
+
132
+ if attributes.key?(:'notification_mode')
133
+ self.notification_mode = attributes[:'notification_mode']
134
+ end
135
+
136
+ if attributes.key?(:'min_reviewers')
137
+ self.min_reviewers = attributes[:'min_reviewers']
138
+ end
139
+
140
+ if attributes.key?(:'min_reviewers_is_per_group')
141
+ self.min_reviewers_is_per_group = attributes[:'min_reviewers_is_per_group']
142
+ end
143
+
144
+ if attributes.key?(:'request_flow')
145
+ self.request_flow = attributes[:'request_flow']
146
+ end
147
+ end
148
+
149
+ # Show invalid properties with the reasons. Usually used together with valid?
150
+ # @return Array for valid properties with the reasons
151
+ def list_invalid_properties
152
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
153
+ invalid_properties = Array.new
154
+ if @name.nil?
155
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
156
+ end
157
+
158
+ if @name.to_s.length < 1
159
+ invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
160
+ end
161
+
162
+ if !@min_reviewers.nil? && @min_reviewers > 32767
163
+ invalid_properties.push('invalid value for "min_reviewers", must be smaller than or equal to 32767.')
164
+ end
165
+
166
+ if !@min_reviewers.nil? && @min_reviewers < 0
167
+ invalid_properties.push('invalid value for "min_reviewers", must be greater than or equal to 0.')
168
+ end
169
+
170
+ invalid_properties
171
+ end
172
+
173
+ # Check to see if the all the properties in the model are valid
174
+ # @return true if the model is valid
175
+ def valid?
176
+ warn '[DEPRECATED] the `valid?` method is obsolete'
177
+ return false if @name.nil?
178
+ return false if @name.to_s.length < 1
179
+ return false if !@min_reviewers.nil? && @min_reviewers > 32767
180
+ return false if !@min_reviewers.nil? && @min_reviewers < 0
181
+ true
182
+ end
183
+
184
+ # Custom attribute writer method with validation
185
+ # @param [Object] name Value to be assigned
186
+ def name=(name)
187
+ if name.nil?
188
+ fail ArgumentError, 'name cannot be nil'
189
+ end
190
+
191
+ if name.to_s.length < 1
192
+ fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.'
193
+ end
194
+
195
+ @name = name
196
+ end
197
+
198
+ # Custom attribute writer method with validation
199
+ # @param [Object] min_reviewers Value to be assigned
200
+ def min_reviewers=(min_reviewers)
201
+ if min_reviewers.nil?
202
+ fail ArgumentError, 'min_reviewers cannot be nil'
203
+ end
204
+
205
+ if min_reviewers > 32767
206
+ fail ArgumentError, 'invalid value for "min_reviewers", must be smaller than or equal to 32767.'
207
+ end
208
+
209
+ if min_reviewers < 0
210
+ fail ArgumentError, 'invalid value for "min_reviewers", must be greater than or equal to 0.'
211
+ end
212
+
213
+ @min_reviewers = min_reviewers
214
+ end
215
+
216
+ # Checks equality by comparing each attribute.
217
+ # @param [Object] Object to be compared
218
+ def ==(o)
219
+ return true if self.equal?(o)
220
+ self.class == o.class &&
221
+ uuid == o.uuid &&
222
+ policy_engine_mode == o.policy_engine_mode &&
223
+ name == o.name &&
224
+ notification_transports == o.notification_transports &&
225
+ notification_mode == o.notification_mode &&
226
+ min_reviewers == o.min_reviewers &&
227
+ min_reviewers_is_per_group == o.min_reviewers_is_per_group &&
228
+ request_flow == o.request_flow
229
+ end
230
+
231
+ # @see the `==` method
232
+ # @param [Object] Object to be compared
233
+ def eql?(o)
234
+ self == o
235
+ end
236
+
237
+ # Calculates hash code according to all attributes.
238
+ # @return [Integer] Hash code
239
+ def hash
240
+ [uuid, policy_engine_mode, name, notification_transports, notification_mode, min_reviewers, min_reviewers_is_per_group, request_flow].hash
241
+ end
242
+
243
+ # Builds the object from hash
244
+ # @param [Hash] attributes Model attributes in the form of hash
245
+ # @return [Object] Returns the model itself
246
+ def self.build_from_hash(attributes)
247
+ return nil unless attributes.is_a?(Hash)
248
+ attributes = attributes.transform_keys(&:to_sym)
249
+ transformed_hash = {}
250
+ openapi_types.each_pair do |key, type|
251
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
252
+ transformed_hash["#{key}"] = nil
253
+ elsif type =~ /\AArray<(.*)>/i
254
+ # check to ensure the input is an array given that the attribute
255
+ # is documented as an array but the input is not
256
+ if attributes[attribute_map[key]].is_a?(Array)
257
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
258
+ end
259
+ elsif !attributes[attribute_map[key]].nil?
260
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
261
+ end
262
+ end
263
+ new(transformed_hash)
264
+ end
265
+
266
+ # Returns the object in the form of hash
267
+ # @return [Hash] Returns the object in the form of hash
268
+ def to_hash
269
+ hash = {}
270
+ self.class.attribute_map.each_pair do |attr, param|
271
+ value = self.send(attr)
272
+ if value.nil?
273
+ is_nullable = self.class.openapi_nullable.include?(attr)
274
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
275
+ end
276
+
277
+ hash[param] = _to_hash(value)
278
+ end
279
+ hash
280
+ end
281
+
282
+ end
283
+
284
+ end
@@ -0,0 +1,36 @@
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 RequestStatus
12
+ CREATED = "created".freeze
13
+ APPROVED = "approved".freeze
14
+ DENIED = "denied".freeze
15
+ REVOKED = "revoked".freeze
16
+
17
+ def self.all_vars
18
+ @all_vars ||= [CREATED, APPROVED, DENIED, REVOKED].freeze
19
+ end
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def self.build_from_hash(value)
25
+ new.build_from_hash(value)
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ return value if RequestStatus.all_vars.include?(value)
33
+ raise "Invalid ENUM value #{value} for class #RequestStatus"
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,278 @@
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
+ # Generic representation of a single request target: whatever was actually requested (an Application, an Application Entitlement, ...), always paired with the parent it belongs to, so the UI/audit trail has that context even when the request itself was scoped narrower than the whole app.
12
+ class RequestableTarget < ApiModelBase
13
+ # Return object's verbose_name
14
+ attr_accessor :verbose_name
15
+
16
+ # Return object's plural verbose_name
17
+ attr_accessor :verbose_name_plural
18
+
19
+ # Return internal model name
20
+ attr_accessor :meta_model_name
21
+
22
+ attr_accessor :pbm_uuid
23
+
24
+ attr_accessor :label
25
+
26
+ attr_accessor :parent
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'verbose_name' => :'verbose_name',
32
+ :'verbose_name_plural' => :'verbose_name_plural',
33
+ :'meta_model_name' => :'meta_model_name',
34
+ :'pbm_uuid' => :'pbm_uuid',
35
+ :'label' => :'label',
36
+ :'parent' => :'parent'
37
+ }
38
+ end
39
+
40
+ # Returns attribute mapping this model knows about
41
+ def self.acceptable_attribute_map
42
+ attribute_map
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ acceptable_attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'verbose_name' => :'String',
54
+ :'verbose_name_plural' => :'String',
55
+ :'meta_model_name' => :'String',
56
+ :'pbm_uuid' => :'String',
57
+ :'label' => :'String',
58
+ :'parent' => :'Application'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ def self.openapi_nullable
64
+ Set.new([
65
+ :'parent'
66
+ ])
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ def initialize(attributes = {})
72
+ if (!attributes.is_a?(Hash))
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::RequestableTarget` initialize method"
74
+ end
75
+
76
+ # check to see if the attribute exists and convert string to symbol for hash key
77
+ acceptable_attribute_map = self.class.acceptable_attribute_map
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!acceptable_attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::RequestableTarget`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'verbose_name')
86
+ self.verbose_name = attributes[:'verbose_name']
87
+ else
88
+ self.verbose_name = nil
89
+ end
90
+
91
+ if attributes.key?(:'verbose_name_plural')
92
+ self.verbose_name_plural = attributes[:'verbose_name_plural']
93
+ else
94
+ self.verbose_name_plural = nil
95
+ end
96
+
97
+ if attributes.key?(:'meta_model_name')
98
+ self.meta_model_name = attributes[:'meta_model_name']
99
+ else
100
+ self.meta_model_name = nil
101
+ end
102
+
103
+ if attributes.key?(:'pbm_uuid')
104
+ self.pbm_uuid = attributes[:'pbm_uuid']
105
+ else
106
+ self.pbm_uuid = nil
107
+ end
108
+
109
+ if attributes.key?(:'label')
110
+ self.label = attributes[:'label']
111
+ else
112
+ self.label = nil
113
+ end
114
+
115
+ if attributes.key?(:'parent')
116
+ self.parent = attributes[:'parent']
117
+ else
118
+ self.parent = nil
119
+ end
120
+ end
121
+
122
+ # Show invalid properties with the reasons. Usually used together with valid?
123
+ # @return Array for valid properties with the reasons
124
+ def list_invalid_properties
125
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
126
+ invalid_properties = Array.new
127
+ if @verbose_name.nil?
128
+ invalid_properties.push('invalid value for "verbose_name", verbose_name cannot be nil.')
129
+ end
130
+
131
+ if @verbose_name_plural.nil?
132
+ invalid_properties.push('invalid value for "verbose_name_plural", verbose_name_plural cannot be nil.')
133
+ end
134
+
135
+ if @meta_model_name.nil?
136
+ invalid_properties.push('invalid value for "meta_model_name", meta_model_name cannot be nil.')
137
+ end
138
+
139
+ if @pbm_uuid.nil?
140
+ invalid_properties.push('invalid value for "pbm_uuid", pbm_uuid cannot be nil.')
141
+ end
142
+
143
+ if @label.nil?
144
+ invalid_properties.push('invalid value for "label", label cannot be nil.')
145
+ end
146
+
147
+ invalid_properties
148
+ end
149
+
150
+ # Check to see if the all the properties in the model are valid
151
+ # @return true if the model is valid
152
+ def valid?
153
+ warn '[DEPRECATED] the `valid?` method is obsolete'
154
+ return false if @verbose_name.nil?
155
+ return false if @verbose_name_plural.nil?
156
+ return false if @meta_model_name.nil?
157
+ return false if @pbm_uuid.nil?
158
+ return false if @label.nil?
159
+ true
160
+ end
161
+
162
+ # Custom attribute writer method with validation
163
+ # @param [Object] verbose_name Value to be assigned
164
+ def verbose_name=(verbose_name)
165
+ if verbose_name.nil?
166
+ fail ArgumentError, 'verbose_name cannot be nil'
167
+ end
168
+
169
+ @verbose_name = verbose_name
170
+ end
171
+
172
+ # Custom attribute writer method with validation
173
+ # @param [Object] verbose_name_plural Value to be assigned
174
+ def verbose_name_plural=(verbose_name_plural)
175
+ if verbose_name_plural.nil?
176
+ fail ArgumentError, 'verbose_name_plural cannot be nil'
177
+ end
178
+
179
+ @verbose_name_plural = verbose_name_plural
180
+ end
181
+
182
+ # Custom attribute writer method with validation
183
+ # @param [Object] meta_model_name Value to be assigned
184
+ def meta_model_name=(meta_model_name)
185
+ if meta_model_name.nil?
186
+ fail ArgumentError, 'meta_model_name cannot be nil'
187
+ end
188
+
189
+ @meta_model_name = meta_model_name
190
+ end
191
+
192
+ # Custom attribute writer method with validation
193
+ # @param [Object] pbm_uuid Value to be assigned
194
+ def pbm_uuid=(pbm_uuid)
195
+ if pbm_uuid.nil?
196
+ fail ArgumentError, 'pbm_uuid cannot be nil'
197
+ end
198
+
199
+ @pbm_uuid = pbm_uuid
200
+ end
201
+
202
+ # Custom attribute writer method with validation
203
+ # @param [Object] label Value to be assigned
204
+ def label=(label)
205
+ if label.nil?
206
+ fail ArgumentError, 'label cannot be nil'
207
+ end
208
+
209
+ @label = label
210
+ end
211
+
212
+ # Checks equality by comparing each attribute.
213
+ # @param [Object] Object to be compared
214
+ def ==(o)
215
+ return true if self.equal?(o)
216
+ self.class == o.class &&
217
+ verbose_name == o.verbose_name &&
218
+ verbose_name_plural == o.verbose_name_plural &&
219
+ meta_model_name == o.meta_model_name &&
220
+ pbm_uuid == o.pbm_uuid &&
221
+ label == o.label &&
222
+ parent == o.parent
223
+ end
224
+
225
+ # @see the `==` method
226
+ # @param [Object] Object to be compared
227
+ def eql?(o)
228
+ self == o
229
+ end
230
+
231
+ # Calculates hash code according to all attributes.
232
+ # @return [Integer] Hash code
233
+ def hash
234
+ [verbose_name, verbose_name_plural, meta_model_name, pbm_uuid, label, parent].hash
235
+ end
236
+
237
+ # Builds the object from hash
238
+ # @param [Hash] attributes Model attributes in the form of hash
239
+ # @return [Object] Returns the model itself
240
+ def self.build_from_hash(attributes)
241
+ return nil unless attributes.is_a?(Hash)
242
+ attributes = attributes.transform_keys(&:to_sym)
243
+ transformed_hash = {}
244
+ openapi_types.each_pair do |key, type|
245
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
246
+ transformed_hash["#{key}"] = nil
247
+ elsif type =~ /\AArray<(.*)>/i
248
+ # check to ensure the input is an array given that the attribute
249
+ # is documented as an array but the input is not
250
+ if attributes[attribute_map[key]].is_a?(Array)
251
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
252
+ end
253
+ elsif !attributes[attribute_map[key]].nil?
254
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
255
+ end
256
+ end
257
+ new(transformed_hash)
258
+ end
259
+
260
+ # Returns the object in the form of hash
261
+ # @return [Hash] Returns the object in the form of hash
262
+ def to_hash
263
+ hash = {}
264
+ self.class.attribute_map.each_pair do |attr, param|
265
+ value = self.send(attr)
266
+ if value.nil?
267
+ is_nullable = self.class.openapi_nullable.include?(attr)
268
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
269
+ end
270
+
271
+ hash[param] = _to_hash(value)
272
+ end
273
+ hash
274
+ end
275
+
276
+ end
277
+
278
+ end
@@ -46,7 +46,7 @@ module Authentik::Api
46
46
  {
47
47
  :'id' => :'String',
48
48
  :'iteration' => :'String',
49
- :'reviewer' => :'ReviewerUser',
49
+ :'reviewer' => :'PartialUser',
50
50
  :'timestamp' => :'Time',
51
51
  :'note' => :'String'
52
52
  }