Class: SDM::AWSStore

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



741
742
743
744
745
746
747
748
749
750
751
# File 'lib/models/porcelain.rb', line 741

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

Instance Attribute Details

#idObject

Unique identifier of the SecretStore.



733
734
735
# File 'lib/models/porcelain.rb', line 733

def id
  @id
end

#nameObject

Unique human-readable name of the SecretStore.



735
736
737
# File 'lib/models/porcelain.rb', line 735

def name
  @name
end

#regionObject

The AWS region to target e.g. us-east-1



737
738
739
# File 'lib/models/porcelain.rb', line 737

def region
  @region
end

#tagsObject

Tags is a map of key, value pairs.



739
740
741
# File 'lib/models/porcelain.rb', line 739

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



753
754
755
756
757
758
759
# File 'lib/models/porcelain.rb', line 753

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