Class: Appwrite::Models::Deployment

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, resource_id:, resource_type:, date_created:, entrypoint:, size:, build_id:, activate:, status:, build_stdout:, build_stderr:) ⇒ Deployment

Returns a new instance of Deployment.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/appwrite/models/deployment.rb', line 18

def initialize(
    id:,
    resource_id:,
    resource_type:,
    date_created:,
    entrypoint:,
    size:,
    build_id:,
    activate:,
    status:,
    build_stdout:,
    build_stderr:
)
    @id = id
    @resource_id = resource_id
    @resource_type = resource_type
    @date_created = date_created
    @entrypoint = entrypoint
    @size = size
    @build_id = build_id
    @activate = activate
    @status = status
    @build_stdout = build_stdout
    @build_stderr = build_stderr
end

Instance Attribute Details

#activateObject (readonly)

Returns the value of attribute activate.



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

def activate
  @activate
end

#build_idObject (readonly)

Returns the value of attribute build_id.



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

def build_id
  @build_id
end

#build_stderrObject (readonly)

Returns the value of attribute build_stderr.



16
17
18
# File 'lib/appwrite/models/deployment.rb', line 16

def build_stderr
  @build_stderr
end

#build_stdoutObject (readonly)

Returns the value of attribute build_stdout.



15
16
17
# File 'lib/appwrite/models/deployment.rb', line 15

def build_stdout
  @build_stdout
end

#date_createdObject (readonly)

Returns the value of attribute date_created.



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

def date_created
  @date_created
end

#entrypointObject (readonly)

Returns the value of attribute entrypoint.



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

def entrypoint
  @entrypoint
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#resource_idObject (readonly)

Returns the value of attribute resource_id.



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

def resource_id
  @resource_id
end

#resource_typeObject (readonly)

Returns the value of attribute resource_type.



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

def resource_type
  @resource_type
end

#sizeObject (readonly)

Returns the value of attribute size.



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

def size
  @size
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

Class Method Details

.from(map:) ⇒ Object



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/appwrite/models/deployment.rb', line 44

def self.from(map:)
    Deployment.new(
        id: map["$id"],
        resource_id: map["resourceId"],
        resource_type: map["resourceType"],
        date_created: map["dateCreated"],
        entrypoint: map["entrypoint"],
        size: map["size"],
        build_id: map["buildId"],
        activate: map["activate"],
        status: map["status"],
        build_stdout: map["buildStdout"],
        build_stderr: map["buildStderr"]
    )
end

Instance Method Details

#to_mapObject



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/appwrite/models/deployment.rb', line 60

def to_map
    {
        "$id": @id,
        "resourceId": @resource_id,
        "resourceType": @resource_type,
        "dateCreated": @date_created,
        "entrypoint": @entrypoint,
        "size": @size,
        "buildId": @build_id,
        "activate": @activate,
        "status": @status,
        "buildStdout": @build_stdout,
        "buildStderr": @build_stderr
    }
end