Class: SDM::Cassandra
- Inherits:
-
Object
- Object
- SDM::Cassandra
- Defined in:
- lib/models/porcelain.rb
Instance Attribute Summary collapse
-
#healthy ⇒ Object
True if the datasource is reachable and the credentials are valid.
-
#hostname ⇒ Object
Returns the value of attribute hostname.
-
#id ⇒ Object
Unique identifier of the Resource.
-
#name ⇒ Object
Unique human-readable name of the Resource.
-
#password ⇒ Object
Returns the value of attribute password.
-
#port ⇒ Object
Returns the value of attribute port.
-
#port_override ⇒ Object
Returns the value of attribute port_override.
-
#tags ⇒ Object
Tags is a map of key, value pairs.
-
#tls_required ⇒ Object
Returns the value of attribute tls_required.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(id: nil, name: nil, healthy: nil, tags: nil, hostname: nil, username: nil, password: nil, port_override: nil, port: nil, tls_required: nil) ⇒ Cassandra
constructor
A new instance of Cassandra.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(id: nil, name: nil, healthy: nil, tags: nil, hostname: nil, username: nil, password: nil, port_override: nil, port: nil, tls_required: nil) ⇒ Cassandra
Returns a new instance of Cassandra.
784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 |
# File 'lib/models/porcelain.rb', line 784 def initialize( id: nil, name: nil, healthy: nil, tags: nil, hostname: nil, username: nil, password: nil, port_override: nil, port: nil, tls_required: nil ) if id != nil @id = id end if name != nil @name = name end if healthy != nil @healthy = healthy end if != nil @tags = end if hostname != nil @hostname = hostname end if username != nil @username = username end if password != nil @password = password end if port_override != nil @port_override = port_override end if port != nil @port = port end if tls_required != nil @tls_required = tls_required end end |
Instance Attribute Details
#healthy ⇒ Object
True if the datasource is reachable and the credentials are valid.
768 769 770 |
# File 'lib/models/porcelain.rb', line 768 def healthy @healthy end |
#hostname ⇒ Object
Returns the value of attribute hostname.
772 773 774 |
# File 'lib/models/porcelain.rb', line 772 def hostname @hostname end |
#id ⇒ Object
Unique identifier of the Resource.
764 765 766 |
# File 'lib/models/porcelain.rb', line 764 def id @id end |
#name ⇒ Object
Unique human-readable name of the Resource.
766 767 768 |
# File 'lib/models/porcelain.rb', line 766 def name @name end |
#password ⇒ Object
Returns the value of attribute password.
776 777 778 |
# File 'lib/models/porcelain.rb', line 776 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
780 781 782 |
# File 'lib/models/porcelain.rb', line 780 def port @port end |
#port_override ⇒ Object
Returns the value of attribute port_override.
778 779 780 |
# File 'lib/models/porcelain.rb', line 778 def port_override @port_override end |
#tags ⇒ Object
Tags is a map of key, value pairs.
770 771 772 |
# File 'lib/models/porcelain.rb', line 770 def @tags end |
#tls_required ⇒ Object
Returns the value of attribute tls_required.
782 783 784 |
# File 'lib/models/porcelain.rb', line 782 def tls_required @tls_required end |
#username ⇒ Object
Returns the value of attribute username.
774 775 776 |
# File 'lib/models/porcelain.rb', line 774 def username @username end |
Instance Method Details
#to_json(options = {}) ⇒ Object
828 829 830 831 832 833 834 |
# File 'lib/models/porcelain.rb', line 828 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |