Class: Appwrite::Models::HealthStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/appwrite/models/health_status.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, ping:, status:) ⇒ HealthStatus

Returns a new instance of HealthStatus.



10
11
12
13
14
15
16
17
18
# File 'lib/appwrite/models/health_status.rb', line 10

def initialize(
    name:,
    ping:,
    status:
)
    @name = name
    @ping = ping
    @status = status
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/appwrite/models/health_status.rb', line 6

def name
  @name
end

#pingObject (readonly)

Returns the value of attribute ping.



7
8
9
# File 'lib/appwrite/models/health_status.rb', line 7

def ping
  @ping
end

#statusObject (readonly)

Returns the value of attribute status.



8
9
10
# File 'lib/appwrite/models/health_status.rb', line 8

def status
  @status
end

Class Method Details

.from(map:) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/appwrite/models/health_status.rb', line 20

def self.from(map:)
    HealthStatus.new(
        name: map["name"],
        ping: map["ping"],
        status: map["status"]
    )
end

Instance Method Details

#to_mapObject



28
29
30
31
32
33
34
# File 'lib/appwrite/models/health_status.rb', line 28

def to_map
    {
        "name": @name,
        "ping": @ping,
        "status": @status
    }
end