Class: SDM::Kubernetes

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, hostname: nil, port: nil, certificate_authority: nil, client_certificate: nil, client_key: nil, healthcheck_namespace: nil) ⇒ Kubernetes

Returns a new instance of Kubernetes.



1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
# File 'lib/models/porcelain.rb', line 1797

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  tags: nil,
  secret_store_id: nil,
  hostname: nil,
  port: nil,
  certificate_authority: nil,
  client_certificate: nil,
  client_key: nil,
  healthcheck_namespace: 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 hostname != nil
    @hostname = hostname
  end
  if port != nil
    @port = port
  end
  if certificate_authority != nil
    @certificate_authority = certificate_authority
  end
  if client_certificate != nil
    @client_certificate = client_certificate
  end
  if client_key != nil
    @client_key = client_key
  end
  if healthcheck_namespace != nil
    @healthcheck_namespace = healthcheck_namespace
  end
end

Instance Attribute Details

#certificate_authorityObject

Returns the value of attribute certificate_authority.



1789
1790
1791
# File 'lib/models/porcelain.rb', line 1789

def certificate_authority
  @certificate_authority
end

#client_certificateObject

Returns the value of attribute client_certificate.



1791
1792
1793
# File 'lib/models/porcelain.rb', line 1791

def client_certificate
  @client_certificate
end

#client_keyObject

Returns the value of attribute client_key.



1793
1794
1795
# File 'lib/models/porcelain.rb', line 1793

def client_key
  @client_key
end

#healthcheck_namespaceObject

Returns the value of attribute healthcheck_namespace.



1795
1796
1797
# File 'lib/models/porcelain.rb', line 1795

def healthcheck_namespace
  @healthcheck_namespace
end

#healthyObject

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



1779
1780
1781
# File 'lib/models/porcelain.rb', line 1779

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



1785
1786
1787
# File 'lib/models/porcelain.rb', line 1785

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



1775
1776
1777
# File 'lib/models/porcelain.rb', line 1775

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1777
1778
1779
# File 'lib/models/porcelain.rb', line 1777

def name
  @name
end

#portObject

Returns the value of attribute port.



1787
1788
1789
# File 'lib/models/porcelain.rb', line 1787

def port
  @port
end

#secret_store_idObject

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



1783
1784
1785
# File 'lib/models/porcelain.rb', line 1783

def secret_store_id
  @secret_store_id
end

#tagsObject

Tags is a map of key, value pairs.



1781
1782
1783
# File 'lib/models/porcelain.rb', line 1781

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1845
1846
1847
1848
1849
1850
1851
# File 'lib/models/porcelain.rb', line 1845

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