""" Code is generated by ucloud-model, DO NOT EDIT IT. """


from ucloud.core.typesystem import schema, fields
from ucloud.services.cube.schemas import models

""" Cube API Schema
"""


"""
API: CreateCubePod

创建Pod
"""


class CreateCubePodRequestSchema(schema.RequestSchema):
    """CreateCubePod - 创建Pod"""

    fields = {
        "ChargeType": fields.Str(required=False, dump_to="ChargeType"),
        "CpuPlatform": fields.Str(required=False, dump_to="CpuPlatform"),
        "Group": fields.Str(required=False, dump_to="Group"),
        "Name": fields.Str(required=False, dump_to="Name"),
        "Pod": fields.Str(required=True, dump_to="Pod"),
        "ProjectId": fields.Str(required=True, dump_to="ProjectId"),
        "Quantity": fields.Int(required=False, dump_to="Quantity"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "SubnetId": fields.Str(required=True, dump_to="SubnetId"),
        "Tag": fields.Str(required=False, dump_to="Tag"),
        "VPCId": fields.Str(required=True, dump_to="VPCId"),
        "Zone": fields.Str(required=True, dump_to="Zone"),
    }


class CreateCubePodResponseSchema(schema.ResponseSchema):
    """CreateCubePod - 创建Pod"""

    fields = {
        "Action": fields.Str(required=True, load_from="Action"),
        "CubeId": fields.Str(required=False, load_from="CubeId"),
        "Pod": fields.Str(required=True, load_from="Pod"),
        "RetCode": fields.Int(required=True, load_from="RetCode"),
    }


"""
API: DeleteCubePod

删除Pod
"""


class DeleteCubePodRequestSchema(schema.RequestSchema):
    """DeleteCubePod - 删除Pod"""

    fields = {
        "CubeId": fields.Str(required=False, dump_to="CubeId"),
        "ProjectId": fields.Str(required=True, dump_to="ProjectId"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "ReleaseEIP": fields.Bool(required=False, dump_to="ReleaseEIP"),
        "Uid": fields.Str(required=False, dump_to="Uid"),
        "Zone": fields.Str(required=False, dump_to="Zone"),
    }


class DeleteCubePodResponseSchema(schema.ResponseSchema):
    """DeleteCubePod - 删除Pod"""

    fields = {}


"""
API: GetCubeExtendInfo

获取Cube的额外信息
"""


class GetCubeExtendInfoRequestSchema(schema.RequestSchema):
    """GetCubeExtendInfo - 获取Cube的额外信息"""

    fields = {
        "CubeIds": fields.Str(required=True, dump_to="CubeIds"),
        "ProjectId": fields.Str(required=True, dump_to="ProjectId"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "Zone": fields.Str(required=False, dump_to="Zone"),
    }


class GetCubeExtendInfoResponseSchema(schema.ResponseSchema):
    """GetCubeExtendInfo - 获取Cube的额外信息"""

    fields = {
        "ExtendInfo": fields.List(
            models.CubeExtendInfoSchema(), required=True, load_from="ExtendInfo"
        ),
    }


"""
API: GetCubePod

获取Pod的详细信息
"""


class GetCubePodRequestSchema(schema.RequestSchema):
    """GetCubePod - 获取Pod的详细信息"""

    fields = {
        "CubeId": fields.Str(required=False, dump_to="CubeId"),
        "ProjectId": fields.Str(required=True, dump_to="ProjectId"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "Uid": fields.Str(required=False, dump_to="Uid"),
        "Zone": fields.Str(required=False, dump_to="Zone"),
    }


class GetCubePodResponseSchema(schema.ResponseSchema):
    """GetCubePod - 获取Pod的详细信息"""

    fields = {
        "Pod": fields.Str(required=True, load_from="Pod"),
    }


"""
API: ListCubePod

获取Pods列表
"""


class ListCubePodRequestSchema(schema.RequestSchema):
    """ListCubePod - 获取Pods列表"""

    fields = {
        "Group": fields.Str(required=False, dump_to="Group"),
        "Limit": fields.Int(required=False, dump_to="Limit"),
        "Offset": fields.Int(required=False, dump_to="Offset"),
        "ProjectId": fields.Str(required=True, dump_to="ProjectId"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "SubnetId": fields.Str(required=False, dump_to="SubnetId"),
        "VPCId": fields.Str(required=False, dump_to="VPCId"),
        "Zone": fields.Str(required=False, dump_to="Zone"),
    }


class ListCubePodResponseSchema(schema.ResponseSchema):
    """ListCubePod - 获取Pods列表"""

    fields = {
        "Pods": fields.List(fields.Str(), required=True, load_from="Pods"),
        "TotalCount": fields.Int(required=False, load_from="TotalCount"),
    }


"""
API: ModifyCubeExtendInfo

修改Cube额外信息
"""


class ModifyCubeExtendInfoRequestSchema(schema.RequestSchema):
    """ModifyCubeExtendInfo - 修改Cube额外信息"""

    fields = {
        "CubeId": fields.Str(required=True, dump_to="CubeId"),
        "Name": fields.Str(required=False, dump_to="Name"),
        "ProjectId": fields.Str(required=True, dump_to="ProjectId"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "Zone": fields.Str(required=False, dump_to="Zone"),
    }


class ModifyCubeExtendInfoResponseSchema(schema.ResponseSchema):
    """ModifyCubeExtendInfo - 修改Cube额外信息"""

    fields = {}


"""
API: RenewCubePod

更新Pod
"""


class RenewCubePodRequestSchema(schema.RequestSchema):
    """RenewCubePod - 更新Pod"""

    fields = {
        "CubeId": fields.Str(required=True, dump_to="CubeId"),
        "Pod": fields.Str(required=True, dump_to="Pod"),
        "ProjectId": fields.Str(required=True, dump_to="ProjectId"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "Zone": fields.Str(required=False, dump_to="Zone"),
    }


class RenewCubePodResponseSchema(schema.ResponseSchema):
    """RenewCubePod - 更新Pod"""

    fields = {
        "Pod": fields.Str(required=True, load_from="Pod"),
    }
