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,214 @@
1
+ =begin
2
+ This file is automatically generated by: https://openapi-generator.tech.
3
+ Any manual changes will be lost when the OpenAPI scheme changes.
4
+
5
+ =end
6
+
7
+ require 'date'
8
+ require 'time'
9
+
10
+ module Authentik::Api
11
+ class PaginatedFleetConnectorList < ApiModelBase
12
+ attr_accessor :pagination
13
+
14
+ attr_accessor :results
15
+
16
+ attr_accessor :autocomplete
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'pagination' => :'pagination',
22
+ :'results' => :'results',
23
+ :'autocomplete' => :'autocomplete'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'pagination' => :'Pagination',
41
+ :'results' => :'Array<FleetConnector>',
42
+ :'autocomplete' => :'Hash<String, Object>'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::PaginatedFleetConnectorList` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!acceptable_attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::PaginatedFleetConnectorList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'pagination')
69
+ self.pagination = attributes[:'pagination']
70
+ else
71
+ self.pagination = nil
72
+ end
73
+
74
+ if attributes.key?(:'results')
75
+ if (value = attributes[:'results']).is_a?(Array)
76
+ self.results = value
77
+ end
78
+ else
79
+ self.results = nil
80
+ end
81
+
82
+ if attributes.key?(:'autocomplete')
83
+ if (value = attributes[:'autocomplete']).is_a?(Hash)
84
+ self.autocomplete = value
85
+ end
86
+ else
87
+ self.autocomplete = nil
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ if @pagination.nil?
97
+ invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
98
+ end
99
+
100
+ if @results.nil?
101
+ invalid_properties.push('invalid value for "results", results cannot be nil.')
102
+ end
103
+
104
+ if @autocomplete.nil?
105
+ invalid_properties.push('invalid value for "autocomplete", autocomplete cannot be nil.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ return false if @pagination.nil?
116
+ return false if @results.nil?
117
+ return false if @autocomplete.nil?
118
+ true
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] pagination Value to be assigned
123
+ def pagination=(pagination)
124
+ if pagination.nil?
125
+ fail ArgumentError, 'pagination cannot be nil'
126
+ end
127
+
128
+ @pagination = pagination
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] results Value to be assigned
133
+ def results=(results)
134
+ if results.nil?
135
+ fail ArgumentError, 'results cannot be nil'
136
+ end
137
+
138
+ @results = results
139
+ end
140
+
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] autocomplete Value to be assigned
143
+ def autocomplete=(autocomplete)
144
+ if autocomplete.nil?
145
+ fail ArgumentError, 'autocomplete cannot be nil'
146
+ end
147
+
148
+ @autocomplete = autocomplete
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] Object to be compared
153
+ def ==(o)
154
+ return true if self.equal?(o)
155
+ self.class == o.class &&
156
+ pagination == o.pagination &&
157
+ results == o.results &&
158
+ autocomplete == o.autocomplete
159
+ end
160
+
161
+ # @see the `==` method
162
+ # @param [Object] Object to be compared
163
+ def eql?(o)
164
+ self == o
165
+ end
166
+
167
+ # Calculates hash code according to all attributes.
168
+ # @return [Integer] Hash code
169
+ def hash
170
+ [pagination, results, autocomplete].hash
171
+ end
172
+
173
+ # Builds the object from hash
174
+ # @param [Hash] attributes Model attributes in the form of hash
175
+ # @return [Object] Returns the model itself
176
+ def self.build_from_hash(attributes)
177
+ return nil unless attributes.is_a?(Hash)
178
+ attributes = attributes.transform_keys(&:to_sym)
179
+ transformed_hash = {}
180
+ openapi_types.each_pair do |key, type|
181
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
182
+ transformed_hash["#{key}"] = nil
183
+ elsif type =~ /\AArray<(.*)>/i
184
+ # check to ensure the input is an array given that the attribute
185
+ # is documented as an array but the input is not
186
+ if attributes[attribute_map[key]].is_a?(Array)
187
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
188
+ end
189
+ elsif !attributes[attribute_map[key]].nil?
190
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
191
+ end
192
+ end
193
+ new(transformed_hash)
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ if value.nil?
203
+ is_nullable = self.class.openapi_nullable.include?(attr)
204
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
+ end
206
+
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ end
213
+
214
+ end
@@ -0,0 +1,214 @@
1
+ =begin
2
+ This file is automatically generated by: https://openapi-generator.tech.
3
+ Any manual changes will be lost when the OpenAPI scheme changes.
4
+
5
+ =end
6
+
7
+ require 'date'
8
+ require 'time'
9
+
10
+ module Authentik::Api
11
+ class PaginatedLifecycleIterationList < ApiModelBase
12
+ attr_accessor :pagination
13
+
14
+ attr_accessor :results
15
+
16
+ attr_accessor :autocomplete
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'pagination' => :'pagination',
22
+ :'results' => :'results',
23
+ :'autocomplete' => :'autocomplete'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'pagination' => :'Pagination',
41
+ :'results' => :'Array<LifecycleIteration>',
42
+ :'autocomplete' => :'Hash<String, Object>'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::PaginatedLifecycleIterationList` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!acceptable_attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::PaginatedLifecycleIterationList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'pagination')
69
+ self.pagination = attributes[:'pagination']
70
+ else
71
+ self.pagination = nil
72
+ end
73
+
74
+ if attributes.key?(:'results')
75
+ if (value = attributes[:'results']).is_a?(Array)
76
+ self.results = value
77
+ end
78
+ else
79
+ self.results = nil
80
+ end
81
+
82
+ if attributes.key?(:'autocomplete')
83
+ if (value = attributes[:'autocomplete']).is_a?(Hash)
84
+ self.autocomplete = value
85
+ end
86
+ else
87
+ self.autocomplete = nil
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ if @pagination.nil?
97
+ invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
98
+ end
99
+
100
+ if @results.nil?
101
+ invalid_properties.push('invalid value for "results", results cannot be nil.')
102
+ end
103
+
104
+ if @autocomplete.nil?
105
+ invalid_properties.push('invalid value for "autocomplete", autocomplete cannot be nil.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ return false if @pagination.nil?
116
+ return false if @results.nil?
117
+ return false if @autocomplete.nil?
118
+ true
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] pagination Value to be assigned
123
+ def pagination=(pagination)
124
+ if pagination.nil?
125
+ fail ArgumentError, 'pagination cannot be nil'
126
+ end
127
+
128
+ @pagination = pagination
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] results Value to be assigned
133
+ def results=(results)
134
+ if results.nil?
135
+ fail ArgumentError, 'results cannot be nil'
136
+ end
137
+
138
+ @results = results
139
+ end
140
+
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] autocomplete Value to be assigned
143
+ def autocomplete=(autocomplete)
144
+ if autocomplete.nil?
145
+ fail ArgumentError, 'autocomplete cannot be nil'
146
+ end
147
+
148
+ @autocomplete = autocomplete
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] Object to be compared
153
+ def ==(o)
154
+ return true if self.equal?(o)
155
+ self.class == o.class &&
156
+ pagination == o.pagination &&
157
+ results == o.results &&
158
+ autocomplete == o.autocomplete
159
+ end
160
+
161
+ # @see the `==` method
162
+ # @param [Object] Object to be compared
163
+ def eql?(o)
164
+ self == o
165
+ end
166
+
167
+ # Calculates hash code according to all attributes.
168
+ # @return [Integer] Hash code
169
+ def hash
170
+ [pagination, results, autocomplete].hash
171
+ end
172
+
173
+ # Builds the object from hash
174
+ # @param [Hash] attributes Model attributes in the form of hash
175
+ # @return [Object] Returns the model itself
176
+ def self.build_from_hash(attributes)
177
+ return nil unless attributes.is_a?(Hash)
178
+ attributes = attributes.transform_keys(&:to_sym)
179
+ transformed_hash = {}
180
+ openapi_types.each_pair do |key, type|
181
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
182
+ transformed_hash["#{key}"] = nil
183
+ elsif type =~ /\AArray<(.*)>/i
184
+ # check to ensure the input is an array given that the attribute
185
+ # is documented as an array but the input is not
186
+ if attributes[attribute_map[key]].is_a?(Array)
187
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
188
+ end
189
+ elsif !attributes[attribute_map[key]].nil?
190
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
191
+ end
192
+ end
193
+ new(transformed_hash)
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ if value.nil?
203
+ is_nullable = self.class.openapi_nullable.include?(attr)
204
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
+ end
206
+
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ end
213
+
214
+ end
@@ -0,0 +1,214 @@
1
+ =begin
2
+ This file is automatically generated by: https://openapi-generator.tech.
3
+ Any manual changes will be lost when the OpenAPI scheme changes.
4
+
5
+ =end
6
+
7
+ require 'date'
8
+ require 'time'
9
+
10
+ module Authentik::Api
11
+ class PaginatedLifecycleRuleList < ApiModelBase
12
+ attr_accessor :pagination
13
+
14
+ attr_accessor :results
15
+
16
+ attr_accessor :autocomplete
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'pagination' => :'pagination',
22
+ :'results' => :'results',
23
+ :'autocomplete' => :'autocomplete'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'pagination' => :'Pagination',
41
+ :'results' => :'Array<LifecycleRule>',
42
+ :'autocomplete' => :'Hash<String, Object>'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::PaginatedLifecycleRuleList` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!acceptable_attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::PaginatedLifecycleRuleList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'pagination')
69
+ self.pagination = attributes[:'pagination']
70
+ else
71
+ self.pagination = nil
72
+ end
73
+
74
+ if attributes.key?(:'results')
75
+ if (value = attributes[:'results']).is_a?(Array)
76
+ self.results = value
77
+ end
78
+ else
79
+ self.results = nil
80
+ end
81
+
82
+ if attributes.key?(:'autocomplete')
83
+ if (value = attributes[:'autocomplete']).is_a?(Hash)
84
+ self.autocomplete = value
85
+ end
86
+ else
87
+ self.autocomplete = nil
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ if @pagination.nil?
97
+ invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
98
+ end
99
+
100
+ if @results.nil?
101
+ invalid_properties.push('invalid value for "results", results cannot be nil.')
102
+ end
103
+
104
+ if @autocomplete.nil?
105
+ invalid_properties.push('invalid value for "autocomplete", autocomplete cannot be nil.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ return false if @pagination.nil?
116
+ return false if @results.nil?
117
+ return false if @autocomplete.nil?
118
+ true
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] pagination Value to be assigned
123
+ def pagination=(pagination)
124
+ if pagination.nil?
125
+ fail ArgumentError, 'pagination cannot be nil'
126
+ end
127
+
128
+ @pagination = pagination
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] results Value to be assigned
133
+ def results=(results)
134
+ if results.nil?
135
+ fail ArgumentError, 'results cannot be nil'
136
+ end
137
+
138
+ @results = results
139
+ end
140
+
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] autocomplete Value to be assigned
143
+ def autocomplete=(autocomplete)
144
+ if autocomplete.nil?
145
+ fail ArgumentError, 'autocomplete cannot be nil'
146
+ end
147
+
148
+ @autocomplete = autocomplete
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] Object to be compared
153
+ def ==(o)
154
+ return true if self.equal?(o)
155
+ self.class == o.class &&
156
+ pagination == o.pagination &&
157
+ results == o.results &&
158
+ autocomplete == o.autocomplete
159
+ end
160
+
161
+ # @see the `==` method
162
+ # @param [Object] Object to be compared
163
+ def eql?(o)
164
+ self == o
165
+ end
166
+
167
+ # Calculates hash code according to all attributes.
168
+ # @return [Integer] Hash code
169
+ def hash
170
+ [pagination, results, autocomplete].hash
171
+ end
172
+
173
+ # Builds the object from hash
174
+ # @param [Hash] attributes Model attributes in the form of hash
175
+ # @return [Object] Returns the model itself
176
+ def self.build_from_hash(attributes)
177
+ return nil unless attributes.is_a?(Hash)
178
+ attributes = attributes.transform_keys(&:to_sym)
179
+ transformed_hash = {}
180
+ openapi_types.each_pair do |key, type|
181
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
182
+ transformed_hash["#{key}"] = nil
183
+ elsif type =~ /\AArray<(.*)>/i
184
+ # check to ensure the input is an array given that the attribute
185
+ # is documented as an array but the input is not
186
+ if attributes[attribute_map[key]].is_a?(Array)
187
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
188
+ end
189
+ elsif !attributes[attribute_map[key]].nil?
190
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
191
+ end
192
+ end
193
+ new(transformed_hash)
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ if value.nil?
203
+ is_nullable = self.class.openapi_nullable.include?(attr)
204
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
+ end
206
+
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ end
213
+
214
+ end