Class: SDM::AKSBasicAuth

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, hostname: nil, port: nil, username: nil, password: nil) ⇒ AKSBasicAuth

Returns a new instance of AKSBasicAuth.



1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
# File 'lib/models/porcelain.rb', line 1719

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  hostname: nil,
  port: nil,
  username: nil,
  password: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if healthy != nil
    @healthy = healthy
  end
  if hostname != nil
    @hostname = hostname
  end
  if port != nil
    @port = port
  end
  if username != nil
    @username = username
  end
  if password != nil
    @password = password
  end
end

Instance Attribute Details

#healthyObject

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



1709
1710
1711
# File 'lib/models/porcelain.rb', line 1709

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



1711
1712
1713
# File 'lib/models/porcelain.rb', line 1711

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



1705
1706
1707
# File 'lib/models/porcelain.rb', line 1705

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1707
1708
1709
# File 'lib/models/porcelain.rb', line 1707

def name
  @name
end

#passwordObject

Returns the value of attribute password.



1717
1718
1719
# File 'lib/models/porcelain.rb', line 1717

def password
  @password
end

#portObject

Returns the value of attribute port.



1713
1714
1715
# File 'lib/models/porcelain.rb', line 1713

def port
  @port
end

#usernameObject

Returns the value of attribute username.



1715
1716
1717
# File 'lib/models/porcelain.rb', line 1715

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1751
1752
1753
1754
1755
1756
1757
# File 'lib/models/porcelain.rb', line 1751

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