Class: Appwrite::Models::Function

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, created_at:, updated_at:, execute:, name:, description:, enabled:, live:, logging:, runtime:, deployment_retention:, deployment_id:, deployment_created_at:, latest_deployment_id:, latest_deployment_created_at:, latest_deployment_status:, scopes:, vars:, events:, schedule:, interval: 0, timeout:, entrypoint:, commands:, version:, installation_id:, provider_repository_id:, provider_branch:, provider_root_directory:, provider_silent_mode:, provider_branches:, provider_paths:, build_specification:, runtime_specification:, email_enabled:) ⇒ Function

Returns a new instance of Function.



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
106
107
108
109
110
111
112
113
114
# File 'lib/appwrite/models/function.rb', line 42

def initialize(
    id:,
    created_at:,
    updated_at:,
    execute:,
    name:,
    description:,
    enabled:,
    live:,
    logging:,
    runtime:,
    deployment_retention:,
    deployment_id:,
    deployment_created_at:,
    latest_deployment_id:,
    latest_deployment_created_at:,
    latest_deployment_status:,
    scopes:,
    vars:,
    events:,
    schedule:,
    interval: 0,
    timeout:,
    entrypoint:,
    commands:,
    version:,
    installation_id:,
    provider_repository_id:,
    provider_branch:,
    provider_root_directory:,
    provider_silent_mode:,
    provider_branches:,
    provider_paths:,
    build_specification:,
    runtime_specification:,
    email_enabled:
)
    @id = id
    @created_at = created_at
    @updated_at = updated_at
    @execute = execute
    @name = name
    @description = description
    @enabled = enabled
    @live = live
    @logging = logging
    @runtime = runtime
    @deployment_retention = deployment_retention
    @deployment_id = deployment_id
    @deployment_created_at = deployment_created_at
    @latest_deployment_id = latest_deployment_id
    @latest_deployment_created_at = latest_deployment_created_at
    @latest_deployment_status = latest_deployment_status
    @scopes = scopes
    @vars = vars
    @events = events
    @schedule = schedule
    @interval = interval
    @timeout = timeout
    @entrypoint = entrypoint
    @commands = commands
    @version = version
    @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
    @provider_branches = provider_branches
    @provider_paths = provider_paths
    @build_specification = build_specification
    @runtime_specification = runtime_specification
    @email_enabled = email_enabled
end

Instance Attribute Details

#build_specification ⇒ Object (readonly)

Returns the value of attribute build_specification.



38
39
40
# File 'lib/appwrite/models/function.rb', line 38

def build_specification
  @build_specification
end

#commands ⇒ Object (readonly)

Returns the value of attribute commands.



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

def commands
  @commands
end

#created_at ⇒ Object (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#deployment_created_at ⇒ Object (readonly)

Returns the value of attribute deployment_created_at.



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

def deployment_created_at
  @deployment_created_at
end

#deployment_id ⇒ Object (readonly)

Returns the value of attribute deployment_id.



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

def deployment_id
  @deployment_id
end

#deployment_retention ⇒ Object (readonly)

Returns the value of attribute deployment_retention.



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

def deployment_retention
  @deployment_retention
end

#description ⇒ Object (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#email_enabled ⇒ Object (readonly)

Returns the value of attribute email_enabled.



40
41
42
# File 'lib/appwrite/models/function.rb', line 40

def email_enabled
  @email_enabled
end

#enabled ⇒ Object (readonly)

Returns the value of attribute enabled.



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

def enabled
  @enabled
end

#entrypoint ⇒ Object (readonly)

Returns the value of attribute entrypoint.



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

def entrypoint
  @entrypoint
end

#events ⇒ Object (readonly)

Returns the value of attribute events.



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

def events
  @events
end

#execute ⇒ Object (readonly)

Returns the value of attribute execute.



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

def execute
  @execute
end

#id ⇒ Object (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#installation_id ⇒ Object (readonly)

Returns the value of attribute installation_id.



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

def installation_id
  @installation_id
end

#interval ⇒ Object (readonly)

Returns the value of attribute interval.



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

def interval
  @interval
end

#latest_deployment_created_at ⇒ Object (readonly)

Returns the value of attribute latest_deployment_created_at.



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

def latest_deployment_created_at
  @latest_deployment_created_at
end

#latest_deployment_id ⇒ Object (readonly)

Returns the value of attribute latest_deployment_id.



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

def latest_deployment_id
  @latest_deployment_id
end

#latest_deployment_status ⇒ Object (readonly)

Returns the value of attribute latest_deployment_status.



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

def latest_deployment_status
  @latest_deployment_status
end

#live ⇒ Object (readonly)

Returns the value of attribute live.



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

def live
  @live
end

#logging ⇒ Object (readonly)

Returns the value of attribute logging.



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

def logging
  @logging
end

#name ⇒ Object (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#provider_branch ⇒ Object (readonly)

Returns the value of attribute provider_branch.



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

def provider_branch
  @provider_branch
end

#provider_branches ⇒ Object (readonly)

Returns the value of attribute provider_branches.



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

def provider_branches
  @provider_branches
end

#provider_paths ⇒ Object (readonly)

Returns the value of attribute provider_paths.



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

def provider_paths
  @provider_paths
end

