Class: SDM::StrongVaultStore

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, tags: nil) ⇒ StrongVaultStore



17484
17485
17486
17487
17488
17489
17490
17491
17492
# File 'lib/models/porcelain.rb', line 17484

def initialize(
  id: nil,
  name: nil,
  tags: nil
)
  @id = id == nil ? "" : id
  @name = name == nil ? "" : name
  @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
end

Instance Attribute Details

#idObject

Unique identifier of the SecretStore.



17478
17479
17480
# File 'lib/models/porcelain.rb', line 17478

def id
  @id
end

#nameObject

Unique human-readable name of the SecretStore.



17480
17481
17482
# File 'lib/models/porcelain.rb', line 17480

def name
  @name
end

#tagsObject

Tags is a map of key, value pairs.



17482
17483
17484
# File 'lib/models/porcelain.rb', line 17482

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



17494
17495
17496
17497
17498
17499
17500
# File 'lib/models/porcelain.rb', line 17494

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