Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/graphn/_generated/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,15 @@
from .function_create import FunctionCreate
from .function_create_files import FunctionCreateFiles
from .function_create_parameters_schema import FunctionCreateParametersSchema
from .function_create_type import FunctionCreateType
from .function_dry_run_request import FunctionDryRunRequest
from .function_dry_run_request_files import FunctionDryRunRequestFiles
from .function_dry_run_request_input import FunctionDryRunRequestInput
from .function_list import FunctionList
from .function_spec import FunctionSpec
from .function_spec_files import FunctionSpecFiles
from .function_spec_parameters_schema import FunctionSpecParametersSchema
from .function_spec_type import FunctionSpecType
from .function_test_request import FunctionTestRequest
from .function_test_request_input import FunctionTestRequestInput
from .function_test_response import FunctionTestResponse
Expand Down Expand Up @@ -425,13 +427,15 @@
"FunctionCreate",
"FunctionCreateFiles",
"FunctionCreateParametersSchema",
"FunctionCreateType",
"FunctionDryRunRequest",
"FunctionDryRunRequestFiles",
"FunctionDryRunRequestInput",
"FunctionList",
"FunctionSpec",
"FunctionSpecFiles",
"FunctionSpecParametersSchema",
"FunctionSpecType",
"FunctionTestRequest",
"FunctionTestRequestInput",
"FunctionTestResponse",
Expand Down
16 changes: 12 additions & 4 deletions src/graphn/_generated/models/function_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from attrs import define as _attrs_define
from typing_extensions import Self

from ..models.function_create_type import FunctionCreateType
from ..types import UNSET, Unset

if TYPE_CHECKING:
Expand All @@ -23,7 +24,7 @@ class FunctionCreate:
"""
Attributes:
name (str):
type_ (str | Unset):
type_ (FunctionCreateType | Unset):
description (str | Unset):
files (FunctionCreateFiles | Unset):
parameters_schema (FunctionCreateParametersSchema | Unset):
Expand All @@ -33,7 +34,7 @@ class FunctionCreate:
"""

name: str
type_: str | Unset = UNSET
type_: FunctionCreateType | Unset = UNSET
description: str | Unset = UNSET
files: FunctionCreateFiles | Unset = UNSET
parameters_schema: FunctionCreateParametersSchema | Unset = UNSET
Expand All @@ -44,7 +45,9 @@ class FunctionCreate:
def to_dict(self) -> dict[str, Any]:
name = self.name

type_ = self.type_
type_: str | Unset = UNSET
if not isinstance(self.type_, Unset):
type_ = self.type_.value

description = self.description

Expand Down Expand Up @@ -96,7 +99,12 @@ def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
name = d.pop("name")

type_ = d.pop("type", UNSET)
_type_ = d.pop("type", UNSET)
type_: FunctionCreateType | Unset
if isinstance(_type_, Unset):
type_ = UNSET
else:
type_ = FunctionCreateType(_type_)

description = d.pop("description", UNSET)

Expand Down
9 changes: 9 additions & 0 deletions src/graphn/_generated/models/function_create_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from enum import Enum


class FunctionCreateType(str, Enum):
BUILTIN = "builtin"
CUSTOM = "custom"

def __str__(self) -> str:
return str(self.value)
16 changes: 12 additions & 4 deletions src/graphn/_generated/models/function_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from attrs import field as _attrs_field
from typing_extensions import Self

from ..models.function_spec_type import FunctionSpecType
from ..types import UNSET, Unset

if TYPE_CHECKING:
Expand All @@ -21,15 +22,15 @@
class FunctionSpec:
"""
Attributes:
type_ (str | Unset):
type_ (FunctionSpecType | Unset):
description (str | Unset):
files (FunctionSpecFiles | Unset):
parameters_schema (FunctionSpecParametersSchema | Unset):
builtin_name (str | Unset):
memory_mb (int | Unset):
"""

type_: str | Unset = UNSET
type_: FunctionSpecType | Unset = UNSET
description: str | Unset = UNSET
files: FunctionSpecFiles | Unset = UNSET
parameters_schema: FunctionSpecParametersSchema | Unset = UNSET
Expand All @@ -38,7 +39,9 @@ class FunctionSpec:
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:
type_ = self.type_
type_: str | Unset = UNSET
if not isinstance(self.type_, Unset):
type_ = self.type_.value

description = self.description

Expand Down Expand Up @@ -80,7 +83,12 @@ def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
)

d = dict(src_dict)
type_ = d.pop("type", UNSET)
_type_ = d.pop("type", UNSET)
type_: FunctionSpecType | Unset
if isinstance(_type_, Unset):
type_ = UNSET
else:
type_ = FunctionSpecType(_type_)

description = d.pop("description", UNSET)

Expand Down
9 changes: 9 additions & 0 deletions src/graphn/_generated/models/function_spec_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from enum import Enum


class FunctionSpecType(str, Enum):
BUILTIN = "builtin"
CUSTOM = "custom"

def __str__(self) -> str:
return str(self.value)
Loading