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.



1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
# File 'lib/models/porcelain.rb', line 1763

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.



1755
1756
1757
# File 'lib/models/porcelain.rb', line 1755

def certificate_authority
  @certificate_authority
end

#client_certificateObject

Returns the value of attribute client_certificate.



1757
1758
1759
# File 'lib/models/porcelain.rb', line 1757

def client_certificate
  @client_certificate
end

#client_keyObject

Returns the value of attribute client_key.



1759
1760
1761
# File 'lib/models/porcelain.rb', line 1759

def client_key
  @client_key
end

#healthcheck_namespaceObject

Returns the value of attribute healthcheck_namespace.



1761
1762
1763
# File 'lib/models/porcelain.rb', line 1761

def healthcheck_namespace
  @healthcheck_namespace
end

#healthyObject

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



1745
1746
1747
# File 'lib/models/porcelain.rb', line 1745

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



1751
1752
1753
# File 'lib/models/porcelain.rb', line 1751

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



1741
1742
1743
# File 'lib/models/porcelain.rb', line 1741

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1743
1744
1745
# File 'lib/models/porcelain.rb', line 1743

def name
  @name
end

#portObject

Returns the value of attribute port.



1753
1754
1755
# File 'lib/models/porcelain.rb', line 1753

def port
  @port
end

#secret_store_idObject

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



1749
1750
1751
# File 'lib/models/porcelain.rb', line 1749

def secret_store_id
  @secret_store_id
end

#tagsObject

Tags is a map of key, value pairs.



1747
1748
1749
# File 'lib/models/porcelain.rb', line 1747

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1811
1812
1813
1814
1815
1816
1817
# File 'lib/models/porcelain.rb', line 1811

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