Class: SDM::KubernetesBasicAuth

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, username: nil, password: nil) ⇒ KubernetesBasicAuth

Returns a new instance of KubernetesBasicAuth.



1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
# File 'lib/models/porcelain.rb', line 1392

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

Instance Attribute Details

#healthyObject

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



1382
1383
1384
# File 'lib/models/porcelain.rb', line 1382

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



1384
1385
1386
# File 'lib/models/porcelain.rb', line 1384

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



1378
1379
1380
# File 'lib/models/porcelain.rb', line 1378

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1380
1381
1382
# File 'lib/models/porcelain.rb', line 1380

def name
  @name
end

#passwordObject

Returns the value of attribute password.



1390
1391
1392
# File 'lib/models/porcelain.rb', line 1390

def password
  @password
end

#portObject

Returns the value of attribute port.



1386
1387
1388
# File 'lib/models/porcelain.rb', line 1386

def port
  @port
end

#usernameObject

Returns the value of attribute username.



1388
1389
1390
# File 'lib/models/porcelain.rb', line 1388

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1424
1425
1426
1427
1428
1429
1430
# File 'lib/models/porcelain.rb', line 1424

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