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(auth_header: nil, default_path: nil, egress_filter: nil, headers_blacklist: nil, healthcheck_path: nil, healthy: nil, id: nil, name: nil, secret_store_id: nil, subdomain: nil, tags: nil, url: nil) ⇒ HTTPAuth

Returns a new instance of HTTPAuth.



3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
# File 'lib/models/porcelain.rb', line 3508

def initialize(
  auth_header: nil,
  default_path: nil,
  egress_filter: nil,
  headers_blacklist: nil,
  healthcheck_path: nil,
  healthy: nil,
  id: nil,
  name: nil,
  secret_store_id: nil,
  subdomain: nil,
  tags: nil,
  url: nil
)
  if auth_header != nil
    @auth_header = auth_header
  end
  if default_path != nil
    @default_path = default_path
  end
  if egress_filter != nil
    @egress_filter = egress_filter
  end
  if headers_blacklist != nil
    @headers_blacklist = headers_blacklist
  end
  if healthcheck_path != nil
    @healthcheck_path = healthcheck_path
  end
  if healthy != nil
    @healthy = healthy
  end
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if secret_store_id != nil
    @secret_store_id = secret_store_id
  end
  if subdomain != nil
    @subdomain = subdomain
  end
  if tags != nil
    @tags = tags
  end
  if url != nil
    @url = url
  end
end

Instance Attribute Details

#auth_headerObject

Returns the value of attribute auth_header.



3484
3485
3486
# File 'lib/models/porcelain.rb', line 3484

def auth_header
  @auth_header
end

#default_pathObject

Returns the value of attribute default_path.



3486
3487
3488
# File 'lib/models/porcelain.rb', line 3486

def default_path
  @default_path
end

#egress_filterObject

A filter applied to the routing logic to pin datasource to nodes.



3488
3489
3490
# File 'lib/models/porcelain.rb', line 3488

def egress_filter
  @egress_filter
end

#headers_blacklistObject

Returns the value of attribute headers_blacklist.



3490
3491
3492
# File 'lib/models/porcelain.rb', line 3490

def headers_blacklist
  @headers_blacklist
end

#healthcheck_pathObject

Returns the value of attribute healthcheck_path.



3492
3493
3494
# File 'lib/models/porcelain.rb', line 3492

def healthcheck_path
  @healthcheck_path
end

#healthyObject

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



3494
3495
3496
# File 'lib/models/porcelain.rb', line 3494

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



3496
3497
3498
# File 'lib/models/porcelain.rb', line 3496

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



3498
3499
3500
# File 'lib/models/porcelain.rb', line 3498

def name
  @name
end

#secret_store_idObject

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



3500
3501
3502
# File 'lib/models/porcelain.rb', line 3500

def secret_store_id
  @secret_store_id
end

#subdomainObject

Returns the value of attribute subdomain.



3502
3503
3504
# File 'lib/models/porcelain.rb', line 3502

def subdomain
  @subdomain
end

#tagsObject

Tags is a map of key, value pairs.



3504
3505
3506
# File 'lib/models/porcelain.rb', line 3504

def tags
  @tags
end

#urlObject

Returns the value of attribute url.



3506
3507
3508
# File 'lib/models/porcelain.rb', line 3506

def url
  @url
end

Instance Method Details

#to_json(options = {}) ⇒ Object



3560
3561
3562
3563
3564
3565
3566
# File 'lib/models/porcelain.rb', line 3560

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