Class: SDM::IdentityAlias

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(account_id: nil, id: nil, identity_set_id: nil, username: nil) ⇒ IdentityAlias

Returns a new instance of IdentityAlias.



6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
# File 'lib/models/porcelain.rb', line 6843

def initialize(
  account_id: nil,
  id: nil,
  identity_set_id: nil,
  username: nil
)
  @account_id =  == nil ? "" : 
  @id = id == nil ? "" : id
  @identity_set_id = identity_set_id == nil ? "" : identity_set_id
  @username = username == nil ? "" : username
end

Instance Attribute Details

#account_idObject

The account for this identity alias.



6835
6836
6837
# File 'lib/models/porcelain.rb', line 6835

def 
  @account_id
end

#idObject

Unique identifier of the IdentityAlias.



6837
6838
6839
# File 'lib/models/porcelain.rb', line 6837

def id
  @id
end

#identity_set_idObject

The identity set.



6839
6840
6841
# File 'lib/models/porcelain.rb', line 6839

def identity_set_id
  @identity_set_id
end

#usernameObject

The username to be used as the identity alias for this account.



6841
6842
6843
# File 'lib/models/porcelain.rb', line 6841

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



6855
6856
6857
6858
6859
6860
6861
# File 'lib/models/porcelain.rb', line 6855

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end