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 PaginatedWSFederationProviderList < 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<WSFederationProvider>',
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::PaginatedWSFederationProviderList` 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::PaginatedWSFederationProviderList`. 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
@@ -11,10 +11,13 @@ module Authentik::Api
11
11
  class PatchedDeviceAccessGroupRequest < ApiModelBase
12
12
  attr_accessor :name
13
13
 
14
+ attr_accessor :attributes
15
+
14
16
  # Attribute mapping from ruby-style variable name to JSON key.
15
17
  def self.attribute_map
16
18
  {
17
- :'name' => :'name'
19
+ :'name' => :'name',
20
+ :'attributes' => :'attributes'
18
21
  }
19
22
  end
20
23
 
@@ -31,7 +34,8 @@ module Authentik::Api
31
34
  # Attribute type mapping.
32
35
  def self.openapi_types
33
36
  {
34
- :'name' => :'String'
37
+ :'name' => :'String',
38
+ :'attributes' => :'Hash<String, Object>'
35
39
  }
36
40
  end
37
41
 
@@ -60,6 +64,12 @@ module Authentik::Api
60
64
  if attributes.key?(:'name')
61
65
  self.name = attributes[:'name']
62
66
  end
67
+
68
+ if attributes.key?(:'attributes')
69
+ if (value = attributes[:'attributes']).is_a?(Hash)
70
+ self.attributes = value
71
+ end
72
+ end
63
73
  end
64
74
 
65
75
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -101,7 +111,8 @@ module Authentik::Api
101
111
  def ==(o)
102
112
  return true if self.equal?(o)
103
113
  self.class == o.class &&
104
- name == o.name
114
+ name == o.name &&
115
+ attributes == o.attributes
105
116
  end
106
117
 
107
118
  # @see the `==` method
@@ -113,7 +124,7 @@ module Authentik::Api
113
124
  # Calculates hash code according to all attributes.
114
125
  # @return [Integer] Hash code
115
126
  def hash
116
- [name].hash
127
+ [name, attributes].hash
117
128
  end
118
129
 
119
130
  # Builds the object from hash
