Class: SDM::IdentityAlias
- Inherits:
-
Object
- Object
- SDM::IdentityAlias
- Defined in:
- lib/models/porcelain.rb
Overview
IdentityAliases define the username to be used for a specific account when connecting to a remote resource using that identity set.
Instance Attribute Summary collapse
-
#account_id ⇒ Object
The account for this identity alias.
-
#id ⇒ Object
Unique identifier of the IdentityAlias.
-
#identity_set_id ⇒ Object
The identity set.
-
#username ⇒ Object
The username to be used as the identity alias for this account.
Instance Method Summary collapse
-
#initialize(account_id: nil, id: nil, identity_set_id: nil, username: nil) ⇒ IdentityAlias
constructor
A new instance of IdentityAlias.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(account_id: nil, id: nil, identity_set_id: nil, username: nil) ⇒ IdentityAlias
Returns a new instance of IdentityAlias.
9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 |
# File 'lib/models/porcelain.rb', line 9424 def initialize( account_id: nil, id: nil, identity_set_id: nil, username: nil ) @account_id = account_id == nil ? "" : account_id @id = id == nil ? "" : id @identity_set_id = identity_set_id == nil ? "" : identity_set_id @username = username == nil ? "" : username end |
Instance Attribute Details
#account_id ⇒ Object
The account for this identity alias.
9416 9417 9418 |
# File 'lib/models/porcelain.rb', line 9416 def account_id @account_id end |
#id ⇒ Object
Unique identifier of the IdentityAlias.
9418 9419 9420 |
# File 'lib/models/porcelain.rb', line 9418 def id @id end |
#identity_set_id ⇒ Object
The identity set.
9420 9421 9422 |
# File 'lib/models/porcelain.rb', line 9420 def identity_set_id @identity_set_id end |
#username ⇒ Object
The username to be used as the identity alias for this account.
9422 9423 9424 |
# File 'lib/models/porcelain.rb', line 9422 def username @username end |
Instance Method Details
#to_json(options = {}) ⇒ Object
9436 9437 9438 9439 9440 9441 9442 |
# File 'lib/models/porcelain.rb', line 9436 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |