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.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/README_API.md +59 -7
  3. data/lib/authentik/api/api/core_api.rb +109 -12
  4. data/lib/authentik/api/api/crypto_api.rb +0 -3
  5. data/lib/authentik/api/api/endpoints_api.rb +459 -0
  6. data/lib/authentik/api/api/events_api.rb +3 -3
  7. data/lib/authentik/api/api/lifecycle_api.rb +681 -0
  8. data/lib/authentik/api/api/policies_api.rb +1 -1
  9. data/lib/authentik/api/api/providers_api.rb +705 -3
  10. data/lib/authentik/api/api/rbac_api.rb +6 -9
  11. data/lib/authentik/api/api/stages_api.rb +1 -1
  12. data/lib/authentik/api/models/alg_enum.rb +3 -1
  13. data/lib/authentik/api/models/app_enum.rb +4 -1
  14. data/lib/authentik/api/models/bulk_delete_session_response.rb +158 -0
  15. data/lib/authentik/api/models/certificate_key_pair.rb +5 -4
  16. data/lib/authentik/api/models/content_type_enum.rb +35 -0
  17. data/lib/authentik/api/models/contextual_flow_info_layout_enum.rb +3 -1
  18. data/lib/authentik/api/models/current_brand_flags.rb +27 -1
  19. data/lib/authentik/api/models/device_access_group.rb +15 -4
  20. data/lib/authentik/api/models/device_access_group_request.rb +15 -4
  21. data/lib/authentik/api/models/device_fact_snapshot.rb +53 -5
  22. data/lib/authentik/api/models/event_actions.rb +6 -1
  23. data/lib/authentik/api/models/fleet_connector.rb +349 -0
  24. data/lib/authentik/api/models/fleet_connector_request.rb +294 -0
  25. data/lib/authentik/api/models/flow_layout_enum.rb +3 -1
  26. data/lib/authentik/api/models/identification_challenge.rb +11 -1
  27. data/lib/authentik/api/models/lifecycle_iteration.rb +525 -0
  28. data/lib/authentik/api/models/lifecycle_iteration_request.rb +181 -0
  29. data/lib/authentik/api/models/lifecycle_iteration_state_enum.rb +36 -0
  30. data/lib/authentik/api/models/lifecycle_rule.rb +440 -0
  31. data/lib/authentik/api/models/lifecycle_rule_request.rb +394 -0
  32. data/lib/authentik/api/models/model_enum.rb +6 -1
  33. data/lib/authentik/api/models/model_request.rb +4 -2
  34. data/lib/authentik/api/models/operating_system.rb +3 -0
  35. data/lib/authentik/api/models/operating_system_request.rb +3 -0
  36. data/lib/authentik/api/models/paginated_fleet_connector_list.rb +214 -0
  37. data/lib/authentik/api/models/paginated_lifecycle_iteration_list.rb +214 -0
  38. data/lib/authentik/api/models/paginated_lifecycle_rule_list.rb +214 -0
  39. data/lib/authentik/api/models/paginated_ws_federation_provider_list.rb +214 -0
  40. data/lib/authentik/api/models/patched_device_access_group_request.rb +15 -4
  41. data/lib/authentik/api/models/patched_fleet_connector_request.rb +273 -0
  42. data/lib/authentik/api/models/patched_lifecycle_rule_request.rb +353 -0
  43. data/lib/authentik/api/models/patched_role_request.rb +0 -9
  44. data/lib/authentik/api/models/patched_saml_provider_request.rb +1 -1
  45. data/lib/authentik/api/models/patched_scim_provider_request.rb +13 -11
  46. data/lib/authentik/api/models/patched_settings_request_flags.rb +27 -1
  47. data/lib/authentik/api/models/patched_ws_federation_provider_request.rb +457 -0
  48. data/lib/authentik/api/models/provider_model_enum.rb +2 -1
  49. data/lib/authentik/api/models/review.rb +247 -0
  50. data/lib/authentik/api/models/review_request.rb +184 -0
  51. data/lib/authentik/api/models/reviewer_group.rb +184 -0
  52. data/lib/authentik/api/models/reviewer_user.rb +258 -0
  53. data/lib/authentik/api/models/role.rb +0 -9
  54. data/lib/authentik/api/models/role_request.rb +0 -9
  55. data/lib/authentik/api/models/{saml_provider_logout_method_enum.rb → saml_logout_methods.rb} +3 -3
  56. data/lib/authentik/api/models/saml_provider.rb +1 -1
  57. data/lib/authentik/api/models/saml_provider_request.rb +1 -1
  58. data/lib/authentik/api/models/scim_provider.rb +13 -11
  59. data/lib/authentik/api/models/scim_provider_request.rb +13 -11
  60. data/lib/authentik/api/models/task.rb +1 -1
  61. data/lib/authentik/api/models/{state_enum.rb → task_state_enum.rb} +3 -3
  62. data/lib/authentik/api/models/user_recovery_email_request.rb +187 -0
  63. data/lib/authentik/api/models/user_recovery_link_request.rb +161 -0
  64. data/lib/authentik/api/models/vendor_enum.rb +35 -0
  65. data/lib/authentik/api/models/ws_federation_provider.rb +668 -0
  66. data/lib/authentik/api/models/ws_federation_provider_request.rb +512 -0
  67. data/lib/authentik/api/version.rb +1 -1
  68. data/spec/api/core_api_spec.rb +21 -1
  69. data/spec/api/crypto_api_spec.rb +0 -1
  70. data/spec/api/endpoints_api_spec.rb +83 -0
  71. data/spec/api/lifecycle_api_spec.rb +144 -0
  72. data/spec/api/providers_api_spec.rb +137 -1
  73. data/spec/api/rbac_api_spec.rb +2 -3
  74. data/spec/models/bulk_delete_session_response_spec.rb +30 -0
  75. data/spec/models/content_type_enum_spec.rb +24 -0
  76. data/spec/models/current_brand_flags_spec.rb +6 -0
  77. data/spec/models/device_access_group_request_spec.rb +6 -0
  78. data/spec/models/device_access_group_spec.rb +6 -0
  79. data/spec/models/device_fact_snapshot_spec.rb +6 -0
  80. data/spec/models/fleet_connector_request_spec.rb +72 -0
  81. data/spec/models/fleet_connector_spec.rb +90 -0
  82. data/spec/models/identification_challenge_spec.rb +6 -0
  83. data/spec/models/lifecycle_iteration_request_spec.rb +30 -0
  84. data/spec/models/lifecycle_iteration_spec.rb +108 -0
  85. data/spec/models/lifecycle_iteration_state_enum_spec.rb +24 -0
  86. data/spec/models/lifecycle_rule_request_spec.rb +84 -0
  87. data/spec/models/lifecycle_rule_spec.rb +108 -0
  88. data/spec/models/paginated_fleet_connector_list_spec.rb +42 -0
  89. data/spec/models/paginated_lifecycle_iteration_list_spec.rb +42 -0
  90. data/spec/models/paginated_lifecycle_rule_list_spec.rb +42 -0
  91. data/spec/models/paginated_ws_federation_provider_list_spec.rb +42 -0
  92. data/spec/models/patched_device_access_group_request_spec.rb +6 -0
  93. data/spec/models/patched_fleet_connector_request_spec.rb +72 -0
  94. data/spec/models/patched_lifecycle_rule_request_spec.rb +84 -0
  95. data/spec/models/patched_scim_provider_request_spec.rb +3 -3
  96. data/spec/models/patched_settings_request_flags_spec.rb +6 -0
  97. data/spec/models/patched_ws_federation_provider_request_spec.rb +138 -0
  98. data/spec/models/review_request_spec.rb +36 -0
  99. data/spec/models/review_spec.rb +54 -0
  100. data/spec/models/reviewer_group_spec.rb +36 -0
  101. data/spec/models/reviewer_user_spec.rb +48 -0
  102. data/spec/models/saml_logout_methods_spec.rb +24 -0
  103. data/spec/models/scim_provider_request_spec.rb +3 -3
  104. data/spec/models/scim_provider_spec.rb +3 -3
  105. data/spec/models/task_state_enum_spec.rb +24 -0
  106. data/spec/models/user_recovery_email_request_spec.rb +36 -0
  107. data/spec/models/user_recovery_link_request_spec.rb +30 -0
  108. data/spec/models/{state_enum_spec.rb → vendor_enum_spec.rb} +6 -6
  109. data/spec/models/ws_federation_provider_request_spec.rb +138 -0
  110. data/spec/models/ws_federation_provider_spec.rb +204 -0
  111. metadata +85 -7
  112. data/spec/models/saml_provider_logout_method_enum_spec.rb +0 -24
