Class: SDM::Greenplum

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, healthy: nil, tags: nil, secret_store_id: nil, egress_filter: nil, hostname: nil, username: nil, password: nil, database: nil, port_override: nil, port: nil, override_database: nil) ⇒ Greenplum

Returns a new instance of Greenplum.



4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
# File 'lib/models/porcelain.rb', line 4495

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  tags: nil,
  secret_store_id: nil,
  egress_filter: nil,
  hostname: nil,
  username: nil,
  password: nil,
  database: nil,
  port_override: nil,
  port: nil,
  override_database: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if healthy != nil
    @healthy = healthy
  end
  if tags != nil
    @tags = tags
  end
  if secret_store_id != nil
    @secret_store_id = secret_store_id
  end
  if egress_filter != nil
    @egress_filter = egress_filter
  end
  if hostname != nil
    @hostname = hostname
  end
  if username != nil
    @username = username
  end
  if password != nil
    @password = password
  end
  if database != nil
    @database = database
  end
  if port_override != nil
    @port_override = port_override
  end
  if port != nil
    @port = port
  end
  if override_database != nil
    @override_database = override_database
  end
end

Instance Attribute Details

#databaseObject

Returns the value of attribute database.



4487
4488
4489
# File 'lib/models/porcelain.rb', line 4487

def database
  @database
end

#egress_filterObject

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



4479
4480
4481
# File 'lib/models/porcelain.rb', line 4479

def egress_filter
  @egress_filter
end

#healthyObject

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



4473
4474
4475
# File 'lib/models/porcelain.rb', line 4473

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



4481
4482
4483
# File 'lib/models/porcelain.rb', line 4481

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



4469
4470
4471
# File 'lib/models/porcelain.rb', line 4469

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



4471
4472
4473
# File 'lib/models/porcelain.rb', line 4471

def name
  @name
end

#override_databaseObject

Returns the value of attribute override_database.



4493
4494
4495
# File 'lib/models/porcelain.rb', line 4493

def override_database
  @override_database
end

#passwordObject

Returns the value of attribute password.



4485
4486
4487
# File 'lib/models/porcelain.rb', line 4485

def password
  @password
end

#portObject

Returns the value of attribute port.



4491
4492
4493
# File 'lib/models/porcelain.rb', line 4491

def port
  @port
end

#port_overrideObject

Returns the value of attribute port_override.



4489
4490
4491
# File 'lib/models/porcelain.rb', line 4489

def port_override
  @port_override
end

#secret_store_idObject

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



4477
4478
4479
# File 'lib/models/porcelain.rb', line 4477

def secret_store_id
  @secret_store_id
end

#tagsObject

Tags is a map of key, value pairs.



4475
4476
4477
# File 'lib/models/porcelain.rb', line 4475

def tags
  @tags
end

#usernameObject

Returns the value of attribute username.



4483
4484
4485
# File 'lib/models/porcelain.rb', line 4483

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



4551
4552
4553
4554
4555
4556
4557
# File 'lib/models/porcelain.rb', line 4551

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