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.
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 827 828 829 830 831 832 833 834 835 836 837 838 839 |
# File 'lib/models/porcelain.rb', line 788 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.
773 774 775 |
# File 'lib/models/porcelain.rb', line 773 def healthy @healthy end |
#hostname ⇒ Object
Returns the value of attribute hostname.
777 778 779 |
# File 'lib/models/porcelain.rb', line 777 def hostname @hostname end |
#id ⇒ Object
Unique identifier of the Resource.
769 770 771 |
# File 'lib/models/porcelain.rb', line 769 def id @id end |
#name ⇒ Object
Unique human-readable name of the Resource.
771 772 773 |
# File 'lib/models/porcelain.rb', line 771 def name @name end |
#password ⇒ Object
Returns the value of attribute password.
781 782 783 |
# File 'lib/models/porcelain.rb', line 781 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
785 786 787 |
# File 'lib/models/porcelain.rb', line 785 def port @port end |
#port_override ⇒ Object
Returns the value of attribute port_override.
783 784 785 |
# File 'lib/models/porcelain.rb', line 783 def port_override @port_override end |
#tags ⇒ Object
Tags is a map of key, value pairs.
775 776 777 |
# File 'lib/models/porcelain.rb', line 775 def @tags end |
#tls_required ⇒ Object
Returns the value of attribute tls_required.
787 788 789 |
# File 'lib/models/porcelain.rb', line 787 def tls_required @tls_required end |
#username ⇒ Object
Returns the value of attribute username.
779 780 781 |
# File 'lib/models/porcelain.rb', line 779 def username @username end |
Instance Method Details
#to_json(options = {}) ⇒ Object
840 841 842 843 844 845 846 |
# File 'lib/models/porcelain.rb', line 840 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 |