Class: Authentik::Api::PatchedBrandRequest
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Authentik::Api::PatchedBrandRequest
- Defined in:
- lib/authentik/api/models/patched_brand_request.rb
Overview
Brand Serializer
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#branding_custom_css ⇒ Object
Returns the value of attribute branding_custom_css.
-
#branding_default_flow_background ⇒ Object
Returns the value of attribute branding_default_flow_background.
-
#branding_favicon ⇒ Object
Returns the value of attribute branding_favicon.
-
#branding_logo ⇒ Object
Returns the value of attribute branding_logo.
-
#branding_map_tiles ⇒ Object
URL template for the vector tile source used by the events map.
-
#branding_title ⇒ Object
Returns the value of attribute branding_title.
-
#client_certificates ⇒ Object
Certificates used for client authentication.
-
#default ⇒ Object
Returns the value of attribute default.
-
#default_application ⇒ Object
When set, external users will be redirected to this application after authenticating.
-
#domain ⇒ Object
Domain that activates this brand.
-
#flow_authentication ⇒ Object
Returns the value of attribute flow_authentication.
-
#flow_device_code ⇒ Object
Returns the value of attribute flow_device_code.
-
#flow_invalidation ⇒ Object
Returns the value of attribute flow_invalidation.
-
#flow_lockdown ⇒ Object
Returns the value of attribute flow_lockdown.
-
#flow_recovery ⇒ Object
Returns the value of attribute flow_recovery.
-
#flow_request ⇒ Object
Returns the value of attribute flow_request.
-
#flow_unenrollment ⇒ Object
Returns the value of attribute flow_unenrollment.
-
#flow_user_settings ⇒ Object
Returns the value of attribute flow_user_settings.
-
#flow_user_switch ⇒ Object
Returns the value of attribute flow_user_switch.
-
#web_certificate ⇒ Object
Web Certificate used by the authentik Core webserver.
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 = {}) ⇒ PatchedBrandRequest
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 = {}) ⇒ PatchedBrandRequest
Initializes the object
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 200 201 202 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 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 143 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::PatchedBrandRequest` 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::PatchedBrandRequest`. 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?(:'domain') self.domain = attributes[:'domain'] end if attributes.key?(:'default') self.default = attributes[:'default'] end if attributes.key?(:'branding_title') self.branding_title = attributes[:'branding_title'] end if attributes.key?(:'branding_logo') self.branding_logo = attributes[:'branding_logo'] end if attributes.key?(:'branding_favicon') self.branding_favicon = attributes[:'branding_favicon'] end if attributes.key?(:'branding_custom_css') self.branding_custom_css = attributes[:'branding_custom_css'] end if attributes.key?(:'branding_default_flow_background') self.branding_default_flow_background = attributes[:'branding_default_flow_background'] end if attributes.key?(:'branding_map_tiles') self.branding_map_tiles = attributes[:'branding_map_tiles'] end if attributes.key?(:'flow_authentication') self.flow_authentication = attributes[:'flow_authentication'] end if attributes.key?(:'flow_user_switch') self.flow_user_switch = attributes[:'flow_user_switch'] end if attributes.key?(:'flow_invalidation') self.flow_invalidation = attributes[:'flow_invalidation'] end if attributes.key?(:'flow_recovery') self.flow_recovery = attributes[:'flow_recovery'] end if attributes.key?(:'flow_unenrollment') self.flow_unenrollment = attributes[:'flow_unenrollment'] end if attributes.key?(:'flow_user_settings') self.flow_user_settings = attributes[:'flow_user_settings'] end if attributes.key?(:'flow_device_code') self.flow_device_code = attributes[:'flow_device_code'] end if attributes.key?(:'flow_lockdown') self.flow_lockdown = attributes[:'flow_lockdown'] end if attributes.key?(:'flow_request') self.flow_request = attributes[:'flow_request'] end if attributes.key?(:'default_application') self.default_application = attributes[:'default_application'] end if attributes.key?(:'web_certificate') self.web_certificate = attributes[:'web_certificate'] end if attributes.key?(:'client_certificates') if (value = attributes[:'client_certificates']).is_a?(Array) self.client_certificates = value end end if attributes.key?(:'attributes') if (value = attributes[:'attributes']).is_a?(Hash) self.attributes = value end end end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
58 59 60 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 58 def attributes @attributes end |
#branding_custom_css ⇒ Object
Returns the value of attribute branding_custom_css.
24 25 26 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 24 def branding_custom_css @branding_custom_css end |
#branding_default_flow_background ⇒ Object
Returns the value of attribute branding_default_flow_background.
26 27 28 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 26 def branding_default_flow_background @branding_default_flow_background end |
#branding_favicon ⇒ Object
Returns the value of attribute branding_favicon.
22 23 24 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 22 def branding_favicon @branding_favicon end |
#branding_logo ⇒ Object
Returns the value of attribute branding_logo.
20 21 22 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 20 def branding_logo @branding_logo end |
#branding_map_tiles ⇒ Object
URL template for the vector tile source used by the events map. Supports XYZ templates with z, x and y placeholders, or pmtiles:// archive URLs. When empty, the frontend uses the bundled hexworld basemap. This value is part of the brand information served to unauthenticated clients; do not embed API keys or other credentials in it.
29 30 31 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 29 def branding_map_tiles @branding_map_tiles end |
#branding_title ⇒ Object
Returns the value of attribute branding_title.
18 19 20 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 18 def branding_title @branding_title end |
#client_certificates ⇒ Object
Certificates used for client authentication.
56 57 58 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 56 def client_certificates @client_certificates end |
#default ⇒ Object
Returns the value of attribute default.
16 17 18 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 16 def default @default end |
#default_application ⇒ Object
When set, external users will be redirected to this application after authenticating.
50 51 52 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 50 def default_application @default_application end |
#domain ⇒ Object
Domain that activates this brand. Can be a superset, i.e. a.b for aa.b and ba.b
14 15 16 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 14 def domain @domain end |
#flow_authentication ⇒ Object
Returns the value of attribute flow_authentication.
31 32 33 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 31 def flow_authentication @flow_authentication end |
#flow_device_code ⇒ Object
Returns the value of attribute flow_device_code.
43 44 45 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 43 def flow_device_code @flow_device_code end |
#flow_invalidation ⇒ Object
Returns the value of attribute flow_invalidation.
35 36 37 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 35 def flow_invalidation @flow_invalidation end |
#flow_lockdown ⇒ Object
Returns the value of attribute flow_lockdown.
45 46 47 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 45 def flow_lockdown @flow_lockdown end |
#flow_recovery ⇒ Object
Returns the value of attribute flow_recovery.
37 38 39 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 37 def flow_recovery @flow_recovery end |
#flow_request ⇒ Object
Returns the value of attribute flow_request.
47 48 49 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 47 def flow_request @flow_request end |
#flow_unenrollment ⇒ Object
Returns the value of attribute flow_unenrollment.
39 40 41 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 39 def flow_unenrollment @flow_unenrollment end |
#flow_user_settings ⇒ Object
Returns the value of attribute flow_user_settings.
41 42 43 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 41 def flow_user_settings @flow_user_settings end |
#flow_user_switch ⇒ Object
Returns the value of attribute flow_user_switch.
33 34 35 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 33 def flow_user_switch @flow_user_switch end |
#web_certificate ⇒ Object
Web Certificate used by the authentik Core webserver.
53 54 55 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 53 def web_certificate @web_certificate end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
88 89 90 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 88 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
93 94 95 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 93 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 61 def self.attribute_map { :'domain' => :'domain', :'default' => :'default', :'branding_title' => :'branding_title', :'branding_logo' => :'branding_logo', :'branding_favicon' => :'branding_favicon', :'branding_custom_css' => :'branding_custom_css', :'branding_default_flow_background' => :'branding_default_flow_background', :'branding_map_tiles' => :'branding_map_tiles', :'flow_authentication' => :'flow_authentication', :'flow_user_switch' => :'flow_user_switch', :'flow_invalidation' => :'flow_invalidation', :'flow_recovery' => :'flow_recovery', :'flow_unenrollment' => :'flow_unenrollment', :'flow_user_settings' => :'flow_user_settings', :'flow_device_code' => :'flow_device_code', :'flow_lockdown' => :'flow_lockdown', :'flow_request' => :'flow_request', :'default_application' => :'default_application', :'web_certificate' => :'web_certificate', :'client_certificates' => :'client_certificates', :'attributes' => :'attributes' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 399 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
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 125 def self.openapi_nullable Set.new([ :'flow_authentication', :'flow_user_switch', :'flow_invalidation', :'flow_recovery', :'flow_unenrollment', :'flow_user_settings', :'flow_device_code', :'flow_lockdown', :'flow_request', :'default_application', :'web_certificate', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 98 def self.openapi_types { :'domain' => :'String', :'default' => :'Boolean', :'branding_title' => :'String', :'branding_logo' => :'String', :'branding_favicon' => :'String', :'branding_custom_css' => :'String', :'branding_default_flow_background' => :'String', :'branding_map_tiles' => :'String', :'flow_authentication' => :'String', :'flow_user_switch' => :'String', :'flow_invalidation' => :'String', :'flow_recovery' => :'String', :'flow_unenrollment' => :'String', :'flow_user_settings' => :'String', :'flow_device_code' => :'String', :'flow_lockdown' => :'String', :'flow_request' => :'String', :'default_application' => :'String', :'web_certificate' => :'String', :'client_certificates' => :'Array<String>', :'attributes' => :'Hash<String, Object>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 358 def ==(o) return true if self.equal?(o) self.class == o.class && domain == o.domain && default == o.default && branding_title == o.branding_title && branding_logo == o.branding_logo && branding_favicon == o.branding_favicon && branding_custom_css == o.branding_custom_css && branding_default_flow_background == o.branding_default_flow_background && branding_map_tiles == o.branding_map_tiles && flow_authentication == o.flow_authentication && flow_user_switch == o.flow_user_switch && flow_invalidation == o.flow_invalidation && flow_recovery == o.flow_recovery && flow_unenrollment == o.flow_unenrollment && flow_user_settings == o.flow_user_settings && flow_device_code == o.flow_device_code && flow_lockdown == o.flow_lockdown && flow_request == o.flow_request && default_application == o.default_application && web_certificate == o.web_certificate && client_certificates == o.client_certificates && attributes == o.attributes end |
#eql?(o) ⇒ Boolean
386 387 388 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 386 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
392 393 394 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 392 def hash [domain, default, branding_title, branding_logo, branding_favicon, branding_custom_css, branding_default_flow_background, branding_map_tiles, flow_authentication, flow_user_switch, flow_invalidation, flow_recovery, flow_unenrollment, flow_user_settings, flow_device_code, flow_lockdown, flow_request, default_application, web_certificate, client_certificates, attributes].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 248 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@domain.nil? && @domain.to_s.length < 1 invalid_properties.push('invalid value for "domain", the character length must be greater than or equal to 1.') end if !@branding_title.nil? && @branding_title.to_s.length < 1 invalid_properties.push('invalid value for "branding_title", the character length must be greater than or equal to 1.') end if !@branding_logo.nil? && @branding_logo.to_s.length < 1 invalid_properties.push('invalid value for "branding_logo", the character length must be greater than or equal to 1.') end if !@branding_favicon.nil? && @branding_favicon.to_s.length < 1 invalid_properties.push('invalid value for "branding_favicon", the character length must be greater than or equal to 1.') end if !@branding_default_flow_background.nil? && @branding_default_flow_background.to_s.length < 1 invalid_properties.push('invalid value for "branding_default_flow_background", the character length must be greater than or equal to 1.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
421 422 423 424 425 426 427 428 429 430 431 432 433 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 421 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
276 277 278 279 280 281 282 283 284 |
# File 'lib/authentik/api/models/patched_brand_request.rb', line 276 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@domain.nil? && @domain.to_s.length < 1 return false if !@branding_title.nil? && @branding_title.to_s.length < 1 return false if !@branding_logo.nil? && @branding_logo.to_s.length < 1 return false if !@branding_favicon.nil? && @branding_favicon.to_s.length < 1 return false if !@branding_default_flow_background.nil? && @branding_default_flow_background.to_s.length < 1 true end |