Class: Authentik::Api::PatchedSettingsRequest
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Authentik::Api::PatchedSettingsRequest
- Defined in:
- lib/authentik/api/models/patched_settings_request.rb
Overview
Settings Serializer
Instance Attribute Summary collapse
-
#avatars ⇒ Object
Configure how authentik should show avatars for users.
-
#default_token_duration ⇒ Object
Default token duration.
-
#default_token_length ⇒ Object
Default token length.
-
#default_user_change_email ⇒ Object
Enable the ability for users to change their email address.
-
#default_user_change_name ⇒ Object
Enable the ability for users to change their name.
-
#default_user_change_username ⇒ Object
Enable the ability for users to change their username.
-
#event_retention ⇒ Object
Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2).
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#footer_links ⇒ Object
Returns the value of attribute footer_links.
-
#gdpr_compliance ⇒ Object
When enabled, all the events caused by a user will be deleted upon the user’s deletion.
-
#impersonation ⇒ Object
Globally enable/disable impersonation.
-
#impersonation_require_reason ⇒ Object
Require administrators to provide a reason for impersonating a user.
-
#pagination_default_page_size ⇒ Object
Default page size for API responses, if no size was requested.
-
#pagination_max_page_size ⇒ Object
Maximum page size.
-
#reputation_lower_limit ⇒ Object
Reputation cannot decrease lower than this value.
-
#reputation_upper_limit ⇒ Object
Reputation cannot increase higher than this value.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ PatchedSettingsRequest
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ PatchedSettingsRequest
Initializes the object
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 122 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::PatchedSettingsRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::PatchedSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'avatars') self.avatars = attributes[:'avatars'] end if attributes.key?(:'default_user_change_name') self.default_user_change_name = attributes[:'default_user_change_name'] end if attributes.key?(:'default_user_change_email') self.default_user_change_email = attributes[:'default_user_change_email'] end if attributes.key?(:'default_user_change_username') self.default_user_change_username = attributes[:'default_user_change_username'] end if attributes.key?(:'event_retention') self.event_retention = attributes[:'event_retention'] end if attributes.key?(:'reputation_lower_limit') self.reputation_lower_limit = attributes[:'reputation_lower_limit'] end if attributes.key?(:'reputation_upper_limit') self.reputation_upper_limit = attributes[:'reputation_upper_limit'] end if attributes.key?(:'footer_links') self. = attributes[:'footer_links'] end if attributes.key?(:'gdpr_compliance') self.gdpr_compliance = attributes[:'gdpr_compliance'] end if attributes.key?(:'impersonation') self.impersonation = attributes[:'impersonation'] end if attributes.key?(:'impersonation_require_reason') self.impersonation_require_reason = attributes[:'impersonation_require_reason'] end if attributes.key?(:'default_token_duration') self.default_token_duration = attributes[:'default_token_duration'] end if attributes.key?(:'default_token_length') self.default_token_length = attributes[:'default_token_length'] end if attributes.key?(:'pagination_default_page_size') self.pagination_default_page_size = attributes[:'pagination_default_page_size'] end if attributes.key?(:'pagination_max_page_size') self.pagination_max_page_size = attributes[:'pagination_max_page_size'] end if attributes.key?(:'flags') self.flags = attributes[:'flags'] end end |
Instance Attribute Details
#avatars ⇒ Object
Configure how authentik should show avatars for users.
14 15 16 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 14 def avatars @avatars end |
#default_token_duration ⇒ Object
Default token duration
46 47 48 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 46 def default_token_duration @default_token_duration end |
#default_token_length ⇒ Object
Default token length
49 50 51 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 49 def default_token_length @default_token_length end |
#default_user_change_email ⇒ Object
Enable the ability for users to change their email address.
20 21 22 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 20 def default_user_change_email @default_user_change_email end |
#default_user_change_name ⇒ Object
Enable the ability for users to change their name.
17 18 19 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 17 def default_user_change_name @default_user_change_name end |
#default_user_change_username ⇒ Object
Enable the ability for users to change their username.
23 24 25 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 23 def default_user_change_username @default_user_change_username end |
#event_retention ⇒ Object
Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2).
26 27 28 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 26 def event_retention @event_retention end |
#flags ⇒ Object
Returns the value of attribute flags.
57 58 59 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 57 def flags @flags end |
#footer_links ⇒ Object
Returns the value of attribute footer_links.
34 35 36 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 34 def @footer_links end |
#gdpr_compliance ⇒ Object
When enabled, all the events caused by a user will be deleted upon the user’s deletion.
37 38 39 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 37 def gdpr_compliance @gdpr_compliance end |
#impersonation ⇒ Object
Globally enable/disable impersonation.
40 41 42 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 40 def impersonation @impersonation end |
#impersonation_require_reason ⇒ Object
Require administrators to provide a reason for impersonating a user.
43 44 45 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 43 def impersonation_require_reason @impersonation_require_reason end |
#pagination_default_page_size ⇒ Object
Default page size for API responses, if no size was requested.
52 53 54 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 52 def pagination_default_page_size @pagination_default_page_size end |
#pagination_max_page_size ⇒ Object
Maximum page size
55 56 57 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 55 def pagination_max_page_size @pagination_max_page_size end |
#reputation_lower_limit ⇒ Object
Reputation cannot decrease lower than this value. Zero or negative.
29 30 31 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 29 def reputation_lower_limit @reputation_lower_limit end |
#reputation_upper_limit ⇒ Object
Reputation cannot increase higher than this value. Zero or positive.
32 33 34 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 32 def reputation_upper_limit @reputation_upper_limit end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
82 83 84 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 82 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
87 88 89 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 87 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 60 def self.attribute_map { :'avatars' => :'avatars', :'default_user_change_name' => :'default_user_change_name', :'default_user_change_email' => :'default_user_change_email', :'default_user_change_username' => :'default_user_change_username', :'event_retention' => :'event_retention', :'reputation_lower_limit' => :'reputation_lower_limit', :'reputation_upper_limit' => :'reputation_upper_limit', :'footer_links' => :'footer_links', :'gdpr_compliance' => :'gdpr_compliance', :'impersonation' => :'impersonation', :'impersonation_require_reason' => :'impersonation_require_reason', :'default_token_duration' => :'default_token_duration', :'default_token_length' => :'default_token_length', :'pagination_default_page_size' => :'pagination_default_page_size', :'pagination_max_page_size' => :'pagination_max_page_size', :'flags' => :'flags' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 451 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
114 115 116 117 118 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 114 def self.openapi_nullable Set.new([ :'footer_links', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 92 def self.openapi_types { :'avatars' => :'String', :'default_user_change_name' => :'Boolean', :'default_user_change_email' => :'Boolean', :'default_user_change_username' => :'Boolean', :'event_retention' => :'String', :'reputation_lower_limit' => :'Integer', :'reputation_upper_limit' => :'Integer', :'footer_links' => :'Object', :'gdpr_compliance' => :'Boolean', :'impersonation' => :'Boolean', :'impersonation_require_reason' => :'Boolean', :'default_token_duration' => :'String', :'default_token_length' => :'Integer', :'pagination_default_page_size' => :'Integer', :'pagination_max_page_size' => :'Integer', :'flags' => :'PatchedSettingsRequestFlags' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 415 def ==(o) return true if self.equal?(o) self.class == o.class && avatars == o.avatars && default_user_change_name == o.default_user_change_name && default_user_change_email == o.default_user_change_email && default_user_change_username == o.default_user_change_username && event_retention == o.event_retention && reputation_lower_limit == o.reputation_lower_limit && reputation_upper_limit == o.reputation_upper_limit && == o. && gdpr_compliance == o.gdpr_compliance && impersonation == o.impersonation && impersonation_require_reason == o.impersonation_require_reason && default_token_duration == o.default_token_duration && default_token_length == o.default_token_length && pagination_default_page_size == o.pagination_default_page_size && pagination_max_page_size == o.pagination_max_page_size && flags == o.flags end |
#eql?(o) ⇒ Boolean
438 439 440 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 438 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
444 445 446 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 444 def hash [avatars, default_user_change_name, default_user_change_email, default_user_change_username, event_retention, reputation_lower_limit, reputation_upper_limit, , gdpr_compliance, impersonation, impersonation_require_reason, default_token_duration, default_token_length, pagination_default_page_size, pagination_max_page_size, flags].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 203 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@avatars.nil? && @avatars.to_s.length < 1 invalid_properties.push('invalid value for "avatars", the character length must be greater than or equal to 1.') end if !@event_retention.nil? && @event_retention.to_s.length < 1 invalid_properties.push('invalid value for "event_retention", the character length must be greater than or equal to 1.') end if !@reputation_lower_limit.nil? && @reputation_lower_limit > 0 invalid_properties.push('invalid value for "reputation_lower_limit", must be smaller than or equal to 0.') end if !@reputation_lower_limit.nil? && @reputation_lower_limit < -2147483648 invalid_properties.push('invalid value for "reputation_lower_limit", must be greater than or equal to -2147483648.') end if !@reputation_upper_limit.nil? && @reputation_upper_limit > 2147483647 invalid_properties.push('invalid value for "reputation_upper_limit", must be smaller than or equal to 2147483647.') end if !@reputation_upper_limit.nil? && @reputation_upper_limit < 0 invalid_properties.push('invalid value for "reputation_upper_limit", must be greater than or equal to 0.') end if !@default_token_duration.nil? && @default_token_duration.to_s.length < 1 invalid_properties.push('invalid value for "default_token_duration", the character length must be greater than or equal to 1.') end if !@default_token_length.nil? && @default_token_length > 2147483647 invalid_properties.push('invalid value for "default_token_length", must be smaller than or equal to 2147483647.') end if !@default_token_length.nil? && @default_token_length < 1 invalid_properties.push('invalid value for "default_token_length", must be greater than or equal to 1.') end if !@pagination_default_page_size.nil? && @pagination_default_page_size > 2147483647 invalid_properties.push('invalid value for "pagination_default_page_size", must be smaller than or equal to 2147483647.') end if !@pagination_default_page_size.nil? && @pagination_default_page_size < 0 invalid_properties.push('invalid value for "pagination_default_page_size", must be greater than or equal to 0.') end if !@pagination_max_page_size.nil? && @pagination_max_page_size > 2147483647 invalid_properties.push('invalid value for "pagination_max_page_size", must be smaller than or equal to 2147483647.') end if !@pagination_max_page_size.nil? && @pagination_max_page_size < 0 invalid_properties.push('invalid value for "pagination_max_page_size", must be greater than or equal to 0.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 473 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/authentik/api/models/patched_settings_request.rb', line 263 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@avatars.nil? && @avatars.to_s.length < 1 return false if !@event_retention.nil? && @event_retention.to_s.length < 1 return false if !@reputation_lower_limit.nil? && @reputation_lower_limit > 0 return false if !@reputation_lower_limit.nil? && @reputation_lower_limit < -2147483648 return false if !@reputation_upper_limit.nil? && @reputation_upper_limit > 2147483647 return false if !@reputation_upper_limit.nil? && @reputation_upper_limit < 0 return false if !@default_token_duration.nil? && @default_token_duration.to_s.length < 1 return false if !@default_token_length.nil? && @default_token_length > 2147483647 return false if !@default_token_length.nil? && @default_token_length < 1 return false if !@pagination_default_page_size.nil? && @pagination_default_page_size > 2147483647 return false if !@pagination_default_page_size.nil? && @pagination_default_page_size < 0 return false if !@pagination_max_page_size.nil? && @pagination_max_page_size > 2147483647 return false if !@pagination_max_page_size.nil? && @pagination_max_page_size < 0 true end |