Class: SDM::VaultTokenStore

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id: nil, name: nil, namespace: nil, server_address: nil, tags: nil) ⇒ VaultTokenStore

Returns a new instance of VaultTokenStore.



7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
# File 'lib/models/porcelain.rb', line 7666

def initialize(
  id: nil,
  name: nil,
  namespace: nil,
  server_address: nil,
  tags: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if namespace != nil
    @namespace = namespace
  end
  if server_address != nil
    @server_address = server_address
  end
  if tags != nil
    @tags = tags
  end
end

Instance Attribute Details

#idObject

Unique identifier of the SecretStore.



7656
7657
7658
# File 'lib/models/porcelain.rb', line 7656

def id
  @id
end

#nameObject

Unique human-readable name of the SecretStore.



7658
7659
7660
# File 'lib/models/porcelain.rb', line 7658

def name
  @name
end

#namespaceObject

Returns the value of attribute namespace.



7660
7661
7662
# File 'lib/models/porcelain.rb', line 7660

def namespace
  @namespace
end

#server_addressObject

Returns the value of attribute server_address.



7662
7663
7664
# File 'lib/models/porcelain.rb', line 7662

def server_address
  @server_address
end

#tagsObject

Tags is a map of key, value pairs.



7664
7665
7666
# File 'lib/models/porcelain.rb', line 7664

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



7690
7691
7692
7693
7694
7695
7696
# File 'lib/models/porcelain.rb', line 7690

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