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


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

""" UTSDB API Schema
"""


"""
API: CheckUInfluxdbAllowance

检查UInfluxdb剩余资源
"""


class CheckUInfluxdbAllowanceRequestSchema(schema.RequestSchema):
    """CheckUInfluxdbAllowance - 检查UInfluxdb剩余资源"""

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


class CheckUInfluxdbAllowanceResponseSchema(schema.ResponseSchema):
    """CheckUInfluxdbAllowance - 检查UInfluxdb剩余资源"""

    fields = {
        "Count": fields.Int(required=True, load_from="Count"),
    }


"""
API: CreateUInfluxdbDatabase

创建Influxdb数据库
"""


class CreateUInfluxdbDatabaseRequestSchema(schema.RequestSchema):
    """CreateUInfluxdbDatabase - 创建Influxdb数据库"""

    fields = {
        "AccoutName": fields.Str(required=False, dump_to="AccoutName"),
        "DatabaseName": fields.Str(required=True, dump_to="DatabaseName"),
        "Description": fields.Str(required=False, dump_to="Description"),
        "ProjectId": fields.Str(required=True, dump_to="ProjectId"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "RetentionPolicy": fields.Str(
            required=False, dump_to="RetentionPolicy"
        ),
        "UInfluxdbId": fields.Str(required=True, dump_to="UInfluxdbId"),
        "Zone": fields.Str(required=True, dump_to="Zone"),
    }


class CreateUInfluxdbDatabaseResponseSchema(schema.ResponseSchema):
    """CreateUInfluxdbDatabase - 创建Influxdb数据库"""

    fields = {}


"""
API: CreateUInfluxdbDatabaseRP

给指定的database创建一个保留策略，最多可以创建10个RP
"""


class CreateUInfluxdbDatabaseRPRequestSchema(schema.RequestSchema):
    """CreateUInfluxdbDatabaseRP - 给指定的database创建一个保留策略，最多可以创建10个RP"""

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


class CreateUInfluxdbDatabaseRPResponseSchema(schema.ResponseSchema):
    """CreateUInfluxdbDatabaseRP - 给指定的database创建一个保留策略，最多可以创建10个RP"""

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


"""
API: CreateUInfluxdbInstance

创建UInfluxdb实例
"""


class CreateUInfluxdbInstanceRequestSchema(schema.RequestSchema):
    """CreateUInfluxdbInstance - 创建UInfluxdb实例"""

    fields = {
        "AccountName": fields.Str(required=True, dump_to="AccountName"),
        "ChargeType": fields.Str(required=True, dump_to="ChargeType"),
        "CouponId": fields.Str(required=False, dump_to="CouponId"),
        "CpuLimit": fields.Int(required=True, dump_to="CpuLimit"),
        "DatabaseName": fields.Str(required=True, dump_to="DatabaseName"),
        "MemoryLimit": fields.Int(required=True, dump_to="MemoryLimit"),
        "Name": fields.Str(required=True, dump_to="Name"),
        "Password": fields.Str(required=True, dump_to="Password"),
        "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
        "Quantity": fields.Int(required=True, 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 CreateUInfluxdbInstanceResponseSchema(schema.ResponseSchema):
    """CreateUInfluxdbInstance - 创建UInfluxdb实例"""

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


"""
API: DeleteUInfluxdbDatabase

删除Influxdb实例的数据库
"""


class DeleteUInfluxdbDatabaseRequestSchema(schema.RequestSchema):
    """DeleteUInfluxdbDatabase - 删除Influxdb实例的数据库"""

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


class DeleteUInfluxdbDatabaseResponseSchema(schema.ResponseSchema):
    """DeleteUInfluxdbDatabase - 删除Influxdb实例的数据库"""

    fields = {}


"""
API: DeleteUInfluxdbDatabaseRP

删除指定数据库下面的一个数据保留策略
"""


class DeleteUInfluxdbDatabaseRPRequestSchema(schema.RequestSchema):
    """DeleteUInfluxdbDatabaseRP - 删除指定数据库下面的一个数据保留策略"""

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


class DeleteUInfluxdbDatabaseRPResponseSchema(schema.ResponseSchema):
    """DeleteUInfluxdbDatabaseRP - 删除指定数据库下面的一个数据保留策略"""

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


"""
API: DeleteUInfluxdbInstance

删除UInfluxdb实例
"""


class DeleteUInfluxdbInstanceRequestSchema(schema.RequestSchema):
    """DeleteUInfluxdbInstance - 删除UInfluxdb实例"""

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


class DeleteUInfluxdbInstanceResponseSchema(schema.ResponseSchema):
    """DeleteUInfluxdbInstance - 删除UInfluxdb实例"""

    fields = {}


"""
API: DescribeUInfluxdbDatabase

描述UInfluxdb数据库
"""


class DescribeUInfluxdbDatabaseRequestSchema(schema.RequestSchema):
    """DescribeUInfluxdbDatabase - 描述UInfluxdb数据库"""

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


class DescribeUInfluxdbDatabaseResponseSchema(schema.ResponseSchema):
    """DescribeUInfluxdbDatabase - 描述UInfluxdb数据库"""

    fields = {
        "DatabaseInfo": fields.List(
            models.DatabaseInfoSchema(), required=True, load_from="DatabaseInfo"
        ),
    }


"""
API: DescribeUInfluxdbDatabaseRP

获取指定数据库下面的所有保留策略
"""


class DescribeUInfluxdbDatabaseRPRequestSchema(schema.RequestSchema):
    """DescribeUInfluxdbDatabaseRP - 获取指定数据库下面的所有保留策略"""

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


class DescribeUInfluxdbDatabaseRPResponseSchema(schema.ResponseSchema):
    """DescribeUInfluxdbDatabaseRP - 获取指定数据库下面的所有保留策略"""

    fields = {
        "DataSet": fields.List(
            models.RpDataSchema(), required=True, load_from="DataSet"
        ),
        "Message": fields.Str(required=True, load_from="Message"),
    }


"""
API: DescribeUInfluxdbInstance

拉取UInfluxdb实例列表
"""


class DescribeUInfluxdbInstanceRequestSchema(schema.RequestSchema):
    """DescribeUInfluxdbInstance - 拉取UInfluxdb实例列表"""

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


class DescribeUInfluxdbInstanceResponseSchema(schema.ResponseSchema):
    """DescribeUInfluxdbInstance - 拉取UInfluxdb实例列表"""

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


"""
API: DescribeUInfluxdbPrice

获取UInfluxdb价格
"""


class DescribeUInfluxdbPriceRequestSchema(schema.RequestSchema):
    """DescribeUInfluxdbPrice - 获取UInfluxdb价格"""

    fields = {
        "ChargeType": fields.Str(required=False, dump_to="ChargeType"),
        "CpuLimit": fields.Int(required=True, dump_to="CpuLimit"),
        "MemoryLimit": fields.Int(required=False, dump_to="MemoryLimit"),
        "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
        "Quantity": fields.Int(required=False, dump_to="Quantity"),
        "Region": fields.Str(required=True, dump_to="Region"),
        "Zone": fields.Str(required=True, dump_to="Zone"),
    }


class DescribeUInfluxdbPriceResponseSchema(schema.ResponseSchema):
    """DescribeUInfluxdbPrice - 获取UInfluxdb价格"""

    fields = {
        "OriginalPrice": fields.Float(
            required=False, load_from="OriginalPrice"
        ),
        "Price": fields.Float(required=True, load_from="Price"),
    }


"""
API: DescribeUInfluxdbUpgradePrice

获取UIfluxdb升降级价格
"""


class DescribeUInfluxdbUpgradePriceRequestSchema(schema.RequestSchema):
    """DescribeUInfluxdbUpgradePrice - 获取UIfluxdb升降级价格"""

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


class DescribeUInfluxdbUpgradePriceResponseSchema(schema.ResponseSchema):
    """DescribeUInfluxdbUpgradePrice - 获取UIfluxdb升降级价格"""

    fields = {
        "OriginalPrice": fields.Float(
            required=False, load_from="OriginalPrice"
        ),
        "TotalPrice": fields.Float(required=True, load_from="TotalPrice"),
    }


"""
API: ModifyUInfluxdbDatabasePolicy

更改UInfluxdb实例数据库数据保留策略
"""


class ModifyUInfluxdbDatabasePolicyRequestSchema(schema.RequestSchema):
    """ModifyUInfluxdbDatabasePolicy - 更改UInfluxdb实例数据库数据保留策略"""

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


class ModifyUInfluxdbDatabasePolicyResponseSchema(schema.ResponseSchema):
    """ModifyUInfluxdbDatabasePolicy - 更改UInfluxdb实例数据库数据保留策略"""

    fields = {}


"""
API: RebootUInfluxdbInstance

重启UInfluxdb实例
"""


class RebootUInfluxdbInstanceRequestSchema(schema.RequestSchema):
    """RebootUInfluxdbInstance - 重启UInfluxdb实例"""

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


class RebootUInfluxdbInstanceResponseSchema(schema.ResponseSchema):
    """RebootUInfluxdbInstance - 重启UInfluxdb实例"""

    fields = {}


"""
API: ResetUInfluxdbInstanceName

更改UIfluxdb实例名称
"""


class ResetUInfluxdbInstanceNameRequestSchema(schema.RequestSchema):
    """ResetUInfluxdbInstanceName - 更改UIfluxdb实例名称"""

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


class ResetUInfluxdbInstanceNameResponseSchema(schema.ResponseSchema):
    """ResetUInfluxdbInstanceName - 更改UIfluxdb实例名称"""

    fields = {}


"""
API: StartUInfluxdbInstance

启动UInfluxdb实例
"""


class StartUInfluxdbInstanceRequestSchema(schema.RequestSchema):
    """StartUInfluxdbInstance - 启动UInfluxdb实例"""

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


class StartUInfluxdbInstanceResponseSchema(schema.ResponseSchema):
    """StartUInfluxdbInstance - 启动UInfluxdb实例"""

    fields = {}


"""
API: StopUInfluxdbInstance

关闭UInfluxdb实例
"""


class StopUInfluxdbInstanceRequestSchema(schema.RequestSchema):
    """StopUInfluxdbInstance - 关闭UInfluxdb实例"""

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


class StopUInfluxdbInstanceResponseSchema(schema.ResponseSchema):
    """StopUInfluxdbInstance - 关闭UInfluxdb实例"""

    fields = {}


"""
API: UpgradeUInfluxdbInstance

UInfluxdb实例配置升降级
"""


class UpgradeUInfluxdbInstanceRequestSchema(schema.RequestSchema):
    """UpgradeUInfluxdbInstance - UInfluxdb实例配置升降级"""

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


class UpgradeUInfluxdbInstanceResponseSchema(schema.ResponseSchema):
    """UpgradeUInfluxdbInstance - UInfluxdb实例配置升降级"""

    fields = {}
