Class: SDM::HTTPAuth

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, url: nil, healthcheck_path: nil, auth_header: nil, headers_blacklist: nil, default_path: nil, subdomain: nil) ⇒ HTTPAuth

Returns a new instance of HTTPAuth.



1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
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
# File 'lib/models/porcelain.rb', line 1441

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  tags: nil,
  url: nil,
  healthcheck_path: nil,
  auth_header: 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 url != nil
    @url = url
  end
  if healthcheck_path != nil
    @healthcheck_path = healthcheck_path
  end
  if auth_header != nil
    @auth_header = auth_header
  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

#auth_headerObject

Returns the value of attribute auth_header.



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

def auth_header
  @auth_header
end

#default_pathObject

Returns the value of attribute default_path.



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

def default_path
  @default_path
end

#headers_blacklistObject

Returns the value of attribute headers_blacklist.



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

def headers_blacklist
  @headers_blacklist
end

#healthcheck_pathObject

Returns the value of attribute healthcheck_path.



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

def healthcheck_path
  @healthcheck_path
end

#healthyObject

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



1425
1426
1427
# File 'lib/models/porcelain.rb', line 1425

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



1421
1422
1423
# File 'lib/models/porcelain.rb', line 1421

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1423
1424
1425
# File 'lib/models/porcelain.rb', line 1423

def name
  @name
end

#subdomainObject

Returns the value of attribute subdomain.



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

def subdomain
  @subdomain
end

#tagsObject

Tags is a map of key, value pairs.



1427
1428
1429
# File 'lib/models/porcelain.rb', line 1427

def tags
  @tags
end

#urlObject

Returns the value of attribute url.



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

def url
  @url
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1485
1486
1487
1488
1489
1490
1491
# File 'lib/models/porcelain.rb', line 1485

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