@@ -0,0 +1,273 @@
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
+ # FleetConnector Serializer
12
+ class PatchedFleetConnectorRequest < ApiModelBase
13
+ attr_accessor :connector_uuid
14
+
15
+ attr_accessor :name
16
+
17
+ attr_accessor :enabled
18
+
19
+ attr_accessor :url
20
+
21
+ attr_accessor :token
22
+
23
+ # Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs
24
+ attr_accessor :headers_mapping
25
+
26
+ attr_accessor :map_users
27
+
28
+ attr_accessor :map_teams_access_group
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'connector_uuid' => :'connector_uuid',
34
+ :'name' => :'name',
35
+ :'enabled' => :'enabled',
36
+ :'url' => :'url',
37
+ :'token' => :'token',
38
+ :'headers_mapping' => :'headers_mapping',
39
+ :'map_users' => :'map_users',
40
+ :'map_teams_access_group' => :'map_teams_access_group'
41
+ }
42
+ end
43
+
44
+ # Returns attribute mapping this model knows about
45
+ def self.acceptable_attribute_map
46
+ attribute_map
47
+ end
48
+
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ acceptable_attribute_map.values
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.openapi_types
56
+ {
57
+ :'connector_uuid' => :'String',
58
+ :'name' => :'String',
59
+ :'enabled' => :'Boolean',
60
+ :'url' => :'String',
61
+ :'token' => :'String',
62
+ :'headers_mapping' => :'String',
63
+ :'map_users' => :'Boolean',
64
+ :'map_teams_access_group' => :'Boolean'
65
+ }
66
+ end
67
+
68
+ # List of attributes with nullable: true
69
+ def self.openapi_nullable
70
+ Set.new([
71
+ :'headers_mapping',
72
+ ])
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ if (!attributes.is_a?(Hash))
79
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::PatchedFleetConnectorRequest` initialize method"
80
+ end
81
+
82
+ # check to see if the attribute exists and convert string to symbol for hash key
83
+ acceptable_attribute_map = self.class.acceptable_attribute_map
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!acceptable_attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::PatchedFleetConnectorRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'connector_uuid')
92
+ self.connector_uuid = attributes[:'connector_uuid']
93
+ end
94
+
95
+ if attributes.key?(:'name')
96
+ self.name = attributes[:'name']
97
+ end
98
+
99
+ if attributes.key?(:'enabled')
100
+ self.enabled = attributes[:'enabled']
101
+ end
102
+
103
+ if attributes.key?(:'url')
104
+ self.url = attributes[:'url']
105
+ end
106
+
107
+ if attributes.key?(:'token')
108
+ self.token = attributes[:'token']
109
+ end
110
+
111
+ if attributes.key?(:'headers_mapping')
112
+ self.headers_mapping = attributes[:'headers_mapping']
113
+ end
114
+
115
+ if attributes.key?(:'map_users')
116
+ self.map_users = attributes[:'map_users']
117
+ end
118
+
119
+ if attributes.key?(:'map_teams_access_group')
120
+ self.map_teams_access_group = attributes[:'map_teams_access_group']
121
+ end
122
+ end
123
+
124
+ # Show invalid properties with the reasons. Usually used together with valid?
125
+ # @return Array for valid properties with the reasons
126
+ def list_invalid_properties
127
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
128
+ invalid_properties = Array.new
129
+ if !@name.nil? && @name.to_s.length < 1
130
+ invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
131
+ end
132
+
133
+ if !@url.nil? && @url.to_s.length > 200
134
+ invalid_properties.push('invalid value for "url", the character length must be smaller than or equal to 200.')
135
+ end
136
+
137
+ if !@url.nil? && @url.to_s.length < 1
138
+ invalid_properties.push('invalid value for "url", the character length must be greater than or equal to 1.')
139
+ end
140
+
141
+ if !@token.nil? && @token.to_s.length < 1
142
+ invalid_properties.push('invalid value for "token", the character length must be greater than or equal to 1.')
143
+ end
144
+
145
+ invalid_properties
146
+ end
147
+
148
+ # Check to see if the all the properties in the model are valid
149
+ # @return true if the model is valid
150
+ def valid?
151
+ warn '[DEPRECATED] the `valid?` method is obsolete'
152
+ return false if !@name.nil? && @name.to_s.length < 1
153
+ return false if !@url.nil? && @url.to_s.length > 200
154
+ return false if !@url.nil? && @url.to_s.length < 1
155
+ return false if !@token.nil? && @token.to_s.length < 1
156
+ true
157
+ end
158
+
159
+ # Custom attribute writer method with validation
160
+ # @param [Object] name Value to be assigned
161
+ def name=(name)
162
+ if name.nil?
163
+ fail ArgumentError, 'name cannot be nil'
164
+ end
165
+
166
+ if name.to_s.length < 1
167
+ fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.'
168
+ end
169
+
170
+ @name = name
171
+ end
172
+
173
+ # Custom attribute writer method with validation
174
+ # @param [Object] url Value to be assigned
175
+ def url=(url)
176
+ if url.nil?
177
+ fail ArgumentError, 'url cannot be nil'
178
+ end
179
+
180
+ if url.to_s.length > 200
181
+ fail ArgumentError, 'invalid value for "url", the character length must be smaller than or equal to 200.'
182
+ end
183
+
184
+ if url.to_s.length < 1
185
+ fail ArgumentError, 'invalid value for "url", the character length must be greater than or equal to 1.'
186
+ end
187
+
188
+ @url = url
189
+ end
190
+
191
+ # Custom attribute writer method with validation
192
+ # @param [Object] token Value to be assigned
193
+ def token=(token)
194
+ if token.nil?
195
+ fail ArgumentError, 'token cannot be nil'
196
+ end
197
+
198
+ if token.to_s.length < 1
199
+ fail ArgumentError, 'invalid value for "token", the character length must be greater than or equal to 1.'
200
+ end
201
+
202
+ @token = token
203
+ end
204
+
205
+ # Checks equality by comparing each attribute.
206
+ # @param [Object] Object to be compared
207
+ def ==(o)
208
+ return true if self.equal?(o)
209
+ self.class == o.class &&
210
+ connector_uuid == o.connector_uuid &&
211
+ name == o.name &&
212
+ enabled == o.enabled &&
213
+ url == o.url &&
214
+ token == o.token &&
215
+ headers_mapping == o.headers_mapping &&
216
+ map_users == o.map_users &&
217
+ map_teams_access_group == o.map_teams_access_group
218
+ end
219
+
220
+ # @see the `==` method
221
+ # @param [Object] Object to be compared
222
+ def eql?(o)
223
+ self == o
224
+ end
225
+
226
+ # Calculates hash code according to all attributes.
227
+ # @return [Integer] Hash code
228
+ def hash
229
+ [connector_uuid, name, enabled, url, token, headers_mapping, map_users, map_teams_access_group].hash
230
+ end
231
+
232
+ # Builds the object from hash
233
+ # @param [Hash] attributes Model attributes in the form of hash
234
+ # @return [Object] Returns the model itself
235
+ def self.build_from_hash(attributes)
236
+ return nil unless attributes.is_a?(Hash)
237
+ attributes = attributes.transform_keys(&:to_sym)
238
+ transformed_hash = {}
239
+ openapi_types.each_pair do |key, type|
240
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
241
+ transformed_hash["#{key}"] = nil
242
+ elsif type =~ /\AArray<(.*)>/i
243
+ # check to ensure the input is an array given that the attribute
244
+ # is documented as an array but the input is not
245
+ if attributes[attribute_map[key]].is_a?(Array)
246
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
247
+ end
248
+ elsif !attributes[attribute_map[key]].nil?
249
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
250
+ end
251
+ end
252
+ new(transformed_hash)
253
+ end
254
+
255
+ # Returns the object in the form of hash
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_hash
258
+ hash = {}
259
+ self.class.attribute_map.each_pair do |attr, param|
260
+ value = self.send(attr)
261
+ if value.nil?
262
+ is_nullable = self.class.openapi_nullable.include?(attr)
263
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
264
+ end
265
+
266
+ hash[param] = _to_hash(value)
267
+ end
268
+ hash
269
+ end
270
+
271
+ end
272
+
273
+ end