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.



7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
# File 'lib/models/porcelain.rb', line 7710

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.



7700
7701
7702
# File 'lib/models/porcelain.rb', line 7700

def id
  @id
end

#nameObject

Unique human-readable name of the SecretStore.



7702
7703
7704
# File 'lib/models/porcelain.rb', line 7702

def name
  @name
end

#namespaceObject

Returns the value of attribute namespace.



7704
7705
7706
# File 'lib/models/porcelain.rb', line 7704

def namespace
  @namespace
end

#server_addressObject

Returns the value of attribute server_address.



7706
7707
7708
# File 'lib/models/porcelain.rb', line 7706

def server_address
  @server_address
end

#tagsObject

Tags is a map of key, value pairs.



7708
7709
7710
# File 'lib/models/porcelain.rb', line 7708

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



7734
7735
7736
7737
7738
7739
7740
# File 'lib/models/porcelain.rb', line 7734

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