Class: Appwrite::Models::DedicatedDatabaseSpecification

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(slug:, name:, price:, cpu:, memory:, max_connections:, included_storage:, included_bandwidth:, enabled:) ⇒ DedicatedDatabaseSpecification

Returns a new instance of DedicatedDatabaseSpecification.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/appwrite/models/dedicated_database_specification.rb', line 16

def initialize(
    slug:,
    name:,
    price:,
    cpu:,
    memory:,
    max_connections:,
    included_storage:,
    included_bandwidth:,
    enabled:
)
    @slug = slug
    @name = name
    @price = price
    @cpu = cpu
    @memory = memory
    @max_connections = max_connections
    @included_storage = included_storage
    @included_bandwidth = included_bandwidth
    @enabled = enabled
end

Instance Attribute Details

#cpuObject (readonly)

Returns the value of attribute cpu.



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

def cpu
  @cpu
end

#enabledObject (readonly)

Returns the value of attribute enabled.



14
15
16
# File 'lib/appwrite/models/dedicated_database_specification.rb', line 14

def enabled
  @enabled
end

#included_bandwidthObject (readonly)

Returns the value of attribute included_bandwidth.



13
14
15
# File 'lib/appwrite/models/dedicated_database_specification.rb', line 13

def included_bandwidth
  @included_bandwidth
end

#included_storageObject (readonly)

Returns the value of attribute included_storage.



12
13
14
# File 'lib/appwrite/models/dedicated_database_specification.rb', line 12

def included_storage
  @included_storage
end

#max_connectionsObject (readonly)

Returns the value of attribute max_connections.



11
12
13
# File 'lib/appwrite/models/dedicated_database_specification.rb', line 11

def max_connections
  @max_connections
end

#memoryObject (readonly)

Returns the value of attribute memory.



10
11
12
# File 'lib/appwrite/models/dedicated_database_specification.rb', line 10

def memory
  @memory
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#priceObject (readonly)

Returns the value of attribute price.



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

def price
  @price
end

#slugObject (readonly)

Returns the value of attribute slug.



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

def slug
  @slug
end

Class Method Details

.from(map:) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/appwrite/models/dedicated_database_specification.rb', line 38

def self.from(map:)
    DedicatedDatabaseSpecification.new(
        slug: map["slug"],
        name: map["name"],
        price: map["price"],
        cpu: map["cpu"],
        memory: map["memory"],
        max_connections: map["maxConnections"],
        included_storage: map["includedStorage"],
        included_bandwidth: map["includedBandwidth"],
        enabled: map["enabled"]
    )
end

Instance Method Details

#to_mapObject



52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/appwrite/models/dedicated_database_specification.rb', line 52

def to_map
    {
        "slug": @slug,
        "name": @name,
        "price": @price,
        "cpu": @cpu,
        "memory": @memory,
        "maxConnections": @max_connections,
        "includedStorage": @included_storage,
        "includedBandwidth": @included_bandwidth,
        "enabled": @enabled
    }
end