Class: SDM::HTTPBasicAuth

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, url: nil, healthcheck_path: nil, username: nil, password: nil, headers_blacklist: nil, default_path: nil, subdomain: nil) ⇒ HTTPBasicAuth

Returns a new instance of HTTPBasicAuth.



1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
# File 'lib/models/porcelain.rb', line 1454

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  tags: nil,
  secret_store_id: nil,
  url: nil,
  healthcheck_path: nil,
  username: nil,
  password: nil,
  headers_blacklist: nil,
  default_path: nil,
  subdomain: 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 url != nil
    @url = url
  end
  if healthcheck_path != nil
    @healthcheck_path = healthcheck_path
  end
  if username != nil
    @username = username
  end
  if password != nil
    @password = password
  end
  if headers_blacklist != nil
    @headers_blacklist = headers_blacklist
  end
  if default_path != nil
    @default_path = default_path
  end
  if subdomain != nil
    @subdomain = subdomain
  end
end

Instance Attribute Details

#default_pathObject

Returns the value of attribute default_path.



1450
1451
1452
# File 'lib/models/porcelain.rb', line 1450

def default_path
  @default_path
end

#headers_blacklistObject

Returns the value of attribute headers_blacklist.



1448
1449
1450
# File 'lib/models/porcelain.rb', line 1448

def headers_blacklist
  @headers_blacklist
end

#healthcheck_pathObject

Returns the value of attribute healthcheck_path.



1442
1443
1444
# File 'lib/models/porcelain.rb', line 1442

def healthcheck_path
  @healthcheck_path
end

#healthyObject

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



1434
1435
1436
# File 'lib/models/porcelain.rb', line 1434

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



1430
1431
1432
# File 'lib/models/porcelain.rb', line 1430

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1432
1433
1434
# File 'lib/models/porcelain.rb', line 1432

def name
  @name
end

#passwordObject

Returns the value of attribute password.



1446
1447
1448
# File 'lib/models/porcelain.rb', line 1446

def password
  @password
end

#secret_store_idObject

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



1438
1439
1440
# File 'lib/models/porcelain.rb', line 1438

def secret_store_id
  @secret_store_id
end

#subdomainObject

Returns the value of attribute subdomain.



1452
1453
1454
# File 'lib/models/porcelain.rb', line 1452

def subdomain
  @subdomain
end

#tagsObject

Tags is a map of key, value pairs.



1436
1437
1438
# File 'lib/models/porcelain.rb', line 1436

def tags
  @tags
end

#urlObject

Returns the value of attribute url.



1440
1441
1442
# File 'lib/models/porcelain.rb', line 1440

def url
  @url
end

#usernameObject

Returns the value of attribute username.



1444
1445
1446
# File 'lib/models/porcelain.rb', line 1444

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1506
1507
1508
1509
1510
1511
1512
# File 'lib/models/porcelain.rb', line 1506

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