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


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

""" UK8S API Schema
"""


"""
API: AddUK8SExistingUHost

将预先创建好的云主机加入到UK8S集群，需要注意的是，该云主机依然会执行重装系统的操作。
"""


class AddUK8SExistingUHostRequestSchema(schema.RequestSchema):
    """AddUK8SExistingUHost - 将预先创建好的云主机加入到UK8S集群，需要注意的是，该云主机依然会执行重装系统的操作。"""

    fields = {
        "ClusterId": fields.Str(required=True, dump_to="ClusterId"),
        "DisableSchedule": fields.Bool(
            required=False, dump_to="DisableSchedule"
        ),
        "ImageId": fields.Str(required=False, dump_to="ImageId"),
        "InitScript": fields.Str(required=False, dump_to="InitScript"),
        "Labels": fields.Str(required=False, dump_to="Labels"),
        "MaxPods": fields.Int(required=False, dump_to="MaxPods"),
        "Password": fields.Str(required=True, dump_to="Password"),
        "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "SubnetId": fields.Str(required=False, dump_to="SubnetId"),
        "UHostId": fields.Str(required=True, dump_to="UHostId"),
        "UserData": fields.Str(required=False, dump_to="UserData"),
        "Zone": fields.Str(required=False, dump_to="Zone"),
    }


class AddUK8SExistingUHostResponseSchema(schema.ResponseSchema):
    """AddUK8SExistingUHost - 将预先创建好的云主机加入到UK8S集群，需要注意的是，该云主机依然会执行重装系统的操作。"""

    fields = {
        "Message": fields.Str(required=False, load_from="Message"),
    }


"""
API: AddUK8SPHostNode

为UK8S集群添加一台或多台物理云主机类型的节点。
"""


