class TaskModel(BaseModel): Name: str Configuration: Any = Schema(..., alias="Config") Env: Dict[str, str] Resources: ResourceModel pass
class DockerPublicAuthCredentials(BaseModel): mode: AuthType = Schema(AuthType.CREDENTIALS, const=True) auth: AuthCredentials
class BundleAuthNone(BaseModel): mode: AuthType = Schema(AuthType.NONE, const=True) auth: AuthNone
class BundleBuild(BaseModel): type: BuildType = Schema(BuildType.BUNDLE_UPLOAD, const=True) config: BundleBuildConfig
class Model(BaseModel): foo: int = Schema(4)
class GitBuild(BaseModel): type: BuildType = Schema(BuildType.BUNDLE_GIT, const=True) config: GitBuildConfig
class GitAuthSsh(BaseModel): mode: AuthType = Schema(AuthType.SSH, const=True) auth: AuthSsh
class BuildExecutorInDb(BuildExecutorInBase): refrence_id: ObjectId = Schema(None, alias="refrence_id") exec_status: ExecutionStatus = ExecutionStatus.ENQUEUED result: Optional[DockerImageSpec]
class DockerPrivateBuild(BaseModel): type: BuildType = Schema(BuildType.REGISTRY_PRIVATE, const=True) config: DockerPrivateBuildConfig
class DockerfileBuild(BaseModel): type: BuildType = Schema(BuildType.DOCKERFILE, const=True) config: DockerfileBuildConfig
class DockerImageSpec(BaseModel): AttachStderr: Optional[bool] = Schema(None, alias="AttachStderr") AttachStdin: Optional[bool] = Schema(None, alias="AttachStdin") AttachStdout: Optional[bool] = Schema(None, alias="AttachStdout") Cmd: Optional[List[str]] = Schema(None, alias="Cmd") Domainname: Optional[str] = Schema(None, alias="Domainname") Entrypoint: Optional[List[str]] = Schema(None, alias="Entrypoint") Env: Optional[List[str]] = Schema(None, alias="Env") Hostname: Optional[str] = Schema(None, alias="Hostname") Image: Optional[str] = Schema(None, alias="Image") User: Optional[str] = Schema(None, alias="User") WorkingDir: Optional[str] = Schema(None, alias="WorkingDir") ArgsEscaped: Optional[bool] = Schema(None, alias="ArgsEscaped") NetworkDisabled: Optional[bool] = Schema(None, alias="NetworkDisabled") StopSignal: Optional[str] = Schema(None, alias="StopSignal") Shell: Optional[List[str]] = Schema(None, alias="Shell") class Config: validate_assignment = True @validator('Cmd') def set_cmd(cls, value): return value or [""] @validator('Entrypoint') def set_env(cls, value): return value or [""]
class BuildExecutorCompositeInResponse(BuildExecutorInBase): refrence_id: ObjectId = Schema(None, alias="refrence_id") exec_status: Optional[ExecutionStatus] = ExecutionStatus.UNKNOWN tool: ToolInResp = Schema(None, alias="tool") build_id: ObjectIdInRes = Schema(None, alias="_build_id") tool_id: ObjectIdInRes = Schema(None, alias="_tool_id")
class BuildExecutorInResponse(BuildExecutorInBase): refrence_id: ObjectId = Schema(None, alias="refrence_id") exec_status: Optional[ExecutionStatus] = ExecutionStatus.UNKNOWN tool: ToolInResp = Schema(None, alias="tool") result: Optional[DockerImageSpec]
class DockerPublicBuild(BaseModel): type: BuildType = Schema(BuildType.REGISTRY_PUBLIC, const=True) config: DockerPublicBuildConfig
class GitAuthToken(BaseModel): mode: AuthType = Schema(AuthType.AUTHTOKEN, const=True) auth: AuthToken
class DockerPublicAuthNone(BaseModel): mode: AuthType = Schema(AuthType.NONE, const=True) auth: AuthNone
class BuildExecutorInRequest(BuildExecutorInBase): refrence_id: ObjectIdInReq = Schema(None, alias="refrence_id") exec_status: Optional[ExecutionStatus] = ExecutionStatus.UNKNOWN