Class: SDM::HTTPNoAuth

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, headers_blacklist: nil, default_path: nil, subdomain: nil) ⇒ HTTPNoAuth

Returns a new instance of HTTPNoAuth.



1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
# File 'lib/models/porcelain.rb', line 1318

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  tags: nil,
  url: nil,
  healthcheck_path: 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 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.



1314
1315
1316
# File 'lib/models/porcelain.rb', line 1314

def default_path
  @default_path
end

#headers_blacklistObject

Returns the value of attribute headers_blacklist.



1312
1313
1314
# File 'lib/models/porcelain.rb', line 1312

def headers_blacklist
  @headers_blacklist
end

#healthcheck_pathObject

Returns the value of attribute healthcheck_path.



1310
1311
1312
# File 'lib/models/porcelain.rb', line 1310

def healthcheck_path
  @healthcheck_path
end

#healthyObject

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



1304
1305
1306
# File 'lib/models/porcelain.rb', line 1304

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



1300
1301
1302
# File 'lib/models/porcelain.rb', line 1300

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1302
1303
1304
# File 'lib/models/porcelain.rb', line 1302

def name
  @name
end

#subdomainObject

Returns the value of attribute subdomain.



1316
1317
1318
# File 'lib/models/porcelain.rb', line 1316

def subdomain
  @subdomain
end

#tagsObject

Tags is a map of key, value pairs.



1306
1307
1308
# File 'lib/models/porcelain.rb', line 1306

def tags
  @tags
end

#urlObject

Returns the value of attribute url.



1308
1309
1310
# File 'lib/models/porcelain.rb', line 1308

def url
  @url
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1358
1359
1360
1361
1362
1363
1364
# File 'lib/models/porcelain.rb', line 1358

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