Class: SDM::AKSServiceAccount

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) ⇒ AKSServiceAccount

Returns a new instance of AKSServiceAccount.



1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
# File 'lib/models/porcelain.rb', line 1977

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.



1968
1969
1970
# File 'lib/models/porcelain.rb', line 1968

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



1972
1973
1974
# File 'lib/models/porcelain.rb', line 1972

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



1964
1965
1966
# File 'lib/models/porcelain.rb', line 1964

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1966
1967
1968
# File 'lib/models/porcelain.rb', line 1966

def name
  @name
end

#portObject

Returns the value of attribute port.



1974
1975
1976
# File 'lib/models/porcelain.rb', line 1974

def port
  @port
end

#tagsObject

Tags is a map of key, value pairs.



1970
1971
1972
# File 'lib/models/porcelain.rb', line 1970

def tags
  @tags
end

#tokenObject

Returns the value of attribute token.



1976
1977
1978
# File 'lib/models/porcelain.rb', line 1976

def token
  @token
end

Instance Method Details

#to_json(options = {}) ⇒ Object



2014
2015
2016
2017
2018
2019
2020
# File 'lib/models/porcelain.rb', line 2014

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