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:, enabled:, live:, logging:, runtime:, deployment:, scopes:, vars:, events:, schedule:, timeout:, entrypoint:, commands:, version:, installation_id:, provider_repository_id:, provider_branch:, provider_root_directory:, provider_silent_mode:, specification:) ⇒ Function

Returns a new instance of Function.



31
32
33
34
35
36
37
38
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
# File 'lib/appwrite/models/function.rb', line 31

def initialize(
    id:,
    created_at:,
    updated_at:,
    execute:,
    name:,
    enabled:,
    live:,
    logging:,
    runtime:,
    deployment:,
    scopes:,
    vars:,
    events:,
    schedule:,
    timeout:,
    entrypoint:,
    commands:,
    version:,
    installation_id:,
    provider_repository_id:,
    provider_branch:,
    provider_root_directory:,
    provider_silent_mode:,
    specification:
)
    @id = id
    @created_at = created_at
    @updated_at = updated_at
    @execute = execute
    @name = name
    @enabled = enabled
    @live = live
    @logging = logging
    @runtime = runtime
    @deployment = deployment
    @scopes = scopes
    @vars = vars
    @events = events
    @schedule = schedule
    @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
    @specification = specification
end

Instance Attribute Details

#commandsObject (readonly)

Returns the value of attribute commands.



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

def commands
  @commands
end

#created_atObject (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

#deploymentObject (readonly)

Returns the value of attribute deployment.



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

def deployment
  @deployment
end

#enabledObject (readonly)

Returns the value of attribute enabled.



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

def enabled
  @enabled
end

#entrypointObject (readonly)

Returns the value of attribute entrypoint.



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

def entrypoint
  @entrypoint
end

#eventsObject (readonly)

Returns the value of attribute events.



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

def events
  @events
end

#executeObject (readonly)

Returns the value of attribute execute.



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

def execute
  @execute
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#installation_idObject (readonly)

Returns the value of attribute installation_id.



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

def installation_id
  @installation_id
end

#liveObject (readonly)

Returns the value of attribute live.



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

def live
  @live
end

#loggingObject (readonly)

Returns the value of attribute logging.



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

def logging
  @logging
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#provider_branchObject (readonly)

Returns the value of attribute provider_branch.



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

def provider_branch
  @provider_branch
end

#provider_repository_idObject (readonly)

Returns the value of attribute provider_repository_id.



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

def provider_repository_id
  @provider_repository_id
end

#provider_root_directoryObject (readonly)

Returns the value of attribute provider_root_directory.



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

def provider_root_directory
  @provider_root_directory
end

#provider_silent_modeObject (readonly)

Returns the value of attribute provider_silent_mode.



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

def provider_silent_mode
  @provider_silent_mode
end

#runtimeObject (readonly)

Returns the value of attribute runtime.



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

def runtime
  @runtime
end

#scheduleObject (readonly)

Returns the value of attribute schedule.



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

def schedule
  @schedule
end

#scopesObject (readonly)

Returns the value of attribute scopes.



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

def scopes
  @scopes
end

#specificationObject (readonly)

Returns the value of attribute specification.



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

def specification
  @specification
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



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

def timeout
  @timeout
end

#updated_atObject (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

#varsObject (readonly)

Returns the value of attribute vars.



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

def vars
  @vars
end

#versionObject (readonly)

Returns the value of attribute version.



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

def version
  @version
end

Class Method Details

.from(map:) ⇒ Object



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
# File 'lib/appwrite/models/function.rb', line 83

def self.from(map:)
    Function.new(
        id: map["$id"],
        created_at: map["$createdAt"],
        updated_at: map["$updatedAt"],
        execute: map["execute"],
        name: map["name"],
        enabled: map["enabled"],
        live: map["live"],
        logging: map["logging"],
        runtime: map["runtime"],
        deployment: map["deployment"],
        scopes: map["scopes"],
        vars: map["vars"].map { |it| Variable.from(map: it) },
        events: map["events"],
        schedule: map["schedule"],
        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"],
        specification: map["specification"]
    )
end

Instance Method Details

#to_mapObject



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
# File 'lib/appwrite/models/function.rb', line 112

def to_map
    {
        "$id": @id,
        "$createdAt": @created_at,
        "$updatedAt": @updated_at,
        "execute": @execute,
        "name": @name,
        "enabled": @enabled,
        "live": @live,
        "logging": @logging,
        "runtime": @runtime,
        "deployment": @deployment,
        "scopes": @scopes,
        "vars": @vars.map { |it| it.to_map },
        "events": @events,
        "schedule": @schedule,
        "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,
        "specification": @specification
    }
end