#provider_repository_id ⇒ Object (readonly)

Returns the value of attribute provider_repository_id.



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

def provider_repository_id
  @provider_repository_id
end

#provider_root_directory ⇒ Object (readonly)

Returns the value of attribute provider_root_directory.



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

def provider_root_directory
  @provider_root_directory
end

#provider_silent_mode ⇒ Object (readonly)

Returns the value of attribute provider_silent_mode.



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

def provider_silent_mode
  @provider_silent_mode
end

#runtime ⇒ Object (readonly)

Returns the value of attribute runtime.



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

def runtime
  @runtime
end

#runtime_specification ⇒ Object (readonly)

Returns the value of attribute runtime_specification.



39
40
41
# File 'lib/appwrite/models/function.rb', line 39

def runtime_specification
  @runtime_specification
end

#schedule ⇒ Object (readonly)

Returns the value of attribute schedule.



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

def schedule
  @schedule
end

#scopes ⇒ Object (readonly)

Returns the value of attribute scopes.



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

def scopes
  @scopes
end

#timeout ⇒ Object (readonly)

Returns the value of attribute timeout.



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

def timeout
  @timeout
end

#updated_at ⇒ Object (readonly)

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#vars ⇒ Object (readonly)

Returns the value of attribute vars.



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

def vars
  @vars
end

#version ⇒ Object (readonly)

Returns the value of attribute version.



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

def version
  @version
end

Class Method Details

.from(map:) ⇒ Object



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
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/appwrite/models/function.rb', line 116

def self.from(map:)
    map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "execute" => [], "name" => "", "description" => "", "enabled" => true, "live" => true, "logging" => true, "runtime" => "", "deploymentRetention" => 0, "deploymentId" => "", "deploymentCreatedAt" => "", "latestDeploymentId" => "", "latestDeploymentCreatedAt" => "", "latestDeploymentStatus" => "", "scopes" => [], "vars" => [], "events" => [], "schedule" => "", "timeout" => 15, "entrypoint" => "", "commands" => "", "version" => "v5", "installationId" => "", "providerRepositoryId" => "", "providerBranch" => "", "providerRootDirectory" => "", "providerSilentMode" => false, "providerBranches" => [], "providerPaths" => [], "buildSpecification" => "s-1vcpu-512mb", "runtimeSpecification" => "s-1vcpu-512mb", "emailEnabled" => false }.merge(map)
    Function.new(
        id: map["$id"],
        created_at: map["$createdAt"],
        updated_at: map["$updatedAt"],
        execute: map["execute"],
        name: map["name"],
        description: map["description"],
        enabled: map["enabled"],
        live: map["live"],
        logging: map["logging"],
        runtime: map["runtime"],
        deployment_retention: map["deploymentRetention"],
        deployment_id: map["deploymentId"],
        deployment_created_at: map["deploymentCreatedAt"],
        latest_deployment_id: map["latestDeploymentId"],
        latest_deployment_created_at: map["latestDeploymentCreatedAt"],
        latest_deployment_status: map["latestDeploymentStatus"],
        scopes: map["scopes"],
        vars: map["vars"].map { |it| Variable.from(map: it) },
        events: map["events"],
        schedule: map["schedule"],
        interval: map["interval"],
        timeout: map["timeout"],
        entrypoint: map["entrypoint"],
        commands: map["commands"],
        version: map["version"],
        installation_id: map["installationId"],
        provider_repository_id: map["providerRepositoryId"],
        provider_branch: map["providerBranch"],
        provider_root_directory: map["providerRootDirectory"],
        provider_silent_mode: map["providerSilentMode"],
        provider_branches: map["providerBranches"],
        provider_paths: map["providerPaths"],
        build_specification: map["buildSpecification"],
        runtime_specification: map["runtimeSpecification"],
        email_enabled: map["emailEnabled"]
    )
end

Instance Method Details

#to_map ⇒ Object



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/appwrite/models/function.rb', line 157

def to_map
    {
        "$id": @id,
        "$createdAt": @created_at,
        "$updatedAt": @updated_at,
        "execute": @execute,
        "name": @name,
        "description": @description,
        "enabled": @enabled,
        "live": @live,
        "logging": @logging,
        "runtime": @runtime,
        "deploymentRetention": @deployment_retention,
        "deploymentId": @deployment_id,
        "deploymentCreatedAt": @deployment_created_at,
        "latestDeploymentId": @latest_deployment_id,
        "latestDeploymentCreatedAt": @latest_deployment_created_at,
        "latestDeploymentStatus": @latest_deployment_status,
        "scopes": @scopes,
        "vars": @vars.map { |it| it.to_map },
        "events": @events,
        "schedule": @schedule,
        "interval": @interval,
        "timeout": @timeout,
        "entrypoint": @entrypoint,
        "commands": @commands,
        "version": @version,
        "installationId": @installation_id,
        "providerRepositoryId": @provider_repository_id,
        "providerBranch": @provider_branch,
        "providerRootDirectory": @provider_root_directory,
        "providerSilentMode": @provider_silent_mode,
        "providerBranches": @provider_branches,
        "providerPaths": @provider_paths,
        "buildSpecification": @build_specification,
        "runtimeSpecification": @runtime_specification,
        "emailEnabled": @email_enabled
    }
end