Class: Appwrite::Models::DatabaseStatus
- Inherits:
-
Object
- Object
- Appwrite::Models::DatabaseStatus
- Defined in:
- lib/appwrite/models/database_status.rb
Instance Attribute Summary collapse
-
#connections ⇒ Object
readonly
Returns the value of attribute connections.
-
#engine ⇒ Object
readonly
Returns the value of attribute engine.
-
#health ⇒ Object
readonly
Returns the value of attribute health.
-
#ready ⇒ Object
readonly
Returns the value of attribute ready.
-
#replicas ⇒ Object
readonly
Returns the value of attribute replicas.
-
#uptime ⇒ Object
readonly
Returns the value of attribute uptime.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
-
#volumes ⇒ Object
readonly
Returns the value of attribute volumes.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(health:, ready:, engine:, version:, uptime:, connections:, replicas:, volumes:) ⇒ DatabaseStatus
constructor
A new instance of DatabaseStatus.
- #to_map ⇒ Object
Constructor Details
#initialize(health:, ready:, engine:, version:, uptime:, connections:, replicas:, volumes:) ⇒ DatabaseStatus
Returns a new instance of DatabaseStatus.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/appwrite/models/database_status.rb', line 15 def initialize( health:, ready:, engine:, version:, uptime:, connections:, replicas:, volumes: ) @health = health @ready = ready @engine = engine @version = version @uptime = uptime @connections = connections @replicas = replicas @volumes = volumes end |
Instance Attribute Details
#connections ⇒ Object (readonly)
Returns the value of attribute connections.
11 12 13 |
# File 'lib/appwrite/models/database_status.rb', line 11 def connections @connections end |
#engine ⇒ Object (readonly)
Returns the value of attribute engine.
8 9 10 |
# File 'lib/appwrite/models/database_status.rb', line 8 def engine @engine end |
#health ⇒ Object (readonly)
Returns the value of attribute health.
6 7 8 |
# File 'lib/appwrite/models/database_status.rb', line 6 def health @health end |
#ready ⇒ Object (readonly)
Returns the value of attribute ready.
7 8 9 |
# File 'lib/appwrite/models/database_status.rb', line 7 def ready @ready end |
#replicas ⇒ Object (readonly)
Returns the value of attribute replicas.
12 13 14 |
# File 'lib/appwrite/models/database_status.rb', line 12 def replicas @replicas end |
#uptime ⇒ Object (readonly)
Returns the value of attribute uptime.
10 11 12 |
# File 'lib/appwrite/models/database_status.rb', line 10 def uptime @uptime end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
9 10 11 |
# File 'lib/appwrite/models/database_status.rb', line 9 def version @version end |
#volumes ⇒ Object (readonly)
Returns the value of attribute volumes.
13 14 15 |
# File 'lib/appwrite/models/database_status.rb', line 13 def volumes @volumes end |
Class Method Details
.from(map:) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/appwrite/models/database_status.rb', line 35 def self.from(map:) DatabaseStatus.new( health: map["health"], ready: map["ready"], engine: map["engine"], version: map["version"], uptime: map["uptime"], connections: DatabaseStatusConnections.from(map: map["connections"]), replicas: map["replicas"].map { |it| DatabaseStatusReplica.from(map: it) }, volumes: map["volumes"].map { |it| DatabaseStatusVolume.from(map: it) } ) end |
Instance Method Details
#to_map ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/appwrite/models/database_status.rb', line 48 def to_map { "health": @health, "ready": @ready, "engine": @engine, "version": @version, "uptime": @uptime, "connections": @connections.to_map, "replicas": @replicas.map { |it| it.to_map }, "volumes": @volumes.map { |it| it.to_map } } end |