Class: Appwrite::Models::Site

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, created_at:, updated_at:, name:, enabled:, live:, logging:, framework:, deployment_retention:, deployment_id:, deployment_created_at:, deployment_screenshot_light:, deployment_screenshot_dark:, latest_deployment_id:, latest_deployment_created_at:, latest_deployment_status:, vars:, timeout:, install_command:, build_command:, start_command:, output_directory:, installation_id:, provider_repository_id:, provider_branch:, provider_root_directory:, provider_silent_mode:, build_specification:, runtime_specification:, build_runtime:, adapter:, fallback_file:) ⇒ Site

Returns a new instance of Site.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/appwrite/models/site.rb', line 39

def initialize(
    id:,
    created_at:,
    updated_at:,
    name:,
    enabled:,
    live:,
    logging:,
    framework:,
    deployment_retention:,
    deployment_id:,
    deployment_created_at:,
    deployment_screenshot_light:,
    deployment_screenshot_dark:,
    latest_deployment_id:,
    latest_deployment_created_at:,
    latest_deployment_status:,
    vars:,
    timeout:,
    install_command:,
    build_command:,
    start_command:,
    output_directory:,
    installation_id:,
    provider_repository_id:,
    provider_branch:,
    provider_root_directory:,
    provider_silent_mode:,
    build_specification:,
    runtime_specification:,
    build_runtime:,
    adapter:,
    fallback_file:
)
    @id = id
    @created_at = created_at
    @updated_at = updated_at
    @name = name
    @enabled = enabled
    @live = live
    @logging = logging
    @framework = framework
    @deployment_retention = deployment_retention
    @deployment_id = deployment_id
    @deployment_created_at = deployment_created_at
    @deployment_screenshot_light = deployment_screenshot_light
    @deployment_screenshot_dark = deployment_screenshot_dark
    @latest_deployment_id = latest_deployment_id
    @latest_deployment_created_at = latest_deployment_created_at
    @latest_deployment_status = latest_deployment_status
    @vars = vars
    @timeout = timeout
    @install_command = install_command
    @build_command = build_command
    @start_command = start_command
    @output_directory = output_directory
    @installation_id = installation_id
    @provider_repository_id = provider_repository_id
    @provider_branch = provider_branch
    @provider_root_directory = provider_root_directory
    @provider_silent_mode = provider_silent_mode
    @build_specification = build_specification
    @runtime_specification = runtime_specification
    @build_runtime = build_runtime
    @adapter = adapter
    @fallback_file = fallback_file
end

Instance Attribute Details

#adapterObject (readonly)

Returns the value of attribute adapter.



36
37
38
# File 'lib/appwrite/models/site.rb', line 36

def adapter
  @adapter
end

#build_commandObject (readonly)

Returns the value of attribute build_command.



25
26
27
# File 'lib/appwrite/models/site.rb', line 25

def build_command
  @build_command
end

#build_runtimeObject (readonly)

Returns the value of attribute build_runtime.



35
36
37
# File 'lib/appwrite/models/site.rb', line 35

def build_runtime
  @build_runtime
end

#build_specificationObject (readonly)

Returns the value of attribute build_specification.



33
34
35
# File 'lib/appwrite/models/site.rb', line 33

def build_specification
  @build_specification
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#deployment_created_atObject (readonly)

Returns the value of attribute deployment_created_at.



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

def deployment_created_at
  @deployment_created_at
end

#deployment_idObject (readonly)

Returns the value of attribute deployment_id.



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

def deployment_id
  @deployment_id
end

#deployment_retentionObject (readonly)

Returns the value of attribute deployment_retention.



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

def deployment_retention
  @deployment_retention
end

#deployment_screenshot_darkObject (readonly)

Returns the value of attribute deployment_screenshot_dark.



18
19
20
# File 'lib/appwrite/models/site.rb', line 18

def deployment_screenshot_dark
  @deployment_screenshot_dark
end

#deployment_screenshot_lightObject (readonly)

Returns the value of attribute deployment_screenshot_light.



17
18
19
# File 'lib/appwrite/models/site.rb', line 17

def deployment_screenshot_light
  @deployment_screenshot_light
end

#enabledObject (readonly)

Returns the value of attribute enabled.



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

def enabled
  @enabled
end

#fallback_fileObject (readonly)

Returns the value of attribute fallback_file.



37
38
39
# File 'lib/appwrite/models/site.rb', line 37

def fallback_file
  @fallback_file
end

#frameworkObject (readonly)

Returns the value of attribute framework.



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

def framework
  @framework
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#install_commandObject (readonly)

Returns the value of attribute install_command.



24
25
26
# File 'lib/appwrite/models/site.rb', line 24

def install_command
  @install_command
end

#installation_idObject (readonly)

Returns the value of attribute installation_id.



28
29
30
# File 'lib/appwrite/models/site.rb', line 28

def installation_id
  @installation_id
end

#latest_deployment_created_atObject (readonly)

Returns the value of attribute latest_deployment_created_at.



20
21
22
# File 'lib/appwrite/models/site.rb', line 20

def latest_deployment_created_at
  @latest_deployment_created_at
end

#latest_deployment_idObject (readonly)

Returns the value of attribute latest_deployment_id.



