Class: SDM::AKS

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, hostname: nil, port: nil, certificate_authority: nil, certificate_authority_filename: nil, client_certificate: nil, client_certificate_filename: nil, client_key: nil, client_key_filename: nil) ⇒ AKS

Returns a new instance of AKS.



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
# File 'lib/models/porcelain.rb', line 1646

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  hostname: nil,
  port: nil,
  certificate_authority: nil,
  certificate_authority_filename: nil,
  client_certificate: nil,
  client_certificate_filename: nil,
  client_key: nil,
  client_key_filename: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if healthy != nil
    @healthy = healthy
  end
  if hostname != nil
    @hostname = hostname
  end
  if port != nil
    @port = port
  end
  if certificate_authority != nil
    @certificate_authority = certificate_authority
  end
  if certificate_authority_filename != nil
    @certificate_authority_filename = certificate_authority_filename
  end
  if client_certificate != nil
    @client_certificate = client_certificate
  end
  if client_certificate_filename != nil
    @client_certificate_filename = client_certificate_filename
  end
  if client_key != nil
    @client_key = client_key
  end
  if client_key_filename != nil
    @client_key_filename = client_key_filename
  end
end

Instance Attribute Details

#certificate_authorityObject

Returns the value of attribute certificate_authority.



1634
1635
1636
# File 'lib/models/porcelain.rb', line 1634

def certificate_authority
  @certificate_authority
end

#certificate_authority_filenameObject

Returns the value of attribute certificate_authority_filename.



1636
1637
1638
# File 'lib/models/porcelain.rb', line 1636

def certificate_authority_filename
  @certificate_authority_filename
end

#client_certificateObject

Returns the value of attribute client_certificate.



1638
1639
1640
# File 'lib/models/porcelain.rb', line 1638

def client_certificate
  @client_certificate
end

#client_certificate_filenameObject

Returns the value of attribute client_certificate_filename.



1640
1641
1642
# File 'lib/models/porcelain.rb', line 1640

def client_certificate_filename
  @client_certificate_filename
end

#client_keyObject

Returns the value of attribute client_key.



1642
1643
1644
# File 'lib/models/porcelain.rb', line 1642

def client_key
  @client_key
end

#client_key_filenameObject

Returns the value of attribute client_key_filename.



1644
1645
1646
# File 'lib/models/porcelain.rb', line 1644

def client_key_filename
  @client_key_filename
end

#healthyObject

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



1628
1629
1630
# File 'lib/models/porcelain.rb', line 1628

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



1630
1631
1632
# File 'lib/models/porcelain.rb', line 1630

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



1624
1625
1626
# File 'lib/models/porcelain.rb', line 1624

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1626
1627
1628
# File 'lib/models/porcelain.rb', line 1626

def name
  @name
end

#portObject

Returns the value of attribute port.



1632
1633
1634
# File 'lib/models/porcelain.rb', line 1632

def port
  @port
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1694
1695
1696
1697
1698
1699
1700
# File 'lib/models/porcelain.rb', line 1694

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