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.



1389
1390
1391
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
1423
1424
1425
1426
1427
1428
1429
1430
1431
# File 'lib/models/porcelain.rb', line 1389

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.



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

def auth_header
  @auth_header
end

#default_pathObject

Returns the value of attribute default_path.



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

def default_path
  @default_path
end

#headers_blacklistObject

Returns the value of attribute headers_blacklist.



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

def headers_blacklist
  @headers_blacklist
end

#healthcheck_pathObject

Returns the value of attribute healthcheck_path.



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

def healthcheck_path
  @healthcheck_path
end

#healthyObject

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



1373
1374
1375
# File 'lib/models/porcelain.rb', line 1373

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



1369
1370
1371
# File 'lib/models/porcelain.rb', line 1369

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1371
1372
1373
# File 'lib/models/porcelain.rb', line 1371

def name
  @name
end

#subdomainObject

Returns the value of attribute subdomain.



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

def subdomain
  @subdomain
end

#tagsObject

Tags is a map of key, value pairs.



1375
1376
1377
# File 'lib/models/porcelain.rb', line 1375

def tags
  @tags
end

#urlObject

Returns the value of attribute url.



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

def url
  @url
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1433
1434
1435
1436
1437
1438
1439
# File 'lib/models/porcelain.rb', line 1433

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