Class: NewStoreApi::CreateIdentityProviderRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::CreateIdentityProviderRequest
- Defined in:
- lib/new_store_api/models/create_identity_provider_request.rb
Overview
Create 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.
-
#protocol ⇒ IdentityProviderProtocolEnum
Supported Protocols for Identity Providers.
-
#vendor ⇒ IdentityProviderVendorEnum
Supported Vendors for Identity Providers.
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, protocol = nil, vendor = nil, enabled = true) ⇒ CreateIdentityProviderRequest
constructor
A new instance of CreateIdentityProviderRequest.
-
#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, protocol = nil, vendor = nil, enabled = true) ⇒ CreateIdentityProviderRequest
Returns a new instance of CreateIdentityProviderRequest.
50 51 52 53 54 55 |
# File 'lib/new_store_api/models/create_identity_provider_request.rb', line 50 def initialize(config = nil, protocol = nil, vendor = nil, enabled = true) @config = config @enabled = enabled unless enabled == SKIP @protocol = protocol @vendor = vendor end |
Instance Attribute Details
#config ⇒ Object
TODO: Write general description for this method
14 15 16 |
# File 'lib/new_store_api/models/create_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/create_identity_provider_request.rb', line 18 def enabled @enabled end |
#protocol ⇒ IdentityProviderProtocolEnum
Supported Protocols for Identity Providers
22 23 24 |
# File 'lib/new_store_api/models/create_identity_provider_request.rb', line 22 def protocol @protocol end |
#vendor ⇒ IdentityProviderVendorEnum
Supported Vendors for Identity Providers
26 27 28 |
# File 'lib/new_store_api/models/create_identity_provider_request.rb', line 26 def vendor @vendor end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/new_store_api/models/create_identity_provider_request.rb', line 58 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. config = hash.key?('config') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:CreateIdentityProviderRequestConfig), hash['config'] ) : nil protocol = hash.key?('protocol') ? hash['protocol'] : nil vendor = hash.key?('vendor') ? hash['vendor'] : nil enabled = hash['enabled'] ||= true # Create object from extracted values. CreateIdentityProviderRequest.new(config, protocol, vendor, enabled) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/new_store_api/models/create_identity_provider_request.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['config'] = 'config' @_hash['enabled'] = 'enabled' @_hash['protocol'] = 'protocol' @_hash['vendor'] = 'vendor' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/new_store_api/models/create_identity_provider_request.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 |
# File 'lib/new_store_api/models/create_identity_provider_request.rb', line 39 def self.optionals %w[ enabled ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/new_store_api/models/create_identity_provider_request.rb', line 78 def self.validate(value) if value.instance_of? self return ( UnionTypeLookUp.get(:CreateIdentityProviderRequestConfig) .validate(value.config) and APIHelper.valid_type?(value.protocol, ->(val) { IdentityProviderProtocolEnum.validate(val) }) and APIHelper.valid_type?(value.vendor, ->(val) { IdentityProviderVendorEnum.validate(val) }) ) end return false unless value.instance_of? Hash ( UnionTypeLookUp.get(:CreateIdentityProviderRequestConfig) .validate(value['config']) and APIHelper.valid_type?(value['protocol'], ->(val) { IdentityProviderProtocolEnum.validate(val) }) and APIHelper.valid_type?(value['vendor'], ->(val) { IdentityProviderVendorEnum.validate(val) }) ) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
110 111 112 113 114 |
# File 'lib/new_store_api/models/create_identity_provider_request.rb', line 110 def inspect class_name = self.class.name.split('::').last "<#{class_name} config: #{@config.inspect}, enabled: #{@enabled.inspect}, protocol:"\ " #{@protocol.inspect}, vendor: #{@vendor.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
103 104 105 106 107 |
# File 'lib/new_store_api/models/create_identity_provider_request.rb', line 103 def to_s class_name = self.class.name.split('::').last "<#{class_name} config: #{@config}, enabled: #{@enabled}, protocol: #{@protocol}, vendor:"\ " #{@vendor}>" end |