Definition class

Constructors

Definition({String? code, List<String> envNames = const [], String? environment, String? handler, String? image, String? memoryLimit, required String name, String? namespace, String? runtime, String? target, int? timeoutSec})
Returns a new Definition instance.

Properties

code ↔ String?
Code is the source to run, capped so one function cannot amplify the store.
getter/setter pair
environment ↔ String?
Environment is a second spelling of runtime, accepted so a console that says "environment" needs no translation.
getter/setter pair
envNames ↔ List<String>
EnvNames are the secret NAMES to mount. Values live in the secret store and are never carried here.
getter/setter pair
handler ↔ String?
Handler is the entry point within the code.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
image ↔ String?
Image names a prebuilt image to run instead of source.
getter/setter pair
memoryLimit ↔ String?
MemoryLimit is the memory the function runs with, defaulting to 256Mi. It is also the multiplier on the GB-seconds compute charge.
getter/setter pair
name ↔ String
Name is the function's org-unique handle and the segment that addresses it, matching ^A-Za-z0-9._-{0,63}$. The names that would shadow a collection route are reserved.
getter/setter pair
namespace ↔ String?
Namespace groups functions for display. It is cosmetic — the org is the isolation key — and is normalised to a DNS-safe label.
getter/setter pair
runtime ↔ String?
Runtime is the language the code runs under: node, python or deno.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
target ↔ String?
Target is where the function runs: sandbox (the default) or fleet, the org's own GPU fleet. fleet supports runtime=python only.
getter/setter pair
timeoutSec ↔ int?
TimeoutSec is the per-invocation deadline, defaulting to 30 and clamped at 900 — a larger value is capped rather than reset to the default.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → Definition?
Returns a new Definition instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Definition>
mapFromJson(dynamic json) → Map<String, Definition>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Definition>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.