Class: SDM::GCPStore

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



6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
# File 'lib/models/porcelain.rb', line 6625

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

Instance Attribute Details

#idObject

Unique identifier of the SecretStore.



6617
6618
6619
# File 'lib/models/porcelain.rb', line 6617

def id
  @id
end

#nameObject

Unique human-readable name of the SecretStore.



6619
6620
6621
# File 'lib/models/porcelain.rb', line 6619

def name
  @name
end

#projectidObject

The GCP project ID to target.



6621
6622
6623
# File 'lib/models/porcelain.rb', line 6621

def projectid
  @projectid
end

#tagsObject

Tags is a map of key, value pairs.



6623
6624
6625
# File 'lib/models/porcelain.rb', line 6623

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



6637
6638
6639
6640
6641
6642
6643
# File 'lib/models/porcelain.rb', line 6637

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