Class: Appwrite::Models::DatabaseStatusReplica
- Inherits:
-
Object
- Object
- Appwrite::Models::DatabaseStatusReplica
- Defined in:
- lib/appwrite/models/database_status_replica.rb
Instance Attribute Summary collapse
-
#healthy ⇒ Object
readonly
Returns the value of attribute healthy.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#lag_seconds ⇒ Object
readonly
Returns the value of attribute lag_seconds.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(index:, role:, healthy:, lag_seconds:) ⇒ DatabaseStatusReplica
constructor
A new instance of DatabaseStatusReplica.
- #to_map ⇒ Object
Constructor Details
#initialize(index:, role:, healthy:, lag_seconds:) ⇒ DatabaseStatusReplica
Returns a new instance of DatabaseStatusReplica.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/appwrite/models/database_status_replica.rb', line 11 def initialize( index:, role:, healthy:, lag_seconds: ) @index = index @role = role @healthy = healthy @lag_seconds = lag_seconds end |
Instance Attribute Details
#healthy ⇒ Object (readonly)
Returns the value of attribute healthy.
8 9 10 |
# File 'lib/appwrite/models/database_status_replica.rb', line 8 def healthy @healthy end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
6 7 8 |
# File 'lib/appwrite/models/database_status_replica.rb', line 6 def index @index end |
#lag_seconds ⇒ Object (readonly)
Returns the value of attribute lag_seconds.
9 10 11 |
# File 'lib/appwrite/models/database_status_replica.rb', line 9 def lag_seconds @lag_seconds end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
7 8 9 |
# File 'lib/appwrite/models/database_status_replica.rb', line 7 def role @role end |
Class Method Details
.from(map:) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/appwrite/models/database_status_replica.rb', line 23 def self.from(map:) DatabaseStatusReplica.new( index: map["index"], role: map["role"], healthy: map["healthy"], lag_seconds: map["lagSeconds"] ) end |
Instance Method Details
#to_map ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/appwrite/models/database_status_replica.rb', line 32 def to_map { "index": @index, "role": @role, "healthy": @healthy, "lagSeconds": @lag_seconds } end |