Class: SDM::Elastic
- Inherits:
-
Object
- Object
- SDM::Elastic
- 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.
-
#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, hostname: nil, username: nil, password: nil, port_override: nil, port: nil, tls_required: nil) ⇒ Elastic
constructor
A new instance of Elastic.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(id: nil, name: nil, healthy: nil, hostname: nil, username: nil, password: nil, port_override: nil, port: nil, tls_required: nil) ⇒ Elastic
Returns a new instance of Elastic.
1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 |
# File 'lib/models/porcelain.rb', line 1039 def initialize( id: nil, name: nil, healthy: 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 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.
1025 1026 1027 |
# File 'lib/models/porcelain.rb', line 1025 def healthy @healthy end |
#hostname ⇒ Object
Returns the value of attribute hostname.
1027 1028 1029 |
# File 'lib/models/porcelain.rb', line 1027 def hostname @hostname end |
#id ⇒ Object
Unique identifier of the Resource.
1021 1022 1023 |
# File 'lib/models/porcelain.rb', line 1021 def id @id end |
#name ⇒ Object
Unique human-readable name of the Resource.
1023 1024 1025 |
# File 'lib/models/porcelain.rb', line 1023 def name @name end |
#password ⇒ Object
Returns the value of attribute password.
1031 1032 1033 |
# File 'lib/models/porcelain.rb', line 1031 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
1035 1036 1037 |
# File 'lib/models/porcelain.rb', line 1035 def port @port end |
#port_override ⇒ Object
Returns the value of attribute port_override.
1033 1034 1035 |
# File 'lib/models/porcelain.rb', line 1033 def port_override @port_override end |
#tls_required ⇒ Object
Returns the value of attribute tls_required.
1037 1038 1039 |
# File 'lib/models/porcelain.rb', line 1037 def tls_required @tls_required end |
#username ⇒ Object
Returns the value of attribute username.
1029 1030 1031 |
# File 'lib/models/porcelain.rb', line 1029 def username @username end |
Instance Method Details
#to_json(options = {}) ⇒ Object
1079 1080 1081 1082 1083 1084 1085 |
# File 'lib/models/porcelain.rb', line 1079 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 |