Class: NewStoreApi::UpdateIdentityProviderRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::UpdateIdentityProviderRequest
- Defined in:
- lib/new_store_api/models/update_identity_provider_request.rb
Overview
Update an Identity Provider.
Instance Attribute Summary collapse
-
#config ⇒ Object
TODO: Write general description for this method.
-
#enabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(config = nil, enabled = true) ⇒ UpdateIdentityProviderRequest
constructor
A new instance of UpdateIdentityProviderRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(config = nil, enabled = true) ⇒ UpdateIdentityProviderRequest
Returns a new instance of UpdateIdentityProviderRequest.
40 41 42 43 |
# File 'lib/new_store_api/models/update_identity_provider_request.rb', line 40 def initialize(config = nil, enabled = true) @config = config @enabled = enabled unless enabled == SKIP end |
Instance Attribute Details
#config ⇒ Object
TODO: Write general description for this method
14 15 16 |
# File 'lib/new_store_api/models/update_identity_provider_request.rb', line 14 def config @config end |
#enabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method
18 19 20 |
# File 'lib/new_store_api/models/update_identity_provider_request.rb', line 18 def enabled @enabled end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/new_store_api/models/update_identity_provider_request.rb', line 46 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. config = hash.key?('config') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:UpdateIdentityProviderRequestConfig), hash['config'] ) : nil enabled = hash['enabled'] ||= true # Create object from extracted values. UpdateIdentityProviderRequest.new(config, enabled) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/new_store_api/models/update_identity_provider_request.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['config'] = 'config' @_hash['enabled'] = 'enabled' @_hash end |
.nullables ⇒ Object
An array for nullable fields
36 37 38 |
# File 'lib/new_store_api/models/update_identity_provider_request.rb', line 36 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 32 33 |
# File 'lib/new_store_api/models/update_identity_provider_request.rb', line 29 def self.optionals %w[ enabled ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/new_store_api/models/update_identity_provider_request.rb', line 62 def self.validate(value) if value.instance_of? self return UnionTypeLookUp.get(:UpdateIdentityProviderRequestConfig) .validate(value.config) end return false unless value.instance_of? Hash UnionTypeLookUp.get(:UpdateIdentityProviderRequestConfig) .validate(value['config']) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
81 82 83 84 |
# File 'lib/new_store_api/models/update_identity_provider_request.rb', line 81 def inspect class_name = self.class.name.split('::').last "<#{class_name} config: #{@config.inspect}, enabled: #{@enabled.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
75 76 77 78 |
# File 'lib/new_store_api/models/update_identity_provider_request.rb', line 75 def to_s class_name = self.class.name.split('::').last "<#{class_name} config: #{@config}, enabled: #{@enabled}>" end |