Class: Authentik::Api::PatchedOAuth2DynamicClientRegistrationRequest
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Authentik::Api::PatchedOAuth2DynamicClientRegistrationRequest
- Defined in:
- lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb
Overview
Serializer for OAuth2DynamicClientRegistration
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#access_token_validity ⇒ Object
Maximum access token validity for registered clients (Format: hours=1;minutes=2;seconds=3).
-
#allowed_grant_types ⇒ Object
If empty, all grant types are allowed.
-
#default_application_group ⇒ Object
Group to assign to automatically created applications.
-
#override_authorization_flow ⇒ Object
Authorization flow applied to dynamically registered clients.
-
#override_invalidation_flow ⇒ Object
Returns the value of attribute override_invalidation_flow.
-
#override_property_mappings ⇒ Object
Scope mappings applied to dynamically registered clients.
-
#policy_engine_mode ⇒ Object
Returns the value of attribute policy_engine_mode.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#refresh_token_validity ⇒ Object
Maximum refresh token validity for registered clients (Format: hours=1;minutes=2;seconds=3).
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 = {}) ⇒ PatchedOAuth2DynamicClientRegistrationRequest
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 = {}) ⇒ PatchedOAuth2DynamicClientRegistrationRequest
Initializes the object
109 110 111 112 113 114 115 116 117 118 119 120 121 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 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 109 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::PatchedOAuth2DynamicClientRegistrationRequest` 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::PatchedOAuth2DynamicClientRegistrationRequest`. 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?(:'provider') self.provider = attributes[:'provider'] end if attributes.key?(:'default_application_group') self.default_application_group = attributes[:'default_application_group'] end if attributes.key?(:'override_authorization_flow') self. = attributes[:'override_authorization_flow'] end if attributes.key?(:'override_invalidation_flow') self.override_invalidation_flow = attributes[:'override_invalidation_flow'] end if attributes.key?(:'override_property_mappings') if (value = attributes[:'override_property_mappings']).is_a?(Array) self.override_property_mappings = value end end if attributes.key?(:'access_token_validity') self.access_token_validity = attributes[:'access_token_validity'] end if attributes.key?(:'refresh_token_validity') self.refresh_token_validity = attributes[:'refresh_token_validity'] end if attributes.key?(:'allowed_grant_types') if (value = attributes[:'allowed_grant_types']).is_a?(Array) self.allowed_grant_types = value end end if attributes.key?(:'policy_engine_mode') self.policy_engine_mode = attributes[:'policy_engine_mode'] end end |
Instance Attribute Details
#access_token_validity ⇒ Object
Maximum access token validity for registered clients (Format: hours=1;minutes=2;seconds=3).
27 28 29 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 27 def access_token_validity @access_token_validity end |
#allowed_grant_types ⇒ Object
If empty, all grant types are allowed.
33 34 35 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 33 def allowed_grant_types @allowed_grant_types end |
#default_application_group ⇒ Object
Group to assign to automatically created applications.
16 17 18 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 16 def default_application_group @default_application_group end |
#override_authorization_flow ⇒ Object
Authorization flow applied to dynamically registered clients.
19 20 21 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 19 def @override_authorization_flow end |
#override_invalidation_flow ⇒ Object
Returns the value of attribute override_invalidation_flow.
21 22 23 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 21 def override_invalidation_flow @override_invalidation_flow end |
#override_property_mappings ⇒ Object
Scope mappings applied to dynamically registered clients.
24 25 26 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 24 def override_property_mappings @override_property_mappings end |
#policy_engine_mode ⇒ Object
Returns the value of attribute policy_engine_mode.
35 36 37 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 35 def policy_engine_mode @policy_engine_mode end |
#provider ⇒ Object
Returns the value of attribute provider.
13 14 15 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 13 def provider @provider end |
#refresh_token_validity ⇒ Object
Maximum refresh token validity for registered clients (Format: hours=1;minutes=2;seconds=3).
30 31 32 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 30 def refresh_token_validity @refresh_token_validity end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
75 76 77 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 75 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
80 81 82 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 80 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 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 60 def self.attribute_map { :'provider' => :'provider', :'default_application_group' => :'default_application_group', :'override_authorization_flow' => :'override_authorization_flow', :'override_invalidation_flow' => :'override_invalidation_flow', :'override_property_mappings' => :'override_property_mappings', :'access_token_validity' => :'access_token_validity', :'refresh_token_validity' => :'refresh_token_validity', :'allowed_grant_types' => :'allowed_grant_types', :'policy_engine_mode' => :'policy_engine_mode' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 248 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
100 101 102 103 104 105 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 100 def self.openapi_nullable Set.new([ :'override_authorization_flow', :'override_invalidation_flow', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 85 def self.openapi_types { :'provider' => :'Integer', :'default_application_group' => :'String', :'override_authorization_flow' => :'String', :'override_invalidation_flow' => :'String', :'override_property_mappings' => :'Array<String>', :'access_token_validity' => :'String', :'refresh_token_validity' => :'String', :'allowed_grant_types' => :'Array<GrantTypeEnum>', :'policy_engine_mode' => :'PolicyEngineMode' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 219 def ==(o) return true if self.equal?(o) self.class == o.class && provider == o.provider && default_application_group == o.default_application_group && == o. && override_invalidation_flow == o.override_invalidation_flow && override_property_mappings == o.override_property_mappings && access_token_validity == o.access_token_validity && refresh_token_validity == o.refresh_token_validity && allowed_grant_types == o.allowed_grant_types && policy_engine_mode == o.policy_engine_mode end |
#eql?(o) ⇒ Boolean
235 236 237 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 235 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
241 242 243 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 241 def hash [provider, default_application_group, , override_invalidation_flow, override_property_mappings, access_token_validity, refresh_token_validity, allowed_grant_types, policy_engine_mode].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 166 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@access_token_validity.nil? && @access_token_validity.to_s.length < 1 invalid_properties.push('invalid value for "access_token_validity", the character length must be greater than or equal to 1.') end if !@refresh_token_validity.nil? && @refresh_token_validity.to_s.length < 1 invalid_properties.push('invalid value for "refresh_token_validity", 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
270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 270 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
182 183 184 185 186 187 |
# File 'lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb', line 182 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@access_token_validity.nil? && @access_token_validity.to_s.length < 1 return false if !@refresh_token_validity.nil? && @refresh_token_validity.to_s.length < 1 true end |