authentik-api 2026.2.2 → 2026.5.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.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/README_API.md +67 -15
- data/lib/authentik/api/api/admin_api.rb +5 -13
- data/lib/authentik/api/api/authenticators_api.rb +60 -60
- data/lib/authentik/api/api/core_api.rb +188 -63
- data/lib/authentik/api/api/crypto_api.rb +9 -13
- data/lib/authentik/api/api/endpoints_api.rb +1600 -679
- data/lib/authentik/api/api/enterprise_api.rb +5 -5
- data/lib/authentik/api/api/events_api.rb +141 -58
- data/lib/authentik/api/api/flows_api.rb +24 -106
- data/lib/authentik/api/api/lifecycle_api.rb +27 -18
- data/lib/authentik/api/api/managed_api.rb +79 -6
- data/lib/authentik/api/api/oauth2_api.rb +9 -9
- data/lib/authentik/api/api/outposts_api.rb +22 -22
- data/lib/authentik/api/api/policies_api.rb +57 -58
- data/lib/authentik/api/api/propertymappings_api.rb +79 -79
- data/lib/authentik/api/api/providers_api.rb +134 -196
- data/lib/authentik/api/api/rac_api.rb +10 -10
- data/lib/authentik/api/api/rbac_api.rb +15 -20
- data/lib/authentik/api/api/reports_api.rb +2 -2
- data/lib/authentik/api/api/schema_api.rb +4 -12
- data/lib/authentik/api/api/sources_api.rb +158 -219
- data/lib/authentik/api/api/ssf_api.rb +64 -7
- data/lib/authentik/api/api/stages_api.rb +723 -244
- data/lib/authentik/api/api/tasks_api.rb +11 -19
- data/lib/authentik/api/api/tenants_api.rb +10 -10
- data/lib/authentik/api/models/account_lockdown_stage.rb +372 -0
- data/lib/authentik/api/models/account_lockdown_stage_request.rb +219 -0
- data/lib/authentik/api/models/app_enum.rb +3 -2
- data/lib/authentik/api/models/apple_independent_secure_enclave.rb +246 -0
- data/lib/authentik/api/models/apple_independent_secure_enclave_request.rb +273 -0
- data/lib/authentik/api/models/application.rb +14 -4
- data/lib/authentik/api/models/application_request.rb +14 -4
- data/lib/authentik/api/models/authenticated_session_user_agent_device.rb +2 -30
- data/lib/authentik/api/models/authenticated_session_user_agent_os.rb +4 -60
- data/lib/authentik/api/models/authentication_enum.rb +2 -1
- data/lib/authentik/api/models/authenticator_validate_stage.rb +51 -4
- data/lib/authentik/api/models/authenticator_validate_stage_request.rb +51 -4
- data/lib/authentik/api/models/authenticator_web_authn_stage.rb +23 -2
- data/lib/authentik/api/models/authenticator_web_authn_stage_request.rb +23 -2
- data/lib/authentik/api/models/{flow_import_result.rb → blueprint_import_result.rb} +4 -4
- data/lib/authentik/api/models/brand.rb +11 -1
- data/lib/authentik/api/models/brand_request.rb +11 -1
- data/lib/authentik/api/models/certificate_key_pair.rb +1 -1
- data/lib/authentik/api/models/certificate_key_pair_key_type_enum.rb +37 -0
- data/lib/authentik/api/models/compatibility_mode_enum.rb +3 -1
- data/lib/authentik/api/models/{consent_stage_mode_enum.rb → consent_mode_enum.rb} +3 -3
- data/lib/authentik/api/models/consent_stage.rb +1 -1
- data/lib/authentik/api/models/consent_stage_request.rb +1 -1
- data/lib/authentik/api/models/country_code_enum.rb +3 -3
- data/lib/authentik/api/models/current_brand.rb +10 -1
- data/lib/authentik/api/models/current_brand_flags.rb +31 -27
- data/lib/authentik/api/models/delivery_method_enum.rb +3 -1
- data/lib/authentik/api/models/device_user_binding.rb +3 -45
- data/lib/authentik/api/models/event_matcher_policy.rb +15 -5
- data/lib/authentik/api/models/event_matcher_policy_request.rb +30 -5
- data/lib/authentik/api/models/event_stats.rb +187 -0
- data/lib/authentik/api/models/event_volume.rb +1 -1
- data/lib/authentik/api/models/events_requested_enum.rb +7 -1
- data/lib/authentik/api/models/force_binding_enum.rb +34 -0
- data/lib/authentik/api/models/{resident_key_requirement_enum.rb → format_enum.rb} +6 -7
- data/lib/authentik/api/models/geo_ip_policy.rb +1 -1
- data/lib/authentik/api/models/{detailed_country_field.rb → geo_ip_policy_countries_obj_inner.rb} +22 -26
- data/lib/authentik/api/models/google_chrome_connector.rb +326 -0
- data/lib/authentik/api/models/google_chrome_connector_request.rb +214 -0
- data/lib/authentik/api/models/grant_types_enum.rb +39 -0
- data/lib/authentik/api/models/group_ldap_source_connection.rb +30 -4
- data/lib/authentik/api/models/iframe_logout_challenge.rb +1 -1
- data/lib/authentik/api/models/invitation_send_email_request.rb +213 -0
- data/lib/authentik/api/models/key_type_enum.rb +3 -3
- data/lib/authentik/api/models/lang_enum.rb +131 -0
- data/lib/authentik/api/models/lifecycle_iteration.rb +30 -86
- data/lib/authentik/api/models/logout_url.rb +209 -0
- data/lib/authentik/api/models/model_enum.rb +3 -1
- data/lib/authentik/api/models/native_logout_challenge.rb +68 -37
- data/lib/authentik/api/models/notification_rule.rb +1 -15
- data/lib/authentik/api/models/notification_transport.rb +13 -2
- data/lib/authentik/api/models/notification_transport_request.rb +13 -2
- data/lib/authentik/api/models/o_auth2_provider.rb +12 -1
- data/lib/authentik/api/models/o_auth2_provider_request.rb +12 -1
- data/lib/authentik/api/models/operating_system.rb +0 -17
- data/lib/authentik/api/models/operating_system_request.rb +2 -9
- data/lib/authentik/api/models/paginated_account_lockdown_stage_list.rb +214 -0
- data/lib/authentik/api/models/paginated_apple_independent_secure_enclave_list.rb +214 -0
- data/lib/authentik/api/models/paginated_extra_role_object_permission_list.rb +32 -4
- data/lib/authentik/api/models/paginated_google_chrome_connector_list.rb +214 -0
- data/lib/authentik/api/models/patched_account_lockdown_stage_request.rb +212 -0
- data/lib/authentik/api/models/patched_apple_independent_secure_enclave_request.rb +235 -0
- data/lib/authentik/api/models/patched_application_request.rb +14 -4
- data/lib/authentik/api/models/patched_authenticator_validate_stage_request.rb +51 -4
- data/lib/authentik/api/models/patched_authenticator_web_authn_stage_request.rb +23 -2
- data/lib/authentik/api/models/patched_brand_request.rb +11 -1
- data/lib/authentik/api/models/patched_consent_stage_request.rb +1 -1
- data/lib/authentik/api/models/patched_event_matcher_policy_request.rb +30 -5
- data/lib/authentik/api/models/patched_google_chrome_connector_request.rb +190 -0
- data/lib/authentik/api/models/patched_notification_transport_request.rb +13 -2
- data/lib/authentik/api/models/patched_o_auth2_provider_request.rb +12 -1
- data/lib/authentik/api/models/patched_saml_provider_request.rb +17 -27
- data/lib/authentik/api/models/patched_saml_source_request.rb +11 -1
- data/lib/authentik/api/models/patched_settings_request_flags.rb +31 -27
- data/lib/authentik/api/models/patched_ssf_provider_request.rb +13 -4
- data/lib/authentik/api/models/policy_binding.rb +3 -45
- data/lib/authentik/api/models/prompt_type_enum.rb +4 -1
- data/lib/authentik/api/models/redirect_uri.rb +13 -4
- data/lib/authentik/api/models/redirect_uri_request.rb +13 -4
- data/lib/authentik/api/models/redirect_uri_type_enum.rb +34 -0
- data/lib/authentik/api/models/related_rule.rb +250 -0
- data/lib/authentik/api/models/saml_metadata.rb +0 -2
- data/lib/authentik/api/models/saml_provider.rb +98 -8
- data/lib/authentik/api/models/saml_provider_request.rb +17 -27
- data/lib/authentik/api/models/saml_source.rb +11 -1
- data/lib/authentik/api/models/saml_source_request.rb +11 -1
- data/lib/authentik/api/models/ssf_provider.rb +41 -4
- data/lib/authentik/api/models/ssf_provider_request.rb +13 -4
- data/lib/authentik/api/models/ssf_stream.rb +10 -1
- data/lib/authentik/api/models/ssf_stream_status_enum.rb +36 -0
- data/lib/authentik/api/models/task.rb +1 -1
- data/lib/authentik/api/models/{task_state_enum.rb → task_status_enum.rb} +3 -3
- data/lib/authentik/api/models/{notification_transport_mode_enum.rb → transport_mode_enum.rb} +3 -3
- data/lib/authentik/api/models/usage_enum.rb +33 -0
- data/lib/authentik/api/models/user_account_lockdown_request.rb +144 -0
- data/lib/authentik/api/models/user_ldap_source_connection.rb +30 -4
- data/lib/authentik/api/models/user_password_hash_set_request.rb +168 -0
- data/lib/authentik/api/models/vendor_enum.rb +2 -1
- data/lib/authentik/api/models/web_authn_hint_enum.rb +35 -0
- data/lib/authentik/api/version.rb +1 -1
- data/spec/api/admin_api_spec.rb +2 -2
- data/spec/api/core_api_spec.rb +27 -3
- data/spec/api/crypto_api_spec.rb +1 -1
- data/spec/api/endpoints_api_spec.rb +167 -0
- data/spec/api/events_api_spec.rb +33 -7
- data/spec/api/flows_api_spec.rb +4 -16
- data/spec/api/lifecycle_api_spec.rb +6 -3
- data/spec/api/managed_api_spec.rb +13 -0
- data/spec/api/policies_api_spec.rb +2 -1
- data/spec/api/providers_api_spec.rb +21 -19
- data/spec/api/schema_api_spec.rb +2 -2
- data/spec/api/sources_api_spec.rb +17 -16
- data/spec/api/ssf_api_spec.rb +12 -1
- data/spec/api/stages_api_spec.rb +117 -18
- data/spec/api/tasks_api_spec.rb +2 -2
- data/spec/models/account_lockdown_stage_request_spec.rb +60 -0
- data/spec/models/account_lockdown_stage_spec.rb +96 -0
- data/spec/models/apple_independent_secure_enclave_request_spec.rb +54 -0
- data/spec/models/apple_independent_secure_enclave_spec.rb +54 -0
- data/spec/models/application_request_spec.rb +6 -0
- data/spec/models/application_spec.rb +6 -0
- data/spec/models/authenticator_validate_stage_request_spec.rb +30 -0
- data/spec/models/authenticator_validate_stage_spec.rb +30 -0
- data/spec/models/authenticator_web_authn_stage_request_spec.rb +12 -0
- data/spec/models/authenticator_web_authn_stage_spec.rb +12 -0
- data/spec/models/{flow_import_result_spec.rb → blueprint_import_result_spec.rb} +6 -6
- data/spec/models/brand_request_spec.rb +6 -0
- data/spec/models/brand_spec.rb +6 -0
- data/spec/models/{notification_transport_mode_enum_spec.rb → certificate_key_pair_key_type_enum_spec.rb} +6 -6
- data/spec/models/{consent_stage_mode_enum_spec.rb → consent_mode_enum_spec.rb} +6 -6
- data/spec/models/current_brand_flags_spec.rb +2 -2
- data/spec/models/current_brand_spec.rb +6 -0
- data/spec/models/event_matcher_policy_request_spec.rb +6 -0
- data/spec/models/event_matcher_policy_spec.rb +6 -0
- data/spec/models/event_stats_spec.rb +36 -0
- data/spec/models/force_binding_enum_spec.rb +24 -0
- data/spec/models/format_enum_spec.rb +24 -0
- data/spec/models/{detailed_country_field_spec.rb → geo_ip_policy_countries_obj_inner_spec.rb} +6 -6
- data/spec/models/google_chrome_connector_request_spec.rb +48 -0
- data/spec/models/google_chrome_connector_spec.rb +78 -0
- data/spec/models/grant_types_enum_spec.rb +24 -0
- data/spec/models/group_ldap_source_connection_spec.rb +6 -0
- data/spec/models/invitation_send_email_request_spec.rb +48 -0
- data/spec/models/lang_enum_spec.rb +24 -0
- data/spec/models/lifecycle_iteration_spec.rb +2 -14
- data/spec/models/logout_url_spec.rb +60 -0
- data/spec/models/native_logout_challenge_spec.rb +13 -7
- data/spec/models/notification_transport_request_spec.rb +6 -0
- data/spec/models/notification_transport_spec.rb +6 -0
- data/spec/models/o_auth2_provider_request_spec.rb +6 -0
- data/spec/models/o_auth2_provider_spec.rb +6 -0
- data/spec/models/paginated_account_lockdown_stage_list_spec.rb +42 -0
- data/spec/models/paginated_apple_independent_secure_enclave_list_spec.rb +42 -0
- data/spec/models/paginated_extra_role_object_permission_list_spec.rb +6 -0
- data/spec/models/paginated_google_chrome_connector_list_spec.rb +42 -0
- data/spec/models/patched_account_lockdown_stage_request_spec.rb +60 -0
- data/spec/models/patched_apple_independent_secure_enclave_request_spec.rb +54 -0
- data/spec/models/patched_application_request_spec.rb +6 -0
- data/spec/models/patched_authenticator_validate_stage_request_spec.rb +30 -0
- data/spec/models/patched_authenticator_web_authn_stage_request_spec.rb +12 -0
- data/spec/models/patched_brand_request_spec.rb +6 -0
- data/spec/models/patched_event_matcher_policy_request_spec.rb +6 -0
- data/spec/models/patched_google_chrome_connector_request_spec.rb +48 -0
- data/spec/models/patched_notification_transport_request_spec.rb +6 -0
- data/spec/models/patched_o_auth2_provider_request_spec.rb +6 -0
- data/spec/models/patched_saml_provider_request_spec.rb +7 -1
- data/spec/models/patched_saml_source_request_spec.rb +6 -0
- data/spec/models/patched_settings_request_flags_spec.rb +2 -2
- data/spec/models/patched_ssf_provider_request_spec.rb +6 -0
- data/spec/models/redirect_uri_request_spec.rb +6 -0
- data/spec/models/redirect_uri_spec.rb +6 -0
- data/spec/models/redirect_uri_type_enum_spec.rb +24 -0
- data/spec/models/related_rule_spec.rb +54 -0
- data/spec/models/saml_provider_request_spec.rb +7 -1
- data/spec/models/saml_provider_spec.rb +25 -1
- data/spec/models/saml_source_request_spec.rb +6 -0
- data/spec/models/saml_source_spec.rb +6 -0
- data/spec/models/ssf_provider_request_spec.rb +6 -0
- data/spec/models/ssf_provider_spec.rb +12 -0
- data/spec/models/ssf_stream_spec.rb +6 -0
- data/spec/models/ssf_stream_status_enum_spec.rb +24 -0
- data/spec/models/{task_state_enum_spec.rb → task_status_enum_spec.rb} +6 -6
- data/spec/models/transport_mode_enum_spec.rb +24 -0
- data/spec/models/usage_enum_spec.rb +24 -0
- data/spec/models/user_account_lockdown_request_spec.rb +30 -0
- data/spec/models/user_ldap_source_connection_spec.rb +6 -0
- data/spec/models/user_password_hash_set_request_spec.rb +30 -0
- data/spec/models/web_authn_hint_enum_spec.rb +24 -0
- data/spec/zeitwerk_spec.rb +34 -0
- metadata +113 -32
- data/spec/models/resident_key_requirement_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 PaginatedGoogleChromeConnectorList < 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<GoogleChromeConnector>',
|
|
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::PaginatedGoogleChromeConnectorList` 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::PaginatedGoogleChromeConnectorList`. 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,212 @@
|
|
|
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
|
+
# AccountLockdownStage Serializer
|
|
12
|
+
class PatchedAccountLockdownStageRequest < ApiModelBase
|
|
13
|
+
attr_accessor :name
|
|
14
|
+
|
|
15
|
+
# Deactivate the user account (set is_active to False)
|
|
16
|
+
attr_accessor :deactivate_user
|
|
17
|
+
|
|
18
|
+
# Set an unusable password for the user
|
|
19
|
+
attr_accessor :set_unusable_password
|
|
20
|
+
|
|
21
|
+
# Delete all active sessions for the user
|
|
22
|
+
attr_accessor :delete_sessions
|
|
23
|
+
|
|
24
|
+
# Revoke all tokens for the user (API, app password, recovery, verification, OAuth)
|
|
25
|
+
attr_accessor :revoke_tokens
|
|
26
|
+
|
|
27
|
+
# Flow to redirect users to after self-service lockdown. This flow should not require authentication since the user's session is deleted.
|
|
28
|
+
attr_accessor :self_service_completion_flow
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'name' => :'name',
|
|
34
|
+
:'deactivate_user' => :'deactivate_user',
|
|
35
|
+
:'set_unusable_password' => :'set_unusable_password',
|
|
36
|
+
:'delete_sessions' => :'delete_sessions',
|
|
37
|
+
:'revoke_tokens' => :'revoke_tokens',
|
|
38
|
+
:'self_service_completion_flow' => :'self_service_completion_flow'
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns attribute mapping this model knows about
|
|
43
|
+
def self.acceptable_attribute_map
|
|
44
|
+
attribute_map
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Returns all the JSON keys this model knows about
|
|
48
|
+
def self.acceptable_attributes
|
|
49
|
+
acceptable_attribute_map.values
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Attribute type mapping.
|
|
53
|
+
def self.openapi_types
|
|
54
|
+
{
|
|
55
|
+
:'name' => :'String',
|
|
56
|
+
:'deactivate_user' => :'Boolean',
|
|
57
|
+
:'set_unusable_password' => :'Boolean',
|
|
58
|
+
:'delete_sessions' => :'Boolean',
|
|
59
|
+
:'revoke_tokens' => :'Boolean',
|
|
60
|
+
:'self_service_completion_flow' => :'String'
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# List of attributes with nullable: true
|
|
65
|
+
def self.openapi_nullable
|
|
66
|
+
Set.new([
|
|
67
|
+
:'self_service_completion_flow'
|
|
68
|
+
])
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Initializes the object
|
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::PatchedAccountLockdownStageRequest` initialize method"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::PatchedAccountLockdownStageRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
83
|
+
end
|
|
84
|
+
h[k.to_sym] = v
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'name')
|
|
88
|
+
self.name = attributes[:'name']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'deactivate_user')
|
|
92
|
+
self.deactivate_user = attributes[:'deactivate_user']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'set_unusable_password')
|
|
96
|
+
self.set_unusable_password = attributes[:'set_unusable_password']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'delete_sessions')
|
|
100
|
+
self.delete_sessions = attributes[:'delete_sessions']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'revoke_tokens')
|
|
104
|
+
self.revoke_tokens = attributes[:'revoke_tokens']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'self_service_completion_flow')
|
|
108
|
+
self.self_service_completion_flow = attributes[:'self_service_completion_flow']
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
113
|
+
# @return Array for valid properties with the reasons
|
|
114
|
+
def list_invalid_properties
|
|
115
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
116
|
+
invalid_properties = Array.new
|
|
117
|
+
if !@name.nil? && @name.to_s.length < 1
|
|
118
|
+
invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
invalid_properties
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Check to see if the all the properties in the model are valid
|
|
125
|
+
# @return true if the model is valid
|
|
126
|
+
def valid?
|
|
127
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
128
|
+
return false if !@name.nil? && @name.to_s.length < 1
|
|
129
|
+
true
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Custom attribute writer method with validation
|
|
133
|
+
# @param [Object] name Value to be assigned
|
|
134
|
+
def name=(name)
|
|
135
|
+
if name.nil?
|
|
136
|
+
fail ArgumentError, 'name cannot be nil'
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if name.to_s.length < 1
|
|
140
|
+
fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.'
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
@name = name
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Checks equality by comparing each attribute.
|
|
147
|
+
# @param [Object] Object to be compared
|
|
148
|
+
def ==(o)
|
|
149
|
+
return true if self.equal?(o)
|
|
150
|
+
self.class == o.class &&
|
|
151
|
+
name == o.name &&
|
|
152
|
+
deactivate_user == o.deactivate_user &&
|
|
153
|
+
set_unusable_password == o.set_unusable_password &&
|
|
154
|
+
delete_sessions == o.delete_sessions &&
|
|
155
|
+
revoke_tokens == o.revoke_tokens &&
|
|
156
|
+
self_service_completion_flow == o.self_service_completion_flow
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# @see the `==` method
|
|
160
|
+
# @param [Object] Object to be compared
|
|
161
|
+
def eql?(o)
|
|
162
|
+
self == o
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Calculates hash code according to all attributes.
|
|
166
|
+
# @return [Integer] Hash code
|
|
167
|
+
def hash
|
|
168
|
+
[name, deactivate_user, set_unusable_password, delete_sessions, revoke_tokens, self_service_completion_flow].hash
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Builds the object from hash
|
|
172
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
173
|
+
# @return [Object] Returns the model itself
|
|
174
|
+
def self.build_from_hash(attributes)
|
|
175
|
+
return nil unless attributes.is_a?(Hash)
|
|
176
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
177
|
+
transformed_hash = {}
|
|
178
|
+
openapi_types.each_pair do |key, type|
|
|
179
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
180
|
+
transformed_hash["#{key}"] = nil
|
|
181
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
182
|
+
# check to ensure the input is an array given that the attribute
|
|
183
|
+
# is documented as an array but the input is not
|
|
184
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
185
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
186
|
+
end
|
|
187
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
188
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
new(transformed_hash)
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns the object in the form of hash
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_hash
|
|
197
|
+
hash = {}
|
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
199
|
+
value = self.send(attr)
|
|
200
|
+
if value.nil?
|
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
hash[param] = _to_hash(value)
|
|
206
|
+
end
|
|
207
|
+
hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
end
|
|
@@ -0,0 +1,235 @@
|
|
|
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 PatchedAppleIndependentSecureEnclaveRequest < ApiModelBase
|
|
12
|
+
attr_accessor :uuid
|
|
13
|
+
|
|
14
|
+
# The user that this device belongs to.
|
|
15
|
+
attr_accessor :user
|
|
16
|
+
|
|
17
|
+
attr_accessor :apple_secure_enclave_key
|
|
18
|
+
|
|
19
|
+
attr_accessor :apple_enclave_key_id
|
|
20
|
+
|
|
21
|
+
attr_accessor :device_type
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'uuid' => :'uuid',
|
|
27
|
+
:'user' => :'user',
|
|
28
|
+
:'apple_secure_enclave_key' => :'apple_secure_enclave_key',
|
|
29
|
+
:'apple_enclave_key_id' => :'apple_enclave_key_id',
|
|
30
|
+
:'device_type' => :'device_type'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'uuid' => :'String',
|
|
48
|
+
:'user' => :'Integer',
|
|
49
|
+
:'apple_secure_enclave_key' => :'String',
|
|
50
|
+
:'apple_enclave_key_id' => :'String',
|
|
51
|
+
:'device_type' => :'String'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::PatchedAppleIndependentSecureEnclaveRequest` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::PatchedAppleIndependentSecureEnclaveRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'uuid')
|
|
78
|
+
self.uuid = attributes[:'uuid']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'user')
|
|
82
|
+
self.user = attributes[:'user']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'apple_secure_enclave_key')
|
|
86
|
+
self.apple_secure_enclave_key = attributes[:'apple_secure_enclave_key']
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'apple_enclave_key_id')
|
|
90
|
+
self.apple_enclave_key_id = attributes[:'apple_enclave_key_id']
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'device_type')
|
|
94
|
+
self.device_type = attributes[:'device_type']
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
99
|
+
# @return Array for valid properties with the reasons
|
|
100
|
+
def list_invalid_properties
|
|
101
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
102
|
+
invalid_properties = Array.new
|
|
103
|
+
if !@apple_secure_enclave_key.nil? && @apple_secure_enclave_key.to_s.length < 1
|
|
104
|
+
invalid_properties.push('invalid value for "apple_secure_enclave_key", the character length must be greater than or equal to 1.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if !@apple_enclave_key_id.nil? && @apple_enclave_key_id.to_s.length < 1
|
|
108
|
+
invalid_properties.push('invalid value for "apple_enclave_key_id", the character length must be greater than or equal to 1.')
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if !@device_type.nil? && @device_type.to_s.length < 1
|
|
112
|
+
invalid_properties.push('invalid value for "device_type", the character length must be greater than or equal to 1.')
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
invalid_properties
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Check to see if the all the properties in the model are valid
|
|
119
|
+
# @return true if the model is valid
|
|
120
|
+
def valid?
|
|
121
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
122
|
+
return false if !@apple_secure_enclave_key.nil? && @apple_secure_enclave_key.to_s.length < 1
|
|
123
|
+
return false if !@apple_enclave_key_id.nil? && @apple_enclave_key_id.to_s.length < 1
|
|
124
|
+
return false if !@device_type.nil? && @device_type.to_s.length < 1
|
|
125
|
+
true
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Custom attribute writer method with validation
|
|
129
|
+
# @param [Object] apple_secure_enclave_key Value to be assigned
|
|
130
|
+
def apple_secure_enclave_key=(apple_secure_enclave_key)
|
|
131
|
+
if apple_secure_enclave_key.nil?
|
|
132
|
+
fail ArgumentError, 'apple_secure_enclave_key cannot be nil'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if apple_secure_enclave_key.to_s.length < 1
|
|
136
|
+
fail ArgumentError, 'invalid value for "apple_secure_enclave_key", the character length must be greater than or equal to 1.'
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
@apple_secure_enclave_key = apple_secure_enclave_key
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Custom attribute writer method with validation
|
|
143
|
+
# @param [Object] apple_enclave_key_id Value to be assigned
|
|
144
|
+
def apple_enclave_key_id=(apple_enclave_key_id)
|
|
145
|
+
if apple_enclave_key_id.nil?
|
|
146
|
+
fail ArgumentError, 'apple_enclave_key_id cannot be nil'
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if apple_enclave_key_id.to_s.length < 1
|
|
150
|
+
fail ArgumentError, 'invalid value for "apple_enclave_key_id", the character length must be greater than or equal to 1.'
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
@apple_enclave_key_id = apple_enclave_key_id
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Custom attribute writer method with validation
|
|
157
|
+
# @param [Object] device_type Value to be assigned
|
|
158
|
+
def device_type=(device_type)
|
|
159
|
+
if device_type.nil?
|
|
160
|
+
fail ArgumentError, 'device_type cannot be nil'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if device_type.to_s.length < 1
|
|
164
|
+
fail ArgumentError, 'invalid value for "device_type", the character length must be greater than or equal to 1.'
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
@device_type = device_type
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Checks equality by comparing each attribute.
|
|
171
|
+
# @param [Object] Object to be compared
|
|
172
|
+
def ==(o)
|
|
173
|
+
return true if self.equal?(o)
|
|
174
|
+
self.class == o.class &&
|
|
175
|
+
uuid == o.uuid &&
|
|
176
|
+
user == o.user &&
|
|
177
|
+
apple_secure_enclave_key == o.apple_secure_enclave_key &&
|
|
178
|
+
apple_enclave_key_id == o.apple_enclave_key_id &&
|
|
179
|
+
device_type == o.device_type
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# @see the `==` method
|
|
183
|
+
# @param [Object] Object to be compared
|
|
184
|
+
def eql?(o)
|
|
185
|
+
self == o
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Calculates hash code according to all attributes.
|
|
189
|
+
# @return [Integer] Hash code
|
|
190
|
+
def hash
|
|
191
|
+
[uuid, user, apple_secure_enclave_key, apple_enclave_key_id, device_type].hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Builds the object from hash
|
|
195
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
196
|
+
# @return [Object] Returns the model itself
|
|
197
|
+
def self.build_from_hash(attributes)
|
|
198
|
+
return nil unless attributes.is_a?(Hash)
|
|
199
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
200
|
+
transformed_hash = {}
|
|
201
|
+
openapi_types.each_pair do |key, type|
|
|
202
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
203
|
+
transformed_hash["#{key}"] = nil
|
|
204
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
205
|
+
# check to ensure the input is an array given that the attribute
|
|
206
|
+
# is documented as an array but the input is not
|
|
207
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
208
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
209
|
+
end
|
|
210
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
211
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
new(transformed_hash)
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Returns the object in the form of hash
|
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
|
219
|
+
def to_hash
|
|
220
|
+
hash = {}
|
|
221
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
222
|
+
value = self.send(attr)
|
|
223
|
+
if value.nil?
|
|
224
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
225
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
hash[param] = _to_hash(value)
|
|
229
|
+
end
|
|
230
|
+
hash
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
end
|