Class: SDM::SSHCert

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, port: nil, port_forwarding: nil, allow_deprecated_key_exchanges: nil) ⇒ SSHCert

Returns a new instance of SSHCert.



5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
# File 'lib/models/porcelain.rb', line 5535

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  tags: nil,
  secret_store_id: nil,
  egress_filter: nil,
  hostname: nil,
  username: nil,
  port: nil,
  port_forwarding: nil,
  allow_deprecated_key_exchanges: 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 port != nil
    @port = port
  end
  if port_forwarding != nil
    @port_forwarding = port_forwarding
  end
  if allow_deprecated_key_exchanges != nil
    @allow_deprecated_key_exchanges = allow_deprecated_key_exchanges
  end
end

Instance Attribute Details

#allow_deprecated_key_exchangesObject

Returns the value of attribute allow_deprecated_key_exchanges.



5533
5534
5535
# File 'lib/models/porcelain.rb', line 5533

def allow_deprecated_key_exchanges
  @allow_deprecated_key_exchanges
end

#egress_filterObject

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



5523
5524
5525
# File 'lib/models/porcelain.rb', line 5523

def egress_filter
  @egress_filter
end

#healthyObject

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



5517
5518
5519
# File 'lib/models/porcelain.rb', line 5517

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



5525
5526
5527
# File 'lib/models/porcelain.rb', line 5525

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



5513
5514
5515
# File 'lib/models/porcelain.rb', line 5513

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



5515
5516
5517
# File 'lib/models/porcelain.rb', line 5515

def name
  @name
end

#portObject

Returns the value of attribute port.



5529
5530
5531
# File 'lib/models/porcelain.rb', line 5529

def port
  @port
end

#port_forwardingObject

Returns the value of attribute port_forwarding.



5531
5532
5533
# File 'lib/models/porcelain.rb', line 5531

def port_forwarding
  @port_forwarding
end

#secret_store_idObject

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



5521
5522
5523
# File 'lib/models/porcelain.rb', line 5521

def secret_store_id
  @secret_store_id
end

#tagsObject

Tags is a map of key, value pairs.



5519
5520
5521
# File 'lib/models/porcelain.rb', line 5519

def tags
  @tags
end

#usernameObject

Returns the value of attribute username.



5527
5528
5529
# File 'lib/models/porcelain.rb', line 5527

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



5583
5584
5585
5586
5587
5588
5589
# File 'lib/models/porcelain.rb', line 5583

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