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

from ucloud.core.typesystem import schema, fields


class UDBInstanceSchema(schema.ResponseSchema):
    """UDBInstance - 数据库信息"""

    fields = {
        "AdminUser": fields.Str(required=False, load_from="AdminUser"),
        "BackupBeginTime": fields.Int(
            required=False, load_from="BackupBeginTime"
        ),
        "BackupCount": fields.Int(required=False, load_from="BackupCount"),
        "BackupDate": fields.Str(required=False, load_from="BackupDate"),
        "BackupTimeRange": fields.Int(
            required=False, load_from="BackupTimeRange"
        ),
        "BackupZone": fields.Str(required=False, load_from="BackupZone"),
        "CreateTime": fields.Int(required=False, load_from="CreateTime"),
        "DBVersion": fields.Str(required=False, load_from="DBVersion"),
        "DataFileSize": fields.Float(required=False, load_from="DataFileSize"),
        "DiskSpace": fields.Int(required=False, load_from="DiskSpace"),
        "DiskUsedSize": fields.Float(required=False, load_from="DiskUsedSize"),
        "ExpiredTime": fields.Int(required=False, load_from="ExpiredTime"),
        "IP": fields.Str(required=False, load_from="IP"),
        "InstanceID": fields.Str(required=False, load_from="InstanceID"),
        "InstanceMode": fields.Str(required=False, load_from="InstanceMode"),
        "LogFileSize": fields.Float(required=False, load_from="LogFileSize"),
        "MemoryLimit": fields.Int(required=False, load_from="MemoryLimit"),
        "ModifyTime": fields.Int(required=False, load_from="ModifyTime"),
        "Name": fields.Str(required=False, load_from="Name"),
        "ParamGroupID": fields.Int(required=False, load_from="ParamGroupID"),
        "Port": fields.Int(required=False, load_from="Port"),
        "Remark": fields.Str(required=False, load_from="Remark"),
        "State": fields.Str(required=False, load_from="State"),
        "SubnetID": fields.Str(required=False, load_from="SubnetID"),
        "SystemFileSize": fields.Float(
            required=False, load_from="SystemFileSize"
        ),
        "VPCID": fields.Str(required=False, load_from="VPCID"),
        "Zone": fields.Str(required=False, load_from="Zone"),
    }


class UPgSQLInstancePriceSetSchema(schema.ResponseSchema):
    """UPgSQLInstancePriceSet - PG云数据库价格"""

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


class ParamSchema(schema.ResponseSchema):
    """Param -"""

    fields = {
        "AllowedVal": fields.Str(required=False, load_from="AllowedVal"),
        "ApplyType": fields.Int(required=False, load_from="ApplyType"),
        "FormatType": fields.Int(required=False, load_from="FormatType"),
        "Key": fields.Str(required=False, load_from="Key"),
        "Modifiable": fields.Bool(required=False, load_from="Modifiable"),
        "Value": fields.Str(required=False, load_from="Value"),
        "ValueType": fields.Int(required=False, load_from="ValueType"),
    }


class UPgSQLBackupSchema(schema.ResponseSchema):
    """UPgSQLBackup - 备份详情信息"""

    fields = {
        "BackupEndTime": fields.Int(required=False, load_from="BackupEndTime"),
        "BackupID": fields.Str(required=True, load_from="BackupID"),
        "BackupName": fields.Str(required=False, load_from="BackupName"),
        "BackupSize": fields.Int(required=False, load_from="BackupSize"),
        "BackupStartTime": fields.Int(
            required=False, load_from="BackupStartTime"
        ),
        "BackupType": fields.Int(required=False, load_from="BackupType"),
        "InstanceID": fields.Str(required=True, load_from="InstanceID"),
        "Region": fields.Str(required=False, load_from="Region"),
        "State": fields.Str(required=False, load_from="State"),
    }


class UDBReadonlyInstanceSchema(schema.ResponseSchema):
    """UDBReadonlyInstance - 只读从库结构"""

    fields = {
        "CreateTime": fields.Int(required=False, load_from="CreateTime"),
        "DBVersion": fields.Str(required=False, load_from="DBVersion"),
        "ExpiredTime": fields.Int(required=False, load_from="ExpiredTime"),
        "IP": fields.Str(required=False, load_from="IP"),
        "InstanceID": fields.Str(required=False, load_from="InstanceID"),
        "InstanceMode": fields.Str(required=False, load_from="InstanceMode"),
        "MachineType": fields.Str(required=False, load_from="MachineType"),
        "Name": fields.Str(required=False, load_from="Name"),
        "Remark": fields.Str(required=False, load_from="Remark"),
        "State": fields.Str(required=False, load_from="State"),
        "SubnetID": fields.Str(required=False, load_from="SubnetID"),
        "VPCID": fields.Str(required=False, load_from="VPCID"),
        "Zone": fields.Str(required=False, load_from="Zone"),
    }


class UDBInstanceSetSchema(schema.ResponseSchema):
    """UDBInstanceSet - 数据库信息列表"""

    fields = {
        "CreateTime": fields.Int(required=False, load_from="CreateTime"),
        "DBVersion": fields.Str(required=False, load_from="DBVersion"),
        "DataSet": fields.List(UDBReadonlyInstanceSchema()),
        "ExpiredTime": fields.Int(required=False, load_from="ExpiredTime"),
        "IP": fields.Str(required=False, load_from="IP"),
        "InstanceID": fields.Str(required=False, load_from="InstanceID"),
        "InstanceMode": fields.Str(required=False, load_from="InstanceMode"),
        "MachineType": fields.Str(required=False, load_from="MachineType"),
        "Name": fields.Str(required=False, load_from="Name"),
        "Remark": fields.Str(required=False, load_from="Remark"),
        "State": fields.Str(required=False, load_from="State"),
        "SubnetID": fields.Str(required=False, load_from="SubnetID"),
        "VPCID": fields.Str(required=False, load_from="VPCID"),
        "Zone": fields.Str(required=False, load_from="Zone"),
    }


class LogSetSchema(schema.ResponseSchema):
    """LogSet - 日志信息"""

    fields = {
        "BeginTime": fields.Int(required=False, load_from="BeginTime"),
        "EndTime": fields.Int(required=False, load_from="EndTime"),
        "Name": fields.Str(required=False, load_from="Name"),
        "Size": fields.Int(required=False, load_from="Size"),
    }


class PgSQLMachineTypeSchema(schema.ResponseSchema):
    """PgSQLMachineType - 机器类型信息列表"""

    fields = {
        "Cpu": fields.Int(required=False, load_from="Cpu"),
        "Description": fields.Str(required=False, load_from="Description"),
        "ID": fields.Str(required=False, load_from="ID"),
        "Memory": fields.Int(required=False, load_from="Memory"),
        "Os": fields.Str(required=False, load_from="Os"),
    }


class PgSQLVersionSchema(schema.ResponseSchema):
    """PgSQLVersion - postgresql版本信息"""

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