@@ -0,0 +1,681 @@
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 'cgi'
8
+
9
+ module Authentik::Api
10
+ class LifecycleApi
11
+ attr_accessor :api_client
12
+
13
+ def initialize(api_client = ApiClient.default)
14
+ @api_client = api_client
15
+ end
16
+ # Mixin to validate that a valid enterprise license exists before allowing to save the object
17
+ # @param lifecycle_iteration_request [LifecycleIterationRequest]
18
+ # @param [Hash] opts the optional parameters
19
+ # @return [LifecycleIteration]
20
+ def lifecycle_iterations_create(lifecycle_iteration_request, opts = {})
21
+ data, _status_code, _headers = lifecycle_iterations_create_with_http_info(lifecycle_iteration_request, opts)
22
+ data
23
+ end
24
+
25
+ # Mixin to validate that a valid enterprise license exists before allowing to save the object
26
+ # @param lifecycle_iteration_request [LifecycleIterationRequest]
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [Array<(LifecycleIteration, Integer, Hash)>] LifecycleIteration data, response status code and response headers
29
+ def lifecycle_iterations_create_with_http_info(lifecycle_iteration_request, opts = {})
30
+ if @api_client.config.debugging
31
+ @api_client.config.logger.debug 'Calling API: LifecycleApi.lifecycle_iterations_create ...'
32
+ end
33
+ # verify the required parameter 'lifecycle_iteration_request' is set
34
+ if @api_client.config.client_side_validation && lifecycle_iteration_request.nil?
35
+ fail ArgumentError, "Missing the required parameter 'lifecycle_iteration_request' when calling LifecycleApi.lifecycle_iterations_create"
36
+ end
37
+ # resource path
38
+ local_var_path = '/lifecycle/iterations/'
39
+
40
+ # query parameters
41
+ query_params = opts[:query_params] || {}
42
+
43
+ # header parameters
44
+ header_params = opts[:header_params] || {}
45
+ # HTTP header 'Accept' (if needed)
46
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
47
+ # HTTP header 'Content-Type'
48
+ content_type = @api_client.select_header_content_type(['application/json'])
49
+ if !content_type.nil?
50
+ header_params['Content-Type'] = content_type
51
+ end
52
+
53
+ # form parameters
54
+ form_params = opts[:form_params] || {}
55
+
56
+ # http body (model)
57
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(lifecycle_iteration_request)
58
+
59
+ # return_type
60
+ return_type = opts[:debug_return_type] || 'LifecycleIteration'
61
+
62
+ # auth_names
63
+ auth_names = opts[:debug_auth_names] || ['authentik']
64
+
65
+ new_options = opts.merge(
66
+ :operation => :"LifecycleApi.lifecycle_iterations_create",
67
+ :header_params => header_params,
68
+ :query_params => query_params,
69
+ :form_params => form_params,
70
+ :body => post_body,
71
+ :auth_names => auth_names,
72
+ :return_type => return_type
73
+ )
74
+
75
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
76
+ if @api_client.config.debugging
77
+ @api_client.config.logger.debug "API called: LifecycleApi#lifecycle_iterations_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
+ end
79
+ return data, status_code, headers
80
+ end
81
+
82
+ # Mixin to validate that a valid enterprise license exists before allowing to save the object
83
+ # @param content_type [String]
84
+ # @param obj_id [String]
85
+ # @param [Hash] opts the optional parameters
86
+ # @return [LifecycleIteration]
87
+ def lifecycle_iterations_latest_retrieve(content_type, obj_id, opts = {})
88
+ data, _status_code, _headers = lifecycle_iterations_latest_retrieve_with_http_info(content_type, obj_id, opts)
89
+ data
90
+ end
91
+
92
+ # Mixin to validate that a valid enterprise license exists before allowing to save the object
93
+ # @param content_type [String]
94
+ # @param obj_id [String]
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [Array<(LifecycleIteration, Integer, Hash)>] LifecycleIteration data, response status code and response headers
97
+ def lifecycle_iterations_latest_retrieve_with_http_info(content_type, obj_id, opts = {})
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug 'Calling API: LifecycleApi.lifecycle_iterations_latest_retrieve ...'
100
+ end
101
+ # verify the required parameter 'content_type' is set
102
+ if @api_client.config.client_side_validation && content_type.nil?
103
+ fail ArgumentError, "Missing the required parameter 'content_type' when calling LifecycleApi.lifecycle_iterations_latest_retrieve"
104
+ end
105
+ pattern = Regexp.new(/^[^\/]+$/)
106
+ if @api_client.config.client_side_validation && content_type !~ pattern
107
+ fail ArgumentError, "invalid value for 'content_type' when calling LifecycleApi.lifecycle_iterations_latest_retrieve, must conform to the pattern #{pattern}."
108
+ end
109
+
110
+ # verify the required parameter 'obj_id' is set
111
+ if @api_client.config.client_side_validation && obj_id.nil?
112
+ fail ArgumentError, "Missing the required parameter 'obj_id' when calling LifecycleApi.lifecycle_iterations_latest_retrieve"
113
+ end
114
+ pattern = Regexp.new(/^[^\/]+$/)
115
+ if @api_client.config.client_side_validation && obj_id !~ pattern
116
+ fail ArgumentError, "invalid value for 'obj_id' when calling LifecycleApi.lifecycle_iterations_latest_retrieve, must conform to the pattern #{pattern}."
117
+ end
118
+
119
+ # resource path
120
+ local_var_path = '/lifecycle/iterations/latest/{content_type}/{object_id}/'.sub('{' + 'content_type' + '}', CGI.escape(content_type.to_s)).sub('{' + 'object_id' + '}', CGI.escape(obj_id.to_s))
121
+
122
+ # query parameters
123
+ query_params = opts[:query_params] || {}
124
+
125
+ # header parameters
126
+ header_params = opts[:header_params] || {}
127
+ # HTTP header 'Accept' (if needed)
128
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
129
+
130
+ # form parameters
131
+ form_params = opts[:form_params] || {}
132
+
133
+ # http body (model)
134
+ post_body = opts[:debug_body]
135
+
136
+ # return_type
137
+ return_type = opts[:debug_return_type] || 'LifecycleIteration'
138
+
139
+ # auth_names
140
+ auth_names = opts[:debug_auth_names] || ['authentik']
141
+
142
+ new_options = opts.merge(
143
+ :operation => :"LifecycleApi.lifecycle_iterations_latest_retrieve",
144
+ :header_params => header_params,
145
+ :query_params => query_params,
146
+ :form_params => form_params,
147
+ :body => post_body,
148
+ :auth_names => auth_names,
149
+ :return_type => return_type
150
+ )
151
+
152
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
153
+ if @api_client.config.debugging
154
+ @api_client.config.logger.debug "API called: LifecycleApi#lifecycle_iterations_latest_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
155
+ end
156
+ return data, status_code, headers
157
+ end
158
+
159
+ # Mixin to validate that a valid enterprise license exists before allowing to save the object
160
+ # @param [Hash] opts the optional parameters
161
+ # @option opts [String] :ordering Which field to use when ordering the results.
162
+ # @option opts [Integer] :page A page number within the paginated result set.
163
+ # @option opts [Integer] :page_size Number of results to return per page.
164
+ # @option opts [String] :search A search term.
165
+ # @option opts [Boolean] :user_is_reviewer
166
+ # @return [PaginatedLifecycleIterationList]
167
+ def lifecycle_iterations_list_open(opts = {})
168
+ data, _status_code, _headers = lifecycle_iterations_list_open_with_http_info(opts)
169
+ data
170
+ end
171
+
172
+ # Mixin to validate that a valid enterprise license exists before allowing to save the object
173
+ # @param [Hash] opts the optional parameters
174
+ # @option opts [String] :ordering Which field to use when ordering the results.
175
+ # @option opts [Integer] :page A page number within the paginated result set.
176
+ # @option opts [Integer] :page_size Number of results to return per page.
177
+ # @option opts [String] :search A search term.
178
+ # @option opts [Boolean] :user_is_reviewer
179
+ # @return [Array<(PaginatedLifecycleIterationList, Integer, Hash)>] PaginatedLifecycleIterationList data, response status code and response headers
180
+ def lifecycle_iterations_list_open_with_http_info(opts = {})
181
+ if @api_client.config.debugging
182
+ @api_client.config.logger.debug 'Calling API: LifecycleApi.lifecycle_iterations_list_open ...'
183
+ end
184
+ # resource path
185
+ local_var_path = '/lifecycle/iterations/open/'
186
+
187
+ # query parameters
188
+ query_params = opts[:query_params] || {}
189
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
190
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
191
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
192
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
193
+ query_params[:'user_is_reviewer'] = opts[:'user_is_reviewer'] if !opts[:'user_is_reviewer'].nil?
194
+
195
+ # header parameters
196
+ header_params = opts[:header_params] || {}
197
+ # HTTP header 'Accept' (if needed)
198
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
199
+
200
+ # form parameters
201
+ form_params = opts[:form_params] || {}
202
+
203
+ # http body (model)
204
+ post_body = opts[:debug_body]
205
+
206
+ # return_type
207
+ return_type = opts[:debug_return_type] || 'PaginatedLifecycleIterationList'
208
+
209
+ # auth_names
210
+ auth_names = opts[:debug_auth_names] || ['authentik']
211
+
212
+ new_options = opts.merge(
213
+ :operation => :"LifecycleApi.lifecycle_iterations_list_open",
214
+ :header_params => header_params,
215
+ :query_params => query_params,
216
+ :form_params => form_params,
217
+ :body => post_body,
218
+ :auth_names => auth_names,
219
+ :return_type => return_type
220
+ )
221
+
222
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
223
+ if @api_client.config.debugging
224
+ @api_client.config.logger.debug "API called: LifecycleApi#lifecycle_iterations_list_open\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
225
+ end
226
+ return data, status_code, headers
227
+ end
228
+
229
+ # Mixin to validate that a valid enterprise license exists before allowing to save the object
230
+ # @param review_request [ReviewRequest]
231
+ # @param [Hash] opts the optional parameters
232
+ # @return [Review]
233
+ def lifecycle_reviews_create(review_request, opts = {})
234
+ data, _status_code, _headers = lifecycle_reviews_create_with_http_info(review_request, opts)
235
+ data
236
+ end
237
+
238
+ # Mixin to validate that a valid enterprise license exists before allowing to save the object
239
+ # @param review_request [ReviewRequest]
240
+ # @param [Hash] opts the optional parameters
241
+ # @return [Array<(Review, Integer, Hash)>] Review data, response status code and response headers
242
+ def lifecycle_reviews_create_with_http_info(review_request, opts = {})
243
+ if @api_client.config.debugging
244
+ @api_client.config.logger.debug 'Calling API: LifecycleApi.lifecycle_reviews_create ...'
245
+ end
246
+ # verify the required parameter 'review_request' is set
247
+ if @api_client.config.client_side_validation && review_request.nil?
248
+ fail ArgumentError, "Missing the required parameter 'review_request' when calling LifecycleApi.lifecycle_reviews_create"
249
+ end
250
+ # resource path
251
+ local_var_path = '/lifecycle/reviews/'
252
+
253
+ # query parameters
254
+ query_params = opts[:query_params] || {}
255
+
256
+ # header parameters
257
+ header_params = opts[:header_params] || {}
258
+ # HTTP header 'Accept' (if needed)
259
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
260
+ # HTTP header 'Content-Type'
261
+ content_type = @api_client.select_header_content_type(['application/json'])
262
+ if !content_type.nil?
263
+ header_params['Content-Type'] = content_type
264
+ end
265
+
266
+ # form parameters
267
+ form_params = opts[:form_params] || {}
268
+
269
+ # http body (model)
270
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(review_request)
271
+
272
+ # return_type
273
+ return_type = opts[:debug_return_type] || 'Review'
274
+
275
+ # auth_names
276
+ auth_names = opts[:debug_auth_names] || ['authentik']
277
+
278
+ new_options = opts.merge(
279
+ :operation => :"LifecycleApi.lifecycle_reviews_create",
280
+ :header_params => header_params,
281
+ :query_params => query_params,
282
+ :form_params => form_params,
283
+ :body => post_body,
284
+ :auth_names => auth_names,
285
+ :return_type => return_type
286
+ )
287
+
288
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug "API called: LifecycleApi#lifecycle_reviews_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
291
+ end
292
+ return data, status_code, headers
293
+ end
294
+
295
+ # @param lifecycle_rule_request [LifecycleRuleRequest]
296
+ # @param [Hash] opts the optional parameters
297
+ # @return [LifecycleRule]
298
+ def lifecycle_rules_create(lifecycle_rule_request, opts = {})
299
+ data, _status_code, _headers = lifecycle_rules_create_with_http_info(lifecycle_rule_request, opts)
300
+ data
301
+ end
302
+
303
+ # @param lifecycle_rule_request [LifecycleRuleRequest]
304
+ # @param [Hash] opts the optional parameters
305
+ # @return [Array<(LifecycleRule, Integer, Hash)>] LifecycleRule data, response status code and response headers
306
+ def lifecycle_rules_create_with_http_info(lifecycle_rule_request, opts = {})
307
+ if @api_client.config.debugging
308
+ @api_client.config.logger.debug 'Calling API: LifecycleApi.lifecycle_rules_create ...'
309
+ end
310
+ # verify the required parameter 'lifecycle_rule_request' is set
311
+ if @api_client.config.client_side_validation && lifecycle_rule_request.nil?
312
+ fail ArgumentError, "Missing the required parameter 'lifecycle_rule_request' when calling LifecycleApi.lifecycle_rules_create"
313
+ end
314
+ # resource path
315
+ local_var_path = '/lifecycle/rules/'
316
+
317
+ # query parameters
318
+ query_params = opts[:query_params] || {}
319
+
320
+ # header parameters
321
+ header_params = opts[:header_params] || {}
322
+ # HTTP header 'Accept' (if needed)
323
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
324
+ # HTTP header 'Content-Type'
325
+ content_type = @api_client.select_header_content_type(['application/json'])
326
+ if !content_type.nil?
327
+ header_params['Content-Type'] = content_type
328
+ end
329
+
330
+ # form parameters
331
+ form_params = opts[:form_params] || {}
332
+
333
+ # http body (model)
334
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(lifecycle_rule_request)
335
+
336
+ # return_type
337
+ return_type = opts[:debug_return_type] || 'LifecycleRule'
338
+
339
+ # auth_names
340
+ auth_names = opts[:debug_auth_names] || ['authentik']
341
+
342
+ new_options = opts.merge(
343
+ :operation => :"LifecycleApi.lifecycle_rules_create",
344
+ :header_params => header_params,
345
+ :query_params => query_params,
346
+ :form_params => form_params,
347
+ :body => post_body,
348
+ :auth_names => auth_names,
349
+ :return_type => return_type
350
+ )
351
+
352
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
353
+ if @api_client.config.debugging
354
+ @api_client.config.logger.debug "API called: LifecycleApi#lifecycle_rules_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
355
+ end
356
+ return data, status_code, headers
357
+ end
358
+
359
+ # @param id [String] A UUID string identifying this lifecycle rule.
360
+ # @param [Hash] opts the optional parameters
361
+ # @return [nil]
362
+ def lifecycle_rules_destroy(id, opts = {})
363
+ lifecycle_rules_destroy_with_http_info(id, opts)
364
+ nil
365
+ end
366
+
367
+ # @param id [String] A UUID string identifying this lifecycle rule.
368
+ # @param [Hash] opts the optional parameters
369
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
370
+ def lifecycle_rules_destroy_with_http_info(id, opts = {})
371
+ if @api_client.config.debugging
372
+ @api_client.config.logger.debug 'Calling API: LifecycleApi.lifecycle_rules_destroy ...'
373
+ end
374
+ # verify the required parameter 'id' is set
375
+ if @api_client.config.client_side_validation && id.nil?
376
+ fail ArgumentError, "Missing the required parameter 'id' when calling LifecycleApi.lifecycle_rules_destroy"
377
+ end
378
+ # resource path
379
+ local_var_path = '/lifecycle/rules/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
380
+
381
+ # query parameters
382
+ query_params = opts[:query_params] || {}
383
+
384
+ # header parameters
385
+ header_params = opts[:header_params] || {}
386
+ # HTTP header 'Accept' (if needed)
387
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
388
+
389
+ # form parameters
390
+ form_params = opts[:form_params] || {}
391
+
392
+ # http body (model)
393
+ post_body = opts[:debug_body]
394
+
395
+ # return_type
396
+ return_type = opts[:debug_return_type]
397
+
398
+ # auth_names
399
+ auth_names = opts[:debug_auth_names] || ['authentik']
400
+
401
+ new_options = opts.merge(
402
+ :operation => :"LifecycleApi.lifecycle_rules_destroy",
403
+ :header_params => header_params,
404
+ :query_params => query_params,
405
+ :form_params => form_params,
406
+ :body => post_body,
407
+ :auth_names => auth_names,
408
+ :return_type => return_type
409
+ )
410
+
411
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug "API called: LifecycleApi#lifecycle_rules_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
414
+ end
415
+ return data, status_code, headers
416
+ end
417
+
418
+ # @param [Hash] opts the optional parameters
419
+ # @option opts [String] :content_type__model
420
+ # @option opts [String] :ordering Which field to use when ordering the results.
421
+ # @option opts [Integer] :page A page number within the paginated result set.
422
+ # @option opts [Integer] :page_size Number of results to return per page.
423
+ # @option opts [String] :search A search term.
424
+ # @return [PaginatedLifecycleRuleList]
425
+ def lifecycle_rules_list(opts = {})
426
+ data, _status_code, _headers = lifecycle_rules_list_with_http_info(opts)
427
+ data
428
+ end
429
+
430
+ # @param [Hash] opts the optional parameters
431
+ # @option opts [String] :content_type__model
432
+ # @option opts [String] :ordering Which field to use when ordering the results.
433
+ # @option opts [Integer] :page A page number within the paginated result set.
434
+ # @option opts [Integer] :page_size Number of results to return per page.
435
+ # @option opts [String] :search A search term.
436
+ # @return [Array<(PaginatedLifecycleRuleList, Integer, Hash)>] PaginatedLifecycleRuleList data, response status code and response headers
437
+ def lifecycle_rules_list_with_http_info(opts = {})
438
+ if @api_client.config.debugging
439
+ @api_client.config.logger.debug 'Calling API: LifecycleApi.lifecycle_rules_list ...'
440
+ end
441
+ # resource path
442
+ local_var_path = '/lifecycle/rules/'
443
+
444
+ # query parameters
445
+ query_params = opts[:query_params] || {}
446
+ query_params[:'content_type__model'] = opts[:'content_type__model'] if !opts[:'content_type__model'].nil?
447
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
448
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
449
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
450
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
451
+
452
+ # header parameters
453
+ header_params = opts[:header_params] || {}
454
+ # HTTP header 'Accept' (if needed)
455
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
456
+
457
+ # form parameters
458
+ form_params = opts[:form_params] || {}
459
+
460
+ # http body (model)
461
+ post_body = opts[:debug_body]
462
+
463
+ # return_type
464
+ return_type = opts[:debug_return_type] || 'PaginatedLifecycleRuleList'
465
+
466
+ # auth_names
467
+ auth_names = opts[:debug_auth_names] || ['authentik']
468
+
469
+ new_options = opts.merge(
470
+ :operation => :"LifecycleApi.lifecycle_rules_list",
471
+ :header_params => header_params,
472
+ :query_params => query_params,
473
+ :form_params => form_params,
474
+ :body => post_body,
475
+ :auth_names => auth_names,
476
+ :return_type => return_type
477
+ )
478
+
479
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
480
+ if @api_client.config.debugging
481
+ @api_client.config.logger.debug "API called: LifecycleApi#lifecycle_rules_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
482
+ end
483
+ return data, status_code, headers
484
+ end
485
+
486
+ # @param id [String] A UUID string identifying this lifecycle rule.
487
+ # @param [Hash] opts the optional parameters
488
+ # @option opts [PatchedLifecycleRuleRequest] :patched_lifecycle_rule_request
489
+ # @return [LifecycleRule]
490
+ def lifecycle_rules_partial_update(id, opts = {})
491
+ data, _status_code, _headers = lifecycle_rules_partial_update_with_http_info(id, opts)
492
+ data
493
+ end
494
+
495
+ # @param id [String] A UUID string identifying this lifecycle rule.
496
+ # @param [Hash] opts the optional parameters
497
+ # @option opts [PatchedLifecycleRuleRequest] :patched_lifecycle_rule_request
498
+ # @return [Array<(LifecycleRule, Integer, Hash)>] LifecycleRule data, response status code and response headers
499
+ def lifecycle_rules_partial_update_with_http_info(id, opts = {})
500
+ if @api_client.config.debugging
501
+ @api_client.config.logger.debug 'Calling API: LifecycleApi.lifecycle_rules_partial_update ...'
502
+ end
503
+ # verify the required parameter 'id' is set
504
+ if @api_client.config.client_side_validation && id.nil?
505
+ fail ArgumentError, "Missing the required parameter 'id' when calling LifecycleApi.lifecycle_rules_partial_update"
506
+ end
507
+ # resource path
508
+ local_var_path = '/lifecycle/rules/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
509
+
510
+ # query parameters
511
+ query_params = opts[:query_params] || {}
512
+
513
+ # header parameters
514
+ header_params = opts[:header_params] || {}
515
+ # HTTP header 'Accept' (if needed)
516
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
517
+ # HTTP header 'Content-Type'
518
+ content_type = @api_client.select_header_content_type(['application/json'])
519
+ if !content_type.nil?
520
+ header_params['Content-Type'] = content_type
521
+ end
522
+
523
+ # form parameters
524
+ form_params = opts[:form_params] || {}
525
+
526
+ # http body (model)
527
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patched_lifecycle_rule_request'])
528
+
529
+ # return_type
530
+ return_type = opts[:debug_return_type] || 'LifecycleRule'
531
+
532
+ # auth_names
533
+ auth_names = opts[:debug_auth_names] || ['authentik']
534
+
535
+ new_options = opts.merge(
536
+ :operation => :"LifecycleApi.lifecycle_rules_partial_update",
537
+ :header_params => header_params,
538
+ :query_params => query_params,
539
+ :form_params => form_params,
540
+ :body => post_body,
541
+ :auth_names => auth_names,
542
+ :return_type => return_type
543
+ )
544
+
545
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
546
+ if @api_client.config.debugging
547
+ @api_client.config.logger.debug "API called: LifecycleApi#lifecycle_rules_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
548
+ end
549
+ return data, status_code, headers
550
+ end
551
+
552
+ # @param id [String] A UUID string identifying this lifecycle rule.
553
+ # @param [Hash] opts the optional parameters
554
+ # @return [LifecycleRule]
555
+ def lifecycle_rules_retrieve(id, opts = {})
556
+ data, _status_code, _headers = lifecycle_rules_retrieve_with_http_info(id, opts)
557
+ data
558
+ end
559
+
560
+ # @param id [String] A UUID string identifying this lifecycle rule.
561
+ # @param [Hash] opts the optional parameters
562
+ # @return [Array<(LifecycleRule, Integer, Hash)>] LifecycleRule data, response status code and response headers
563
+ def lifecycle_rules_retrieve_with_http_info(id, opts = {})
564
+ if @api_client.config.debugging
565
+ @api_client.config.logger.debug 'Calling API: LifecycleApi.lifecycle_rules_retrieve ...'
566
+ end
567
+ # verify the required parameter 'id' is set
568
+ if @api_client.config.client_side_validation && id.nil?
569
+ fail ArgumentError, "Missing the required parameter 'id' when calling LifecycleApi.lifecycle_rules_retrieve"
570
+ end
571
+ # resource path
572
+ local_var_path = '/lifecycle/rules/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
573
+
574
+ # query parameters
575
+ query_params = opts[:query_params] || {}
576
+
577
+ # header parameters
578
+ header_params = opts[:header_params] || {}
579
+ # HTTP header 'Accept' (if needed)
580
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
581
+
582
+ # form parameters
583
+ form_params = opts[:form_params] || {}
584
+
585
+ # http body (model)
586
+ post_body = opts[:debug_body]
587
+
588
+ # return_type
589
+ return_type = opts[:debug_return_type] || 'LifecycleRule'
590
+
591
+ # auth_names
592
+ auth_names = opts[:debug_auth_names] || ['authentik']
593
+
594
+ new_options = opts.merge(
595
+ :operation => :"LifecycleApi.lifecycle_rules_retrieve",
596
+ :header_params => header_params,
597
+ :query_params => query_params,
598
+ :form_params => form_params,
599
+ :body => post_body,
600
+ :auth_names => auth_names,
601
+ :return_type => return_type
602
+ )
603
+
604
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
605
+ if @api_client.config.debugging
606
+ @api_client.config.logger.debug "API called: LifecycleApi#lifecycle_rules_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
607
+ end
608
+ return data, status_code, headers
609
+ end
610
+
611
+ # @param id [String] A UUID string identifying this lifecycle rule.
612
+ # @param lifecycle_rule_request [LifecycleRuleRequest]
613
+ # @param [Hash] opts the optional parameters
614
+ # @return [LifecycleRule]
615
+ def lifecycle_rules_update(id, lifecycle_rule_request, opts = {})
616
+ data, _status_code, _headers = lifecycle_rules_update_with_http_info(id, lifecycle_rule_request, opts)
617
+ data
618
+ end
619
+
620
+ # @param id [String] A UUID string identifying this lifecycle rule.
621
+ # @param lifecycle_rule_request [LifecycleRuleRequest]
622
+ # @param [Hash] opts the optional parameters
623
+ # @return [Array<(LifecycleRule, Integer, Hash)>] LifecycleRule data, response status code and response headers
624
+ def lifecycle_rules_update_with_http_info(id, lifecycle_rule_request, opts = {})
625
+ if @api_client.config.debugging
626
+ @api_client.config.logger.debug 'Calling API: LifecycleApi.lifecycle_rules_update ...'
627
+ end
628
+ # verify the required parameter 'id' is set
629
+ if @api_client.config.client_side_validation && id.nil?
630
+ fail ArgumentError, "Missing the required parameter 'id' when calling LifecycleApi.lifecycle_rules_update"
631
+ end
632
+ # verify the required parameter 'lifecycle_rule_request' is set
633
+ if @api_client.config.client_side_validation && lifecycle_rule_request.nil?
634
+ fail ArgumentError, "Missing the required parameter 'lifecycle_rule_request' when calling LifecycleApi.lifecycle_rules_update"
635
+ end
636
+ # resource path
637
+ local_var_path = '/lifecycle/rules/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
638
+
639
+ # query parameters
640
+ query_params = opts[:query_params] || {}
641
+
642
+ # header parameters
643
+ header_params = opts[:header_params] || {}
644
+ # HTTP header 'Accept' (if needed)
645
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
646
+ # HTTP header 'Content-Type'
647
+ content_type = @api_client.select_header_content_type(['application/json'])
648
+ if !content_type.nil?
649
+ header_params['Content-Type'] = content_type
650
+ end
651
+
652
+ # form parameters
653
+ form_params = opts[:form_params] || {}
654
+
655
+ # http body (model)
656
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(lifecycle_rule_request)
657
+
658
+ # return_type
659
+ return_type = opts[:debug_return_type] || 'LifecycleRule'
660
+
661
+ # auth_names
662
+ auth_names = opts[:debug_auth_names] || ['authentik']
663
+
664
+ new_options = opts.merge(
665
+ :operation => :"LifecycleApi.lifecycle_rules_update",
666
+ :header_params => header_params,
667
+ :query_params => query_params,
668
+ :form_params => form_params,
669
+ :body => post_body,
670
+ :auth_names => auth_names,
671
+ :return_type => return_type
672
+ )
673
+
674
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
675
+ if @api_client.config.debugging
676
+ @api_client.config.logger.debug "API called: LifecycleApi#lifecycle_rules_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
677
+ end
678
+ return data, status_code, headers
679
+ end
680
+ end
681
+ end