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(bind_interface: nil, 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.



3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
# File 'lib/models/porcelain.rb', line 3388

def initialize(
  bind_interface: nil,
  egress_filter: nil,
  healthy: nil,
  id: nil,
  keyfile: nil,
  name: nil,
  scopes: nil,
  secret_store_id: nil,
  tags: nil
)
  @bind_interface = bind_interface == nil ? "" : bind_interface
  @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

#bind_interfaceObject

Bind interface



3370
3371
3372
# File 'lib/models/porcelain.rb', line 3370

def bind_interface
  @bind_interface
end

#egress_filterObject

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



3372
3373
3374
# File 'lib/models/porcelain.rb', line 3372

def egress_filter
  @egress_filter
end

#healthyObject

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



3374
3375
3376
# File 'lib/models/porcelain.rb', line 3374

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



3376
3377
3378
# File 'lib/models/porcelain.rb', line 3376

def id
  @id
end

#keyfileObject

Returns the value of attribute keyfile.



3378
3379
3380
# File 'lib/models/porcelain.rb', line 3378

def keyfile
  @keyfile
end

#nameObject

Unique human-readable name of the Resource.



3380
3381
3382
# File 'lib/models/porcelain.rb', line 3380

def name
  @name
end

#scopesObject

Returns the value of attribute scopes.



3382
3383
3384
# File 'lib/models/porcelain.rb', line 3382

def scopes
  @scopes
end

#secret_store_idObject

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



3384
3385
3386
# File 'lib/models/porcelain.rb', line 3384

def secret_store_id
  @secret_store_id
end

#tagsObject

Tags is a map of key, value pairs.



3386
3387
3388
# File 'lib/models/porcelain.rb', line 3386

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



3410
3411
3412
3413
3414
3415
3416
# File 'lib/models/porcelain.rb', line 3410

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