Class: SDM::KubernetesServiceAccount

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, hostname: nil, port: nil, token: nil) ⇒ KubernetesServiceAccount

Returns a new instance of KubernetesServiceAccount.



1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
# File 'lib/models/porcelain.rb', line 1581

def initialize(
	id:nil \
,
	name:nil \
,
	healthy:nil \
,
	tags:nil \
,
	hostname:nil \
,
	port:nil \
,
	token: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 hostname != nil
		@hostname = hostname
	end
	if port != nil
		@port = port
	end
	if token != nil
		@token = token
	end
end

Instance Attribute Details

#healthyObject

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



1572
1573
1574
# File 'lib/models/porcelain.rb', line 1572

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



1576
1577
1578
# File 'lib/models/porcelain.rb', line 1576

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



1568
1569
1570
# File 'lib/models/porcelain.rb', line 1568

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1570
1571
1572
# File 'lib/models/porcelain.rb', line 1570

def name
  @name
end

#portObject

Returns the value of attribute port.



1578
1579
1580
# File 'lib/models/porcelain.rb', line 1578

def port
  @port
end

#tagsObject

Tags is a map of key, value pairs.



1574
1575
1576
# File 'lib/models/porcelain.rb', line 1574

def tags
  @tags
end

#tokenObject

Returns the value of attribute token.



1580
1581
1582
# File 'lib/models/porcelain.rb', line 1580

def token
  @token
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1618
1619
1620
1621
1622
1623
1624
# File 'lib/models/porcelain.rb', line 1618

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