from enum import Enum


class MediaProtocol(str, Enum):
    http = "http"
    s3 = "s3"
    vod = "vod"
    cos = "cos"
    hls = "hls"
    gs = "gs"


class MediaCacheStatus(str, Enum):
    downloading = "downloading"
    failed = "failed"
    ready = "ready"
    deleted = "deleted"
    missing = "missing"
    unknown = "unknown"


class TaskStatus(str, Enum):
    running = "running"
    failed = "failed"
    success = "success"
    expired = "expired"


class CacheOperationType(str, Enum):
    copy = "copy"
    move = "move"
    delete = "delete"


class ErrorCode(int, Enum):
    SUCCESS = 0
    PARAM_ERROR = 10001
    NOT_FOUND = 10002
    UNAUTHORIZED = 10003
    FORBIDDEN = 10004
    BUSINESS_ERROR = 10005
    SYSTEM_ERROR = 99999


class WebhookMethodEnum(str, Enum):
    GET = "get"
    POST = "post"
