Class: Appwrite::Models::DedicatedDatabaseMember

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, role:, status:, lag_seconds:) ⇒ DedicatedDatabaseMember

Returns a new instance of DedicatedDatabaseMember.



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

def initialize(
    id:,
    role:,
    status:,
    lag_seconds:
)
    @id = id
    @role = role
    @status = status
    @lag_seconds = lag_seconds
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#lag_secondsObject (readonly)

Returns the value of attribute lag_seconds.



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

def lag_seconds
  @lag_seconds
end

#roleObject (readonly)

Returns the value of attribute role.



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

def role
  @role
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

Class Method Details

.from(map:) ⇒ Object



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

def self.from(map:)
    DedicatedDatabaseMember.new(
        id: map["$id"],
        role: map["role"],
        status: map["status"],
        lag_seconds: map["lagSeconds"]
    )
end

Instance Method Details

#to_mapObject



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

def to_map
    {
        "$id": @id,
        "role": @role,
        "status": @status,
        "lagSeconds": @lag_seconds
    }
end