19
20
21
# File 'lib/appwrite/models/site.rb', line 19

def latest_deployment_id
  @latest_deployment_id
end

#latest_deployment_statusObject (readonly)

Returns the value of attribute latest_deployment_status.



21
22
23
# File 'lib/appwrite/models/site.rb', line 21

def latest_deployment_status
  @latest_deployment_status
end

#liveObject (readonly)

Returns the value of attribute live.



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

def live
  @live
end

#loggingObject (readonly)

Returns the value of attribute logging.



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

def logging
  @logging
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#output_directoryObject (readonly)

Returns the value of attribute output_directory.



27
28
29
# File 'lib/appwrite/models/site.rb', line 27

def output_directory
  @output_directory
end

#provider_branchObject (readonly)

Returns the value of attribute provider_branch.



30
31
32
# File 'lib/appwrite/models/site.rb', line 30

def provider_branch
  @provider_branch
end

#provider_repository_idObject (readonly)

Returns the value of attribute provider_repository_id.



29
30
31
# File 'lib/appwrite/models/site.rb', line 29

def provider_repository_id
  @provider_repository_id
end

#provider_root_directoryObject (readonly)

Returns the value of attribute provider_root_directory.



31
32
33
# File 'lib/appwrite/models/site.rb', line 31

def provider_root_directory
  @provider_root_directory
end

#provider_silent_modeObject (readonly)

Returns the value of attribute provider_silent_mode.



32
33
34
# File 'lib/appwrite/models/site.rb', line 32

def provider_silent_mode
  @provider_silent_mode
end

#runtime_specificationObject (readonly)

Returns the value of attribute runtime_specification.



34
35
36
# File 'lib/appwrite/models/site.rb', line 34

def runtime_specification
  @runtime_specification
end

#start_commandObject (readonly)

Returns the value of attribute start_command.



26
27
28
# File 'lib/appwrite/models/site.rb', line 26

def start_command
  @start_command
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



23
24
25
# File 'lib/appwrite/models/site.rb', line 23

def timeout
  @timeout
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#varsObject (readonly)

Returns the value of attribute vars.



22
23
24
# File 'lib/appwrite/models/site.rb', line 22

def vars
  @vars
end

Class Method Details

.from(map:) ⇒ Object



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/appwrite/models/site.rb', line 107

def self.from(map:)
    Site.new(
        id: map["$id"],
        created_at: map["$createdAt"],
        updated_at: map["$updatedAt"],
        name: map["name"],
        enabled: map["enabled"],
        live: map["live"],
        logging: map["logging"],
        framework: map["framework"],
        deployment_retention: map["deploymentRetention"],
        deployment_id: map["deploymentId"],
        deployment_created_at: map["deploymentCreatedAt"],
        deployment_screenshot_light: map["deploymentScreenshotLight"],
        deployment_screenshot_dark: map["deploymentScreenshotDark"],
        latest_deployment_id: map["latestDeploymentId"],
        latest_deployment_created_at: map["latestDeploymentCreatedAt"],
        latest_deployment_status: map["latestDeploymentStatus"],
        vars: map["vars"].map { |it| Variable.from(map: it) },
        timeout: map["timeout"],
        install_command: map["installCommand"],
        build_command: map["buildCommand"],
        start_command: map["startCommand"],
        output_directory: map["outputDirectory"],
        installation_id: map["installationId"],
        provider_repository_id: map["providerRepositoryId"],
        provider_branch: map["providerBranch"],
        provider_root_directory: map["providerRootDirectory"],
        provider_silent_mode: map["providerSilentMode"],
        build_specification: map["buildSpecification"],
        runtime_specification: map["runtimeSpecification"],
        build_runtime: map["buildRuntime"],
        adapter: map["adapter"],
        fallback_file: map["fallbackFile"]
    )
end

Instance Method Details

#to_mapObject



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/appwrite/models/site.rb', line 144

def to_map
    {
        "$id": @id,
        "$createdAt": @created_at,
        "$updatedAt": @updated_at,
        "name": @name,
        "enabled": @enabled,
        "live": @live,
        "logging": @logging,
        "framework": @framework,
        "deploymentRetention": @deployment_retention,
        "deploymentId": @deployment_id,
        "deploymentCreatedAt": @deployment_created_at,
        "deploymentScreenshotLight": @deployment_screenshot_light,
        "deploymentScreenshotDark": @deployment_screenshot_dark,
        "latestDeploymentId": @latest_deployment_id,
        "latestDeploymentCreatedAt": @latest_deployment_created_at,
        "latestDeploymentStatus": @latest_deployment_status,
        "vars": @vars.map { |it| it.to_map },
        "timeout": @timeout,
        "installCommand": @install_command,
        "buildCommand": @build_command,
        "startCommand": @start_command,
        "outputDirectory": @output_directory,
        "installationId": @installation_id,
        "providerRepositoryId": @provider_repository_id,
        "providerBranch": @provider_branch,
        "providerRootDirectory": @provider_root_directory,
        "providerSilentMode": @provider_silent_mode,
        "buildSpecification": @build_specification,
        "runtimeSpecification": @runtime_specification,
        "buildRuntime": @build_runtime,
        "adapter": @adapter,
        "fallbackFile": @fallback_file
    }
end