Class: SDM::GCP

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(egress_filter: nil, healthy: nil, id: nil, keyfile: nil, name: nil, scopes: nil, secret_store_id: nil, tags: nil) ⇒ GCP

Returns a new instance of GCP.



2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
# File 'lib/models/porcelain.rb', line 2329

def initialize(
  egress_filter: nil,
  healthy: nil,
  id: nil,
  keyfile: nil,
  name: nil,
  scopes: nil,
  secret_store_id: nil,
  tags: nil
)
  @egress_filter = egress_filter == nil ? "" : egress_filter
  @healthy = healthy == nil ? false : healthy
  @id = id == nil ? "" : id
  @keyfile = keyfile == nil ? "" : keyfile
  @name = name == nil ? "" : name
  @scopes = scopes == nil ? "" : scopes
  @secret_store_id = secret_store_id == nil ? "" : secret_store_id
  @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
end

Instance Attribute Details

#egress_filterObject

A filter applied to the routing logic to pin datasource to nodes.



2313
2314
2315
# File 'lib/models/porcelain.rb', line 2313

def egress_filter
  @egress_filter
end

#healthyObject

True if the datasource is reachable and the credentials are valid.



2315
2316
2317
# File 'lib/models/porcelain.rb', line 2315

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



2317
2318
2319
# File 'lib/models/porcelain.rb', line 2317

def id
  @id
end

#keyfileObject

Returns the value of attribute keyfile.



2319
2320
2321
# File 'lib/models/porcelain.rb', line 2319

def keyfile
  @keyfile
end

#nameObject

Unique human-readable name of the Resource.



2321
2322
2323
# File 'lib/models/porcelain.rb', line 2321

def name
  @name
end

#scopesObject

Returns the value of attribute scopes.



2323
2324
2325
# File 'lib/models/porcelain.rb', line 2323

def scopes
  @scopes
end

#secret_store_idObject

ID of the secret store containing credentials for this resource, if any.



2325
2326
2327
# File 'lib/models/porcelain.rb', line 2325

def secret_store_id
  @secret_store_id
end

#tagsObject

Tags is a map of key, value pairs.



2327
2328
2329
# File 'lib/models/porcelain.rb', line 2327

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



2349
2350
2351
2352
2353
2354
2355
# File 'lib/models/porcelain.rb', line 2349

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