Class: IbmCloudIam::CreateIdpRequestPropertiesSp
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- IbmCloudIam::CreateIdpRequestPropertiesSp
- Defined in:
- lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb
Overview
Service Provider configuration
Instance Attribute Summary collapse
-
#authn_context ⇒ Object
Returns the value of attribute authn_context.
-
#claims ⇒ Object
Custom mapping between SAML assertions and IAM claims (can be left empty when no custom mapping is needed).
-
#encrypt_response ⇒ Object
Indicates if responses should be encrypted.
-
#idp_initiated_login_enabled ⇒ Object
Enables IDP-initiated login.
-
#idp_initiated_urls ⇒ Object
URLs for IDP-initiated login (only when IdP initiated login is used).
-
#logout_url_enabled_when_available ⇒ Object
Enables logout URL when available.
-
#want_assertion_signed ⇒ Object
Indicates if SP wants assertions to be signed.
-
#want_response_signed ⇒ Object
Indicates if SP wants responses to be signed.
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 = {}) ⇒ CreateIdpRequestPropertiesSp
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 = {}) ⇒ CreateIdpRequestPropertiesSp
Initializes the object
88 89 90 91 92 93 94 95 96 97 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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 88 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IbmCloudIam::CreateIdpRequestPropertiesSp` 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 `IbmCloudIam::CreateIdpRequestPropertiesSp`. 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?(:'want_assertion_signed') self.want_assertion_signed = attributes[:'want_assertion_signed'] end if attributes.key?(:'want_response_signed') self.want_response_signed = attributes[:'want_response_signed'] end if attributes.key?(:'encrypt_response') self.encrypt_response = attributes[:'encrypt_response'] end if attributes.key?(:'idp_initiated_login_enabled') self.idp_initiated_login_enabled = attributes[:'idp_initiated_login_enabled'] end if attributes.key?(:'logout_url_enabled_when_available') self.logout_url_enabled_when_available = attributes[:'logout_url_enabled_when_available'] end if attributes.key?(:'idp_initiated_urls') if (value = attributes[:'idp_initiated_urls']).is_a?(Array) self.idp_initiated_urls = value end end if attributes.key?(:'authn_context') self.authn_context = attributes[:'authn_context'] end if attributes.key?(:'claims') if (value = attributes[:'claims']).is_a?(Hash) self.claims = value end end end |
Instance Attribute Details
#authn_context ⇒ Object
Returns the value of attribute authn_context.
37 38 39 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 37 def authn_context @authn_context end |
#claims ⇒ Object
Custom mapping between SAML assertions and IAM claims (can be left empty when no custom mapping is needed)
40 41 42 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 40 def claims @claims end |
#encrypt_response ⇒ Object
Indicates if responses should be encrypted
26 27 28 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 26 def encrypt_response @encrypt_response end |
#idp_initiated_login_enabled ⇒ Object
Enables IDP-initiated login
29 30 31 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 29 def idp_initiated_login_enabled @idp_initiated_login_enabled end |
#idp_initiated_urls ⇒ Object
URLs for IDP-initiated login (only when IdP initiated login is used)
35 36 37 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 35 def idp_initiated_urls @idp_initiated_urls end |
#logout_url_enabled_when_available ⇒ Object
Enables logout URL when available
32 33 34 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 32 def logout_url_enabled_when_available @logout_url_enabled_when_available end |
#want_assertion_signed ⇒ Object
Indicates if SP wants assertions to be signed
20 21 22 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 20 def want_assertion_signed @want_assertion_signed end |
#want_response_signed ⇒ Object
Indicates if SP wants responses to be signed
23 24 25 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 23 def want_response_signed @want_response_signed end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
57 58 59 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 57 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
62 63 64 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 62 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 43 def self.attribute_map { :'want_assertion_signed' => :'want_assertion_signed', :'want_response_signed' => :'want_response_signed', :'encrypt_response' => :'encrypt_response', :'idp_initiated_login_enabled' => :'idp_initiated_login_enabled', :'logout_url_enabled_when_available' => :'logout_url_enabled_when_available', :'idp_initiated_urls' => :'idp_initiated_urls', :'authn_context' => :'authn_context', :'claims' => :'claims' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 184 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
81 82 83 84 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 81 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 67 def self.openapi_types { :'want_assertion_signed' => :'Boolean', :'want_response_signed' => :'Boolean', :'encrypt_response' => :'Boolean', :'idp_initiated_login_enabled' => :'Boolean', :'logout_url_enabled_when_available' => :'Boolean', :'idp_initiated_urls' => :'Array<String>', :'authn_context' => :'CreateIdpRequestPropertiesSpAuthnContext', :'claims' => :'Hash<String, String>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 156 def ==(o) return true if self.equal?(o) self.class == o.class && want_assertion_signed == o.want_assertion_signed && want_response_signed == o.want_response_signed && encrypt_response == o.encrypt_response && idp_initiated_login_enabled == o.idp_initiated_login_enabled && logout_url_enabled_when_available == o.logout_url_enabled_when_available && idp_initiated_urls == o.idp_initiated_urls && authn_context == o.authn_context && claims == o.claims end |
#eql?(o) ⇒ Boolean
171 172 173 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 171 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
177 178 179 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 177 def hash [want_assertion_signed, want_response_signed, encrypt_response, idp_initiated_login_enabled, logout_url_enabled_when_available, idp_initiated_urls, authn_context, claims].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
141 142 143 144 145 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 141 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 206 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
149 150 151 152 |
# File 'lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb', line 149 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |