Class: SDM::MongoReplicaSet
- Inherits:
-
Object
- Object
- SDM::MongoReplicaSet
- Defined in:
- lib/models/porcelain.rb
Instance Attribute Summary collapse
-
#auth_database ⇒ Object
Returns the value of attribute auth_database.
-
#connect_to_replica ⇒ Object
Returns the value of attribute connect_to_replica.
-
#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.
-
#replica_set ⇒ Object
Returns the value of attribute replica_set.
-
#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, auth_database: nil, port_override: nil, username: nil, password: nil, port: nil, replica_set: nil, connect_to_replica: nil, tls_required: nil) ⇒ MongoReplicaSet
constructor
A new instance of MongoReplicaSet.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(id: nil, name: nil, healthy: nil, tags: nil, hostname: nil, auth_database: nil, port_override: nil, username: nil, password: nil, port: nil, replica_set: nil, connect_to_replica: nil, tls_required: nil) ⇒ MongoReplicaSet
Returns a new instance of MongoReplicaSet.
2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 |
# File 'lib/models/porcelain.rb', line 2406 def initialize( id: nil, name: nil, healthy: nil, tags: nil, hostname: nil, auth_database: nil, port_override: nil, username: nil, password: nil, port: nil, replica_set: nil, connect_to_replica: 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 auth_database != nil @auth_database = auth_database end if port_override != nil @port_override = port_override end if username != nil @username = username end if password != nil @password = password end if port != nil @port = port end if replica_set != nil @replica_set = replica_set end if connect_to_replica != nil @connect_to_replica = connect_to_replica end if tls_required != nil @tls_required = tls_required end end |
Instance Attribute Details
#auth_database ⇒ Object
Returns the value of attribute auth_database.
2390 2391 2392 |
# File 'lib/models/porcelain.rb', line 2390 def auth_database @auth_database end |
#connect_to_replica ⇒ Object
Returns the value of attribute connect_to_replica.
2402 2403 2404 |
# File 'lib/models/porcelain.rb', line 2402 def connect_to_replica @connect_to_replica end |
#healthy ⇒ Object
True if the datasource is reachable and the credentials are valid.
2384 2385 2386 |
# File 'lib/models/porcelain.rb', line 2384 def healthy @healthy end |
#hostname ⇒ Object
Returns the value of attribute hostname.
2388 2389 2390 |
# File 'lib/models/porcelain.rb', line 2388 def hostname @hostname end |
#id ⇒ Object
Unique identifier of the Resource.
2380 2381 2382 |
# File 'lib/models/porcelain.rb', line 2380 def id @id end |
#name ⇒ Object
Unique human-readable name of the Resource.
2382 2383 2384 |
# File 'lib/models/porcelain.rb', line 2382 def name @name end |
#password ⇒ Object
Returns the value of attribute password.
2396 2397 2398 |
# File 'lib/models/porcelain.rb', line 2396 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
2398 2399 2400 |
# File 'lib/models/porcelain.rb', line 2398 def port @port end |
#port_override ⇒ Object
Returns the value of attribute port_override.
2392 2393 2394 |
# File 'lib/models/porcelain.rb', line 2392 def port_override @port_override end |
#replica_set ⇒ Object
Returns the value of attribute replica_set.
2400 2401 2402 |
# File 'lib/models/porcelain.rb', line 2400 def replica_set @replica_set end |
#tags ⇒ Object
Tags is a map of key, value pairs.
2386 2387 2388 |
# File 'lib/models/porcelain.rb', line 2386 def @tags end |
#tls_required ⇒ Object
Returns the value of attribute tls_required.
2404 2405 2406 |
# File 'lib/models/porcelain.rb', line 2404 def tls_required @tls_required end |
#username ⇒ Object
Returns the value of attribute username.
2394 2395 2396 |
# File 'lib/models/porcelain.rb', line 2394 def username @username end |
Instance Method Details
#to_json(options = {}) ⇒ Object
2462 2463 2464 2465 2466 2467 2468 |
# File 'lib/models/porcelain.rb', line 2462 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 |