mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-12 15:20:51 +08:00
95 lines
2.7 KiB
Python
95 lines
2.7 KiB
Python
# coding: utf-8
|
|
|
|
"""
|
|
comfyui
|
|
No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501
|
|
The version of the OpenAPI document: 0.0.1
|
|
Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
from comfy.api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary]
|
|
|
|
|
|
|
|
class SchemaEnums:
|
|
|
|
@schemas.classproperty
|
|
def OUTPUT(cls) -> typing.Literal["output"]:
|
|
return Schema.validate("output")
|
|
|
|
@schemas.classproperty
|
|
def INPUT(cls) -> typing.Literal["input"]:
|
|
return Schema.validate("input")
|
|
|
|
@schemas.classproperty
|
|
def TEMP(cls) -> typing.Literal["temp"]:
|
|
return Schema.validate("temp")
|
|
|
|
|
|
@dataclasses.dataclass(frozen=True)
|
|
class Schema(
|
|
schemas.Schema
|
|
):
|
|
types: typing.FrozenSet[typing.Type] = frozenset({
|
|
str,
|
|
})
|
|
enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field(
|
|
default_factory=lambda: {
|
|
"output": "OUTPUT",
|
|
"input": "INPUT",
|
|
"temp": "TEMP",
|
|
}
|
|
)
|
|
enums = SchemaEnums
|
|
|
|
@typing.overload
|
|
@classmethod
|
|
def validate(
|
|
cls,
|
|
arg: typing.Literal["output"],
|
|
configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
|
|
) -> typing.Literal["output"]: ...
|
|
@typing.overload
|
|
@classmethod
|
|
def validate(
|
|
cls,
|
|
arg: typing.Literal["input"],
|
|
configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
|
|
) -> typing.Literal["input"]: ...
|
|
@typing.overload
|
|
@classmethod
|
|
def validate(
|
|
cls,
|
|
arg: typing.Literal["temp"],
|
|
configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
|
|
) -> typing.Literal["temp"]: ...
|
|
@typing.overload
|
|
@classmethod
|
|
def validate(
|
|
cls,
|
|
arg: str,
|
|
configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
|
|
) -> typing.Literal["output","input","temp",]: ...
|
|
@classmethod
|
|
def validate(
|
|
cls,
|
|
arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID],
|
|
configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
|
|
) -> typing.Literal[
|
|
"output",
|
|
"input",
|
|
"temp",
|
|
]:
|
|
validated_arg = super().validate_base(
|
|
arg,
|
|
configuration=configuration,
|
|
)
|
|
return typing.cast(typing.Literal[
|
|
"output",
|
|
"input",
|
|
"temp",
|
|
],
|
|
validated_arg
|
|
)
|