class AddUK8SPHostNodeRequestSchema(schema.RequestSchema):
    """AddUK8SPHostNode - 为UK8S集群添加一台或多台物理云主机类型的节点。"""

    fields = {
        "ChargeType": fields.Str(required=True, dump_to="ChargeType"),
        "ClusterId": fields.Str(required=True, dump_to="ClusterId"),
        "Count": fields.Int(required=True, dump_to="Count"),
        "DisableSchedule": fields.Bool(
            required=False, dump_to="DisableSchedule"
        ),
        "ImageId": fields.Str(required=False, dump_to="ImageId"),
        "InitScript": fields.Str(required=False, dump_to="InitScript"),
        "Labels": fields.Str(required=False, dump_to="Labels"),
        "MaxPods": fields.Int(required=False, dump_to="MaxPods"),
        "NIC": fields.Str(required=False, dump_to="NIC"),
        "Password": fields.Str(required=True, dump_to="Password"),
        "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
        "Quantity": fields.Int(required=False, dump_to="Quantity"),
        "Raid": fields.Str(required=False, dump_to="Raid"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "SubnetId": fields.Str(required=False, dump_to="SubnetId"),
        "Type": fields.Str(required=False, dump_to="Type"),
        "Zone": fields.Str(required=True, dump_to="Zone"),
    }


class AddUK8SPHostNodeResponseSchema(schema.ResponseSchema):
    """AddUK8SPHostNode - 为UK8S集群添加一台或多台物理云主机类型的节点。"""

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


"""
API: AddUK8SUHostNode

为UK8S集群添加一台Node节点，机型类型为云主机
"""


class AddUK8SUHostNodeRequestSchema(schema.RequestSchema):
    """AddUK8SUHostNode - 为UK8S集群添加一台Node节点，机型类型为云主机"""

    fields = {
        "BootDiskType": fields.Str(required=False, dump_to="BootDiskType"),
        "CPU": fields.Int(required=True, dump_to="CPU"),
        "ChargeType": fields.Str(required=True, dump_to="ChargeType"),
        "ClusterId": fields.Str(required=True, dump_to="ClusterId"),
        "Count": fields.Int(required=True, dump_to="Count"),
        "DataDiskSize": fields.Str(required=False, dump_to="DataDiskSize"),
        "DataDiskType": fields.Str(required=False, dump_to="DataDiskType"),
        "DisableSchedule": fields.Bool(
            required=False, dump_to="DisableSchedule"
        ),
        "GPU": fields.Int(required=False, dump_to="GPU"),
        "GpuType": fields.Str(required=False, dump_to="GpuType"),
        "ImageId": fields.Str(required=False, dump_to="ImageId"),
        "InitScript": fields.Str(required=False, dump_to="InitScript"),
        "IsolationGroup": fields.Str(required=False, dump_to="IsolationGroup"),
        "Labels": fields.Str(required=False, dump_to="Labels"),
        "MachineType": fields.Str(required=False, dump_to="MachineType"),
        "MaxPods": fields.Int(required=False, dump_to="MaxPods"),
        "Mem": fields.Int(required=True, dump_to="Mem"),
        "MinmalCpuPlatform": fields.Str(
            required=False, dump_to="MinmalCpuPlatform"
        ),
        "Password": fields.Str(required=True, dump_to="Password"),
        "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
        "Quantity": fields.Int(required=False, dump_to="Quantity"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "SubnetId": fields.Str(required=False, dump_to="SubnetId"),
        "UserData": fields.Str(required=False, dump_to="UserData"),
        "Zone": fields.Str(required=True, dump_to="Zone"),
    }


class AddUK8SUHostNodeResponseSchema(schema.ResponseSchema):
    """AddUK8SUHostNode - 为UK8S集群添加一台Node节点，机型类型为云主机"""

    fields = {
        "Message": fields.Str(required=True, load_from="Message"),
        "NodeIds": fields.List(
            fields.Str(), required=False, load_from="NodeIds"
        ),
    }


"""
API: CreateUK8SClusterV2

创建UK8S集群
"""


class CreateUK8SClusterV2ParamMasterSchema(schema.RequestSchema):
    """CreateUK8SClusterV2ParamMaster -"""

    fields = {
        "Zone": fields.Str(required=True, dump_to="Zone"),
    }


class CreateUK8SClusterV2ParamKubeProxySchema(schema.RequestSchema):
    """CreateUK8SClusterV2ParamKubeProxy -"""

    fields = {
        "Mode": fields.Str(required=False, dump_to="Mode"),
    }


class CreateUK8SClusterV2ParamNodesSchema(schema.RequestSchema):
    """CreateUK8SClusterV2ParamNodes -"""

    fields = {
        "BootDiskType": fields.Str(required=False, dump_to="BootDiskType"),
        "CPU": fields.Int(required=True, dump_to="CPU"),
        "Count": fields.Int(required=True, dump_to="Count"),
        "DataDiskSize": fields.Int(required=False, dump_to="DataDiskSize"),
        "DataDiskType": fields.Str(required=False, dump_to="DataDiskType"),
        "GPU": fields.Int(required=False, dump_to="GPU"),
        "GpuType": fields.Str(required=False, dump_to="GpuType"),
        "IsolationGroup": fields.Str(required=False, dump_to="IsolationGroup"),
        "Labels": fields.Str(required=False, dump_to="Labels"),
        "MachineType": fields.Str(required=True, dump_to="MachineType"),
        "MaxPods": fields.Int(required=False, dump_to="MaxPods"),
        "Mem": fields.Int(required=True, dump_to="Mem"),
        "MinmalCpuPlatform": fields.Str(
            required=False, dump_to="MinmalCpuPlatform"
        ),
        "Zone": fields.Str(required=True, dump_to="Zone"),
    }


class CreateUK8SClusterV2RequestSchema(schema.RequestSchema):
    """CreateUK8SClusterV2 - 创建UK8S集群"""

    fields = {
        "ChargeType": fields.Str(required=False, dump_to="ChargeType"),
        "ClusterName": fields.Str(required=True, dump_to="ClusterName"),
        "ExternalApiServer": fields.Str(
            required=False, dump_to="ExternalApiServer"
        ),
        "ImageId": fields.Str(required=False, dump_to="ImageId"),
        "InitScript": fields.Str(required=False, dump_to="InitScript"),
        "K8sVersion": fields.Str(required=False, dump_to="K8sVersion"),
        "KubeProxy": CreateUK8SClusterV2ParamKubeProxySchema(
            required=False, dump_to="KubeProxy"
        ),
        "Master": fields.List(CreateUK8SClusterV2ParamMasterSchema()),
        "MasterBootDiskType": fields.Str(
            required=False, dump_to="MasterBootDiskType"
        ),
        "MasterCPU": fields.Int(required=True, dump_to="MasterCPU"),
        "MasterDataDiskSize": fields.Int(
            required=False, dump_to="MasterDataDiskSize"
        ),
        "MasterDataDiskType": fields.Str(
            required=False, dump_to="MasterDataDiskType"
        ),
        "MasterIsolationGroup": fields.Str(
            required=False, dump_to="MasterIsolationGroup"
        ),
        "MasterMachineType": fields.Str(
            required=True, dump_to="MasterMachineType"
        ),
        "MasterMem": fields.Int(required=True, dump_to="MasterMem"),
        "MasterMinmalCpuPlatform": fields.Str(
            required=False, dump_to="MasterMinmalCpuPlatform"
        ),
        "Nodes": fields.List(CreateUK8SClusterV2ParamNodesSchema()),
        "Password": fields.Str(required=True, dump_to="Password"),
        "ProjectId": fields.Str(required=True, dump_to="ProjectId"),
        "Quantity": fields.Int(required=False, dump_to="Quantity"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "ServiceCIDR": fields.Str(required=True, dump_to="ServiceCIDR"),
        "SubnetId": fields.Str(required=True, dump_to="SubnetId"),
        "UserData": fields.Str(required=False, dump_to="UserData"),
        "VPCId": fields.Str(required=True, dump_to="VPCId"),
    }


class CreateUK8SClusterV2ResponseSchema(schema.ResponseSchema):
    """CreateUK8SClusterV2 - 创建UK8S集群"""

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


"""
API: DelUK8SCluster

删除UK8S集群
"""


class DelUK8SClusterRequestSchema(schema.RequestSchema):
    """DelUK8SCluster - 删除UK8S集群"""

    fields = {
        "ClusterId": fields.Str(required=True, dump_to="ClusterId"),
        "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "ReleaseUDisk": fields.Bool(required=False, dump_to="ReleaseUDisk"),
    }


class DelUK8SClusterResponseSchema(schema.ResponseSchema):
    """DelUK8SCluster - 删除UK8S集群"""

    fields = {}


"""
API: DelUK8SClusterNodeV2

删除集群中的Node节点，删除前务必先将其中的Pod驱逐。
"""


class DelUK8SClusterNodeV2RequestSchema(schema.RequestSchema):
    """DelUK8SClusterNodeV2 - 删除集群中的Node节点，删除前务必先将其中的Pod驱逐。"""

    fields = {
        "ClusterId": fields.Str(required=True, dump_to="ClusterId"),
        "NodeId": fields.Str(required=True, dump_to="NodeId"),
        "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "ReleaseDataUDisk": fields.Bool(
            required=False, dump_to="ReleaseDataUDisk"
        ),
    }


class DelUK8SClusterNodeV2ResponseSchema(schema.ResponseSchema):
    """DelUK8SClusterNodeV2 - 删除集群中的Node节点，删除前务必先将其中的Pod驱逐。"""

    fields = {
        "Message": fields.Str(required=False, load_from="Message"),
    }


"""
API: DescribeUK8SImage

获取UK8S支持的Node节点操作系统，可基于该操作系统制定自定义镜像
"""


class DescribeUK8SImageRequestSchema(schema.RequestSchema):
    """DescribeUK8SImage - 获取UK8S支持的Node节点操作系统，可基于该操作系统制定自定义镜像"""

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


class DescribeUK8SImageResponseSchema(schema.ResponseSchema):
    """DescribeUK8SImage - 获取UK8S支持的Node节点操作系统，可基于该操作系统制定自定义镜像"""

    fields = {
        "ImageSet": fields.List(
            models.ImageInfoSchema(), required=False, load_from="ImageSet"
        ),
        "Message": fields.Str(required=True, load_from="Message"),
        "PHostImageSet": fields.List(
            models.ImageInfoSchema(), required=False, load_from="PHostImageSet"
        ),
    }


"""
API: ListUK8SClusterNodeV2

获取UK8S集群节点信息
"""


class ListUK8SClusterNodeV2RequestSchema(schema.RequestSchema):
    """ListUK8SClusterNodeV2 - 获取UK8S集群节点信息"""

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


class ListUK8SClusterNodeV2ResponseSchema(schema.ResponseSchema):
    """ListUK8SClusterNodeV2 - 获取UK8S集群节点信息"""

    fields = {
        "NodeSet": fields.List(
            models.NodeInfoV2Schema(), required=True, load_from="NodeSet"
        ),
        "TotalCount": fields.Int(required=True, load_from="TotalCount"),
    }


"""
API: ListUK8SClusterV2

获取UK8S集群列表信息
"""


class ListUK8SClusterV2RequestSchema(schema.RequestSchema):
    """ListUK8SClusterV2 - 获取UK8S集群列表信息"""

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


class ListUK8SClusterV2ResponseSchema(schema.ResponseSchema):
    """ListUK8SClusterV2 - 获取UK8S集群列表信息"""

    fields = {
        "ClusterCount": fields.Int(required=True, load_from="ClusterCount"),
        "ClusterSet": fields.List(
            models.ClusterSetSchema(), required=False, load_from="ClusterSet"
        ),
    }
