Class: Appwrite::Models::DatabaseStatusVolume

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xpath:, used_percent:, available:, mounted:) ⇒ DatabaseStatusVolume

Returns a new instance of DatabaseStatusVolume.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/appwrite/models/database_status_volume.rb', line 11

def initialize(
    xpath:,
    used_percent:,
    available:,
    mounted:
)
    @xpath = xpath
    @used_percent = used_percent
    @available = available
    @mounted = mounted
end

Instance Attribute Details

#availableObject (readonly)

Returns the value of attribute available.



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

def available
  @available
end

#mountedObject (readonly)

Returns the value of attribute mounted.



9
10
11
# File 'lib/appwrite/models/database_status_volume.rb', line 9

def mounted
  @mounted
end

#used_percentObject (readonly)

Returns the value of attribute used_percent.



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

def used_percent
  @used_percent
end

#xpathObject (readonly)

Returns the value of attribute xpath.



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

def xpath
  @xpath
end

Class Method Details

.from(map:) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/appwrite/models/database_status_volume.rb', line 23

def self.from(map:)
    DatabaseStatusVolume.new(
        xpath: map["path"],
        used_percent: map["usedPercent"],
        available: map["available"],
        mounted: map["mounted"]
    )
end

Instance Method Details

#to_mapObject



32
33
34
35
36
37
38
39
# File 'lib/appwrite/models/database_status_volume.rb', line 32

def to_map
    {
        "path": @xpath,
        "usedPercent": @used_percent,
        "available": @available,
        "mounted": @mounted
    }
end