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.



3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
# File 'lib/models/porcelain.rb', line 3423

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



3405
3406
3407
# File 'lib/models/porcelain.rb', line 3405

def bind_interface
  @bind_interface
end

#egress_filterObject

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



3407
3408
3409
# File 'lib/models/porcelain.rb', line 3407

def egress_filter
  @egress_filter
end

#healthyObject

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



3409
3410
3411
# File 'lib/models/porcelain.rb', line 3409

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



3411
3412
3413
# File 'lib/models/porcelain.rb', line 3411

def id
  @id
end

#keyfileObject

Returns the value of attribute keyfile.



3413
3414
3415
# File 'lib/models/porcelain.rb', line 3413

def keyfile
  @keyfile
end

#nameObject

Unique human-readable name of the Resource.



3415
3416
3417
# File 'lib/models/porcelain.rb', line 3415

def name
  @name
end

#scopesObject

Returns the value of attribute scopes.



3417
3418
3419
# File 'lib/models/porcelain.rb', line 3417

def scopes
  @scopes
end

#secret_store_idObject

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



3419
3420
3421
# File 'lib/models/porcelain.rb', line 3419

def secret_store_id
  @secret_store_id
end

#tagsObject

Tags is a map of key, value pairs.



3421
3422
3423
# File 'lib/models/porcelain.rb', line 3421

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



3445
3446
3447
3448
3449
3450
3451
# File 'lib/models/porcelain.rb', line 3445

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