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.



1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
# File 'lib/models/porcelain.rb', line 1341

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.



1334
1335
1336
# File 'lib/models/porcelain.rb', line 1334

def auth_header
  @auth_header
end

#default_pathObject

Returns the value of attribute default_path.



1338
1339
1340
# File 'lib/models/porcelain.rb', line 1338

def default_path
  @default_path
end

#headers_blacklistObject

Returns the value of attribute headers_blacklist.



1336
1337
1338
# File 'lib/models/porcelain.rb', line 1336

def headers_blacklist
  @headers_blacklist
end

#healthcheck_pathObject

Returns the value of attribute healthcheck_path.



1332
1333
1334
# File 'lib/models/porcelain.rb', line 1332

def healthcheck_path
  @healthcheck_path
end

#healthyObject

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



1326
1327
1328
# File 'lib/models/porcelain.rb', line 1326

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



1322
1323
1324
# File 'lib/models/porcelain.rb', line 1322

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1324
1325
1326
# File 'lib/models/porcelain.rb', line 1324

def name
  @name
end

#subdomainObject

Returns the value of attribute subdomain.



1340
1341
1342
# File 'lib/models/porcelain.rb', line 1340

def subdomain
  @subdomain
end

#tagsObject

Tags is a map of key, value pairs.



1328
1329
1330
# File 'lib/models/porcelain.rb', line 1328

def tags
  @tags
end

#urlObject

Returns the value of attribute url.



1330
1331
1332
# File 'lib/models/porcelain.rb', line 1330

def url
  @url
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1393
1394
1395
1396
1397
1398
1399
# File 'lib/models/porcelain.rb', line 1393

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