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


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

""" UFS API Schema
"""


"""
API: CreateUFSVolume

创建文件系统
"""


class CreateUFSVolumeRequestSchema(schema.RequestSchema):
    """CreateUFSVolume - 创建文件系统"""

    fields = {
        "ChargeType": fields.Str(required=False, dump_to="ChargeType"),
        "CouponId": fields.Str(required=False, dump_to="CouponId"),
        "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
        "ProtocolType": fields.Str(required=True, dump_to="ProtocolType"),
        "Quantity": fields.Int(required=False, dump_to="Quantity"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "Remark": fields.Str(required=False, dump_to="Remark"),
        "Size": fields.Int(required=True, dump_to="Size"),
        "StorageType": fields.Str(required=True, dump_to="StorageType"),
        "Tag": fields.Str(required=False, dump_to="Tag"),
        "VolumeName": fields.Str(required=False, dump_to="VolumeName"),
    }


class CreateUFSVolumeResponseSchema(schema.ResponseSchema):
    """CreateUFSVolume - 创建文件系统"""

    fields = {
        "VolumeId": fields.Str(required=True, load_from="VolumeId"),
        "VolumeName": fields.Str(required=True, load_from="VolumeName"),
        "VolumeStatus": fields.Str(required=True, load_from="VolumeStatus"),
    }


"""
API: DescribeUFSVolume2

获取文件系统列表
"""


class DescribeUFSVolume2RequestSchema(schema.RequestSchema):
    """DescribeUFSVolume2 - 获取文件系统列表"""

    fields = {
        "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"),
        "VolumeId": fields.Str(required=False, dump_to="VolumeId"),
    }


class DescribeUFSVolume2ResponseSchema(schema.ResponseSchema):
    """DescribeUFSVolume2 - 获取文件系统列表"""

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


"""
API: ExtendUFSVolume

文件系统扩容
"""


class ExtendUFSVolumeRequestSchema(schema.RequestSchema):
    """ExtendUFSVolume - 文件系统扩容"""

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


class ExtendUFSVolumeResponseSchema(schema.ResponseSchema):
    """ExtendUFSVolume - 文件系统扩容"""

    fields = {}


"""
API: RemoveUFSVolume

删除UFS文件系统
"""


class RemoveUFSVolumeRequestSchema(schema.RequestSchema):
    """RemoveUFSVolume - 删除UFS文件系统"""

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


class RemoveUFSVolumeResponseSchema(schema.ResponseSchema):
    """RemoveUFSVolume - 删除UFS文件系统"""

    fields = {}
