# -*- coding: utf-8 -*-
# This file is auto-generated, don't edit it. Thanks.
from Tea.model import TeaModel


class AddAccountRelationRequest(TeaModel):
    def __init__(self, child_nick=None, child_user_id=None, parent_user_id=None, permission_codes=None,
                 relation_type=None, request_id=None, role_codes=None):
        # The display name of the member. This helps clarify the scenario in which the account is used.
        self.child_nick = child_nick  # type: str
        # The ID of the Alibaba Cloud account that is used as the member.
        self.child_user_id = child_user_id  # type: long
        # The ID of the Alibaba Cloud account that is used as the management account.
        self.parent_user_id = parent_user_id  # type: long
        # The permissions that can be granted to the member. Valid values:
        # 
        # *   SYNCHRONIZE_FINANCE_IDENTITY: allows the credit control identity to be shared with the member.
        # *   SYNCHRONIZE_FINANCE_DISCOUNT_POLICY_TO_TARGET: allows the discount policy to be shared with the member.
        # *   FORBID_WITHDRAW_CASH: does not allow the member to withdraw the balance.
        # *   FORBID_MANAGE_INVOICE: does not allow the member to manage invoices.
        # *   CHECK_FINANCE_INFO: requests to view information about the financial relationship.
        # *   MANAGE_TARGET_INVOICE: allows the member to manage invoices.
        # *   CHECK_TARGET_CONSUMPTION: allows the member to view the bills.
        self.permission_codes = permission_codes  # type: list[str]
        # The type of the financial relationship. Set the value to enterprise_group.
        self.relation_type = relation_type  # type: str
        # The unique ID of the request. The ID is used to mark a request and troubleshoot a problem.
        self.request_id = request_id  # type: str
        # The roles that can be assigned to the member. Set the value to trusteeship.
        self.role_codes = role_codes  # type: list[str]

    def validate(self):
        pass

    def to_map(self):
        _map = super(AddAccountRelationRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.child_nick is not None:
            result['ChildNick'] = self.child_nick
        if self.child_user_id is not None:
            result['ChildUserId'] = self.child_user_id
        if self.parent_user_id is not None:
            result['ParentUserId'] = self.parent_user_id
        if self.permission_codes is not None:
            result['PermissionCodes'] = self.permission_codes
        if self.relation_type is not None:
            result['RelationType'] = self.relation_type
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.role_codes is not None:
            result['RoleCodes'] = self.role_codes
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ChildNick') is not None:
            self.child_nick = m.get('ChildNick')
        if m.get('ChildUserId') is not None:
            self.child_user_id = m.get('ChildUserId')
        if m.get('ParentUserId') is not None:
            self.parent_user_id = m.get('ParentUserId')
        if m.get('PermissionCodes') is not None:
            self.permission_codes = m.get('PermissionCodes')
        if m.get('RelationType') is not None:
            self.relation_type = m.get('RelationType')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('RoleCodes') is not None:
            self.role_codes = m.get('RoleCodes')
        return self


class AddAccountRelationResponseBodyData(TeaModel):
    def __init__(self, host_id=None, relation_id=None):
        # HostId
        self.host_id = host_id  # type: str
        # The ID of the financial relationship.
        self.relation_id = relation_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(AddAccountRelationResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        if self.relation_id is not None:
            result['RelationId'] = self.relation_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        if m.get('RelationId') is not None:
            self.relation_id = m.get('RelationId')
        return self


class AddAccountRelationResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: AddAccountRelationResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(AddAccountRelationResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = AddAccountRelationResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class AddAccountRelationResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: AddAccountRelationResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(AddAccountRelationResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = AddAccountRelationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class AllocateCostUnitResourceRequestResourceInstanceList(TeaModel):
    def __init__(self, apportion_code=None, commodity_code=None, resource_id=None, resource_user_id=None):
        # The split item of the shared instance. This parameter is required only for shared instances.
        # 
        # *   Eight cloud services support bill splitting. The commodity codes of the eight services are oss, dcdn, snapshot, vod, cdn, live, cbwp, and pcdn.
        # *   You can obtain the split item of a shared instance by calling QueryCostUnitResource operation to obtain all resource instances within a cost center.
        self.apportion_code = apportion_code  # type: str
        # The commodity code of the resource instance.
        self.commodity_code = commodity_code  # type: str
        # The ID of the resource instance.
        self.resource_id = resource_id  # type: str
        # The user ID of the resource instance owner.
        self.resource_user_id = resource_user_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(AllocateCostUnitResourceRequestResourceInstanceList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.apportion_code is not None:
            result['ApportionCode'] = self.apportion_code
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_user_id is not None:
            result['ResourceUserId'] = self.resource_user_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ApportionCode') is not None:
            self.apportion_code = m.get('ApportionCode')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceUserId') is not None:
            self.resource_user_id = m.get('ResourceUserId')
        return self


class AllocateCostUnitResourceRequest(TeaModel):
    def __init__(self, from_unit_id=None, from_unit_user_id=None, resource_instance_list=None, to_unit_id=None,
                 to_unit_user_id=None):
        # The ID of the source cost center.
        # 
        # *   A value of 0 indicates that the resources to be transferred have not been allocated to a cost center.
        # *   A value greater than 0 indicates the ID of an existing cost center.
        self.from_unit_id = from_unit_id  # type: long
        # The user ID of the owner of the source cost center.
        self.from_unit_user_id = from_unit_user_id  # type: long
        # The resource instances to be transferred.
        self.resource_instance_list = resource_instance_list  # type: list[AllocateCostUnitResourceRequestResourceInstanceList]
        # The ID of the destination cost center.
        # 
        # *   A value of -1 indicates that the allocated resources are changed to unallocated.
        # *   A value greater than 0 indicates the ID of an existing cost center.
        self.to_unit_id = to_unit_id  # type: long
        # The user ID of the owner of the destination cost center.
        self.to_unit_user_id = to_unit_user_id  # type: long

    def validate(self):
        if self.resource_instance_list:
            for k in self.resource_instance_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(AllocateCostUnitResourceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.from_unit_id is not None:
            result['FromUnitId'] = self.from_unit_id
        if self.from_unit_user_id is not None:
            result['FromUnitUserId'] = self.from_unit_user_id
        result['ResourceInstanceList'] = []
        if self.resource_instance_list is not None:
            for k in self.resource_instance_list:
                result['ResourceInstanceList'].append(k.to_map() if k else None)
        if self.to_unit_id is not None:
            result['ToUnitId'] = self.to_unit_id
        if self.to_unit_user_id is not None:
            result['ToUnitUserId'] = self.to_unit_user_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('FromUnitId') is not None:
            self.from_unit_id = m.get('FromUnitId')
        if m.get('FromUnitUserId') is not None:
            self.from_unit_user_id = m.get('FromUnitUserId')
        self.resource_instance_list = []
        if m.get('ResourceInstanceList') is not None:
            for k in m.get('ResourceInstanceList'):
                temp_model = AllocateCostUnitResourceRequestResourceInstanceList()
                self.resource_instance_list.append(temp_model.from_map(k))
        if m.get('ToUnitId') is not None:
            self.to_unit_id = m.get('ToUnitId')
        if m.get('ToUnitUserId') is not None:
            self.to_unit_user_id = m.get('ToUnitUserId')
        return self


class AllocateCostUnitResourceResponseBodyData(TeaModel):
    def __init__(self, is_success=None, to_unit_id=None, to_unit_user_id=None):
        # Indicates whether resources are allocated to the specified cost center. Valid values:
        # 
        # *   true: The resources are allocated to the specified cost center.
        # *   false: The resources fail to be allocated to the specified cost center.
        self.is_success = is_success  # type: bool
        # The ID of the destination cost center.
        self.to_unit_id = to_unit_id  # type: long
        # The user ID of the owner of the destination cost center.
        self.to_unit_user_id = to_unit_user_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(AllocateCostUnitResourceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.is_success is not None:
            result['IsSuccess'] = self.is_success
        if self.to_unit_id is not None:
            result['ToUnitId'] = self.to_unit_id
        if self.to_unit_user_id is not None:
            result['ToUnitUserId'] = self.to_unit_user_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('IsSuccess') is not None:
            self.is_success = m.get('IsSuccess')
        if m.get('ToUnitId') is not None:
            self.to_unit_id = m.get('ToUnitId')
        if m.get('ToUnitUserId') is not None:
            self.to_unit_user_id = m.get('ToUnitUserId')
        return self


class AllocateCostUnitResourceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: AllocateCostUnitResourceResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(AllocateCostUnitResourceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = AllocateCostUnitResourceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class AllocateCostUnitResourceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: AllocateCostUnitResourceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(AllocateCostUnitResourceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = AllocateCostUnitResourceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ApplyInvoiceRequest(TeaModel):
    def __init__(self, address_id=None, apply_user_nick=None, customer_id=None, invoice_amount=None,
                 invoice_by_amount=None, invoicing_type=None, owner_id=None, process_way=None, selected_ids=None, user_remark=None):
        # The ID of the address to which the invoice is delivered. This parameter is required if the invoice is a paper invoice. Set the ID to the value of the AddressId parameter returned by calling the QueryCustomerAddressList operation.
        self.address_id = address_id  # type: long
        # The nickname of the applicant. The system does not verify the nickname.
        self.apply_user_nick = apply_user_nick  # type: str
        # The ID of the customer. Set the ID to the value of the CustomerId parameter returned by calling the QueryInvoicingCustomerList operation.
        self.customer_id = customer_id  # type: long
        # The amount of the invoice. Unit: Cent.
        self.invoice_amount = invoice_amount  # type: long
        # Specifies whether to invoice by amount. A value of true indicates that the user applies for the invoice based on the InvoiceAmount parameter. A value of false indicates that the user applies for the invoice based on the total amount of the invoicing items.
        self.invoice_by_amount = invoice_by_amount  # type: bool
        # The type of the invoice. Valid values:
        # 
        # *   0: paper invoice
        # *   1: electronic invoice
        self.invoicing_type = invoicing_type  # type: int
        self.owner_id = owner_id  # type: long
        # The channel that is used to process the invoice. A value of 0 indicates that the invoice is processed by Alibaba Cloud. A value of 1 indicates that the invoice is processed by the tax platform. Set the value to 1.
        self.process_way = process_way  # type: int
        # The IDs of the selected invoicing items. Set the IDs to the IDs returned by calling the QueryEvaluateList operation.
        self.selected_ids = selected_ids  # type: list[long]
        # The remarks made by the user.
        self.user_remark = user_remark  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ApplyInvoiceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.address_id is not None:
            result['AddressId'] = self.address_id
        if self.apply_user_nick is not None:
            result['ApplyUserNick'] = self.apply_user_nick
        if self.customer_id is not None:
            result['CustomerId'] = self.customer_id
        if self.invoice_amount is not None:
            result['InvoiceAmount'] = self.invoice_amount
        if self.invoice_by_amount is not None:
            result['InvoiceByAmount'] = self.invoice_by_amount
        if self.invoicing_type is not None:
            result['InvoicingType'] = self.invoicing_type
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.process_way is not None:
            result['ProcessWay'] = self.process_way
        if self.selected_ids is not None:
            result['SelectedIds'] = self.selected_ids
        if self.user_remark is not None:
            result['UserRemark'] = self.user_remark
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AddressId') is not None:
            self.address_id = m.get('AddressId')
        if m.get('ApplyUserNick') is not None:
            self.apply_user_nick = m.get('ApplyUserNick')
        if m.get('CustomerId') is not None:
            self.customer_id = m.get('CustomerId')
        if m.get('InvoiceAmount') is not None:
            self.invoice_amount = m.get('InvoiceAmount')
        if m.get('InvoiceByAmount') is not None:
            self.invoice_by_amount = m.get('InvoiceByAmount')
        if m.get('InvoicingType') is not None:
            self.invoicing_type = m.get('InvoicingType')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('ProcessWay') is not None:
            self.process_way = m.get('ProcessWay')
        if m.get('SelectedIds') is not None:
            self.selected_ids = m.get('SelectedIds')
        if m.get('UserRemark') is not None:
            self.user_remark = m.get('UserRemark')
        return self


class ApplyInvoiceResponseBodyData(TeaModel):
    def __init__(self, invoice_apply_id=None):
        # The ID of the application.
        self.invoice_apply_id = invoice_apply_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(ApplyInvoiceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.invoice_apply_id is not None:
            result['InvoiceApplyId'] = self.invoice_apply_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('InvoiceApplyId') is not None:
            self.invoice_apply_id = m.get('InvoiceApplyId')
        return self


class ApplyInvoiceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: ApplyInvoiceResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(ApplyInvoiceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = ApplyInvoiceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class ApplyInvoiceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: ApplyInvoiceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(ApplyInvoiceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = ApplyInvoiceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CancelOrderRequest(TeaModel):
    def __init__(self, order_id=None, owner_id=None):
        # The ID of the order.
        self.order_id = order_id  # type: str
        self.owner_id = owner_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(CancelOrderRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        return self


class CancelOrderResponseBodyData(TeaModel):
    def __init__(self, host_id=None):
        # The ID of the host.
        self.host_id = host_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CancelOrderResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        return self


class CancelOrderResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: CancelOrderResponseBodyData
        # The error message.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the call was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(CancelOrderResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = CancelOrderResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class CancelOrderResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: CancelOrderResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(CancelOrderResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = CancelOrderResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ChangeResellerConsumeAmountRequest(TeaModel):
    def __init__(self, adjust_type=None, amount=None, business_type=None, currency=None, extend_map=None,
                 out_biz_id=None, owner_id=None, source=None):
        # The type of the consumption amount adjustment. Valid values: increase: The consumption amount increases because new consumption occurs. decrease: The consumption amount decreases because funds are added to the account. This parameter is required.
        self.adjust_type = adjust_type  # type: str
        # The amount to be adjusted. Unit: CNY
        self.amount = amount  # type: str
        # The type of the business.
        self.business_type = business_type  # type: str
        # The type of the currency.
        self.currency = currency  # type: str
        # The extended field of a message.
        self.extend_map = extend_map  # type: str
        # The ID of the primary key for external business. The ID is used for idempotence verification.
        self.out_biz_id = out_biz_id  # type: str
        self.owner_id = owner_id  # type: long
        # The source of the request. Specify the system name for the parameter.
        self.source = source  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ChangeResellerConsumeAmountRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.adjust_type is not None:
            result['AdjustType'] = self.adjust_type
        if self.amount is not None:
            result['Amount'] = self.amount
        if self.business_type is not None:
            result['BusinessType'] = self.business_type
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.extend_map is not None:
            result['ExtendMap'] = self.extend_map
        if self.out_biz_id is not None:
            result['OutBizId'] = self.out_biz_id
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.source is not None:
            result['Source'] = self.source
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AdjustType') is not None:
            self.adjust_type = m.get('AdjustType')
        if m.get('Amount') is not None:
            self.amount = m.get('Amount')
        if m.get('BusinessType') is not None:
            self.business_type = m.get('BusinessType')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('ExtendMap') is not None:
            self.extend_map = m.get('ExtendMap')
        if m.get('OutBizId') is not None:
            self.out_biz_id = m.get('OutBizId')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('Source') is not None:
            self.source = m.get('Source')
        return self


class ChangeResellerConsumeAmountResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The error code returned if the call failed. For more information, see the "Error codes" section of the topic.
        self.code = code  # type: str
        # The consumption quota for the quota ledger after adjustment.
        self.data = data  # type: str
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call failed.
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(ChangeResellerConsumeAmountResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            self.data = m.get('Data')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class ChangeResellerConsumeAmountResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: ChangeResellerConsumeAmountResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(ChangeResellerConsumeAmountResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = ChangeResellerConsumeAmountResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ConfirmRelationRequest(TeaModel):
    def __init__(self, child_user_id=None, confirm_code=None, parent_user_id=None, permission_codes=None,
                 relation_id=None, relation_type=None, request_id=None):
        # The ID of the Alibaba Cloud account that is used as the member.
        self.child_user_id = child_user_id  # type: long
        # The operation to be performed to confirm the invitation. Valid values:
        # 
        # *   child_agree: The member accepts the invitation.
        # *   child_disagree: The member rejects the invitation.
        # *   Canceled by the master account: The management account cancels the confirmation.
        self.confirm_code = confirm_code  # type: str
        # The ID of the Alibaba Cloud account that is used as the management account.
        self.parent_user_id = parent_user_id  # type: long
        # The permissions that can be granted to the member. Valid values:
        # 
        # *   SYNCHRONIZE_FINANCE_IDENTITY: allows the credit control identity to be shared with the member.
        # *   SYNCHRONIZE_FINANCE_DISCOUNT_POLICY_TO_TARGET: allows the discount policy to be shared with the member.
        # *   FORBID_WITHDRAW_CASH: does not allow the member to withdraw the balance.
        # *   FORBID_MANAGE_INVOICE: does not allow the member to manage invoices.
        # *   CHECK_FINANCE_INFO: requests to view information about the financial relationship.
        # *   MANAGE_TARGET_INVOICE: allows the member to manage invoices.
        # *   CHECK_TARGET_CONSUMPTION: allows the member to view the bills.
        self.permission_codes = permission_codes  # type: list[str]
        # The ID of the financial relationship. Set this parameter to the value of the RelationId response parameter returned by calling the QueryRelationList operation.
        self.relation_id = relation_id  # type: long
        # The type of the financial relationship. Set the value to enterprise_group.
        self.relation_type = relation_type  # type: str
        # The unique ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ConfirmRelationRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.child_user_id is not None:
            result['ChildUserId'] = self.child_user_id
        if self.confirm_code is not None:
            result['ConfirmCode'] = self.confirm_code
        if self.parent_user_id is not None:
            result['ParentUserId'] = self.parent_user_id
        if self.permission_codes is not None:
            result['PermissionCodes'] = self.permission_codes
        if self.relation_id is not None:
            result['RelationId'] = self.relation_id
        if self.relation_type is not None:
            result['RelationType'] = self.relation_type
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ChildUserId') is not None:
            self.child_user_id = m.get('ChildUserId')
        if m.get('ConfirmCode') is not None:
            self.confirm_code = m.get('ConfirmCode')
        if m.get('ParentUserId') is not None:
            self.parent_user_id = m.get('ParentUserId')
        if m.get('PermissionCodes') is not None:
            self.permission_codes = m.get('PermissionCodes')
        if m.get('RelationId') is not None:
            self.relation_id = m.get('RelationId')
        if m.get('RelationType') is not None:
            self.relation_type = m.get('RelationType')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ConfirmRelationResponseBodyData(TeaModel):
    def __init__(self, host_id=None):
        # HostId
        self.host_id = host_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ConfirmRelationResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        return self


class ConfirmRelationResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: ConfirmRelationResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The unique ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(ConfirmRelationResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = ConfirmRelationResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class ConfirmRelationResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: ConfirmRelationResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(ConfirmRelationResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = ConfirmRelationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ConvertChargeTypeRequest(TeaModel):
    def __init__(self, instance_id=None, owner_id=None, period=None, product_code=None, product_type=None,
                 subscription_type=None):
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        self.owner_id = owner_id  # type: long
        # The subscription duration. Unit: months. This parameter is required if you switch the billing method to subscription. Valid values:
        # 
        # *   1 to 9
        # *   12
        # *   24
        # *   36
        self.period = period  # type: int
        # The code of the service to which the instance belongs.
        self.product_code = product_code  # type: str
        # The type of the service to which the instance belongs.
        self.product_type = product_type  # type: str
        # The billing method of the instance. Valid values:
        # 
        # *   Subscription: subscription
        # *   PayAsYouGo: pay-as-you-go
        # 
        # >  After the call is successful, the billing method of the instance is switched.
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ConvertChargeTypeRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.period is not None:
            result['Period'] = self.period
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('Period') is not None:
            self.period = m.get('Period')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class ConvertChargeTypeResponseBodyData(TeaModel):
    def __init__(self, order_id=None):
        # The ID of the order.
        self.order_id = order_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ConvertChargeTypeResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        return self


class ConvertChargeTypeResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: ConvertChargeTypeResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(ConvertChargeTypeResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = ConvertChargeTypeResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class ConvertChargeTypeResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: ConvertChargeTypeResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(ConvertChargeTypeResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = ConvertChargeTypeResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateAgAccountRequest(TeaModel):
    def __init__(self, account_attr=None, city_name=None, enterprise_name=None, first_name=None, last_name=None,
                 login_email=None, nation_code=None, postcode=None, province_name=None):
        # The attribute of the account. To view the attribute of the account, use the account to log on to the Alibaba Cloud Management Console, move the pointer over the profile picture in the upper-right corner, and then click **Security Settings**.
        self.account_attr = account_attr  # type: str
        # The name of the city.
        self.city_name = city_name  # type: str
        # The name of the enterprise.
        self.enterprise_name = enterprise_name  # type: str
        # The first name.
        self.first_name = first_name  # type: str
        # The last name.
        # 
        # The last name can be up to 64 characters in length.
        self.last_name = last_name  # type: str
        # The email address used to log on to the account.
        self.login_email = login_email  # type: str
        # The country code.
        self.nation_code = nation_code  # type: str
        # The zip code.
        self.postcode = postcode  # type: str
        # The name of the province. This parameter is optional.
        self.province_name = province_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateAgAccountRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_attr is not None:
            result['AccountAttr'] = self.account_attr
        if self.city_name is not None:
            result['CityName'] = self.city_name
        if self.enterprise_name is not None:
            result['EnterpriseName'] = self.enterprise_name
        if self.first_name is not None:
            result['FirstName'] = self.first_name
        if self.last_name is not None:
            result['LastName'] = self.last_name
        if self.login_email is not None:
            result['LoginEmail'] = self.login_email
        if self.nation_code is not None:
            result['NationCode'] = self.nation_code
        if self.postcode is not None:
            result['Postcode'] = self.postcode
        if self.province_name is not None:
            result['ProvinceName'] = self.province_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountAttr') is not None:
            self.account_attr = m.get('AccountAttr')
        if m.get('CityName') is not None:
            self.city_name = m.get('CityName')
        if m.get('EnterpriseName') is not None:
            self.enterprise_name = m.get('EnterpriseName')
        if m.get('FirstName') is not None:
            self.first_name = m.get('FirstName')
        if m.get('LastName') is not None:
            self.last_name = m.get('LastName')
        if m.get('LoginEmail') is not None:
            self.login_email = m.get('LoginEmail')
        if m.get('NationCode') is not None:
            self.nation_code = m.get('NationCode')
        if m.get('Postcode') is not None:
            self.postcode = m.get('Postcode')
        if m.get('ProvinceName') is not None:
            self.province_name = m.get('ProvinceName')
        return self


class CreateAgAccountResponseBodyAgRelationDto(TeaModel):
    def __init__(self, mpk=None, pk=None, ram_admin_role_name=None, type=None):
        # The ID of the account that is used to call the CreateAgAccount operation.
        self.mpk = mpk  # type: str
        # The ID of the account that is created.
        self.pk = pk  # type: str
        # The role of the account that is created.
        self.ram_admin_role_name = ram_admin_role_name  # type: str
        # The type of the relationship.
        self.type = type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateAgAccountResponseBodyAgRelationDto, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.mpk is not None:
            result['Mpk'] = self.mpk
        if self.pk is not None:
            result['Pk'] = self.pk
        if self.ram_admin_role_name is not None:
            result['RamAdminRoleName'] = self.ram_admin_role_name
        if self.type is not None:
            result['Type'] = self.type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Mpk') is not None:
            self.mpk = m.get('Mpk')
        if m.get('Pk') is not None:
            self.pk = m.get('Pk')
        if m.get('RamAdminRoleName') is not None:
            self.ram_admin_role_name = m.get('RamAdminRoleName')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        return self


class CreateAgAccountResponseBody(TeaModel):
    def __init__(self, ag_relation_dto=None, code=None, message=None, request_id=None, success=None):
        # The relationship between the account that is used to call the CreateAgAccount operation and the account that is created.
        self.ag_relation_dto = ag_relation_dto  # type: CreateAgAccountResponseBodyAgRelationDto
        # The status code returned.
        self.code = code  # type: str
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.ag_relation_dto:
            self.ag_relation_dto.validate()

    def to_map(self):
        _map = super(CreateAgAccountResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.ag_relation_dto is not None:
            result['AgRelationDto'] = self.ag_relation_dto.to_map()
        if self.code is not None:
            result['Code'] = self.code
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AgRelationDto') is not None:
            temp_model = CreateAgAccountResponseBodyAgRelationDto()
            self.ag_relation_dto = temp_model.from_map(m['AgRelationDto'])
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class CreateAgAccountResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: CreateAgAccountResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(CreateAgAccountResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = CreateAgAccountResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateCostUnitRequestUnitEntityList(TeaModel):
    def __init__(self, owner_uid=None, parent_unit_id=None, unit_name=None):
        # The user ID of the owner of the cost center.
        self.owner_uid = owner_uid  # type: long
        # The ID of the parent cost center. A value of -1 indicates the root cost center.
        self.parent_unit_id = parent_unit_id  # type: long
        # The name of the cost center.
        self.unit_name = unit_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateCostUnitRequestUnitEntityList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.owner_uid is not None:
            result['OwnerUid'] = self.owner_uid
        if self.parent_unit_id is not None:
            result['ParentUnitId'] = self.parent_unit_id
        if self.unit_name is not None:
            result['UnitName'] = self.unit_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OwnerUid') is not None:
            self.owner_uid = m.get('OwnerUid')
        if m.get('ParentUnitId') is not None:
            self.parent_unit_id = m.get('ParentUnitId')
        if m.get('UnitName') is not None:
            self.unit_name = m.get('UnitName')
        return self


class CreateCostUnitRequest(TeaModel):
    def __init__(self, unit_entity_list=None):
        # The list of cost centers.
        self.unit_entity_list = unit_entity_list  # type: list[CreateCostUnitRequestUnitEntityList]

    def validate(self):
        if self.unit_entity_list:
            for k in self.unit_entity_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(CreateCostUnitRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['UnitEntityList'] = []
        if self.unit_entity_list is not None:
            for k in self.unit_entity_list:
                result['UnitEntityList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.unit_entity_list = []
        if m.get('UnitEntityList') is not None:
            for k in m.get('UnitEntityList'):
                temp_model = CreateCostUnitRequestUnitEntityList()
                self.unit_entity_list.append(temp_model.from_map(k))
        return self


class CreateCostUnitResponseBodyDataCostUnitDtoList(TeaModel):
    def __init__(self, owner_uid=None, parent_unit_id=None, unit_id=None, unit_name=None):
        # The user ID of the owner of the cost center.
        self.owner_uid = owner_uid  # type: long
        # The ID of the parent cost center. A value of -1 indicates the root cost center.
        self.parent_unit_id = parent_unit_id  # type: long
        # The ID of the cost center.
        self.unit_id = unit_id  # type: long
        # The name of the cost center.
        self.unit_name = unit_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateCostUnitResponseBodyDataCostUnitDtoList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.owner_uid is not None:
            result['OwnerUid'] = self.owner_uid
        if self.parent_unit_id is not None:
            result['ParentUnitId'] = self.parent_unit_id
        if self.unit_id is not None:
            result['UnitId'] = self.unit_id
        if self.unit_name is not None:
            result['UnitName'] = self.unit_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OwnerUid') is not None:
            self.owner_uid = m.get('OwnerUid')
        if m.get('ParentUnitId') is not None:
            self.parent_unit_id = m.get('ParentUnitId')
        if m.get('UnitId') is not None:
            self.unit_id = m.get('UnitId')
        if m.get('UnitName') is not None:
            self.unit_name = m.get('UnitName')
        return self


class CreateCostUnitResponseBodyData(TeaModel):
    def __init__(self, cost_unit_dto_list=None):
        # The list of cost center entities.
        self.cost_unit_dto_list = cost_unit_dto_list  # type: list[CreateCostUnitResponseBodyDataCostUnitDtoList]

    def validate(self):
        if self.cost_unit_dto_list:
            for k in self.cost_unit_dto_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(CreateCostUnitResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['CostUnitDtoList'] = []
        if self.cost_unit_dto_list is not None:
            for k in self.cost_unit_dto_list:
                result['CostUnitDtoList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.cost_unit_dto_list = []
        if m.get('CostUnitDtoList') is not None:
            for k in m.get('CostUnitDtoList'):
                temp_model = CreateCostUnitResponseBodyDataCostUnitDtoList()
                self.cost_unit_dto_list.append(temp_model.from_map(k))
        return self


class CreateCostUnitResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: CreateCostUnitResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the call is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(CreateCostUnitResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = CreateCostUnitResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class CreateCostUnitResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: CreateCostUnitResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(CreateCostUnitResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = CreateCostUnitResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateInstanceRequestParameter(TeaModel):
    def __init__(self, code=None, value=None):
        # The code property of the Nth module. Value of N: 1 to 100. If multiple module property parameters are involved, concatenate multiple parameters based on the value of N in sequence.
        self.code = code  # type: str
        # The value property of the Nth module. Value of N: 1 to 100.
        self.value = value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateInstanceRequestParameter, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.value is not None:
            result['Value'] = self.value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Value') is not None:
            self.value = m.get('Value')
        return self


class CreateInstanceRequest(TeaModel):
    def __init__(self, client_token=None, logistics=None, owner_id=None, parameter=None, period=None,
                 product_code=None, product_type=None, renew_period=None, renewal_status=None, subscription_type=None):
        # The client token that is used to ensure the idempotence of the request. The server checks whether a request that uses the same client token has been received. If a request that uses the same client token has been received, the server returns the same request result as the previous request.
        self.client_token = client_token  # type: str
        # The logistics address of this order. This parameter is generally valid for physical orders.
        self.logistics = logistics  # type: str
        self.owner_id = owner_id  # type: long
        # The details of the modules.
        self.parameter = parameter  # type: list[CreateInstanceRequestParameter]
        # The subscription duration. Unit: month. The value must be an integral multiple of 12.
        # 
        # >  This parameter is required if you create a subscription instance.
        self.period = period  # type: int
        # The code of the service to which the instance belongs. You can query the service code by calling the **QueryProductList** operation or viewing **Codes of Alibaba Cloud Services**.
        self.product_code = product_code  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The auto-renewal period. Unit: month.
        # 
        # >  This parameter is required if the **RenewalStatus** parameter is set to **AutoRenewal**.
        self.renew_period = renew_period  # type: int
        # The renewal method. Valid values:
        # 
        # *   AutoRenewal: The instance is automatically renewed.
        # *   ManualRenewal: The instance is manually renewed.
        # 
        # Default value: ManualRenewal.
        self.renewal_status = renewal_status  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: the subscription billing method.
        # *   PayAsYouGo: the pay-as-you-go billing method.
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        if self.parameter:
            for k in self.parameter:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(CreateInstanceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.logistics is not None:
            result['Logistics'] = self.logistics
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        result['Parameter'] = []
        if self.parameter is not None:
            for k in self.parameter:
                result['Parameter'].append(k.to_map() if k else None)
        if self.period is not None:
            result['Period'] = self.period
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.renew_period is not None:
            result['RenewPeriod'] = self.renew_period
        if self.renewal_status is not None:
            result['RenewalStatus'] = self.renewal_status
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('Logistics') is not None:
            self.logistics = m.get('Logistics')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        self.parameter = []
        if m.get('Parameter') is not None:
            for k in m.get('Parameter'):
                temp_model = CreateInstanceRequestParameter()
                self.parameter.append(temp_model.from_map(k))
        if m.get('Period') is not None:
            self.period = m.get('Period')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('RenewPeriod') is not None:
            self.renew_period = m.get('RenewPeriod')
        if m.get('RenewalStatus') is not None:
            self.renewal_status = m.get('RenewalStatus')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class CreateInstanceResponseBodyData(TeaModel):
    def __init__(self, instance_id=None, order_id=None):
        # The ID of the instance for which the order was created.
        self.instance_id = instance_id  # type: str
        # The ID of the order that was created.
        self.order_id = order_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateInstanceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        return self


class CreateInstanceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: CreateInstanceResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(CreateInstanceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = CreateInstanceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class CreateInstanceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: CreateInstanceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(CreateInstanceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = CreateInstanceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateResellerUserQuotaRequest(TeaModel):
    def __init__(self, amount=None, currency=None, out_biz_id=None, owner_id=None):
        self.amount = amount  # type: str
        self.currency = currency  # type: str
        self.out_biz_id = out_biz_id  # type: str
        self.owner_id = owner_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateResellerUserQuotaRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.amount is not None:
            result['Amount'] = self.amount
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.out_biz_id is not None:
            result['OutBizId'] = self.out_biz_id
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Amount') is not None:
            self.amount = m.get('Amount')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('OutBizId') is not None:
            self.out_biz_id = m.get('OutBizId')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        return self


class CreateResellerUserQuotaResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        self.code = code  # type: str
        self.data = data  # type: bool
        self.message = message  # type: str
        self.request_id = request_id  # type: str
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateResellerUserQuotaResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            self.data = m.get('Data')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class CreateResellerUserQuotaResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: CreateResellerUserQuotaResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(CreateResellerUserQuotaResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = CreateResellerUserQuotaResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateResourcePackageRequest(TeaModel):
    def __init__(self, duration=None, effective_date=None, owner_id=None, package_type=None, pricing_cycle=None,
                 product_code=None, specification=None):
        # The validity period of the resource plan.
        self.duration = duration  # type: int
        # The time when the resource plan takes effect. If you leave this parameter empty, the resource plan immediately takes effect by default.
        # 
        # Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        self.effective_date = effective_date  # type: str
        self.owner_id = owner_id  # type: long
        # The type of the resource plan. Set this parameter to the code of the **resource plan** returned by calling the **DescribeResourcePackageProduct** operation.
        self.package_type = package_type  # type: str
        # The unit of the validity period of the resource plan. Valid values:
        # 
        # *   Month
        # *   Year
        # 
        # Default value: Month.
        self.pricing_cycle = pricing_cycle  # type: str
        # The code of the service. You can query the code by calling the **QueryProductList** operation or viewing **Codes of Alibaba Cloud services**.
        self.product_code = product_code  # type: str
        # The specifications of the resource plan. Set this parameter to the value of the **specifications** returned by calling the **DescribeResourcePackageProduct** operation.
        self.specification = specification  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateResourcePackageRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.duration is not None:
            result['Duration'] = self.duration
        if self.effective_date is not None:
            result['EffectiveDate'] = self.effective_date
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.package_type is not None:
            result['PackageType'] = self.package_type
        if self.pricing_cycle is not None:
            result['PricingCycle'] = self.pricing_cycle
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.specification is not None:
            result['Specification'] = self.specification
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Duration') is not None:
            self.duration = m.get('Duration')
        if m.get('EffectiveDate') is not None:
            self.effective_date = m.get('EffectiveDate')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('PackageType') is not None:
            self.package_type = m.get('PackageType')
        if m.get('PricingCycle') is not None:
            self.pricing_cycle = m.get('PricingCycle')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('Specification') is not None:
            self.specification = m.get('Specification')
        return self


class CreateResourcePackageResponseBodyData(TeaModel):
    def __init__(self, instance_id=None, order_id=None):
        # The ID of the resource plan.
        self.instance_id = instance_id  # type: str
        # The ID of the order.
        self.order_id = order_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateResourcePackageResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        return self


class CreateResourcePackageResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, order_id=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: CreateResourcePackageResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the order.
        self.order_id = order_id  # type: long
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(CreateResourcePackageResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = CreateResourcePackageResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class CreateResourcePackageResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: CreateResourcePackageResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(CreateResourcePackageResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = CreateResourcePackageResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateSavingsPlansInstanceRequest(TeaModel):
    def __init__(self, commodity_code=None, duration=None, effective_date=None, extend_map=None, pay_mode=None,
                 pool_value=None, pricing_cycle=None, region=None, spec_type=None, specification=None, type=None):
        # The code of the service.
        self.commodity_code = commodity_code  # type: str
        # The service duration. This parameter is used together with the PricingCycle parameter.
        self.duration = duration  # type: str
        # The time when the savings plan takes effect. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        self.effective_date = effective_date  # type: str
        self.extend_map = extend_map  # type: dict[str, str]
        # The payment mode. Valid values:
        # 
        # *   total: all upfront
        # *   half: partial upfront
        # *   zero: no upfront
        self.pay_mode = pay_mode  # type: str
        # The contracted amount. unit: CNY
        self.pool_value = pool_value  # type: str
        # The unit of the service duration. This parameter is used together with the During parameter. Valid values:
        # 
        # *   Year
        # *   Month
        self.pricing_cycle = pricing_cycle  # type: str
        # The ID of the region in which you create the savings plan. You must specify this parameter if the Type parameter is not set to universal.
        self.region = region  # type: str
        # The specification type. This parameter is used together with the Specification parameter. You must specify this parameter if the Type parameter is not set to universal. Valid values:
        # 
        # *   group: specification group
        # *   family: specification family
        self.spec_type = spec_type  # type: str
        # The specifications of the savings plan. This parameter is used together with the SpecType parameter.
        self.specification = specification  # type: str
        # The type of the savings plan. Valid values:
        # 
        # *   universal: general-purpose type
        # *   ecs: ECS compute type
        # *   elasticy: elastic type
        self.type = type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateSavingsPlansInstanceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.duration is not None:
            result['Duration'] = self.duration
        if self.effective_date is not None:
            result['EffectiveDate'] = self.effective_date
        if self.extend_map is not None:
            result['ExtendMap'] = self.extend_map
        if self.pay_mode is not None:
            result['PayMode'] = self.pay_mode
        if self.pool_value is not None:
            result['PoolValue'] = self.pool_value
        if self.pricing_cycle is not None:
            result['PricingCycle'] = self.pricing_cycle
        if self.region is not None:
            result['Region'] = self.region
        if self.spec_type is not None:
            result['SpecType'] = self.spec_type
        if self.specification is not None:
            result['Specification'] = self.specification
        if self.type is not None:
            result['Type'] = self.type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('Duration') is not None:
            self.duration = m.get('Duration')
        if m.get('EffectiveDate') is not None:
            self.effective_date = m.get('EffectiveDate')
        if m.get('ExtendMap') is not None:
            self.extend_map = m.get('ExtendMap')
        if m.get('PayMode') is not None:
            self.pay_mode = m.get('PayMode')
        if m.get('PoolValue') is not None:
            self.pool_value = m.get('PoolValue')
        if m.get('PricingCycle') is not None:
            self.pricing_cycle = m.get('PricingCycle')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('SpecType') is not None:
            self.spec_type = m.get('SpecType')
        if m.get('Specification') is not None:
            self.specification = m.get('Specification')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        return self


class CreateSavingsPlansInstanceShrinkRequest(TeaModel):
    def __init__(self, commodity_code=None, duration=None, effective_date=None, extend_map_shrink=None,
                 pay_mode=None, pool_value=None, pricing_cycle=None, region=None, spec_type=None, specification=None,
                 type=None):
        # The code of the service.
        self.commodity_code = commodity_code  # type: str
        # The service duration. This parameter is used together with the PricingCycle parameter.
        self.duration = duration  # type: str
        # The time when the savings plan takes effect. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        self.effective_date = effective_date  # type: str
        self.extend_map_shrink = extend_map_shrink  # type: str
        # The payment mode. Valid values:
        # 
        # *   total: all upfront
        # *   half: partial upfront
        # *   zero: no upfront
        self.pay_mode = pay_mode  # type: str
        # The contracted amount. unit: CNY
        self.pool_value = pool_value  # type: str
        # The unit of the service duration. This parameter is used together with the During parameter. Valid values:
        # 
        # *   Year
        # *   Month
        self.pricing_cycle = pricing_cycle  # type: str
        # The ID of the region in which you create the savings plan. You must specify this parameter if the Type parameter is not set to universal.
        self.region = region  # type: str
        # The specification type. This parameter is used together with the Specification parameter. You must specify this parameter if the Type parameter is not set to universal. Valid values:
        # 
        # *   group: specification group
        # *   family: specification family
        self.spec_type = spec_type  # type: str
        # The specifications of the savings plan. This parameter is used together with the SpecType parameter.
        self.specification = specification  # type: str
        # The type of the savings plan. Valid values:
        # 
        # *   universal: general-purpose type
        # *   ecs: ECS compute type
        # *   elasticy: elastic type
        self.type = type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateSavingsPlansInstanceShrinkRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.duration is not None:
            result['Duration'] = self.duration
        if self.effective_date is not None:
            result['EffectiveDate'] = self.effective_date
        if self.extend_map_shrink is not None:
            result['ExtendMap'] = self.extend_map_shrink
        if self.pay_mode is not None:
            result['PayMode'] = self.pay_mode
        if self.pool_value is not None:
            result['PoolValue'] = self.pool_value
        if self.pricing_cycle is not None:
            result['PricingCycle'] = self.pricing_cycle
        if self.region is not None:
            result['Region'] = self.region
        if self.spec_type is not None:
            result['SpecType'] = self.spec_type
        if self.specification is not None:
            result['Specification'] = self.specification
        if self.type is not None:
            result['Type'] = self.type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('Duration') is not None:
            self.duration = m.get('Duration')
        if m.get('EffectiveDate') is not None:
            self.effective_date = m.get('EffectiveDate')
        if m.get('ExtendMap') is not None:
            self.extend_map_shrink = m.get('ExtendMap')
        if m.get('PayMode') is not None:
            self.pay_mode = m.get('PayMode')
        if m.get('PoolValue') is not None:
            self.pool_value = m.get('PoolValue')
        if m.get('PricingCycle') is not None:
            self.pricing_cycle = m.get('PricingCycle')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('SpecType') is not None:
            self.spec_type = m.get('SpecType')
        if m.get('Specification') is not None:
            self.specification = m.get('Specification')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        return self


class CreateSavingsPlansInstanceResponseBodyData(TeaModel):
    def __init__(self, order_id=None):
        # The ID of the order.
        self.order_id = order_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateSavingsPlansInstanceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        return self


class CreateSavingsPlansInstanceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: CreateSavingsPlansInstanceResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(CreateSavingsPlansInstanceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = CreateSavingsPlansInstanceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class CreateSavingsPlansInstanceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: CreateSavingsPlansInstanceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(CreateSavingsPlansInstanceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = CreateSavingsPlansInstanceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DeleteCostUnitRequest(TeaModel):
    def __init__(self, owner_uid=None, unit_id=None):
        # The user ID of the cost center owner.
        self.owner_uid = owner_uid  # type: long
        # The ID of the cost center. A value of -1 indicates the root cost center.
        self.unit_id = unit_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(DeleteCostUnitRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.owner_uid is not None:
            result['OwnerUid'] = self.owner_uid
        if self.unit_id is not None:
            result['UnitId'] = self.unit_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OwnerUid') is not None:
            self.owner_uid = m.get('OwnerUid')
        if m.get('UnitId') is not None:
            self.unit_id = m.get('UnitId')
        return self


class DeleteCostUnitResponseBodyData(TeaModel):
    def __init__(self, is_success=None, owner_uid=None, unit_id=None):
        # Indicates whether the call is complete.
        self.is_success = is_success  # type: bool
        # The user ID of the cost center owner.
        self.owner_uid = owner_uid  # type: long
        # The ID of the cost center.
        self.unit_id = unit_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(DeleteCostUnitResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.is_success is not None:
            result['IsSuccess'] = self.is_success
        if self.owner_uid is not None:
            result['OwnerUid'] = self.owner_uid
        if self.unit_id is not None:
            result['UnitId'] = self.unit_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('IsSuccess') is not None:
            self.is_success = m.get('IsSuccess')
        if m.get('OwnerUid') is not None:
            self.owner_uid = m.get('OwnerUid')
        if m.get('UnitId') is not None:
            self.unit_id = m.get('UnitId')
        return self


class DeleteCostUnitResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: DeleteCostUnitResponseBodyData
        # The error message.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DeleteCostUnitResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DeleteCostUnitResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DeleteCostUnitResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DeleteCostUnitResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DeleteCostUnitResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DeleteCostUnitResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeCostBudgetsSummaryRequest(TeaModel):
    def __init__(self, budget_name=None, budget_status=None, budget_type=None, max_results=None, next_token=None):
        # The name of the budget. Fuzzy match is supported.
        self.budget_name = budget_name  # type: str
        # The status of the budget. Valid values: overdue and notOverdue. A value of overdue specifies to filter expired budgets. A value of notOverdue specifies to filter budgets that do not expire. By default, if you do not specify this parameter, information about all budgets is to be returned.
        self.budget_status = budget_status  # type: str
        # The type of the budget. Valid values: cost, byquantity, and asset. A value of cost specifies to filter expense budgets. A value of byquantity specifies to filter budgets calculated based on the resource usage. A value of asset specifies to filter usage or coverage budgets. By default, information about all budgets is returned if you do not specify this parameter.
        self.budget_type = budget_type  # type: str
        # The number of entries to return on each page. Default value: 10. Maximum value: 10. Minimum value: 1.
        self.max_results = max_results  # type: int
        # The position in which the query starts. You must set this parameter to null or the token that is obtained from the previous query. Otherwise, an error is returned. If you set the NextToken parameter to null, the query starts from the beginning. The default value is null.
        self.next_token = next_token  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeCostBudgetsSummaryRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.budget_name is not None:
            result['BudgetName'] = self.budget_name
        if self.budget_status is not None:
            result['BudgetStatus'] = self.budget_status
        if self.budget_type is not None:
            result['BudgetType'] = self.budget_type
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BudgetName') is not None:
            self.budget_name = m.get('BudgetName')
        if m.get('BudgetStatus') is not None:
            self.budget_status = m.get('BudgetStatus')
        if m.get('BudgetType') is not None:
            self.budget_type = m.get('BudgetType')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        return self


class DescribeCostBudgetsSummaryResponseBodyDataItems(TeaModel):
    def __init__(self, budget=None, budget_name=None, budget_status=None, budget_type=None, calculated_values=None,
                 consume_period=None):
        # The information about the budget. The BudgetCycleType parameter indicates the cycle of the budget. Valid values: daily, monthly, quarterly, and yearly. The TotalBudgetAmount parameter indicates the total budget. The BudgetMemo parameter indicates the remarks of the budget.
        self.budget = budget  # type: dict[str, any]
        # The name of the budget.
        self.budget_name = budget_name  # type: str
        # The status of the budget.
        self.budget_status = budget_status  # type: str
        # The type of the budget.
        self.budget_type = budget_type  # type: str
        # The information about the estimate-to-actual analysis. The ActualConsumeSum parameter indicates the accumulated actual value. The ActualAddForecastedAmount parameter indicates the sum of accumulated actual value and predicted value. If the BudgetType parameter is set to cost, the sum of actual value and predicted value includes the actual cost incurred from the budget start date to the current date and the predicted cost from the current date to the budget end date. If the BudgetType parameter is set to asset, the sum of actual value and predicted value includes the actual usage or coverage from the budget start date to the budget end date. If the budget end date minus the current date is more than one year, the part that exceeds one year is not included. The ActualAndBudgetComparison parameter indicates the comparison between the actual value and the predicted value. The value of the ActualAndBudgetComparison parameter is calculated based on the following formula: Accumulated actual value/Total budget × 100%.
        self.calculated_values = calculated_values  # type: dict[str, any]
        # The information about the billing cycle. The ConsumePeriodBegin parameter indicates the start date of the budget. The ConsumePeriodEnd parameter indicates the end date of the budget.
        self.consume_period = consume_period  # type: dict[str, any]

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeCostBudgetsSummaryResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.budget is not None:
            result['Budget'] = self.budget
        if self.budget_name is not None:
            result['BudgetName'] = self.budget_name
        if self.budget_status is not None:
            result['BudgetStatus'] = self.budget_status
        if self.budget_type is not None:
            result['BudgetType'] = self.budget_type
        if self.calculated_values is not None:
            result['CalculatedValues'] = self.calculated_values
        if self.consume_period is not None:
            result['ConsumePeriod'] = self.consume_period
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Budget') is not None:
            self.budget = m.get('Budget')
        if m.get('BudgetName') is not None:
            self.budget_name = m.get('BudgetName')
        if m.get('BudgetStatus') is not None:
            self.budget_status = m.get('BudgetStatus')
        if m.get('BudgetType') is not None:
            self.budget_type = m.get('BudgetType')
        if m.get('CalculatedValues') is not None:
            self.calculated_values = m.get('CalculatedValues')
        if m.get('ConsumePeriod') is not None:
            self.consume_period = m.get('ConsumePeriod')
        return self


class DescribeCostBudgetsSummaryResponseBodyData(TeaModel):
    def __init__(self, host_id=None, items=None, max_results=None, next_token=None, total_count=None):
        # The site of the host.
        self.host_id = host_id  # type: str
        # The data that is returned.
        self.items = items  # type: list[DescribeCostBudgetsSummaryResponseBodyDataItems]
        # The maximum number of entries that are returned.
        self.max_results = max_results  # type: int
        # The token that is used to retrieve the next page
        self.next_token = next_token  # type: str
        # The total number of entries that are returned.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeCostBudgetsSummaryResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = DescribeCostBudgetsSummaryResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class DescribeCostBudgetsSummaryResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The HTTP status code.
        self.code = code  # type: str
        # The data that is returned.
        self.data = data  # type: DescribeCostBudgetsSummaryResponseBodyData
        # The error message.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeCostBudgetsSummaryResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeCostBudgetsSummaryResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeCostBudgetsSummaryResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeCostBudgetsSummaryResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeCostBudgetsSummaryResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeCostBudgetsSummaryResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeInstanceAmortizedCostByAmortizationPeriodRequest(TeaModel):
    def __init__(self, bill_owner_id_list=None, bill_user_id_list=None, billing_cycle=None,
                 consume_period_filter=None, cost_unit_code=None, instance_id_list=None, max_results=None, next_token=None,
                 product_code=None, product_detail=None, subscription_type=None):
        # The ID of the member to which the bill belongs. The member ID is used to filter bills. If you specify a value for this parameter, you can query the bills of the specified member. If you leave this parameter empty, the bills of the current account and all members of the current account are queried. You can specify a maximum of 10 IDs.
        self.bill_owner_id_list = bill_owner_id_list  # type: list[str]
        # The ID of the member that needs to settle the bill. The member ID is used to filter bills. If you specify a value for this parameter, you can query the bills of the specified member account. If you leave this parameter empty, the bills of the current account and all members of the current account are queried by default. You can specify a maximum of 10 IDs.
        self.bill_user_id_list = bill_user_id_list  # type: list[str]
        # The allocation month. Format: YYYY-MM.
        self.billing_cycle = billing_cycle  # type: str
        # The billing cycle that is used to filter bills. You can specify a maximum of 10 billing cycles.
        self.consume_period_filter = consume_period_filter  # type: list[str]
        # The code of the cost center.
        self.cost_unit_code = cost_unit_code  # type: str
        # The instance ID that is used to filter bills. You can specify multiple instance IDs to query bills of multiple instances. If you leave this parameter empty, the bills of all instances are queried by default. You can specify a maximum of 10 instance IDs.
        self.instance_id_list = instance_id_list  # type: list[str]
        # The maximum number of entries to return. Default value: 20. Maximum value: 300.
        self.max_results = max_results  # type: int
        # The position from which the query starts. The parameter must be left empty or set to the value of the NextToken parameter returned from the last call. Otherwise, an error is returned. If this parameter is left empty, data is queried from the beginning.
        self.next_token = next_token  # type: str
        # The code of the service. You can obtain the value of this parameter by calling the QueryProductList operation or the DescribeResourcePackageProduct operation.
        self.product_code = product_code  # type: str
        # The specific service resource.
        self.product_detail = product_detail  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: the subscription billing method
        # *   PayAsYouGo: the pay-as-you-go billing method
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByAmortizationPeriodRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id_list is not None:
            result['BillOwnerIdList'] = self.bill_owner_id_list
        if self.bill_user_id_list is not None:
            result['BillUserIdList'] = self.bill_user_id_list
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.consume_period_filter is not None:
            result['ConsumePeriodFilter'] = self.consume_period_filter
        if self.cost_unit_code is not None:
            result['CostUnitCode'] = self.cost_unit_code
        if self.instance_id_list is not None:
            result['InstanceIdList'] = self.instance_id_list
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerIdList') is not None:
            self.bill_owner_id_list = m.get('BillOwnerIdList')
        if m.get('BillUserIdList') is not None:
            self.bill_user_id_list = m.get('BillUserIdList')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('ConsumePeriodFilter') is not None:
            self.consume_period_filter = m.get('ConsumePeriodFilter')
        if m.get('CostUnitCode') is not None:
            self.cost_unit_code = m.get('CostUnitCode')
        if m.get('InstanceIdList') is not None:
            self.instance_id_list = m.get('InstanceIdList')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class DescribeInstanceAmortizedCostByAmortizationPeriodResponseBodyDataItems(TeaModel):
    def __init__(self, amortization_period=None, amortization_status=None, bill_account_id=None,
                 bill_account_name=None, bill_owner_id=None, bill_owner_name=None, biz_type=None, consume_period=None, cost_unit=None,
                 cost_unit_code=None, current_amortization_deducted_by_cash_coupons=None,
                 current_amortization_deducted_by_coupons=None, current_amortization_deducted_by_prepaid_card=None,
                 current_amortization_expenditure_amount=None, current_amortization_invoice_discount=None, current_amortization_pretax_amount=None,
                 current_amortization_pretax_gross_amount=None, current_amortization_round_down_discount=None, deducted_by_cash_coupons=None,
                 deducted_by_coupons=None, deducted_by_prepaid_card=None, expenditure_amount=None, instance_id=None, internet_ip=None,
                 intranet_ip=None, invoice_discount=None, pretax_amount=None, pretax_gross_amount=None,
                 previously_amortized_deducted_by_cash_coupons=None, previously_amortized_deducted_by_coupons=None,
                 previously_amortized_deducted_by_prepaid_card=None, previously_amortized_expenditure_amount=None, previously_amortized_invoice_discount=None,
                 previously_amortized_pretax_amount=None, previously_amortized_pretax_gross_amount=None,
                 previously_amortized_round_down_discount=None, product_code=None, product_detail=None, product_detail_code=None, product_name=None,
                 region=None, remaining_amortization_deducted_by_cash_coupons=None,
                 remaining_amortization_deducted_by_coupons=None, remaining_amortization_deducted_by_prepaid_card=None,
                 remaining_amortization_expenditure_amount=None, remaining_amortization_invoice_discount=None, remaining_amortization_pretax_amount=None,
                 remaining_amortization_pretax_gross_amount=None, remaining_amortization_round_down_discount=None, resource_group=None,
                 round_down_discount=None, split_account_name=None, split_item_id=None, split_item_name=None,
                 split_product_detail=None, subscription_type=None, tag=None, zone=None):
        # The allocation month. Format: YYYYMM.
        self.amortization_period = amortization_period  # type: str
        # The allocation status. Valid values:
        # 
        # *   amortized: allocated
        # *   unAmortized: not allocated
        self.amortization_status = amortization_status  # type: str
        # The ID of the account to which the bill belongs.
        self.bill_account_id = bill_account_id  # type: long
        # The name of the account to which the bill belongs.
        self.bill_account_name = bill_account_name  # type: str
        # The ID of the account to which the resource belongs.
        self.bill_owner_id = bill_owner_id  # type: long
        # The name of the account to which the resource belongs.
        self.bill_owner_name = bill_owner_name  # type: str
        # The business type.
        self.biz_type = biz_type  # type: str
        # The billing cycle. Format: YYYYMM.
        self.consume_period = consume_period  # type: str
        # The cost center.
        self.cost_unit = cost_unit  # type: str
        # The code of the cost center.
        self.cost_unit_code = cost_unit_code  # type: str
        # The amount deducted by using vouchers and allocated to the current allocation month.
        self.current_amortization_deducted_by_cash_coupons = current_amortization_deducted_by_cash_coupons  # type: float
        # The amount deducted by using coupons and allocated to the current allocation month.
        self.current_amortization_deducted_by_coupons = current_amortization_deducted_by_coupons  # type: float
        # The amount deducted by using prepaid cards and allocated to the current allocation month.
        self.current_amortization_deducted_by_prepaid_card = current_amortization_deducted_by_prepaid_card  # type: float
        # The expenditure amount allocated to the current allocation month. Invoicing is supported.
        self.current_amortization_expenditure_amount = current_amortization_expenditure_amount  # type: float
        # The discount amount allocated to the current allocation month.
        self.current_amortization_invoice_discount = current_amortization_invoice_discount  # type: float
        # The pretax amount allocated to the current allocation month.
        self.current_amortization_pretax_amount = current_amortization_pretax_amount  # type: float
        # The pretax gross amount allocated to the current allocation month.
        self.current_amortization_pretax_gross_amount = current_amortization_pretax_gross_amount  # type: float
        # The round-off amount allocated to the current allocation month.
        self.current_amortization_round_down_discount = current_amortization_round_down_discount  # type: float
        # The amount deducted by using vouchers.
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: float
        # The amount deducted by using coupons.
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        # The amount deducted by using prepaid cards.
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: float
        # The expenditure amount. Invoicing is supported.
        self.expenditure_amount = expenditure_amount  # type: float
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        # The public IP address of the instance.
        self.internet_ip = internet_ip  # type: str
        # The private IP address of the instance.
        self.intranet_ip = intranet_ip  # type: str
        # The discount amount.
        self.invoice_discount = invoice_discount  # type: float
        # The pretax amount.
        self.pretax_amount = pretax_amount  # type: float
        # The pretax gross amount.
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        # The amount deducted by using vouchers and allocated before the current allocation month.
        self.previously_amortized_deducted_by_cash_coupons = previously_amortized_deducted_by_cash_coupons  # type: float
        # The amount deducted by using coupons and allocated before the current allocation month.
        self.previously_amortized_deducted_by_coupons = previously_amortized_deducted_by_coupons  # type: float
        # The amount deducted by using prepaid cards and allocated before the current allocation month.
        self.previously_amortized_deducted_by_prepaid_card = previously_amortized_deducted_by_prepaid_card  # type: float
        # The expenditure amount allocated before the allocation month. Invoicing is supported.
        self.previously_amortized_expenditure_amount = previously_amortized_expenditure_amount  # type: float
        # The discount amount allocated before the current allocation month.
        self.previously_amortized_invoice_discount = previously_amortized_invoice_discount  # type: float
        # The pretax amount allocated before the current allocation month.
        self.previously_amortized_pretax_amount = previously_amortized_pretax_amount  # type: float
        # The pretax gross amount allocated before the current allocation month.
        self.previously_amortized_pretax_gross_amount = previously_amortized_pretax_gross_amount  # type: float
        # The round-off amount allocated before the current allocation month.
        self.previously_amortized_round_down_discount = previously_amortized_round_down_discount  # type: float
        # The code of the service.
        self.product_code = product_code  # type: str
        # The specific service resource.
        self.product_detail = product_detail  # type: str
        # The code of the specific service resource.
        self.product_detail_code = product_detail_code  # type: str
        # The name of the service.
        self.product_name = product_name  # type: str
        # The region.
        self.region = region  # type: str
        # The amount deducted by using vouchers and to be allocated to one or more future allocation months.
        self.remaining_amortization_deducted_by_cash_coupons = remaining_amortization_deducted_by_cash_coupons  # type: float
        # The amount deducted by using coupons and to be allocated to one or more future allocation months.
        self.remaining_amortization_deducted_by_coupons = remaining_amortization_deducted_by_coupons  # type: float
        # The amount deducted by using prepaid cards and to be allocated to one or more future allocation months.
        self.remaining_amortization_deducted_by_prepaid_card = remaining_amortization_deducted_by_prepaid_card  # type: float
        # The expenditure amount to be allocated to one or more future allocation months. Invoicing is supported.
        self.remaining_amortization_expenditure_amount = remaining_amortization_expenditure_amount  # type: float
        # The discount amount to be allocated to one or more future allocation months.
        self.remaining_amortization_invoice_discount = remaining_amortization_invoice_discount  # type: float
        # The pretax amount to be allocated to one or more future allocation months.
        self.remaining_amortization_pretax_amount = remaining_amortization_pretax_amount  # type: float
        # The pretax gross amount to be allocated to one or more future allocation months.
        self.remaining_amortization_pretax_gross_amount = remaining_amortization_pretax_gross_amount  # type: float
        # The round-off amount to be allocated to one or more future allocation months.
        self.remaining_amortization_round_down_discount = remaining_amortization_round_down_discount  # type: float
        # The name of the resource group.
        self.resource_group = resource_group  # type: str
        # The round-off amount.
        self.round_down_discount = round_down_discount  # type: float
        # The name of the account to which the split item belongs.
        self.split_account_name = split_account_name  # type: str
        # The ID of the split item.
        self.split_item_id = split_item_id  # type: str
        # The name of the split item.
        self.split_item_name = split_item_name  # type: str
        # The name of the specific service resource to which the split item belongs.
        self.split_product_detail = split_product_detail  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: the subscription billing method
        # *   PayAsYouGo: the pay-as-you-go billing method
        self.subscription_type = subscription_type  # type: str
        # The tag of the instance.
        self.tag = tag  # type: str
        # The ID of the zone.
        self.zone = zone  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByAmortizationPeriodResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.amortization_period is not None:
            result['AmortizationPeriod'] = self.amortization_period
        if self.amortization_status is not None:
            result['AmortizationStatus'] = self.amortization_status
        if self.bill_account_id is not None:
            result['BillAccountID'] = self.bill_account_id
        if self.bill_account_name is not None:
            result['BillAccountName'] = self.bill_account_name
        if self.bill_owner_id is not None:
            result['BillOwnerID'] = self.bill_owner_id
        if self.bill_owner_name is not None:
            result['BillOwnerName'] = self.bill_owner_name
        if self.biz_type is not None:
            result['BizType'] = self.biz_type
        if self.consume_period is not None:
            result['ConsumePeriod'] = self.consume_period
        if self.cost_unit is not None:
            result['CostUnit'] = self.cost_unit
        if self.cost_unit_code is not None:
            result['CostUnitCode'] = self.cost_unit_code
        if self.current_amortization_deducted_by_cash_coupons is not None:
            result['CurrentAmortizationDeductedByCashCoupons'] = self.current_amortization_deducted_by_cash_coupons
        if self.current_amortization_deducted_by_coupons is not None:
            result['CurrentAmortizationDeductedByCoupons'] = self.current_amortization_deducted_by_coupons
        if self.current_amortization_deducted_by_prepaid_card is not None:
            result['CurrentAmortizationDeductedByPrepaidCard'] = self.current_amortization_deducted_by_prepaid_card
        if self.current_amortization_expenditure_amount is not None:
            result['CurrentAmortizationExpenditureAmount'] = self.current_amortization_expenditure_amount
        if self.current_amortization_invoice_discount is not None:
            result['CurrentAmortizationInvoiceDiscount'] = self.current_amortization_invoice_discount
        if self.current_amortization_pretax_amount is not None:
            result['CurrentAmortizationPretaxAmount'] = self.current_amortization_pretax_amount
        if self.current_amortization_pretax_gross_amount is not None:
            result['CurrentAmortizationPretaxGrossAmount'] = self.current_amortization_pretax_gross_amount
        if self.current_amortization_round_down_discount is not None:
            result['CurrentAmortizationRoundDownDiscount'] = self.current_amortization_round_down_discount
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.expenditure_amount is not None:
            result['ExpenditureAmount'] = self.expenditure_amount
        if self.instance_id is not None:
            result['InstanceID'] = self.instance_id
        if self.internet_ip is not None:
            result['InternetIP'] = self.internet_ip
        if self.intranet_ip is not None:
            result['IntranetIP'] = self.intranet_ip
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.previously_amortized_deducted_by_cash_coupons is not None:
            result['PreviouslyAmortizedDeductedByCashCoupons'] = self.previously_amortized_deducted_by_cash_coupons
        if self.previously_amortized_deducted_by_coupons is not None:
            result['PreviouslyAmortizedDeductedByCoupons'] = self.previously_amortized_deducted_by_coupons
        if self.previously_amortized_deducted_by_prepaid_card is not None:
            result['PreviouslyAmortizedDeductedByPrepaidCard'] = self.previously_amortized_deducted_by_prepaid_card
        if self.previously_amortized_expenditure_amount is not None:
            result['PreviouslyAmortizedExpenditureAmount'] = self.previously_amortized_expenditure_amount
        if self.previously_amortized_invoice_discount is not None:
            result['PreviouslyAmortizedInvoiceDiscount'] = self.previously_amortized_invoice_discount
        if self.previously_amortized_pretax_amount is not None:
            result['PreviouslyAmortizedPretaxAmount'] = self.previously_amortized_pretax_amount
        if self.previously_amortized_pretax_gross_amount is not None:
            result['PreviouslyAmortizedPretaxGrossAmount'] = self.previously_amortized_pretax_gross_amount
        if self.previously_amortized_round_down_discount is not None:
            result['PreviouslyAmortizedRoundDownDiscount'] = self.previously_amortized_round_down_discount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.product_detail_code is not None:
            result['ProductDetailCode'] = self.product_detail_code
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.region is not None:
            result['Region'] = self.region
        if self.remaining_amortization_deducted_by_cash_coupons is not None:
            result['RemainingAmortizationDeductedByCashCoupons'] = self.remaining_amortization_deducted_by_cash_coupons
        if self.remaining_amortization_deducted_by_coupons is not None:
            result['RemainingAmortizationDeductedByCoupons'] = self.remaining_amortization_deducted_by_coupons
        if self.remaining_amortization_deducted_by_prepaid_card is not None:
            result['RemainingAmortizationDeductedByPrepaidCard'] = self.remaining_amortization_deducted_by_prepaid_card
        if self.remaining_amortization_expenditure_amount is not None:
            result['RemainingAmortizationExpenditureAmount'] = self.remaining_amortization_expenditure_amount
        if self.remaining_amortization_invoice_discount is not None:
            result['RemainingAmortizationInvoiceDiscount'] = self.remaining_amortization_invoice_discount
        if self.remaining_amortization_pretax_amount is not None:
            result['RemainingAmortizationPretaxAmount'] = self.remaining_amortization_pretax_amount
        if self.remaining_amortization_pretax_gross_amount is not None:
            result['RemainingAmortizationPretaxGrossAmount'] = self.remaining_amortization_pretax_gross_amount
        if self.remaining_amortization_round_down_discount is not None:
            result['RemainingAmortizationRoundDownDiscount'] = self.remaining_amortization_round_down_discount
        if self.resource_group is not None:
            result['ResourceGroup'] = self.resource_group
        if self.round_down_discount is not None:
            result['RoundDownDiscount'] = self.round_down_discount
        if self.split_account_name is not None:
            result['SplitAccountName'] = self.split_account_name
        if self.split_item_id is not None:
            result['SplitItemID'] = self.split_item_id
        if self.split_item_name is not None:
            result['SplitItemName'] = self.split_item_name
        if self.split_product_detail is not None:
            result['SplitProductDetail'] = self.split_product_detail
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tag is not None:
            result['Tag'] = self.tag
        if self.zone is not None:
            result['Zone'] = self.zone
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AmortizationPeriod') is not None:
            self.amortization_period = m.get('AmortizationPeriod')
        if m.get('AmortizationStatus') is not None:
            self.amortization_status = m.get('AmortizationStatus')
        if m.get('BillAccountID') is not None:
            self.bill_account_id = m.get('BillAccountID')
        if m.get('BillAccountName') is not None:
            self.bill_account_name = m.get('BillAccountName')
        if m.get('BillOwnerID') is not None:
            self.bill_owner_id = m.get('BillOwnerID')
        if m.get('BillOwnerName') is not None:
            self.bill_owner_name = m.get('BillOwnerName')
        if m.get('BizType') is not None:
            self.biz_type = m.get('BizType')
        if m.get('ConsumePeriod') is not None:
            self.consume_period = m.get('ConsumePeriod')
        if m.get('CostUnit') is not None:
            self.cost_unit = m.get('CostUnit')
        if m.get('CostUnitCode') is not None:
            self.cost_unit_code = m.get('CostUnitCode')
        if m.get('CurrentAmortizationDeductedByCashCoupons') is not None:
            self.current_amortization_deducted_by_cash_coupons = m.get('CurrentAmortizationDeductedByCashCoupons')
        if m.get('CurrentAmortizationDeductedByCoupons') is not None:
            self.current_amortization_deducted_by_coupons = m.get('CurrentAmortizationDeductedByCoupons')
        if m.get('CurrentAmortizationDeductedByPrepaidCard') is not None:
            self.current_amortization_deducted_by_prepaid_card = m.get('CurrentAmortizationDeductedByPrepaidCard')
        if m.get('CurrentAmortizationExpenditureAmount') is not None:
            self.current_amortization_expenditure_amount = m.get('CurrentAmortizationExpenditureAmount')
        if m.get('CurrentAmortizationInvoiceDiscount') is not None:
            self.current_amortization_invoice_discount = m.get('CurrentAmortizationInvoiceDiscount')
        if m.get('CurrentAmortizationPretaxAmount') is not None:
            self.current_amortization_pretax_amount = m.get('CurrentAmortizationPretaxAmount')
        if m.get('CurrentAmortizationPretaxGrossAmount') is not None:
            self.current_amortization_pretax_gross_amount = m.get('CurrentAmortizationPretaxGrossAmount')
        if m.get('CurrentAmortizationRoundDownDiscount') is not None:
            self.current_amortization_round_down_discount = m.get('CurrentAmortizationRoundDownDiscount')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('ExpenditureAmount') is not None:
            self.expenditure_amount = m.get('ExpenditureAmount')
        if m.get('InstanceID') is not None:
            self.instance_id = m.get('InstanceID')
        if m.get('InternetIP') is not None:
            self.internet_ip = m.get('InternetIP')
        if m.get('IntranetIP') is not None:
            self.intranet_ip = m.get('IntranetIP')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('PreviouslyAmortizedDeductedByCashCoupons') is not None:
            self.previously_amortized_deducted_by_cash_coupons = m.get('PreviouslyAmortizedDeductedByCashCoupons')
        if m.get('PreviouslyAmortizedDeductedByCoupons') is not None:
            self.previously_amortized_deducted_by_coupons = m.get('PreviouslyAmortizedDeductedByCoupons')
        if m.get('PreviouslyAmortizedDeductedByPrepaidCard') is not None:
            self.previously_amortized_deducted_by_prepaid_card = m.get('PreviouslyAmortizedDeductedByPrepaidCard')
        if m.get('PreviouslyAmortizedExpenditureAmount') is not None:
            self.previously_amortized_expenditure_amount = m.get('PreviouslyAmortizedExpenditureAmount')
        if m.get('PreviouslyAmortizedInvoiceDiscount') is not None:
            self.previously_amortized_invoice_discount = m.get('PreviouslyAmortizedInvoiceDiscount')
        if m.get('PreviouslyAmortizedPretaxAmount') is not None:
            self.previously_amortized_pretax_amount = m.get('PreviouslyAmortizedPretaxAmount')
        if m.get('PreviouslyAmortizedPretaxGrossAmount') is not None:
            self.previously_amortized_pretax_gross_amount = m.get('PreviouslyAmortizedPretaxGrossAmount')
        if m.get('PreviouslyAmortizedRoundDownDiscount') is not None:
            self.previously_amortized_round_down_discount = m.get('PreviouslyAmortizedRoundDownDiscount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('ProductDetailCode') is not None:
            self.product_detail_code = m.get('ProductDetailCode')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('RemainingAmortizationDeductedByCashCoupons') is not None:
            self.remaining_amortization_deducted_by_cash_coupons = m.get('RemainingAmortizationDeductedByCashCoupons')
        if m.get('RemainingAmortizationDeductedByCoupons') is not None:
            self.remaining_amortization_deducted_by_coupons = m.get('RemainingAmortizationDeductedByCoupons')
        if m.get('RemainingAmortizationDeductedByPrepaidCard') is not None:
            self.remaining_amortization_deducted_by_prepaid_card = m.get('RemainingAmortizationDeductedByPrepaidCard')
        if m.get('RemainingAmortizationExpenditureAmount') is not None:
            self.remaining_amortization_expenditure_amount = m.get('RemainingAmortizationExpenditureAmount')
        if m.get('RemainingAmortizationInvoiceDiscount') is not None:
            self.remaining_amortization_invoice_discount = m.get('RemainingAmortizationInvoiceDiscount')
        if m.get('RemainingAmortizationPretaxAmount') is not None:
            self.remaining_amortization_pretax_amount = m.get('RemainingAmortizationPretaxAmount')
        if m.get('RemainingAmortizationPretaxGrossAmount') is not None:
            self.remaining_amortization_pretax_gross_amount = m.get('RemainingAmortizationPretaxGrossAmount')
        if m.get('RemainingAmortizationRoundDownDiscount') is not None:
            self.remaining_amortization_round_down_discount = m.get('RemainingAmortizationRoundDownDiscount')
        if m.get('ResourceGroup') is not None:
            self.resource_group = m.get('ResourceGroup')
        if m.get('RoundDownDiscount') is not None:
            self.round_down_discount = m.get('RoundDownDiscount')
        if m.get('SplitAccountName') is not None:
            self.split_account_name = m.get('SplitAccountName')
        if m.get('SplitItemID') is not None:
            self.split_item_id = m.get('SplitItemID')
        if m.get('SplitItemName') is not None:
            self.split_item_name = m.get('SplitItemName')
        if m.get('SplitProductDetail') is not None:
            self.split_product_detail = m.get('SplitProductDetail')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tag') is not None:
            self.tag = m.get('Tag')
        if m.get('Zone') is not None:
            self.zone = m.get('Zone')
        return self


class DescribeInstanceAmortizedCostByAmortizationPeriodResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, items=None, max_results=None, next_token=None,
                 total_count=None):
        # The ID of the account.
        self.account_id = account_id  # type: str
        # The name of the account.
        self.account_name = account_name  # type: str
        # The data entries returned.
        self.items = items  # type: list[DescribeInstanceAmortizedCostByAmortizationPeriodResponseBodyDataItems]
        # The maximum number of entries returned.
        self.max_results = max_results  # type: int
        # The position from which the results started to return. The parameter must be left empty or set to the value of the NextToken parameter returned from the last call. Otherwise, an error is returned. If this parameter is left empty, data is queried from the beginning.
        self.next_token = next_token  # type: str
        # The total number of returned entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByAmortizationPeriodResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = DescribeInstanceAmortizedCostByAmortizationPeriodResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class DescribeInstanceAmortizedCostByAmortizationPeriodResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: DescribeInstanceAmortizedCostByAmortizationPeriodResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByAmortizationPeriodResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeInstanceAmortizedCostByAmortizationPeriodResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeInstanceAmortizedCostByAmortizationPeriodResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeInstanceAmortizedCostByAmortizationPeriodResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByAmortizationPeriodResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeInstanceAmortizedCostByAmortizationPeriodResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeInstanceAmortizedCostByAmortizationPeriodDateRequest(TeaModel):
    def __init__(self, amortization_date_end=None, amortization_date_start=None, bill_owner_id_list=None,
                 bill_user_id_list=None, billing_cycle=None, cost_unit_code=None, instance_id_list=None, max_results=None,
                 next_token=None, product_code=None, product_detail=None, subscription_type=None):
        self.amortization_date_end = amortization_date_end  # type: str
        self.amortization_date_start = amortization_date_start  # type: str
        self.bill_owner_id_list = bill_owner_id_list  # type: list[str]
        self.bill_user_id_list = bill_user_id_list  # type: list[str]
        self.billing_cycle = billing_cycle  # type: str
        self.cost_unit_code = cost_unit_code  # type: str
        self.instance_id_list = instance_id_list  # type: list[str]
        self.max_results = max_results  # type: int
        self.next_token = next_token  # type: str
        self.product_code = product_code  # type: str
        self.product_detail = product_detail  # type: str
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByAmortizationPeriodDateRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.amortization_date_end is not None:
            result['AmortizationDateEnd'] = self.amortization_date_end
        if self.amortization_date_start is not None:
            result['AmortizationDateStart'] = self.amortization_date_start
        if self.bill_owner_id_list is not None:
            result['BillOwnerIdList'] = self.bill_owner_id_list
        if self.bill_user_id_list is not None:
            result['BillUserIdList'] = self.bill_user_id_list
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.cost_unit_code is not None:
            result['CostUnitCode'] = self.cost_unit_code
        if self.instance_id_list is not None:
            result['InstanceIdList'] = self.instance_id_list
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AmortizationDateEnd') is not None:
            self.amortization_date_end = m.get('AmortizationDateEnd')
        if m.get('AmortizationDateStart') is not None:
            self.amortization_date_start = m.get('AmortizationDateStart')
        if m.get('BillOwnerIdList') is not None:
            self.bill_owner_id_list = m.get('BillOwnerIdList')
        if m.get('BillUserIdList') is not None:
            self.bill_user_id_list = m.get('BillUserIdList')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('CostUnitCode') is not None:
            self.cost_unit_code = m.get('CostUnitCode')
        if m.get('InstanceIdList') is not None:
            self.instance_id_list = m.get('InstanceIdList')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class DescribeInstanceAmortizedCostByAmortizationPeriodDateResponseBodyDataItems(TeaModel):
    def __init__(self, amortization_period=None, amortization_period_day=None, amortization_status=None,
                 bill_account_id=None, bill_account_name=None, bill_owner_id=None, bill_owner_name=None, biz_type=None,
                 consume_period=None, consume_period_day=None, cost_unit=None, cost_unit_code=None,
                 current_amortization_deducted_by_cash_coupons=None, current_amortization_deducted_by_coupons=None,
                 current_amortization_deducted_by_prepaid_card=None, current_amortization_expenditure_amount=None, current_amortization_invoice_discount=None,
                 current_amortization_pretax_amount=None, current_amortization_pretax_gross_amount=None,
                 current_amortization_round_down_discount=None, deducted_by_cash_coupons=None, deducted_by_coupons=None, deducted_by_prepaid_card=None,
                 expenditure_amount=None, instance_id=None, internet_ip=None, intranet_ip=None, invoice_discount=None,
                 pretax_amount=None, pretax_gross_amount=None, previously_amortized_deducted_by_cash_coupons=None,
                 previously_amortized_deducted_by_coupons=None, previously_amortized_deducted_by_prepaid_card=None,
                 previously_amortized_expenditure_amount=None, previously_amortized_invoice_discount=None, previously_amortized_pretax_amount=None,
                 previously_amortized_pretax_gross_amount=None, previously_amortized_round_down_discount=None, product_code=None, product_detail=None,
                 product_detail_code=None, product_name=None, region=None, remaining_amortization_deducted_by_cash_coupons=None,
                 remaining_amortization_deducted_by_coupons=None, remaining_amortization_deducted_by_prepaid_card=None,
                 remaining_amortization_expenditure_amount=None, remaining_amortization_invoice_discount=None, remaining_amortization_pretax_amount=None,
                 remaining_amortization_pretax_gross_amount=None, remaining_amortization_round_down_discount=None, resource_group=None,
                 round_down_discount=None, split_account_name=None, split_item_id=None, split_item_name=None,
                 split_product_detail=None, subscription_type=None, tag=None, zone=None):
        self.amortization_period = amortization_period  # type: str
        self.amortization_period_day = amortization_period_day  # type: str
        self.amortization_status = amortization_status  # type: str
        self.bill_account_id = bill_account_id  # type: long
        self.bill_account_name = bill_account_name  # type: str
        self.bill_owner_id = bill_owner_id  # type: long
        self.bill_owner_name = bill_owner_name  # type: str
        self.biz_type = biz_type  # type: str
        self.consume_period = consume_period  # type: str
        self.consume_period_day = consume_period_day  # type: str
        self.cost_unit = cost_unit  # type: str
        self.cost_unit_code = cost_unit_code  # type: str
        self.current_amortization_deducted_by_cash_coupons = current_amortization_deducted_by_cash_coupons  # type: float
        self.current_amortization_deducted_by_coupons = current_amortization_deducted_by_coupons  # type: float
        self.current_amortization_deducted_by_prepaid_card = current_amortization_deducted_by_prepaid_card  # type: float
        self.current_amortization_expenditure_amount = current_amortization_expenditure_amount  # type: float
        self.current_amortization_invoice_discount = current_amortization_invoice_discount  # type: float
        self.current_amortization_pretax_amount = current_amortization_pretax_amount  # type: float
        self.current_amortization_pretax_gross_amount = current_amortization_pretax_gross_amount  # type: float
        self.current_amortization_round_down_discount = current_amortization_round_down_discount  # type: float
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: float
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: float
        self.expenditure_amount = expenditure_amount  # type: float
        self.instance_id = instance_id  # type: str
        self.internet_ip = internet_ip  # type: str
        self.intranet_ip = intranet_ip  # type: str
        self.invoice_discount = invoice_discount  # type: float
        self.pretax_amount = pretax_amount  # type: float
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        self.previously_amortized_deducted_by_cash_coupons = previously_amortized_deducted_by_cash_coupons  # type: float
        self.previously_amortized_deducted_by_coupons = previously_amortized_deducted_by_coupons  # type: float
        self.previously_amortized_deducted_by_prepaid_card = previously_amortized_deducted_by_prepaid_card  # type: float
        self.previously_amortized_expenditure_amount = previously_amortized_expenditure_amount  # type: float
        self.previously_amortized_invoice_discount = previously_amortized_invoice_discount  # type: float
        self.previously_amortized_pretax_amount = previously_amortized_pretax_amount  # type: float
        self.previously_amortized_pretax_gross_amount = previously_amortized_pretax_gross_amount  # type: float
        self.previously_amortized_round_down_discount = previously_amortized_round_down_discount  # type: float
        self.product_code = product_code  # type: str
        self.product_detail = product_detail  # type: str
        self.product_detail_code = product_detail_code  # type: str
        self.product_name = product_name  # type: str
        self.region = region  # type: str
        self.remaining_amortization_deducted_by_cash_coupons = remaining_amortization_deducted_by_cash_coupons  # type: float
        self.remaining_amortization_deducted_by_coupons = remaining_amortization_deducted_by_coupons  # type: float
        self.remaining_amortization_deducted_by_prepaid_card = remaining_amortization_deducted_by_prepaid_card  # type: float
        self.remaining_amortization_expenditure_amount = remaining_amortization_expenditure_amount  # type: float
        self.remaining_amortization_invoice_discount = remaining_amortization_invoice_discount  # type: float
        self.remaining_amortization_pretax_amount = remaining_amortization_pretax_amount  # type: float
        self.remaining_amortization_pretax_gross_amount = remaining_amortization_pretax_gross_amount  # type: float
        self.remaining_amortization_round_down_discount = remaining_amortization_round_down_discount  # type: float
        self.resource_group = resource_group  # type: str
        self.round_down_discount = round_down_discount  # type: float
        self.split_account_name = split_account_name  # type: str
        self.split_item_id = split_item_id  # type: str
        self.split_item_name = split_item_name  # type: str
        self.split_product_detail = split_product_detail  # type: str
        self.subscription_type = subscription_type  # type: str
        self.tag = tag  # type: str
        self.zone = zone  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByAmortizationPeriodDateResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.amortization_period is not None:
            result['AmortizationPeriod'] = self.amortization_period
        if self.amortization_period_day is not None:
            result['AmortizationPeriodDay'] = self.amortization_period_day
        if self.amortization_status is not None:
            result['AmortizationStatus'] = self.amortization_status
        if self.bill_account_id is not None:
            result['BillAccountID'] = self.bill_account_id
        if self.bill_account_name is not None:
            result['BillAccountName'] = self.bill_account_name
        if self.bill_owner_id is not None:
            result['BillOwnerID'] = self.bill_owner_id
        if self.bill_owner_name is not None:
            result['BillOwnerName'] = self.bill_owner_name
        if self.biz_type is not None:
            result['BizType'] = self.biz_type
        if self.consume_period is not None:
            result['ConsumePeriod'] = self.consume_period
        if self.consume_period_day is not None:
            result['ConsumePeriodDay'] = self.consume_period_day
        if self.cost_unit is not None:
            result['CostUnit'] = self.cost_unit
        if self.cost_unit_code is not None:
            result['CostUnitCode'] = self.cost_unit_code
        if self.current_amortization_deducted_by_cash_coupons is not None:
            result['CurrentAmortizationDeductedByCashCoupons'] = self.current_amortization_deducted_by_cash_coupons
        if self.current_amortization_deducted_by_coupons is not None:
            result['CurrentAmortizationDeductedByCoupons'] = self.current_amortization_deducted_by_coupons
        if self.current_amortization_deducted_by_prepaid_card is not None:
            result['CurrentAmortizationDeductedByPrepaidCard'] = self.current_amortization_deducted_by_prepaid_card
        if self.current_amortization_expenditure_amount is not None:
            result['CurrentAmortizationExpenditureAmount'] = self.current_amortization_expenditure_amount
        if self.current_amortization_invoice_discount is not None:
            result['CurrentAmortizationInvoiceDiscount'] = self.current_amortization_invoice_discount
        if self.current_amortization_pretax_amount is not None:
            result['CurrentAmortizationPretaxAmount'] = self.current_amortization_pretax_amount
        if self.current_amortization_pretax_gross_amount is not None:
            result['CurrentAmortizationPretaxGrossAmount'] = self.current_amortization_pretax_gross_amount
        if self.current_amortization_round_down_discount is not None:
            result['CurrentAmortizationRoundDownDiscount'] = self.current_amortization_round_down_discount
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.expenditure_amount is not None:
            result['ExpenditureAmount'] = self.expenditure_amount
        if self.instance_id is not None:
            result['InstanceID'] = self.instance_id
        if self.internet_ip is not None:
            result['InternetIP'] = self.internet_ip
        if self.intranet_ip is not None:
            result['IntranetIP'] = self.intranet_ip
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.previously_amortized_deducted_by_cash_coupons is not None:
            result['PreviouslyAmortizedDeductedByCashCoupons'] = self.previously_amortized_deducted_by_cash_coupons
        if self.previously_amortized_deducted_by_coupons is not None:
            result['PreviouslyAmortizedDeductedByCoupons'] = self.previously_amortized_deducted_by_coupons
        if self.previously_amortized_deducted_by_prepaid_card is not None:
            result['PreviouslyAmortizedDeductedByPrepaidCard'] = self.previously_amortized_deducted_by_prepaid_card
        if self.previously_amortized_expenditure_amount is not None:
            result['PreviouslyAmortizedExpenditureAmount'] = self.previously_amortized_expenditure_amount
        if self.previously_amortized_invoice_discount is not None:
            result['PreviouslyAmortizedInvoiceDiscount'] = self.previously_amortized_invoice_discount
        if self.previously_amortized_pretax_amount is not None:
            result['PreviouslyAmortizedPretaxAmount'] = self.previously_amortized_pretax_amount
        if self.previously_amortized_pretax_gross_amount is not None:
            result['PreviouslyAmortizedPretaxGrossAmount'] = self.previously_amortized_pretax_gross_amount
        if self.previously_amortized_round_down_discount is not None:
            result['PreviouslyAmortizedRoundDownDiscount'] = self.previously_amortized_round_down_discount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.product_detail_code is not None:
            result['ProductDetailCode'] = self.product_detail_code
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.region is not None:
            result['Region'] = self.region
        if self.remaining_amortization_deducted_by_cash_coupons is not None:
            result['RemainingAmortizationDeductedByCashCoupons'] = self.remaining_amortization_deducted_by_cash_coupons
        if self.remaining_amortization_deducted_by_coupons is not None:
            result['RemainingAmortizationDeductedByCoupons'] = self.remaining_amortization_deducted_by_coupons
        if self.remaining_amortization_deducted_by_prepaid_card is not None:
            result['RemainingAmortizationDeductedByPrepaidCard'] = self.remaining_amortization_deducted_by_prepaid_card
        if self.remaining_amortization_expenditure_amount is not None:
            result['RemainingAmortizationExpenditureAmount'] = self.remaining_amortization_expenditure_amount
        if self.remaining_amortization_invoice_discount is not None:
            result['RemainingAmortizationInvoiceDiscount'] = self.remaining_amortization_invoice_discount
        if self.remaining_amortization_pretax_amount is not None:
            result['RemainingAmortizationPretaxAmount'] = self.remaining_amortization_pretax_amount
        if self.remaining_amortization_pretax_gross_amount is not None:
            result['RemainingAmortizationPretaxGrossAmount'] = self.remaining_amortization_pretax_gross_amount
        if self.remaining_amortization_round_down_discount is not None:
            result['RemainingAmortizationRoundDownDiscount'] = self.remaining_amortization_round_down_discount
        if self.resource_group is not None:
            result['ResourceGroup'] = self.resource_group
        if self.round_down_discount is not None:
            result['RoundDownDiscount'] = self.round_down_discount
        if self.split_account_name is not None:
            result['SplitAccountName'] = self.split_account_name
        if self.split_item_id is not None:
            result['SplitItemID'] = self.split_item_id
        if self.split_item_name is not None:
            result['SplitItemName'] = self.split_item_name
        if self.split_product_detail is not None:
            result['SplitProductDetail'] = self.split_product_detail
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tag is not None:
            result['Tag'] = self.tag
        if self.zone is not None:
            result['Zone'] = self.zone
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AmortizationPeriod') is not None:
            self.amortization_period = m.get('AmortizationPeriod')
        if m.get('AmortizationPeriodDay') is not None:
            self.amortization_period_day = m.get('AmortizationPeriodDay')
        if m.get('AmortizationStatus') is not None:
            self.amortization_status = m.get('AmortizationStatus')
        if m.get('BillAccountID') is not None:
            self.bill_account_id = m.get('BillAccountID')
        if m.get('BillAccountName') is not None:
            self.bill_account_name = m.get('BillAccountName')
        if m.get('BillOwnerID') is not None:
            self.bill_owner_id = m.get('BillOwnerID')
        if m.get('BillOwnerName') is not None:
            self.bill_owner_name = m.get('BillOwnerName')
        if m.get('BizType') is not None:
            self.biz_type = m.get('BizType')
        if m.get('ConsumePeriod') is not None:
            self.consume_period = m.get('ConsumePeriod')
        if m.get('ConsumePeriodDay') is not None:
            self.consume_period_day = m.get('ConsumePeriodDay')
        if m.get('CostUnit') is not None:
            self.cost_unit = m.get('CostUnit')
        if m.get('CostUnitCode') is not None:
            self.cost_unit_code = m.get('CostUnitCode')
        if m.get('CurrentAmortizationDeductedByCashCoupons') is not None:
            self.current_amortization_deducted_by_cash_coupons = m.get('CurrentAmortizationDeductedByCashCoupons')
        if m.get('CurrentAmortizationDeductedByCoupons') is not None:
            self.current_amortization_deducted_by_coupons = m.get('CurrentAmortizationDeductedByCoupons')
        if m.get('CurrentAmortizationDeductedByPrepaidCard') is not None:
            self.current_amortization_deducted_by_prepaid_card = m.get('CurrentAmortizationDeductedByPrepaidCard')
        if m.get('CurrentAmortizationExpenditureAmount') is not None:
            self.current_amortization_expenditure_amount = m.get('CurrentAmortizationExpenditureAmount')
        if m.get('CurrentAmortizationInvoiceDiscount') is not None:
            self.current_amortization_invoice_discount = m.get('CurrentAmortizationInvoiceDiscount')
        if m.get('CurrentAmortizationPretaxAmount') is not None:
            self.current_amortization_pretax_amount = m.get('CurrentAmortizationPretaxAmount')
        if m.get('CurrentAmortizationPretaxGrossAmount') is not None:
            self.current_amortization_pretax_gross_amount = m.get('CurrentAmortizationPretaxGrossAmount')
        if m.get('CurrentAmortizationRoundDownDiscount') is not None:
            self.current_amortization_round_down_discount = m.get('CurrentAmortizationRoundDownDiscount')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('ExpenditureAmount') is not None:
            self.expenditure_amount = m.get('ExpenditureAmount')
        if m.get('InstanceID') is not None:
            self.instance_id = m.get('InstanceID')
        if m.get('InternetIP') is not None:
            self.internet_ip = m.get('InternetIP')
        if m.get('IntranetIP') is not None:
            self.intranet_ip = m.get('IntranetIP')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('PreviouslyAmortizedDeductedByCashCoupons') is not None:
            self.previously_amortized_deducted_by_cash_coupons = m.get('PreviouslyAmortizedDeductedByCashCoupons')
        if m.get('PreviouslyAmortizedDeductedByCoupons') is not None:
            self.previously_amortized_deducted_by_coupons = m.get('PreviouslyAmortizedDeductedByCoupons')
        if m.get('PreviouslyAmortizedDeductedByPrepaidCard') is not None:
            self.previously_amortized_deducted_by_prepaid_card = m.get('PreviouslyAmortizedDeductedByPrepaidCard')
        if m.get('PreviouslyAmortizedExpenditureAmount') is not None:
            self.previously_amortized_expenditure_amount = m.get('PreviouslyAmortizedExpenditureAmount')
        if m.get('PreviouslyAmortizedInvoiceDiscount') is not None:
            self.previously_amortized_invoice_discount = m.get('PreviouslyAmortizedInvoiceDiscount')
        if m.get('PreviouslyAmortizedPretaxAmount') is not None:
            self.previously_amortized_pretax_amount = m.get('PreviouslyAmortizedPretaxAmount')
        if m.get('PreviouslyAmortizedPretaxGrossAmount') is not None:
            self.previously_amortized_pretax_gross_amount = m.get('PreviouslyAmortizedPretaxGrossAmount')
        if m.get('PreviouslyAmortizedRoundDownDiscount') is not None:
            self.previously_amortized_round_down_discount = m.get('PreviouslyAmortizedRoundDownDiscount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('ProductDetailCode') is not None:
            self.product_detail_code = m.get('ProductDetailCode')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('RemainingAmortizationDeductedByCashCoupons') is not None:
            self.remaining_amortization_deducted_by_cash_coupons = m.get('RemainingAmortizationDeductedByCashCoupons')
        if m.get('RemainingAmortizationDeductedByCoupons') is not None:
            self.remaining_amortization_deducted_by_coupons = m.get('RemainingAmortizationDeductedByCoupons')
        if m.get('RemainingAmortizationDeductedByPrepaidCard') is not None:
            self.remaining_amortization_deducted_by_prepaid_card = m.get('RemainingAmortizationDeductedByPrepaidCard')
        if m.get('RemainingAmortizationExpenditureAmount') is not None:
            self.remaining_amortization_expenditure_amount = m.get('RemainingAmortizationExpenditureAmount')
        if m.get('RemainingAmortizationInvoiceDiscount') is not None:
            self.remaining_amortization_invoice_discount = m.get('RemainingAmortizationInvoiceDiscount')
        if m.get('RemainingAmortizationPretaxAmount') is not None:
            self.remaining_amortization_pretax_amount = m.get('RemainingAmortizationPretaxAmount')
        if m.get('RemainingAmortizationPretaxGrossAmount') is not None:
            self.remaining_amortization_pretax_gross_amount = m.get('RemainingAmortizationPretaxGrossAmount')
        if m.get('RemainingAmortizationRoundDownDiscount') is not None:
            self.remaining_amortization_round_down_discount = m.get('RemainingAmortizationRoundDownDiscount')
        if m.get('ResourceGroup') is not None:
            self.resource_group = m.get('ResourceGroup')
        if m.get('RoundDownDiscount') is not None:
            self.round_down_discount = m.get('RoundDownDiscount')
        if m.get('SplitAccountName') is not None:
            self.split_account_name = m.get('SplitAccountName')
        if m.get('SplitItemID') is not None:
            self.split_item_id = m.get('SplitItemID')
        if m.get('SplitItemName') is not None:
            self.split_item_name = m.get('SplitItemName')
        if m.get('SplitProductDetail') is not None:
            self.split_product_detail = m.get('SplitProductDetail')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tag') is not None:
            self.tag = m.get('Tag')
        if m.get('Zone') is not None:
            self.zone = m.get('Zone')
        return self


class DescribeInstanceAmortizedCostByAmortizationPeriodDateResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, host_id=None, items=None, max_results=None,
                 next_token=None, total_count=None):
        self.account_id = account_id  # type: str
        self.account_name = account_name  # type: str
        self.host_id = host_id  # type: str
        self.items = items  # type: list[DescribeInstanceAmortizedCostByAmortizationPeriodDateResponseBodyDataItems]
        self.max_results = max_results  # type: int
        self.next_token = next_token  # type: str
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByAmortizationPeriodDateResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        if self.host_id is not None:
            result['HostId'] = self.host_id
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = DescribeInstanceAmortizedCostByAmortizationPeriodDateResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class DescribeInstanceAmortizedCostByAmortizationPeriodDateResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        self.code = code  # type: str
        self.data = data  # type: DescribeInstanceAmortizedCostByAmortizationPeriodDateResponseBodyData
        self.message = message  # type: str
        self.request_id = request_id  # type: str
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByAmortizationPeriodDateResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeInstanceAmortizedCostByAmortizationPeriodDateResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeInstanceAmortizedCostByAmortizationPeriodDateResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeInstanceAmortizedCostByAmortizationPeriodDateResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByAmortizationPeriodDateResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeInstanceAmortizedCostByAmortizationPeriodDateResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeInstanceAmortizedCostByConsumePeriodRequest(TeaModel):
    def __init__(self, amortization_period_filter=None, bill_owner_id_list=None, bill_user_id_list=None,
                 billing_cycle=None, cost_unit_code=None, instance_id_list=None, max_results=None, next_token=None,
                 product_code=None, product_detail=None, subscription_type=None):
        self.amortization_period_filter = amortization_period_filter  # type: list[str]
        self.bill_owner_id_list = bill_owner_id_list  # type: list[str]
        self.bill_user_id_list = bill_user_id_list  # type: list[str]
        self.billing_cycle = billing_cycle  # type: str
        self.cost_unit_code = cost_unit_code  # type: str
        self.instance_id_list = instance_id_list  # type: list[str]
        self.max_results = max_results  # type: int
        self.next_token = next_token  # type: str
        self.product_code = product_code  # type: str
        self.product_detail = product_detail  # type: str
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByConsumePeriodRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.amortization_period_filter is not None:
            result['AmortizationPeriodFilter'] = self.amortization_period_filter
        if self.bill_owner_id_list is not None:
            result['BillOwnerIdList'] = self.bill_owner_id_list
        if self.bill_user_id_list is not None:
            result['BillUserIdList'] = self.bill_user_id_list
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.cost_unit_code is not None:
            result['CostUnitCode'] = self.cost_unit_code
        if self.instance_id_list is not None:
            result['InstanceIdList'] = self.instance_id_list
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AmortizationPeriodFilter') is not None:
            self.amortization_period_filter = m.get('AmortizationPeriodFilter')
        if m.get('BillOwnerIdList') is not None:
            self.bill_owner_id_list = m.get('BillOwnerIdList')
        if m.get('BillUserIdList') is not None:
            self.bill_user_id_list = m.get('BillUserIdList')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('CostUnitCode') is not None:
            self.cost_unit_code = m.get('CostUnitCode')
        if m.get('InstanceIdList') is not None:
            self.instance_id_list = m.get('InstanceIdList')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class DescribeInstanceAmortizedCostByConsumePeriodResponseBodyDataItems(TeaModel):
    def __init__(self, amortization_period=None, amortization_status=None, bill_account_id=None,
                 bill_account_name=None, bill_owner_id=None, bill_owner_name=None, biz_type=None, consume_period=None, cost_unit=None,
                 cost_unit_code=None, current_amortization_deducted_by_cash_coupons=None,
                 current_amortization_deducted_by_coupons=None, current_amortization_deducted_by_prepaid_card=None,
                 current_amortization_expenditure_amount=None, current_amortization_invoice_discount=None, current_amortization_pretax_amount=None,
                 current_amortization_pretax_gross_amount=None, current_amortization_round_down_discount=None, deducted_by_cash_coupons=None,
                 deducted_by_coupons=None, deducted_by_prepaid_card=None, expenditure_amount=None, instance_id=None, internet_ip=None,
                 intranet_ip=None, invoice_discount=None, pretax_amount=None, pretax_gross_amount=None,
                 previously_amortized_deducted_by_cash_coupons=None, previously_amortized_deducted_by_coupons=None,
                 previously_amortized_deducted_by_prepaid_card=None, previously_amortized_expenditure_amount=None, previously_amortized_invoice_discount=None,
                 previously_amortized_pretax_amount=None, previously_amortized_pretax_gross_amount=None,
                 previously_amortized_round_down_discount=None, product_code=None, product_detail=None, product_detail_code=None, product_name=None,
                 region=None, remaining_amortization_deducted_by_cash_coupons=None,
                 remaining_amortization_deducted_by_coupons=None, remaining_amortization_deducted_by_prepaid_card=None,
                 remaining_amortization_expenditure_amount=None, remaining_amortization_invoice_discount=None, remaining_amortization_pretax_amount=None,
                 remaining_amortization_pretax_gross_amount=None, remaining_amortization_round_down_discount=None, resource_group=None,
                 round_down_discount=None, split_account_name=None, split_item_id=None, split_item_name=None,
                 split_product_detail=None, subscription_type=None, tag=None, zone=None):
        self.amortization_period = amortization_period  # type: str
        self.amortization_status = amortization_status  # type: str
        self.bill_account_id = bill_account_id  # type: long
        self.bill_account_name = bill_account_name  # type: str
        self.bill_owner_id = bill_owner_id  # type: long
        self.bill_owner_name = bill_owner_name  # type: str
        self.biz_type = biz_type  # type: str
        self.consume_period = consume_period  # type: str
        self.cost_unit = cost_unit  # type: str
        self.cost_unit_code = cost_unit_code  # type: str
        self.current_amortization_deducted_by_cash_coupons = current_amortization_deducted_by_cash_coupons  # type: float
        self.current_amortization_deducted_by_coupons = current_amortization_deducted_by_coupons  # type: float
        self.current_amortization_deducted_by_prepaid_card = current_amortization_deducted_by_prepaid_card  # type: float
        self.current_amortization_expenditure_amount = current_amortization_expenditure_amount  # type: float
        self.current_amortization_invoice_discount = current_amortization_invoice_discount  # type: float
        self.current_amortization_pretax_amount = current_amortization_pretax_amount  # type: float
        self.current_amortization_pretax_gross_amount = current_amortization_pretax_gross_amount  # type: float
        self.current_amortization_round_down_discount = current_amortization_round_down_discount  # type: float
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: float
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: float
        self.expenditure_amount = expenditure_amount  # type: float
        self.instance_id = instance_id  # type: str
        self.internet_ip = internet_ip  # type: str
        self.intranet_ip = intranet_ip  # type: str
        self.invoice_discount = invoice_discount  # type: float
        self.pretax_amount = pretax_amount  # type: float
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        self.previously_amortized_deducted_by_cash_coupons = previously_amortized_deducted_by_cash_coupons  # type: float
        self.previously_amortized_deducted_by_coupons = previously_amortized_deducted_by_coupons  # type: float
        self.previously_amortized_deducted_by_prepaid_card = previously_amortized_deducted_by_prepaid_card  # type: float
        self.previously_amortized_expenditure_amount = previously_amortized_expenditure_amount  # type: float
        self.previously_amortized_invoice_discount = previously_amortized_invoice_discount  # type: float
        self.previously_amortized_pretax_amount = previously_amortized_pretax_amount  # type: float
        self.previously_amortized_pretax_gross_amount = previously_amortized_pretax_gross_amount  # type: float
        self.previously_amortized_round_down_discount = previously_amortized_round_down_discount  # type: float
        self.product_code = product_code  # type: str
        self.product_detail = product_detail  # type: str
        self.product_detail_code = product_detail_code  # type: str
        self.product_name = product_name  # type: str
        self.region = region  # type: str
        self.remaining_amortization_deducted_by_cash_coupons = remaining_amortization_deducted_by_cash_coupons  # type: float
        self.remaining_amortization_deducted_by_coupons = remaining_amortization_deducted_by_coupons  # type: float
        self.remaining_amortization_deducted_by_prepaid_card = remaining_amortization_deducted_by_prepaid_card  # type: float
        self.remaining_amortization_expenditure_amount = remaining_amortization_expenditure_amount  # type: float
        self.remaining_amortization_invoice_discount = remaining_amortization_invoice_discount  # type: float
        self.remaining_amortization_pretax_amount = remaining_amortization_pretax_amount  # type: float
        self.remaining_amortization_pretax_gross_amount = remaining_amortization_pretax_gross_amount  # type: float
        self.remaining_amortization_round_down_discount = remaining_amortization_round_down_discount  # type: float
        self.resource_group = resource_group  # type: str
        self.round_down_discount = round_down_discount  # type: float
        self.split_account_name = split_account_name  # type: str
        self.split_item_id = split_item_id  # type: str
        self.split_item_name = split_item_name  # type: str
        self.split_product_detail = split_product_detail  # type: str
        self.subscription_type = subscription_type  # type: str
        self.tag = tag  # type: str
        self.zone = zone  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByConsumePeriodResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.amortization_period is not None:
            result['AmortizationPeriod'] = self.amortization_period
        if self.amortization_status is not None:
            result['AmortizationStatus'] = self.amortization_status
        if self.bill_account_id is not None:
            result['BillAccountID'] = self.bill_account_id
        if self.bill_account_name is not None:
            result['BillAccountName'] = self.bill_account_name
        if self.bill_owner_id is not None:
            result['BillOwnerID'] = self.bill_owner_id
        if self.bill_owner_name is not None:
            result['BillOwnerName'] = self.bill_owner_name
        if self.biz_type is not None:
            result['BizType'] = self.biz_type
        if self.consume_period is not None:
            result['ConsumePeriod'] = self.consume_period
        if self.cost_unit is not None:
            result['CostUnit'] = self.cost_unit
        if self.cost_unit_code is not None:
            result['CostUnitCode'] = self.cost_unit_code
        if self.current_amortization_deducted_by_cash_coupons is not None:
            result['CurrentAmortizationDeductedByCashCoupons'] = self.current_amortization_deducted_by_cash_coupons
        if self.current_amortization_deducted_by_coupons is not None:
            result['CurrentAmortizationDeductedByCoupons'] = self.current_amortization_deducted_by_coupons
        if self.current_amortization_deducted_by_prepaid_card is not None:
            result['CurrentAmortizationDeductedByPrepaidCard'] = self.current_amortization_deducted_by_prepaid_card
        if self.current_amortization_expenditure_amount is not None:
            result['CurrentAmortizationExpenditureAmount'] = self.current_amortization_expenditure_amount
        if self.current_amortization_invoice_discount is not None:
            result['CurrentAmortizationInvoiceDiscount'] = self.current_amortization_invoice_discount
        if self.current_amortization_pretax_amount is not None:
            result['CurrentAmortizationPretaxAmount'] = self.current_amortization_pretax_amount
        if self.current_amortization_pretax_gross_amount is not None:
            result['CurrentAmortizationPretaxGrossAmount'] = self.current_amortization_pretax_gross_amount
        if self.current_amortization_round_down_discount is not None:
            result['CurrentAmortizationRoundDownDiscount'] = self.current_amortization_round_down_discount
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.expenditure_amount is not None:
            result['ExpenditureAmount'] = self.expenditure_amount
        if self.instance_id is not None:
            result['InstanceID'] = self.instance_id
        if self.internet_ip is not None:
            result['InternetIP'] = self.internet_ip
        if self.intranet_ip is not None:
            result['IntranetIP'] = self.intranet_ip
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.previously_amortized_deducted_by_cash_coupons is not None:
            result['PreviouslyAmortizedDeductedByCashCoupons'] = self.previously_amortized_deducted_by_cash_coupons
        if self.previously_amortized_deducted_by_coupons is not None:
            result['PreviouslyAmortizedDeductedByCoupons'] = self.previously_amortized_deducted_by_coupons
        if self.previously_amortized_deducted_by_prepaid_card is not None:
            result['PreviouslyAmortizedDeductedByPrepaidCard'] = self.previously_amortized_deducted_by_prepaid_card
        if self.previously_amortized_expenditure_amount is not None:
            result['PreviouslyAmortizedExpenditureAmount'] = self.previously_amortized_expenditure_amount
        if self.previously_amortized_invoice_discount is not None:
            result['PreviouslyAmortizedInvoiceDiscount'] = self.previously_amortized_invoice_discount
        if self.previously_amortized_pretax_amount is not None:
            result['PreviouslyAmortizedPretaxAmount'] = self.previously_amortized_pretax_amount
        if self.previously_amortized_pretax_gross_amount is not None:
            result['PreviouslyAmortizedPretaxGrossAmount'] = self.previously_amortized_pretax_gross_amount
        if self.previously_amortized_round_down_discount is not None:
            result['PreviouslyAmortizedRoundDownDiscount'] = self.previously_amortized_round_down_discount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.product_detail_code is not None:
            result['ProductDetailCode'] = self.product_detail_code
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.region is not None:
            result['Region'] = self.region
        if self.remaining_amortization_deducted_by_cash_coupons is not None:
            result['RemainingAmortizationDeductedByCashCoupons'] = self.remaining_amortization_deducted_by_cash_coupons
        if self.remaining_amortization_deducted_by_coupons is not None:
            result['RemainingAmortizationDeductedByCoupons'] = self.remaining_amortization_deducted_by_coupons
        if self.remaining_amortization_deducted_by_prepaid_card is not None:
            result['RemainingAmortizationDeductedByPrepaidCard'] = self.remaining_amortization_deducted_by_prepaid_card
        if self.remaining_amortization_expenditure_amount is not None:
            result['RemainingAmortizationExpenditureAmount'] = self.remaining_amortization_expenditure_amount
        if self.remaining_amortization_invoice_discount is not None:
            result['RemainingAmortizationInvoiceDiscount'] = self.remaining_amortization_invoice_discount
        if self.remaining_amortization_pretax_amount is not None:
            result['RemainingAmortizationPretaxAmount'] = self.remaining_amortization_pretax_amount
        if self.remaining_amortization_pretax_gross_amount is not None:
            result['RemainingAmortizationPretaxGrossAmount'] = self.remaining_amortization_pretax_gross_amount
        if self.remaining_amortization_round_down_discount is not None:
            result['RemainingAmortizationRoundDownDiscount'] = self.remaining_amortization_round_down_discount
        if self.resource_group is not None:
            result['ResourceGroup'] = self.resource_group
        if self.round_down_discount is not None:
            result['RoundDownDiscount'] = self.round_down_discount
        if self.split_account_name is not None:
            result['SplitAccountName'] = self.split_account_name
        if self.split_item_id is not None:
            result['SplitItemID'] = self.split_item_id
        if self.split_item_name is not None:
            result['SplitItemName'] = self.split_item_name
        if self.split_product_detail is not None:
            result['SplitProductDetail'] = self.split_product_detail
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tag is not None:
            result['Tag'] = self.tag
        if self.zone is not None:
            result['Zone'] = self.zone
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AmortizationPeriod') is not None:
            self.amortization_period = m.get('AmortizationPeriod')
        if m.get('AmortizationStatus') is not None:
            self.amortization_status = m.get('AmortizationStatus')
        if m.get('BillAccountID') is not None:
            self.bill_account_id = m.get('BillAccountID')
        if m.get('BillAccountName') is not None:
            self.bill_account_name = m.get('BillAccountName')
        if m.get('BillOwnerID') is not None:
            self.bill_owner_id = m.get('BillOwnerID')
        if m.get('BillOwnerName') is not None:
            self.bill_owner_name = m.get('BillOwnerName')
        if m.get('BizType') is not None:
            self.biz_type = m.get('BizType')
        if m.get('ConsumePeriod') is not None:
            self.consume_period = m.get('ConsumePeriod')
        if m.get('CostUnit') is not None:
            self.cost_unit = m.get('CostUnit')
        if m.get('CostUnitCode') is not None:
            self.cost_unit_code = m.get('CostUnitCode')
        if m.get('CurrentAmortizationDeductedByCashCoupons') is not None:
            self.current_amortization_deducted_by_cash_coupons = m.get('CurrentAmortizationDeductedByCashCoupons')
        if m.get('CurrentAmortizationDeductedByCoupons') is not None:
            self.current_amortization_deducted_by_coupons = m.get('CurrentAmortizationDeductedByCoupons')
        if m.get('CurrentAmortizationDeductedByPrepaidCard') is not None:
            self.current_amortization_deducted_by_prepaid_card = m.get('CurrentAmortizationDeductedByPrepaidCard')
        if m.get('CurrentAmortizationExpenditureAmount') is not None:
            self.current_amortization_expenditure_amount = m.get('CurrentAmortizationExpenditureAmount')
        if m.get('CurrentAmortizationInvoiceDiscount') is not None:
            self.current_amortization_invoice_discount = m.get('CurrentAmortizationInvoiceDiscount')
        if m.get('CurrentAmortizationPretaxAmount') is not None:
            self.current_amortization_pretax_amount = m.get('CurrentAmortizationPretaxAmount')
        if m.get('CurrentAmortizationPretaxGrossAmount') is not None:
            self.current_amortization_pretax_gross_amount = m.get('CurrentAmortizationPretaxGrossAmount')
        if m.get('CurrentAmortizationRoundDownDiscount') is not None:
            self.current_amortization_round_down_discount = m.get('CurrentAmortizationRoundDownDiscount')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('ExpenditureAmount') is not None:
            self.expenditure_amount = m.get('ExpenditureAmount')
        if m.get('InstanceID') is not None:
            self.instance_id = m.get('InstanceID')
        if m.get('InternetIP') is not None:
            self.internet_ip = m.get('InternetIP')
        if m.get('IntranetIP') is not None:
            self.intranet_ip = m.get('IntranetIP')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('PreviouslyAmortizedDeductedByCashCoupons') is not None:
            self.previously_amortized_deducted_by_cash_coupons = m.get('PreviouslyAmortizedDeductedByCashCoupons')
        if m.get('PreviouslyAmortizedDeductedByCoupons') is not None:
            self.previously_amortized_deducted_by_coupons = m.get('PreviouslyAmortizedDeductedByCoupons')
        if m.get('PreviouslyAmortizedDeductedByPrepaidCard') is not None:
            self.previously_amortized_deducted_by_prepaid_card = m.get('PreviouslyAmortizedDeductedByPrepaidCard')
        if m.get('PreviouslyAmortizedExpenditureAmount') is not None:
            self.previously_amortized_expenditure_amount = m.get('PreviouslyAmortizedExpenditureAmount')
        if m.get('PreviouslyAmortizedInvoiceDiscount') is not None:
            self.previously_amortized_invoice_discount = m.get('PreviouslyAmortizedInvoiceDiscount')
        if m.get('PreviouslyAmortizedPretaxAmount') is not None:
            self.previously_amortized_pretax_amount = m.get('PreviouslyAmortizedPretaxAmount')
        if m.get('PreviouslyAmortizedPretaxGrossAmount') is not None:
            self.previously_amortized_pretax_gross_amount = m.get('PreviouslyAmortizedPretaxGrossAmount')
        if m.get('PreviouslyAmortizedRoundDownDiscount') is not None:
            self.previously_amortized_round_down_discount = m.get('PreviouslyAmortizedRoundDownDiscount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('ProductDetailCode') is not None:
            self.product_detail_code = m.get('ProductDetailCode')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('RemainingAmortizationDeductedByCashCoupons') is not None:
            self.remaining_amortization_deducted_by_cash_coupons = m.get('RemainingAmortizationDeductedByCashCoupons')
        if m.get('RemainingAmortizationDeductedByCoupons') is not None:
            self.remaining_amortization_deducted_by_coupons = m.get('RemainingAmortizationDeductedByCoupons')
        if m.get('RemainingAmortizationDeductedByPrepaidCard') is not None:
            self.remaining_amortization_deducted_by_prepaid_card = m.get('RemainingAmortizationDeductedByPrepaidCard')
        if m.get('RemainingAmortizationExpenditureAmount') is not None:
            self.remaining_amortization_expenditure_amount = m.get('RemainingAmortizationExpenditureAmount')
        if m.get('RemainingAmortizationInvoiceDiscount') is not None:
            self.remaining_amortization_invoice_discount = m.get('RemainingAmortizationInvoiceDiscount')
        if m.get('RemainingAmortizationPretaxAmount') is not None:
            self.remaining_amortization_pretax_amount = m.get('RemainingAmortizationPretaxAmount')
        if m.get('RemainingAmortizationPretaxGrossAmount') is not None:
            self.remaining_amortization_pretax_gross_amount = m.get('RemainingAmortizationPretaxGrossAmount')
        if m.get('RemainingAmortizationRoundDownDiscount') is not None:
            self.remaining_amortization_round_down_discount = m.get('RemainingAmortizationRoundDownDiscount')
        if m.get('ResourceGroup') is not None:
            self.resource_group = m.get('ResourceGroup')
        if m.get('RoundDownDiscount') is not None:
            self.round_down_discount = m.get('RoundDownDiscount')
        if m.get('SplitAccountName') is not None:
            self.split_account_name = m.get('SplitAccountName')
        if m.get('SplitItemID') is not None:
            self.split_item_id = m.get('SplitItemID')
        if m.get('SplitItemName') is not None:
            self.split_item_name = m.get('SplitItemName')
        if m.get('SplitProductDetail') is not None:
            self.split_product_detail = m.get('SplitProductDetail')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tag') is not None:
            self.tag = m.get('Tag')
        if m.get('Zone') is not None:
            self.zone = m.get('Zone')
        return self


class DescribeInstanceAmortizedCostByConsumePeriodResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, items=None, max_results=None, next_token=None,
                 total_count=None):
        self.account_id = account_id  # type: str
        self.account_name = account_name  # type: str
        self.items = items  # type: list[DescribeInstanceAmortizedCostByConsumePeriodResponseBodyDataItems]
        self.max_results = max_results  # type: int
        self.next_token = next_token  # type: str
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByConsumePeriodResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = DescribeInstanceAmortizedCostByConsumePeriodResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class DescribeInstanceAmortizedCostByConsumePeriodResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        self.code = code  # type: str
        self.data = data  # type: DescribeInstanceAmortizedCostByConsumePeriodResponseBodyData
        self.message = message  # type: str
        self.request_id = request_id  # type: str
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByConsumePeriodResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeInstanceAmortizedCostByConsumePeriodResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeInstanceAmortizedCostByConsumePeriodResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeInstanceAmortizedCostByConsumePeriodResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeInstanceAmortizedCostByConsumePeriodResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeInstanceAmortizedCostByConsumePeriodResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeInstanceBillRequest(TeaModel):
    def __init__(self, bill_owner_id=None, billing_cycle=None, billing_date=None, granularity=None,
                 instance_id=None, is_billing_item=None, is_hide_zero_charge=None, max_results=None, next_token=None,
                 owner_id=None, product_code=None, product_type=None, subscription_type=None):
        # The ID of the member. If you specify this parameter, the bills of the member are queried. If you do not specify this parameter, the bills of the current account are queried by default.
        self.bill_owner_id = bill_owner_id  # type: long
        # The billing cycle. Specify the parameter in the YYYY-MM format.
        # Only the latest 18 month billing cycle is supported.
        self.billing_cycle = billing_cycle  # type: str
        # The billing date. This parameter is required only when the Granularity parameter is set to DAILY. Format: YYYY-MM-DD.
        self.billing_date = billing_date  # type: str
        # The granularity at which bills are queried. Valid values:
        # 
        # *   MONTHLY: queries bills on a monthly basis. The data that you query is the same as the data searched by instances on the Billing Details tab of the Bill Details page in the User Center console.
        # *   DAILY: queries bills on a daily basis. The data that you query is the same as the data searched by days on the Billing Details tab of the Bill Details page in the User Center console.
        # 
        # The BillingDate parameter is required if you set the Granularity parameter to DAILY.
        self.granularity = granularity  # type: str
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        # Specifies whether to query data by billable items. Valid values:
        # 
        # *   false: The data that you query is the same as the data searched by instances on the Billing Details tab of the Bill Details page in the User Center console.
        # *   true: The data that you query is the same as the data searched by billable items on the Billing Details tab of the Bill Details page in the User Center console.
        # 
        # Default value: false.
        self.is_billing_item = is_billing_item  # type: bool
        # Specifies whether to filter bills if both the pretax gross amount and pretax amount are 0. Valid values:
        # 
        # *   false: does not filter bills.
        # *   true: filters bills.
        self.is_hide_zero_charge = is_hide_zero_charge  # type: bool
        # The maximum number of entries to return. Default value: 20. Maximum value: 300.
        self.max_results = max_results  # type: int
        # The token that is used to indicate the position where the results for the current call start. The parameter must be left empty or set to the value of the NextToken parameter that is returned from the last call. Otherwise, an error is returned. If the parameter is left empty, data is queried from the first item.
        self.next_token = next_token  # type: str
        self.owner_id = owner_id  # type: long
        # The code of the service.
        self.product_code = product_code  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: the subscription billing method.
        # *   PayAsYouGo: the pay-as-you-go billing method.
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeInstanceBillRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.billing_date is not None:
            result['BillingDate'] = self.billing_date
        if self.granularity is not None:
            result['Granularity'] = self.granularity
        if self.instance_id is not None:
            result['InstanceID'] = self.instance_id
        if self.is_billing_item is not None:
            result['IsBillingItem'] = self.is_billing_item
        if self.is_hide_zero_charge is not None:
            result['IsHideZeroCharge'] = self.is_hide_zero_charge
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('BillingDate') is not None:
            self.billing_date = m.get('BillingDate')
        if m.get('Granularity') is not None:
            self.granularity = m.get('Granularity')
        if m.get('InstanceID') is not None:
            self.instance_id = m.get('InstanceID')
        if m.get('IsBillingItem') is not None:
            self.is_billing_item = m.get('IsBillingItem')
        if m.get('IsHideZeroCharge') is not None:
            self.is_hide_zero_charge = m.get('IsHideZeroCharge')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class DescribeInstanceBillResponseBodyDataItems(TeaModel):
    def __init__(self, adjust_amount=None, bill_account_id=None, bill_account_name=None, billing_date=None,
                 billing_item=None, billing_item_code=None, billing_type=None, biz_type=None, cash_amount=None,
                 commodity_code=None, cost_unit=None, currency=None, deducted_by_cash_coupons=None, deducted_by_coupons=None,
                 deducted_by_prepaid_card=None, deducted_by_resource_package=None, instance_config=None, instance_id=None,
                 instance_spec=None, internet_ip=None, intranet_ip=None, invoice_discount=None, item=None, item_name=None,
                 list_price=None, list_price_unit=None, nick_name=None, outstanding_amount=None, owner_id=None,
                 payment_amount=None, pip_code=None, pretax_amount=None, pretax_gross_amount=None, product_code=None,
                 product_detail=None, product_name=None, product_type=None, region=None, resource_group=None, service_period=None,
                 service_period_unit=None, subscription_type=None, tag=None, usage=None, usage_unit=None, zone=None):
        # The amount deducted with credit refund.
        self.adjust_amount = adjust_amount  # type: float
        # The ID of the account to which the bill belongs.
        self.bill_account_id = bill_account_id  # type: str
        # The name of the account to which the bill belongs.
        self.bill_account_name = bill_account_name  # type: str
        # The billing date. This parameter is returned only if the Granularity parameter is set to DAILY. Format: YYYY-MM-DD.
        self.billing_date = billing_date  # type: str
        # The billable item. A value is returned only if the IsBillingItem parameter is set to true.
        self.billing_item = billing_item  # type: str
        # The code of the billable item.
        self.billing_item_code = billing_item_code  # type: str
        # The billing method.
        self.billing_type = billing_type  # type: str
        # The type of business.
        self.biz_type = biz_type  # type: str
        # The amount paid in cash. The amount deducted with credit refund is not included.
        self.cash_amount = cash_amount  # type: float
        # The code of the commodity. The code is the same as that in Cost Center.
        self.commodity_code = commodity_code  # type: str
        # The cost center.
        self.cost_unit = cost_unit  # type: str
        # The type of currency. Valid values:
        # 
        # *   CNY
        # *   USD
        # *   JPY
        self.currency = currency  # type: str
        # The amount deducted with vouchers.
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: float
        # The amount deducted with coupons.
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        # The amount deducted with prepaid cards.
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: float
        # The amount deducted with resource plans. This parameter is valid only when the isBillingItem parameter is set to true.
        self.deducted_by_resource_package = deducted_by_resource_package  # type: str
        # The configurations of the instance.
        self.instance_config = instance_config  # type: str
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        # The type of the instance.
        self.instance_spec = instance_spec  # type: str
        # The public IP address.
        self.internet_ip = internet_ip  # type: str
        # The private IP address.
        self.intranet_ip = intranet_ip  # type: str
        # The discount amount.
        self.invoice_discount = invoice_discount  # type: float
        # The type of the bill.
        # 
        # *   SubscriptionOrder: the subscription bill.
        # *   PayAsYouGoBill: the pay-as-you-go bill,
        # *   Refund: the refund.
        # *   Adjustment: the adjustment bill.
        self.item = item  # type: str
        # The name of the project.
        self.item_name = item_name  # type: str
        # The unit price of the service. This parameter is valid only when the isBillingItem parameter is set to true.
        self.list_price = list_price  # type: str
        # The unit of the unit price. This parameter is valid only when the isBillingItem parameter is set to true.
        self.list_price_unit = list_price_unit  # type: str
        # The name of the instance.
        self.nick_name = nick_name  # type: str
        # The unsettled amount.
        self.outstanding_amount = outstanding_amount  # type: float
        # The ID of the account that owns the resource. This parameter is returned in multi-account payment scenario.
        self.owner_id = owner_id  # type: str
        # The amount paid in cash. The amount deducted with credit refund is not included.
        self.payment_amount = payment_amount  # type: float
        # The code of the service. The code is the same as that in Cost Center.
        self.pip_code = pip_code  # type: str
        # The pretax amount.
        self.pretax_amount = pretax_amount  # type: float
        # The pretax gross amount.
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        # The code of the service.
        self.product_code = product_code  # type: str
        # The details of the service.
        self.product_detail = product_detail  # type: str
        # The name of the service.
        self.product_name = product_name  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The ID of the region.
        self.region = region  # type: str
        # The ID of the resource group.
        self.resource_group = resource_group  # type: str
        # The service duration.
        self.service_period = service_period  # type: str
        # The unit of the service duration.
        self.service_period_unit = service_period_unit  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: the subscription billing method.
        # *   PayAsYouGo: the pay-as-you-go billing method.
        self.subscription_type = subscription_type  # type: str
        # The tag of the resource.
        self.tag = tag  # type: str
        # The usage of the service. This parameter is valid only when the isBillingItem parameter is set to true. The usage is the total usage in all bills in the billing cycle, not the amount that you purchase. For example, if 1 GB of storage is used and bills are generated every hour, the usage is 1 GB per hour. In this case, the usage is 24 GB per day.
        self.usage = usage  # type: str
        # The unit of usage. This parameter is valid only when the isBillingItem parameter is set to true.
        self.usage_unit = usage_unit  # type: str
        # The ID of the zone.
        self.zone = zone  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeInstanceBillResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.adjust_amount is not None:
            result['AdjustAmount'] = self.adjust_amount
        if self.bill_account_id is not None:
            result['BillAccountID'] = self.bill_account_id
        if self.bill_account_name is not None:
            result['BillAccountName'] = self.bill_account_name
        if self.billing_date is not None:
            result['BillingDate'] = self.billing_date
        if self.billing_item is not None:
            result['BillingItem'] = self.billing_item
        if self.billing_item_code is not None:
            result['BillingItemCode'] = self.billing_item_code
        if self.billing_type is not None:
            result['BillingType'] = self.billing_type
        if self.biz_type is not None:
            result['BizType'] = self.biz_type
        if self.cash_amount is not None:
            result['CashAmount'] = self.cash_amount
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.cost_unit is not None:
            result['CostUnit'] = self.cost_unit
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.deducted_by_resource_package is not None:
            result['DeductedByResourcePackage'] = self.deducted_by_resource_package
        if self.instance_config is not None:
            result['InstanceConfig'] = self.instance_config
        if self.instance_id is not None:
            result['InstanceID'] = self.instance_id
        if self.instance_spec is not None:
            result['InstanceSpec'] = self.instance_spec
        if self.internet_ip is not None:
            result['InternetIP'] = self.internet_ip
        if self.intranet_ip is not None:
            result['IntranetIP'] = self.intranet_ip
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.item is not None:
            result['Item'] = self.item
        if self.item_name is not None:
            result['ItemName'] = self.item_name
        if self.list_price is not None:
            result['ListPrice'] = self.list_price
        if self.list_price_unit is not None:
            result['ListPriceUnit'] = self.list_price_unit
        if self.nick_name is not None:
            result['NickName'] = self.nick_name
        if self.outstanding_amount is not None:
            result['OutstandingAmount'] = self.outstanding_amount
        if self.owner_id is not None:
            result['OwnerID'] = self.owner_id
        if self.payment_amount is not None:
            result['PaymentAmount'] = self.payment_amount
        if self.pip_code is not None:
            result['PipCode'] = self.pip_code
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_group is not None:
            result['ResourceGroup'] = self.resource_group
        if self.service_period is not None:
            result['ServicePeriod'] = self.service_period
        if self.service_period_unit is not None:
            result['ServicePeriodUnit'] = self.service_period_unit
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tag is not None:
            result['Tag'] = self.tag
        if self.usage is not None:
            result['Usage'] = self.usage
        if self.usage_unit is not None:
            result['UsageUnit'] = self.usage_unit
        if self.zone is not None:
            result['Zone'] = self.zone
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AdjustAmount') is not None:
            self.adjust_amount = m.get('AdjustAmount')
        if m.get('BillAccountID') is not None:
            self.bill_account_id = m.get('BillAccountID')
        if m.get('BillAccountName') is not None:
            self.bill_account_name = m.get('BillAccountName')
        if m.get('BillingDate') is not None:
            self.billing_date = m.get('BillingDate')
        if m.get('BillingItem') is not None:
            self.billing_item = m.get('BillingItem')
        if m.get('BillingItemCode') is not None:
            self.billing_item_code = m.get('BillingItemCode')
        if m.get('BillingType') is not None:
            self.billing_type = m.get('BillingType')
        if m.get('BizType') is not None:
            self.biz_type = m.get('BizType')
        if m.get('CashAmount') is not None:
            self.cash_amount = m.get('CashAmount')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('CostUnit') is not None:
            self.cost_unit = m.get('CostUnit')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('DeductedByResourcePackage') is not None:
            self.deducted_by_resource_package = m.get('DeductedByResourcePackage')
        if m.get('InstanceConfig') is not None:
            self.instance_config = m.get('InstanceConfig')
        if m.get('InstanceID') is not None:
            self.instance_id = m.get('InstanceID')
        if m.get('InstanceSpec') is not None:
            self.instance_spec = m.get('InstanceSpec')
        if m.get('InternetIP') is not None:
            self.internet_ip = m.get('InternetIP')
        if m.get('IntranetIP') is not None:
            self.intranet_ip = m.get('IntranetIP')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('Item') is not None:
            self.item = m.get('Item')
        if m.get('ItemName') is not None:
            self.item_name = m.get('ItemName')
        if m.get('ListPrice') is not None:
            self.list_price = m.get('ListPrice')
        if m.get('ListPriceUnit') is not None:
            self.list_price_unit = m.get('ListPriceUnit')
        if m.get('NickName') is not None:
            self.nick_name = m.get('NickName')
        if m.get('OutstandingAmount') is not None:
            self.outstanding_amount = m.get('OutstandingAmount')
        if m.get('OwnerID') is not None:
            self.owner_id = m.get('OwnerID')
        if m.get('PaymentAmount') is not None:
            self.payment_amount = m.get('PaymentAmount')
        if m.get('PipCode') is not None:
            self.pip_code = m.get('PipCode')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceGroup') is not None:
            self.resource_group = m.get('ResourceGroup')
        if m.get('ServicePeriod') is not None:
            self.service_period = m.get('ServicePeriod')
        if m.get('ServicePeriodUnit') is not None:
            self.service_period_unit = m.get('ServicePeriodUnit')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tag') is not None:
            self.tag = m.get('Tag')
        if m.get('Usage') is not None:
            self.usage = m.get('Usage')
        if m.get('UsageUnit') is not None:
            self.usage_unit = m.get('UsageUnit')
        if m.get('Zone') is not None:
            self.zone = m.get('Zone')
        return self


class DescribeInstanceBillResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, billing_cycle=None, items=None, max_results=None,
                 next_token=None, total_count=None):
        # The ID of the account.
        self.account_id = account_id  # type: str
        # The name of the account.
        self.account_name = account_name  # type: str
        # The billing cycle in the YYYY-MM format.
        self.billing_cycle = billing_cycle  # type: str
        # The details of the bill.
        self.items = items  # type: list[DescribeInstanceBillResponseBodyDataItems]
        # The maximum number of entries returned.
        self.max_results = max_results  # type: int
        # The position where the query stopped. If this parameter is left empty, all the results are returned. If you perform another call, you must set the NextToken parameter to the value of this parameter.
        self.next_token = next_token  # type: str
        # The total number of returned entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeInstanceBillResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = DescribeInstanceBillResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class DescribeInstanceBillResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: DescribeInstanceBillResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeInstanceBillResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeInstanceBillResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeInstanceBillResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeInstanceBillResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeInstanceBillResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeInstanceBillResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeInstanceDeductAmortizedCostByAmortizationPeriodRequest(TeaModel):
    def __init__(self, bill_owner_id_list=None, bill_user_id_list=None, billing_cycle=None, cost_unit_code=None,
                 instance_id_list=None, max_results=None, next_token=None, product_code=None, product_detail=None,
                 subscription_type=None):
        self.bill_owner_id_list = bill_owner_id_list  # type: list[str]
        self.bill_user_id_list = bill_user_id_list  # type: list[str]
        self.billing_cycle = billing_cycle  # type: str
        self.cost_unit_code = cost_unit_code  # type: str
        self.instance_id_list = instance_id_list  # type: list[str]
        self.max_results = max_results  # type: int
        self.next_token = next_token  # type: str
        self.product_code = product_code  # type: str
        self.product_detail = product_detail  # type: str
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeInstanceDeductAmortizedCostByAmortizationPeriodRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id_list is not None:
            result['BillOwnerIdList'] = self.bill_owner_id_list
        if self.bill_user_id_list is not None:
            result['BillUserIdList'] = self.bill_user_id_list
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.cost_unit_code is not None:
            result['CostUnitCode'] = self.cost_unit_code
        if self.instance_id_list is not None:
            result['InstanceIdList'] = self.instance_id_list
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerIdList') is not None:
            self.bill_owner_id_list = m.get('BillOwnerIdList')
        if m.get('BillUserIdList') is not None:
            self.bill_user_id_list = m.get('BillUserIdList')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('CostUnitCode') is not None:
            self.cost_unit_code = m.get('CostUnitCode')
        if m.get('InstanceIdList') is not None:
            self.instance_id_list = m.get('InstanceIdList')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponseBodyDataItems(TeaModel):
    def __init__(self, amortization_period=None, amortization_period_day=None, amortization_status=None,
                 bill_account_id=None, bill_account_name=None, bill_owner_id=None, bill_owner_name=None, biz_type=None,
                 consume_period=None, cost_unit=None, cost_unit_code=None, current_amortization_deducted_by_coupons=None,
                 current_amortization_invoice_discount=None, current_amortization_pretax_amount=None, current_amortization_pretax_gross_amount=None,
                 current_amortization_round_down_discount=None, deducted_by_coupons=None, instance_config=None, instance_id=None, internet_ip=None,
                 intranet_ip=None, invoice_discount=None, pretax_amount=None, pretax_gross_amount=None, product_code=None,
                 product_detail=None, product_detail_code=None, product_name=None, refer_fr_instance_id=None,
                 refer_fr_owner_id=None, refer_fr_product_detail_code=None, region=None, resource_group=None,
                 round_down_discount=None, split_account_name=None, split_item_id=None, split_item_name=None,
                 split_product_detail=None, subscription_type=None, tag=None, unused_amortization_deducted_by_coupons=None,
                 unused_amortization_invoice_discount=None, unused_amortization_pretax_amount=None, unused_amortization_pretax_gross_amount=None,
                 unused_amortization_round_down_discount=None, zone=None):
        self.amortization_period = amortization_period  # type: str
        self.amortization_period_day = amortization_period_day  # type: str
        self.amortization_status = amortization_status  # type: str
        self.bill_account_id = bill_account_id  # type: long
        self.bill_account_name = bill_account_name  # type: str
        self.bill_owner_id = bill_owner_id  # type: long
        self.bill_owner_name = bill_owner_name  # type: str
        self.biz_type = biz_type  # type: str
        self.consume_period = consume_period  # type: str
        self.cost_unit = cost_unit  # type: str
        self.cost_unit_code = cost_unit_code  # type: str
        self.current_amortization_deducted_by_coupons = current_amortization_deducted_by_coupons  # type: float
        self.current_amortization_invoice_discount = current_amortization_invoice_discount  # type: float
        self.current_amortization_pretax_amount = current_amortization_pretax_amount  # type: float
        self.current_amortization_pretax_gross_amount = current_amortization_pretax_gross_amount  # type: float
        self.current_amortization_round_down_discount = current_amortization_round_down_discount  # type: float
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        self.instance_config = instance_config  # type: str
        self.instance_id = instance_id  # type: str
        self.internet_ip = internet_ip  # type: str
        self.intranet_ip = intranet_ip  # type: str
        self.invoice_discount = invoice_discount  # type: float
        self.pretax_amount = pretax_amount  # type: float
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        self.product_code = product_code  # type: str
        self.product_detail = product_detail  # type: str
        self.product_detail_code = product_detail_code  # type: str
        self.product_name = product_name  # type: str
        self.refer_fr_instance_id = refer_fr_instance_id  # type: str
        self.refer_fr_owner_id = refer_fr_owner_id  # type: str
        self.refer_fr_product_detail_code = refer_fr_product_detail_code  # type: str
        self.region = region  # type: str
        self.resource_group = resource_group  # type: str
        self.round_down_discount = round_down_discount  # type: float
        self.split_account_name = split_account_name  # type: str
        self.split_item_id = split_item_id  # type: str
        self.split_item_name = split_item_name  # type: str
        self.split_product_detail = split_product_detail  # type: str
        self.subscription_type = subscription_type  # type: str
        self.tag = tag  # type: str
        self.unused_amortization_deducted_by_coupons = unused_amortization_deducted_by_coupons  # type: float
        self.unused_amortization_invoice_discount = unused_amortization_invoice_discount  # type: float
        self.unused_amortization_pretax_amount = unused_amortization_pretax_amount  # type: float
        self.unused_amortization_pretax_gross_amount = unused_amortization_pretax_gross_amount  # type: float
        self.unused_amortization_round_down_discount = unused_amortization_round_down_discount  # type: float
        self.zone = zone  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.amortization_period is not None:
            result['AmortizationPeriod'] = self.amortization_period
        if self.amortization_period_day is not None:
            result['AmortizationPeriodDay'] = self.amortization_period_day
        if self.amortization_status is not None:
            result['AmortizationStatus'] = self.amortization_status
        if self.bill_account_id is not None:
            result['BillAccountID'] = self.bill_account_id
        if self.bill_account_name is not None:
            result['BillAccountName'] = self.bill_account_name
        if self.bill_owner_id is not None:
            result['BillOwnerID'] = self.bill_owner_id
        if self.bill_owner_name is not None:
            result['BillOwnerName'] = self.bill_owner_name
        if self.biz_type is not None:
            result['BizType'] = self.biz_type
        if self.consume_period is not None:
            result['ConsumePeriod'] = self.consume_period
        if self.cost_unit is not None:
            result['CostUnit'] = self.cost_unit
        if self.cost_unit_code is not None:
            result['CostUnitCode'] = self.cost_unit_code
        if self.current_amortization_deducted_by_coupons is not None:
            result['CurrentAmortizationDeductedByCoupons'] = self.current_amortization_deducted_by_coupons
        if self.current_amortization_invoice_discount is not None:
            result['CurrentAmortizationInvoiceDiscount'] = self.current_amortization_invoice_discount
        if self.current_amortization_pretax_amount is not None:
            result['CurrentAmortizationPretaxAmount'] = self.current_amortization_pretax_amount
        if self.current_amortization_pretax_gross_amount is not None:
            result['CurrentAmortizationPretaxGrossAmount'] = self.current_amortization_pretax_gross_amount
        if self.current_amortization_round_down_discount is not None:
            result['CurrentAmortizationRoundDownDiscount'] = self.current_amortization_round_down_discount
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.instance_config is not None:
            result['InstanceConfig'] = self.instance_config
        if self.instance_id is not None:
            result['InstanceID'] = self.instance_id
        if self.internet_ip is not None:
            result['InternetIP'] = self.internet_ip
        if self.intranet_ip is not None:
            result['IntranetIP'] = self.intranet_ip
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.product_detail_code is not None:
            result['ProductDetailCode'] = self.product_detail_code
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.refer_fr_instance_id is not None:
            result['ReferFrInstanceID'] = self.refer_fr_instance_id
        if self.refer_fr_owner_id is not None:
            result['ReferFrOwnerID'] = self.refer_fr_owner_id
        if self.refer_fr_product_detail_code is not None:
            result['ReferFrProductDetailCode'] = self.refer_fr_product_detail_code
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_group is not None:
            result['ResourceGroup'] = self.resource_group
        if self.round_down_discount is not None:
            result['RoundDownDiscount'] = self.round_down_discount
        if self.split_account_name is not None:
            result['SplitAccountName'] = self.split_account_name
        if self.split_item_id is not None:
            result['SplitItemID'] = self.split_item_id
        if self.split_item_name is not None:
            result['SplitItemName'] = self.split_item_name
        if self.split_product_detail is not None:
            result['SplitProductDetail'] = self.split_product_detail
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tag is not None:
            result['Tag'] = self.tag
        if self.unused_amortization_deducted_by_coupons is not None:
            result['UnusedAmortizationDeductedByCoupons'] = self.unused_amortization_deducted_by_coupons
        if self.unused_amortization_invoice_discount is not None:
            result['UnusedAmortizationInvoiceDiscount'] = self.unused_amortization_invoice_discount
        if self.unused_amortization_pretax_amount is not None:
            result['UnusedAmortizationPretaxAmount'] = self.unused_amortization_pretax_amount
        if self.unused_amortization_pretax_gross_amount is not None:
            result['UnusedAmortizationPretaxGrossAmount'] = self.unused_amortization_pretax_gross_amount
        if self.unused_amortization_round_down_discount is not None:
            result['UnusedAmortizationRoundDownDiscount'] = self.unused_amortization_round_down_discount
        if self.zone is not None:
            result['Zone'] = self.zone
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AmortizationPeriod') is not None:
            self.amortization_period = m.get('AmortizationPeriod')
        if m.get('AmortizationPeriodDay') is not None:
            self.amortization_period_day = m.get('AmortizationPeriodDay')
        if m.get('AmortizationStatus') is not None:
            self.amortization_status = m.get('AmortizationStatus')
        if m.get('BillAccountID') is not None:
            self.bill_account_id = m.get('BillAccountID')
        if m.get('BillAccountName') is not None:
            self.bill_account_name = m.get('BillAccountName')
        if m.get('BillOwnerID') is not None:
            self.bill_owner_id = m.get('BillOwnerID')
        if m.get('BillOwnerName') is not None:
            self.bill_owner_name = m.get('BillOwnerName')
        if m.get('BizType') is not None:
            self.biz_type = m.get('BizType')
        if m.get('ConsumePeriod') is not None:
            self.consume_period = m.get('ConsumePeriod')
        if m.get('CostUnit') is not None:
            self.cost_unit = m.get('CostUnit')
        if m.get('CostUnitCode') is not None:
            self.cost_unit_code = m.get('CostUnitCode')
        if m.get('CurrentAmortizationDeductedByCoupons') is not None:
            self.current_amortization_deducted_by_coupons = m.get('CurrentAmortizationDeductedByCoupons')
        if m.get('CurrentAmortizationInvoiceDiscount') is not None:
            self.current_amortization_invoice_discount = m.get('CurrentAmortizationInvoiceDiscount')
        if m.get('CurrentAmortizationPretaxAmount') is not None:
            self.current_amortization_pretax_amount = m.get('CurrentAmortizationPretaxAmount')
        if m.get('CurrentAmortizationPretaxGrossAmount') is not None:
            self.current_amortization_pretax_gross_amount = m.get('CurrentAmortizationPretaxGrossAmount')
        if m.get('CurrentAmortizationRoundDownDiscount') is not None:
            self.current_amortization_round_down_discount = m.get('CurrentAmortizationRoundDownDiscount')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('InstanceConfig') is not None:
            self.instance_config = m.get('InstanceConfig')
        if m.get('InstanceID') is not None:
            self.instance_id = m.get('InstanceID')
        if m.get('InternetIP') is not None:
            self.internet_ip = m.get('InternetIP')
        if m.get('IntranetIP') is not None:
            self.intranet_ip = m.get('IntranetIP')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('ProductDetailCode') is not None:
            self.product_detail_code = m.get('ProductDetailCode')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('ReferFrInstanceID') is not None:
            self.refer_fr_instance_id = m.get('ReferFrInstanceID')
        if m.get('ReferFrOwnerID') is not None:
            self.refer_fr_owner_id = m.get('ReferFrOwnerID')
        if m.get('ReferFrProductDetailCode') is not None:
            self.refer_fr_product_detail_code = m.get('ReferFrProductDetailCode')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceGroup') is not None:
            self.resource_group = m.get('ResourceGroup')
        if m.get('RoundDownDiscount') is not None:
            self.round_down_discount = m.get('RoundDownDiscount')
        if m.get('SplitAccountName') is not None:
            self.split_account_name = m.get('SplitAccountName')
        if m.get('SplitItemID') is not None:
            self.split_item_id = m.get('SplitItemID')
        if m.get('SplitItemName') is not None:
            self.split_item_name = m.get('SplitItemName')
        if m.get('SplitProductDetail') is not None:
            self.split_product_detail = m.get('SplitProductDetail')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tag') is not None:
            self.tag = m.get('Tag')
        if m.get('UnusedAmortizationDeductedByCoupons') is not None:
            self.unused_amortization_deducted_by_coupons = m.get('UnusedAmortizationDeductedByCoupons')
        if m.get('UnusedAmortizationInvoiceDiscount') is not None:
            self.unused_amortization_invoice_discount = m.get('UnusedAmortizationInvoiceDiscount')
        if m.get('UnusedAmortizationPretaxAmount') is not None:
            self.unused_amortization_pretax_amount = m.get('UnusedAmortizationPretaxAmount')
        if m.get('UnusedAmortizationPretaxGrossAmount') is not None:
            self.unused_amortization_pretax_gross_amount = m.get('UnusedAmortizationPretaxGrossAmount')
        if m.get('UnusedAmortizationRoundDownDiscount') is not None:
            self.unused_amortization_round_down_discount = m.get('UnusedAmortizationRoundDownDiscount')
        if m.get('Zone') is not None:
            self.zone = m.get('Zone')
        return self


class DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, items=None, max_results=None, next_token=None,
                 total_count=None):
        self.account_id = account_id  # type: str
        self.account_name = account_name  # type: str
        self.items = items  # type: list[DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponseBodyDataItems]
        self.max_results = max_results  # type: int
        self.next_token = next_token  # type: str
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        self.code = code  # type: str
        self.data = data  # type: DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponseBodyData
        self.message = message  # type: str
        self.request_id = request_id  # type: str
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeInstanceDeductAmortizedCostByAmortizationPeriodResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribePricingModuleRequest(TeaModel):
    def __init__(self, owner_id=None, product_code=None, product_type=None, subscription_type=None):
        self.owner_id = owner_id  # type: long
        # The service code. You can query the service code by calling the **QueryProductList** operation.
        self.product_code = product_code  # type: str
        # The type of the service. You can query the service type by calling the **QueryProductList** operation.
        self.product_type = product_type  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: subscription
        # *   PayAsYouGo: pay-as-you-go
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribePricingModuleRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class DescribePricingModuleResponseBodyDataAttributeListAttributeValuesAttributeValue(TeaModel):
    def __init__(self, name=None, remark=None, type=None, value=None):
        # The attribute value that corresponds to the module code.
        self.name = name  # type: str
        # The description of the module values.
        self.remark = remark  # type: str
        # The type of the attribute value that corresponds to the module code. Valid values:
        # 
        # *   single_float: single value
        # *   range_float: range value
        self.type = type  # type: str
        # The attribute value that corresponds to the module code.
        # 
        # >  If the Type parameter is set to range_float, the valid values of this parameter range from 1024 to 1024000. A value of 1024 indicates that the step size is 1024.
        self.value = value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribePricingModuleResponseBodyDataAttributeListAttributeValuesAttributeValue, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.name is not None:
            result['Name'] = self.name
        if self.remark is not None:
            result['Remark'] = self.remark
        if self.type is not None:
            result['Type'] = self.type
        if self.value is not None:
            result['Value'] = self.value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Name') is not None:
            self.name = m.get('Name')
        if m.get('Remark') is not None:
            self.remark = m.get('Remark')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        if m.get('Value') is not None:
            self.value = m.get('Value')
        return self


class DescribePricingModuleResponseBodyDataAttributeListAttributeValues(TeaModel):
    def __init__(self, attribute_value=None):
        self.attribute_value = attribute_value  # type: list[DescribePricingModuleResponseBodyDataAttributeListAttributeValuesAttributeValue]

    def validate(self):
        if self.attribute_value:
            for k in self.attribute_value:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribePricingModuleResponseBodyDataAttributeListAttributeValues, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['AttributeValue'] = []
        if self.attribute_value is not None:
            for k in self.attribute_value:
                result['AttributeValue'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.attribute_value = []
        if m.get('AttributeValue') is not None:
            for k in m.get('AttributeValue'):
                temp_model = DescribePricingModuleResponseBodyDataAttributeListAttributeValuesAttributeValue()
                self.attribute_value.append(temp_model.from_map(k))
        return self


class DescribePricingModuleResponseBodyDataAttributeListAttribute(TeaModel):
    def __init__(self, code=None, name=None, unit=None, values=None):
        # The code of the attribute.
        self.code = code  # type: str
        # The name of the attribute.
        self.name = name  # type: str
        # The unit of the attribute.
        self.unit = unit  # type: str
        # The attribute values.
        self.values = values  # type: DescribePricingModuleResponseBodyDataAttributeListAttributeValues

    def validate(self):
        if self.values:
            self.values.validate()

    def to_map(self):
        _map = super(DescribePricingModuleResponseBodyDataAttributeListAttribute, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.name is not None:
            result['Name'] = self.name
        if self.unit is not None:
            result['Unit'] = self.unit
        if self.values is not None:
            result['Values'] = self.values.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Name') is not None:
            self.name = m.get('Name')
        if m.get('Unit') is not None:
            self.unit = m.get('Unit')
        if m.get('Values') is not None:
            temp_model = DescribePricingModuleResponseBodyDataAttributeListAttributeValues()
            self.values = temp_model.from_map(m['Values'])
        return self


class DescribePricingModuleResponseBodyDataAttributeList(TeaModel):
    def __init__(self, attribute=None):
        self.attribute = attribute  # type: list[DescribePricingModuleResponseBodyDataAttributeListAttribute]

    def validate(self):
        if self.attribute:
            for k in self.attribute:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribePricingModuleResponseBodyDataAttributeList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Attribute'] = []
        if self.attribute is not None:
            for k in self.attribute:
                result['Attribute'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.attribute = []
        if m.get('Attribute') is not None:
            for k in m.get('Attribute'):
                temp_model = DescribePricingModuleResponseBodyDataAttributeListAttribute()
                self.attribute.append(temp_model.from_map(k))
        return self


class DescribePricingModuleResponseBodyDataModuleListModuleConfigList(TeaModel):
    def __init__(self, config_list=None):
        self.config_list = config_list  # type: list[str]

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribePricingModuleResponseBodyDataModuleListModuleConfigList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.config_list is not None:
            result['ConfigList'] = self.config_list
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigList') is not None:
            self.config_list = m.get('ConfigList')
        return self


class DescribePricingModuleResponseBodyDataModuleListModule(TeaModel):
    def __init__(self, config_list=None, currency=None, module_code=None, module_name=None, price_type=None):
        self.config_list = config_list  # type: DescribePricingModuleResponseBodyDataModuleListModuleConfigList
        # The currency. Default value: CNY.
        self.currency = currency  # type: str
        # The code of the pricing module.
        self.module_code = module_code  # type: str
        # The name of the pricing module.
        self.module_name = module_name  # type: str
        # The price type. Valid values:
        # 
        # *   Usage: usage price
        # *   Hour: hourly price
        # *   Day: daily price
        # *   Week: weekly price
        # *   Month: monthly price
        # *   Year: annual price
        self.price_type = price_type  # type: str

    def validate(self):
        if self.config_list:
            self.config_list.validate()

    def to_map(self):
        _map = super(DescribePricingModuleResponseBodyDataModuleListModule, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.config_list is not None:
            result['ConfigList'] = self.config_list.to_map()
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.module_code is not None:
            result['ModuleCode'] = self.module_code
        if self.module_name is not None:
            result['ModuleName'] = self.module_name
        if self.price_type is not None:
            result['PriceType'] = self.price_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigList') is not None:
            temp_model = DescribePricingModuleResponseBodyDataModuleListModuleConfigList()
            self.config_list = temp_model.from_map(m['ConfigList'])
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('ModuleCode') is not None:
            self.module_code = m.get('ModuleCode')
        if m.get('ModuleName') is not None:
            self.module_name = m.get('ModuleName')
        if m.get('PriceType') is not None:
            self.price_type = m.get('PriceType')
        return self


class DescribePricingModuleResponseBodyDataModuleList(TeaModel):
    def __init__(self, module=None):
        self.module = module  # type: list[DescribePricingModuleResponseBodyDataModuleListModule]

    def validate(self):
        if self.module:
            for k in self.module:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribePricingModuleResponseBodyDataModuleList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Module'] = []
        if self.module is not None:
            for k in self.module:
                result['Module'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.module = []
        if m.get('Module') is not None:
            for k in m.get('Module'):
                temp_model = DescribePricingModuleResponseBodyDataModuleListModule()
                self.module.append(temp_model.from_map(k))
        return self


class DescribePricingModuleResponseBodyData(TeaModel):
    def __init__(self, attribute_list=None, module_list=None):
        # The module attributes.
        self.attribute_list = attribute_list  # type: DescribePricingModuleResponseBodyDataAttributeList
        # The pricing information of modules.
        self.module_list = module_list  # type: DescribePricingModuleResponseBodyDataModuleList

    def validate(self):
        if self.attribute_list:
            self.attribute_list.validate()
        if self.module_list:
            self.module_list.validate()

    def to_map(self):
        _map = super(DescribePricingModuleResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.attribute_list is not None:
            result['AttributeList'] = self.attribute_list.to_map()
        if self.module_list is not None:
            result['ModuleList'] = self.module_list.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AttributeList') is not None:
            temp_model = DescribePricingModuleResponseBodyDataAttributeList()
            self.attribute_list = temp_model.from_map(m['AttributeList'])
        if m.get('ModuleList') is not None:
            temp_model = DescribePricingModuleResponseBodyDataModuleList()
            self.module_list = temp_model.from_map(m['ModuleList'])
        return self


class DescribePricingModuleResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: DescribePricingModuleResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribePricingModuleResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribePricingModuleResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribePricingModuleResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribePricingModuleResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribePricingModuleResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribePricingModuleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeProductAmortizedCostByAmortizationPeriodRequest(TeaModel):
    def __init__(self, bill_owner_id_list=None, bill_user_id_list=None, billing_cycle=None,
                 consume_period_filter=None, cost_unit_code=None, max_results=None, next_token=None, product_code=None,
                 product_detail=None, subscription_type=None):
        # The instance ID that is used to filter bills. You can specify multiple instance IDs to query bills of multiple instances. If you leave this parameter empty, the bills of all instances are queried by default. You can specify a maximum of 10 instance IDs.
        self.bill_owner_id_list = bill_owner_id_list  # type: list[str]
        # The ID of the member that needs to settle the bill. The member ID is used to filter bills. If you specify a value for this parameter, you can query the bills of the specified member. If you leave this parameter empty, the bills of the current account and all members of the current account are queried by default. You can specify a maximum of 10 IDs.
        self.bill_user_id_list = bill_user_id_list  # type: list[str]
        # The allocation month. Format: YYYY-MM.
        self.billing_cycle = billing_cycle  # type: str
        # The billing cycle that is used to filter bills. You can specify a maximum of 10 billing cycles.
        self.consume_period_filter = consume_period_filter  # type: list[str]
        # The code of the cost center.
        self.cost_unit_code = cost_unit_code  # type: str
        # The maximum number of entries to return. Default value: 20. Maximum value: 300.
        self.max_results = max_results  # type: int
        # The position from which the query starts. The parameter must be left empty or set to the value of the NextToken parameter returned from the last call. Otherwise, an error is returned. If this parameter is left empty, data is queried from the beginning.
        self.next_token = next_token  # type: str
        # The code of the service. You can obtain the value of this parameter by calling the QueryProductList operation or the DescribeResourcePackageProduct operation.
        self.product_code = product_code  # type: str
        # The specific service resource.
        self.product_detail = product_detail  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: the subscription billing method
        # *   PayAsYouGo: the pay-as-you-go billing method
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeProductAmortizedCostByAmortizationPeriodRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id_list is not None:
            result['BillOwnerIdList'] = self.bill_owner_id_list
        if self.bill_user_id_list is not None:
            result['BillUserIdList'] = self.bill_user_id_list
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.consume_period_filter is not None:
            result['ConsumePeriodFilter'] = self.consume_period_filter
        if self.cost_unit_code is not None:
            result['CostUnitCode'] = self.cost_unit_code
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerIdList') is not None:
            self.bill_owner_id_list = m.get('BillOwnerIdList')
        if m.get('BillUserIdList') is not None:
            self.bill_user_id_list = m.get('BillUserIdList')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('ConsumePeriodFilter') is not None:
            self.consume_period_filter = m.get('ConsumePeriodFilter')
        if m.get('CostUnitCode') is not None:
            self.cost_unit_code = m.get('CostUnitCode')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class DescribeProductAmortizedCostByAmortizationPeriodResponseBodyDataItems(TeaModel):
    def __init__(self, amortization_period=None, amortization_status=None, bill_account_id=None,
                 bill_account_name=None, bill_owner_id=None, bill_owner_name=None, biz_type=None, consume_period=None,
                 current_amortization_deducted_by_cash_coupons=None, current_amortization_deducted_by_coupons=None,
                 current_amortization_deducted_by_prepaid_card=None, current_amortization_expenditure_amount=None, current_amortization_invoice_discount=None,
                 current_amortization_pretax_amount=None, current_amortization_pretax_gross_amount=None,
                 current_amortization_round_down_discount=None, deducted_by_cash_coupons=None, deducted_by_coupons=None, deducted_by_prepaid_card=None,
                 expenditure_amount=None, invoice_discount=None, pretax_amount=None, pretax_gross_amount=None,
                 previously_amortized_deducted_by_cash_coupons=None, previously_amortized_deducted_by_coupons=None,
                 previously_amortized_deducted_by_prepaid_card=None, previously_amortized_expenditure_amount=None, previously_amortized_invoice_discount=None,
                 previously_amortized_pretax_amount=None, previously_amortized_pretax_gross_amount=None,
                 previously_amortized_round_down_discount=None, product_code=None, product_detail=None, product_detail_code=None, product_name=None,
                 remaining_amortization_deducted_by_cash_coupons=None, remaining_amortization_deducted_by_coupons=None,
                 remaining_amortization_deducted_by_prepaid_card=None, remaining_amortization_expenditure_amount=None,
                 remaining_amortization_invoice_discount=None, remaining_amortization_pretax_amount=None,
                 remaining_amortization_pretax_gross_amount=None, remaining_amortization_round_down_discount=None, round_down_discount=None,
                 subscription_type=None):
        # The allocation month. Format: YYYYMM.
        self.amortization_period = amortization_period  # type: str
        # The allocation status. Valid values:
        # 
        # *   amortized: allocated
        # *   unAmortized: not allocated
        self.amortization_status = amortization_status  # type: str
        # The ID of the account to which the bill belongs.
        self.bill_account_id = bill_account_id  # type: long
        # The name of the account to which the bill belongs.
        self.bill_account_name = bill_account_name  # type: str
        # The ID of the account to which the resource belongs.
        self.bill_owner_id = bill_owner_id  # type: long
        # The name of the account to which the resource belongs.
        self.bill_owner_name = bill_owner_name  # type: str
        # The business type.
        self.biz_type = biz_type  # type: str
        # The billing cycle. Format: YYYYMM.
        self.consume_period = consume_period  # type: str
        # The amount deducted by using vouchers and allocated to the current allocation month.
        self.current_amortization_deducted_by_cash_coupons = current_amortization_deducted_by_cash_coupons  # type: float
        # The amount deducted by using coupons and allocated to the current allocation month.
        self.current_amortization_deducted_by_coupons = current_amortization_deducted_by_coupons  # type: float
        # The amount deducted by using prepaid cards and allocated to the current allocation month.
        self.current_amortization_deducted_by_prepaid_card = current_amortization_deducted_by_prepaid_card  # type: float
        # The expenditure amount allocated to the current allocation month. Invoicing is supported.
        self.current_amortization_expenditure_amount = current_amortization_expenditure_amount  # type: float
        # The discount amount allocated to the current allocation month.
        self.current_amortization_invoice_discount = current_amortization_invoice_discount  # type: float
        # The pretax amount allocated to the current allocation month.
        self.current_amortization_pretax_amount = current_amortization_pretax_amount  # type: float
        # The pretax gross amount allocated to the current allocation month.
        self.current_amortization_pretax_gross_amount = current_amortization_pretax_gross_amount  # type: float
        # The round-off amount allocated to the current allocation month.
        self.current_amortization_round_down_discount = current_amortization_round_down_discount  # type: float
        # The amount deducted by using vouchers.
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: float
        # The amount deducted by using coupons.
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        # The amount deducted by using prepaid cards.
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: float
        # The expenditure amount. Invoicing is supported.
        self.expenditure_amount = expenditure_amount  # type: float
        # The discount amount.
        self.invoice_discount = invoice_discount  # type: float
        # The pretax amount.
        self.pretax_amount = pretax_amount  # type: float
        # The pretax gross amount.
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        # The amount deducted by using vouchers and allocated before the current allocation month.
        self.previously_amortized_deducted_by_cash_coupons = previously_amortized_deducted_by_cash_coupons  # type: float
        # The amount deducted by using coupons and allocated before the current allocation month.
        self.previously_amortized_deducted_by_coupons = previously_amortized_deducted_by_coupons  # type: float
        # The amount deducted by using prepaid cards and allocated before the current allocation month.
        self.previously_amortized_deducted_by_prepaid_card = previously_amortized_deducted_by_prepaid_card  # type: float
        # The expenditure amount allocated before the current allocation month. Invoicing is supported.
        self.previously_amortized_expenditure_amount = previously_amortized_expenditure_amount  # type: float
        # The discount amount allocated before the current allocation month.
        self.previously_amortized_invoice_discount = previously_amortized_invoice_discount  # type: float
        # The pretax amount allocated before the current allocation month.
        self.previously_amortized_pretax_amount = previously_amortized_pretax_amount  # type: float
        # The pretax gross amount allocated before the current allocation month.
        self.previously_amortized_pretax_gross_amount = previously_amortized_pretax_gross_amount  # type: float
        # The round-off amount allocated before the current allocation month.
        self.previously_amortized_round_down_discount = previously_amortized_round_down_discount  # type: float
        # The code of the service.
        self.product_code = product_code  # type: str
        # The specific service resource.
        self.product_detail = product_detail  # type: str
        # The code of the specific service resource.
        self.product_detail_code = product_detail_code  # type: str
        # The name of the service.
        self.product_name = product_name  # type: str
        # The amount deducted by using vouchers and to be allocated to one or more future allocation months.
        self.remaining_amortization_deducted_by_cash_coupons = remaining_amortization_deducted_by_cash_coupons  # type: float
        # The amount deducted by using coupons and to be allocated to one or more future allocation months.
        self.remaining_amortization_deducted_by_coupons = remaining_amortization_deducted_by_coupons  # type: float
        # The amount deducted by using prepaid cards and to be allocated to one or more future allocation months.
        self.remaining_amortization_deducted_by_prepaid_card = remaining_amortization_deducted_by_prepaid_card  # type: float
        # The expenditure amount to be allocated to one or more future allocation months. Invoicing is supported.
        self.remaining_amortization_expenditure_amount = remaining_amortization_expenditure_amount  # type: float
        # The discount amount to be allocated to one or more future allocation months.
        self.remaining_amortization_invoice_discount = remaining_amortization_invoice_discount  # type: float
        # The pretax amount to be allocated to one or more future allocation months.
        self.remaining_amortization_pretax_amount = remaining_amortization_pretax_amount  # type: float
        # The pretax gross amount to be allocated to one or more future allocation months.
        self.remaining_amortization_pretax_gross_amount = remaining_amortization_pretax_gross_amount  # type: float
        # The round-off amount to be allocated to one or more future allocation months.
        self.remaining_amortization_round_down_discount = remaining_amortization_round_down_discount  # type: float
        # The round-off amount.
        self.round_down_discount = round_down_discount  # type: float
        # The billing method. Valid values:
        # 
        # *   Subscription: the subscription billing method
        # *   PayAsYouGo: the pay-as-you-go billing method
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeProductAmortizedCostByAmortizationPeriodResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.amortization_period is not None:
            result['AmortizationPeriod'] = self.amortization_period
        if self.amortization_status is not None:
            result['AmortizationStatus'] = self.amortization_status
        if self.bill_account_id is not None:
            result['BillAccountID'] = self.bill_account_id
        if self.bill_account_name is not None:
            result['BillAccountName'] = self.bill_account_name
        if self.bill_owner_id is not None:
            result['BillOwnerID'] = self.bill_owner_id
        if self.bill_owner_name is not None:
            result['BillOwnerName'] = self.bill_owner_name
        if self.biz_type is not None:
            result['BizType'] = self.biz_type
        if self.consume_period is not None:
            result['ConsumePeriod'] = self.consume_period
        if self.current_amortization_deducted_by_cash_coupons is not None:
            result['CurrentAmortizationDeductedByCashCoupons'] = self.current_amortization_deducted_by_cash_coupons
        if self.current_amortization_deducted_by_coupons is not None:
            result['CurrentAmortizationDeductedByCoupons'] = self.current_amortization_deducted_by_coupons
        if self.current_amortization_deducted_by_prepaid_card is not None:
            result['CurrentAmortizationDeductedByPrepaidCard'] = self.current_amortization_deducted_by_prepaid_card
        if self.current_amortization_expenditure_amount is not None:
            result['CurrentAmortizationExpenditureAmount'] = self.current_amortization_expenditure_amount
        if self.current_amortization_invoice_discount is not None:
            result['CurrentAmortizationInvoiceDiscount'] = self.current_amortization_invoice_discount
        if self.current_amortization_pretax_amount is not None:
            result['CurrentAmortizationPretaxAmount'] = self.current_amortization_pretax_amount
        if self.current_amortization_pretax_gross_amount is not None:
            result['CurrentAmortizationPretaxGrossAmount'] = self.current_amortization_pretax_gross_amount
        if self.current_amortization_round_down_discount is not None:
            result['CurrentAmortizationRoundDownDiscount'] = self.current_amortization_round_down_discount
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.expenditure_amount is not None:
            result['ExpenditureAmount'] = self.expenditure_amount
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.previously_amortized_deducted_by_cash_coupons is not None:
            result['PreviouslyAmortizedDeductedByCashCoupons'] = self.previously_amortized_deducted_by_cash_coupons
        if self.previously_amortized_deducted_by_coupons is not None:
            result['PreviouslyAmortizedDeductedByCoupons'] = self.previously_amortized_deducted_by_coupons
        if self.previously_amortized_deducted_by_prepaid_card is not None:
            result['PreviouslyAmortizedDeductedByPrepaidCard'] = self.previously_amortized_deducted_by_prepaid_card
        if self.previously_amortized_expenditure_amount is not None:
            result['PreviouslyAmortizedExpenditureAmount'] = self.previously_amortized_expenditure_amount
        if self.previously_amortized_invoice_discount is not None:
            result['PreviouslyAmortizedInvoiceDiscount'] = self.previously_amortized_invoice_discount
        if self.previously_amortized_pretax_amount is not None:
            result['PreviouslyAmortizedPretaxAmount'] = self.previously_amortized_pretax_amount
        if self.previously_amortized_pretax_gross_amount is not None:
            result['PreviouslyAmortizedPretaxGrossAmount'] = self.previously_amortized_pretax_gross_amount
        if self.previously_amortized_round_down_discount is not None:
            result['PreviouslyAmortizedRoundDownDiscount'] = self.previously_amortized_round_down_discount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.product_detail_code is not None:
            result['ProductDetailCode'] = self.product_detail_code
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.remaining_amortization_deducted_by_cash_coupons is not None:
            result['RemainingAmortizationDeductedByCashCoupons'] = self.remaining_amortization_deducted_by_cash_coupons
        if self.remaining_amortization_deducted_by_coupons is not None:
            result['RemainingAmortizationDeductedByCoupons'] = self.remaining_amortization_deducted_by_coupons
        if self.remaining_amortization_deducted_by_prepaid_card is not None:
            result['RemainingAmortizationDeductedByPrepaidCard'] = self.remaining_amortization_deducted_by_prepaid_card
        if self.remaining_amortization_expenditure_amount is not None:
            result['RemainingAmortizationExpenditureAmount'] = self.remaining_amortization_expenditure_amount
        if self.remaining_amortization_invoice_discount is not None:
            result['RemainingAmortizationInvoiceDiscount'] = self.remaining_amortization_invoice_discount
        if self.remaining_amortization_pretax_amount is not None:
            result['RemainingAmortizationPretaxAmount'] = self.remaining_amortization_pretax_amount
        if self.remaining_amortization_pretax_gross_amount is not None:
            result['RemainingAmortizationPretaxGrossAmount'] = self.remaining_amortization_pretax_gross_amount
        if self.remaining_amortization_round_down_discount is not None:
            result['RemainingAmortizationRoundDownDiscount'] = self.remaining_amortization_round_down_discount
        if self.round_down_discount is not None:
            result['RoundDownDiscount'] = self.round_down_discount
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AmortizationPeriod') is not None:
            self.amortization_period = m.get('AmortizationPeriod')
        if m.get('AmortizationStatus') is not None:
            self.amortization_status = m.get('AmortizationStatus')
        if m.get('BillAccountID') is not None:
            self.bill_account_id = m.get('BillAccountID')
        if m.get('BillAccountName') is not None:
            self.bill_account_name = m.get('BillAccountName')
        if m.get('BillOwnerID') is not None:
            self.bill_owner_id = m.get('BillOwnerID')
        if m.get('BillOwnerName') is not None:
            self.bill_owner_name = m.get('BillOwnerName')
        if m.get('BizType') is not None:
            self.biz_type = m.get('BizType')
        if m.get('ConsumePeriod') is not None:
            self.consume_period = m.get('ConsumePeriod')
        if m.get('CurrentAmortizationDeductedByCashCoupons') is not None:
            self.current_amortization_deducted_by_cash_coupons = m.get('CurrentAmortizationDeductedByCashCoupons')
        if m.get('CurrentAmortizationDeductedByCoupons') is not None:
            self.current_amortization_deducted_by_coupons = m.get('CurrentAmortizationDeductedByCoupons')
        if m.get('CurrentAmortizationDeductedByPrepaidCard') is not None:
            self.current_amortization_deducted_by_prepaid_card = m.get('CurrentAmortizationDeductedByPrepaidCard')
        if m.get('CurrentAmortizationExpenditureAmount') is not None:
            self.current_amortization_expenditure_amount = m.get('CurrentAmortizationExpenditureAmount')
        if m.get('CurrentAmortizationInvoiceDiscount') is not None:
            self.current_amortization_invoice_discount = m.get('CurrentAmortizationInvoiceDiscount')
        if m.get('CurrentAmortizationPretaxAmount') is not None:
            self.current_amortization_pretax_amount = m.get('CurrentAmortizationPretaxAmount')
        if m.get('CurrentAmortizationPretaxGrossAmount') is not None:
            self.current_amortization_pretax_gross_amount = m.get('CurrentAmortizationPretaxGrossAmount')
        if m.get('CurrentAmortizationRoundDownDiscount') is not None:
            self.current_amortization_round_down_discount = m.get('CurrentAmortizationRoundDownDiscount')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('ExpenditureAmount') is not None:
            self.expenditure_amount = m.get('ExpenditureAmount')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('PreviouslyAmortizedDeductedByCashCoupons') is not None:
            self.previously_amortized_deducted_by_cash_coupons = m.get('PreviouslyAmortizedDeductedByCashCoupons')
        if m.get('PreviouslyAmortizedDeductedByCoupons') is not None:
            self.previously_amortized_deducted_by_coupons = m.get('PreviouslyAmortizedDeductedByCoupons')
        if m.get('PreviouslyAmortizedDeductedByPrepaidCard') is not None:
            self.previously_amortized_deducted_by_prepaid_card = m.get('PreviouslyAmortizedDeductedByPrepaidCard')
        if m.get('PreviouslyAmortizedExpenditureAmount') is not None:
            self.previously_amortized_expenditure_amount = m.get('PreviouslyAmortizedExpenditureAmount')
        if m.get('PreviouslyAmortizedInvoiceDiscount') is not None:
            self.previously_amortized_invoice_discount = m.get('PreviouslyAmortizedInvoiceDiscount')
        if m.get('PreviouslyAmortizedPretaxAmount') is not None:
            self.previously_amortized_pretax_amount = m.get('PreviouslyAmortizedPretaxAmount')
        if m.get('PreviouslyAmortizedPretaxGrossAmount') is not None:
            self.previously_amortized_pretax_gross_amount = m.get('PreviouslyAmortizedPretaxGrossAmount')
        if m.get('PreviouslyAmortizedRoundDownDiscount') is not None:
            self.previously_amortized_round_down_discount = m.get('PreviouslyAmortizedRoundDownDiscount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('ProductDetailCode') is not None:
            self.product_detail_code = m.get('ProductDetailCode')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('RemainingAmortizationDeductedByCashCoupons') is not None:
            self.remaining_amortization_deducted_by_cash_coupons = m.get('RemainingAmortizationDeductedByCashCoupons')
        if m.get('RemainingAmortizationDeductedByCoupons') is not None:
            self.remaining_amortization_deducted_by_coupons = m.get('RemainingAmortizationDeductedByCoupons')
        if m.get('RemainingAmortizationDeductedByPrepaidCard') is not None:
            self.remaining_amortization_deducted_by_prepaid_card = m.get('RemainingAmortizationDeductedByPrepaidCard')
        if m.get('RemainingAmortizationExpenditureAmount') is not None:
            self.remaining_amortization_expenditure_amount = m.get('RemainingAmortizationExpenditureAmount')
        if m.get('RemainingAmortizationInvoiceDiscount') is not None:
            self.remaining_amortization_invoice_discount = m.get('RemainingAmortizationInvoiceDiscount')
        if m.get('RemainingAmortizationPretaxAmount') is not None:
            self.remaining_amortization_pretax_amount = m.get('RemainingAmortizationPretaxAmount')
        if m.get('RemainingAmortizationPretaxGrossAmount') is not None:
            self.remaining_amortization_pretax_gross_amount = m.get('RemainingAmortizationPretaxGrossAmount')
        if m.get('RemainingAmortizationRoundDownDiscount') is not None:
            self.remaining_amortization_round_down_discount = m.get('RemainingAmortizationRoundDownDiscount')
        if m.get('RoundDownDiscount') is not None:
            self.round_down_discount = m.get('RoundDownDiscount')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class DescribeProductAmortizedCostByAmortizationPeriodResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, items=None, max_results=None, next_token=None,
                 total_count=None):
        # The ID of the account.
        self.account_id = account_id  # type: str
        # The name of the account.
        self.account_name = account_name  # type: str
        # The data entries returned.
        self.items = items  # type: list[DescribeProductAmortizedCostByAmortizationPeriodResponseBodyDataItems]
        # The maximum number of entries returned.
        self.max_results = max_results  # type: int
        # The position from which the results started to return. The parameter must be left empty or set to the value of the NextToken parameter returned from the last call. Otherwise, an error is returned. If this parameter is left empty, data is queried from the beginning.
        self.next_token = next_token  # type: str
        # The total number of returned entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeProductAmortizedCostByAmortizationPeriodResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = DescribeProductAmortizedCostByAmortizationPeriodResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class DescribeProductAmortizedCostByAmortizationPeriodResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: DescribeProductAmortizedCostByAmortizationPeriodResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeProductAmortizedCostByAmortizationPeriodResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeProductAmortizedCostByAmortizationPeriodResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeProductAmortizedCostByAmortizationPeriodResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeProductAmortizedCostByAmortizationPeriodResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeProductAmortizedCostByAmortizationPeriodResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeProductAmortizedCostByAmortizationPeriodResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeProductAmortizedCostByConsumePeriodRequest(TeaModel):
    def __init__(self, amortization_period_filter=None, bill_owner_id_list=None, bill_user_id_list=None,
                 billing_cycle=None, cost_unit_code=None, max_results=None, next_token=None, product_code=None,
                 product_detail=None, subscription_type=None):
        self.amortization_period_filter = amortization_period_filter  # type: list[str]
        self.bill_owner_id_list = bill_owner_id_list  # type: list[str]
        self.bill_user_id_list = bill_user_id_list  # type: list[str]
        self.billing_cycle = billing_cycle  # type: str
        self.cost_unit_code = cost_unit_code  # type: str
        self.max_results = max_results  # type: int
        self.next_token = next_token  # type: str
        self.product_code = product_code  # type: str
        self.product_detail = product_detail  # type: str
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeProductAmortizedCostByConsumePeriodRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.amortization_period_filter is not None:
            result['AmortizationPeriodFilter'] = self.amortization_period_filter
        if self.bill_owner_id_list is not None:
            result['BillOwnerIdList'] = self.bill_owner_id_list
        if self.bill_user_id_list is not None:
            result['BillUserIdList'] = self.bill_user_id_list
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.cost_unit_code is not None:
            result['CostUnitCode'] = self.cost_unit_code
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AmortizationPeriodFilter') is not None:
            self.amortization_period_filter = m.get('AmortizationPeriodFilter')
        if m.get('BillOwnerIdList') is not None:
            self.bill_owner_id_list = m.get('BillOwnerIdList')
        if m.get('BillUserIdList') is not None:
            self.bill_user_id_list = m.get('BillUserIdList')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('CostUnitCode') is not None:
            self.cost_unit_code = m.get('CostUnitCode')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class DescribeProductAmortizedCostByConsumePeriodResponseBodyDataItems(TeaModel):
    def __init__(self, amortization_period=None, amortization_status=None, bill_account_id=None,
                 bill_account_name=None, bill_owner_id=None, bill_owner_name=None, biz_type=None, consume_period=None,
                 current_amortization_deducted_by_cash_coupons=None, current_amortization_deducted_by_coupons=None,
                 current_amortization_deducted_by_prepaid_card=None, current_amortization_expenditure_amount=None, current_amortization_invoice_discount=None,
                 current_amortization_pretax_amount=None, current_amortization_pretax_gross_amount=None,
                 current_amortization_round_down_discount=None, deducted_by_cash_coupons=None, deducted_by_coupons=None, deducted_by_prepaid_card=None,
                 expenditure_amount=None, invoice_discount=None, pretax_amount=None, pretax_gross_amount=None,
                 previously_amortized_deducted_by_cash_coupons=None, previously_amortized_deducted_by_coupons=None,
                 previously_amortized_deducted_by_prepaid_card=None, previously_amortized_expenditure_amount=None, previously_amortized_invoice_discount=None,
                 previously_amortized_pretax_amount=None, previously_amortized_pretax_gross_amount=None,
                 previously_amortized_round_down_discount=None, product_code=None, product_detail=None, product_detail_code=None, product_name=None,
                 remaining_amortization_deducted_by_cash_coupons=None, remaining_amortization_deducted_by_coupons=None,
                 remaining_amortization_deducted_by_prepaid_card=None, remaining_amortization_expenditure_amount=None,
                 remaining_amortization_invoice_discount=None, remaining_amortization_pretax_amount=None,
                 remaining_amortization_pretax_gross_amount=None, remaining_amortization_round_down_discount=None, round_down_discount=None,
                 subscription_type=None):
        self.amortization_period = amortization_period  # type: str
        self.amortization_status = amortization_status  # type: str
        self.bill_account_id = bill_account_id  # type: long
        self.bill_account_name = bill_account_name  # type: str
        self.bill_owner_id = bill_owner_id  # type: long
        self.bill_owner_name = bill_owner_name  # type: str
        self.biz_type = biz_type  # type: str
        self.consume_period = consume_period  # type: str
        self.current_amortization_deducted_by_cash_coupons = current_amortization_deducted_by_cash_coupons  # type: float
        self.current_amortization_deducted_by_coupons = current_amortization_deducted_by_coupons  # type: float
        self.current_amortization_deducted_by_prepaid_card = current_amortization_deducted_by_prepaid_card  # type: float
        self.current_amortization_expenditure_amount = current_amortization_expenditure_amount  # type: float
        self.current_amortization_invoice_discount = current_amortization_invoice_discount  # type: float
        self.current_amortization_pretax_amount = current_amortization_pretax_amount  # type: float
        self.current_amortization_pretax_gross_amount = current_amortization_pretax_gross_amount  # type: float
        self.current_amortization_round_down_discount = current_amortization_round_down_discount  # type: float
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: float
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: float
        self.expenditure_amount = expenditure_amount  # type: float
        self.invoice_discount = invoice_discount  # type: float
        self.pretax_amount = pretax_amount  # type: float
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        self.previously_amortized_deducted_by_cash_coupons = previously_amortized_deducted_by_cash_coupons  # type: float
        self.previously_amortized_deducted_by_coupons = previously_amortized_deducted_by_coupons  # type: float
        self.previously_amortized_deducted_by_prepaid_card = previously_amortized_deducted_by_prepaid_card  # type: float
        self.previously_amortized_expenditure_amount = previously_amortized_expenditure_amount  # type: float
        self.previously_amortized_invoice_discount = previously_amortized_invoice_discount  # type: float
        self.previously_amortized_pretax_amount = previously_amortized_pretax_amount  # type: float
        self.previously_amortized_pretax_gross_amount = previously_amortized_pretax_gross_amount  # type: float
        self.previously_amortized_round_down_discount = previously_amortized_round_down_discount  # type: float
        self.product_code = product_code  # type: str
        self.product_detail = product_detail  # type: str
        self.product_detail_code = product_detail_code  # type: str
        self.product_name = product_name  # type: str
        self.remaining_amortization_deducted_by_cash_coupons = remaining_amortization_deducted_by_cash_coupons  # type: float
        self.remaining_amortization_deducted_by_coupons = remaining_amortization_deducted_by_coupons  # type: float
        self.remaining_amortization_deducted_by_prepaid_card = remaining_amortization_deducted_by_prepaid_card  # type: float
        self.remaining_amortization_expenditure_amount = remaining_amortization_expenditure_amount  # type: float
        self.remaining_amortization_invoice_discount = remaining_amortization_invoice_discount  # type: float
        self.remaining_amortization_pretax_amount = remaining_amortization_pretax_amount  # type: float
        self.remaining_amortization_pretax_gross_amount = remaining_amortization_pretax_gross_amount  # type: float
        self.remaining_amortization_round_down_discount = remaining_amortization_round_down_discount  # type: float
        self.round_down_discount = round_down_discount  # type: float
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeProductAmortizedCostByConsumePeriodResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.amortization_period is not None:
            result['AmortizationPeriod'] = self.amortization_period
        if self.amortization_status is not None:
            result['AmortizationStatus'] = self.amortization_status
        if self.bill_account_id is not None:
            result['BillAccountID'] = self.bill_account_id
        if self.bill_account_name is not None:
            result['BillAccountName'] = self.bill_account_name
        if self.bill_owner_id is not None:
            result['BillOwnerID'] = self.bill_owner_id
        if self.bill_owner_name is not None:
            result['BillOwnerName'] = self.bill_owner_name
        if self.biz_type is not None:
            result['BizType'] = self.biz_type
        if self.consume_period is not None:
            result['ConsumePeriod'] = self.consume_period
        if self.current_amortization_deducted_by_cash_coupons is not None:
            result['CurrentAmortizationDeductedByCashCoupons'] = self.current_amortization_deducted_by_cash_coupons
        if self.current_amortization_deducted_by_coupons is not None:
            result['CurrentAmortizationDeductedByCoupons'] = self.current_amortization_deducted_by_coupons
        if self.current_amortization_deducted_by_prepaid_card is not None:
            result['CurrentAmortizationDeductedByPrepaidCard'] = self.current_amortization_deducted_by_prepaid_card
        if self.current_amortization_expenditure_amount is not None:
            result['CurrentAmortizationExpenditureAmount'] = self.current_amortization_expenditure_amount
        if self.current_amortization_invoice_discount is not None:
            result['CurrentAmortizationInvoiceDiscount'] = self.current_amortization_invoice_discount
        if self.current_amortization_pretax_amount is not None:
            result['CurrentAmortizationPretaxAmount'] = self.current_amortization_pretax_amount
        if self.current_amortization_pretax_gross_amount is not None:
            result['CurrentAmortizationPretaxGrossAmount'] = self.current_amortization_pretax_gross_amount
        if self.current_amortization_round_down_discount is not None:
            result['CurrentAmortizationRoundDownDiscount'] = self.current_amortization_round_down_discount
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.expenditure_amount is not None:
            result['ExpenditureAmount'] = self.expenditure_amount
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.previously_amortized_deducted_by_cash_coupons is not None:
            result['PreviouslyAmortizedDeductedByCashCoupons'] = self.previously_amortized_deducted_by_cash_coupons
        if self.previously_amortized_deducted_by_coupons is not None:
            result['PreviouslyAmortizedDeductedByCoupons'] = self.previously_amortized_deducted_by_coupons
        if self.previously_amortized_deducted_by_prepaid_card is not None:
            result['PreviouslyAmortizedDeductedByPrepaidCard'] = self.previously_amortized_deducted_by_prepaid_card
        if self.previously_amortized_expenditure_amount is not None:
            result['PreviouslyAmortizedExpenditureAmount'] = self.previously_amortized_expenditure_amount
        if self.previously_amortized_invoice_discount is not None:
            result['PreviouslyAmortizedInvoiceDiscount'] = self.previously_amortized_invoice_discount
        if self.previously_amortized_pretax_amount is not None:
            result['PreviouslyAmortizedPretaxAmount'] = self.previously_amortized_pretax_amount
        if self.previously_amortized_pretax_gross_amount is not None:
            result['PreviouslyAmortizedPretaxGrossAmount'] = self.previously_amortized_pretax_gross_amount
        if self.previously_amortized_round_down_discount is not None:
            result['PreviouslyAmortizedRoundDownDiscount'] = self.previously_amortized_round_down_discount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.product_detail_code is not None:
            result['ProductDetailCode'] = self.product_detail_code
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.remaining_amortization_deducted_by_cash_coupons is not None:
            result['RemainingAmortizationDeductedByCashCoupons'] = self.remaining_amortization_deducted_by_cash_coupons
        if self.remaining_amortization_deducted_by_coupons is not None:
            result['RemainingAmortizationDeductedByCoupons'] = self.remaining_amortization_deducted_by_coupons
        if self.remaining_amortization_deducted_by_prepaid_card is not None:
            result['RemainingAmortizationDeductedByPrepaidCard'] = self.remaining_amortization_deducted_by_prepaid_card
        if self.remaining_amortization_expenditure_amount is not None:
            result['RemainingAmortizationExpenditureAmount'] = self.remaining_amortization_expenditure_amount
        if self.remaining_amortization_invoice_discount is not None:
            result['RemainingAmortizationInvoiceDiscount'] = self.remaining_amortization_invoice_discount
        if self.remaining_amortization_pretax_amount is not None:
            result['RemainingAmortizationPretaxAmount'] = self.remaining_amortization_pretax_amount
        if self.remaining_amortization_pretax_gross_amount is not None:
            result['RemainingAmortizationPretaxGrossAmount'] = self.remaining_amortization_pretax_gross_amount
        if self.remaining_amortization_round_down_discount is not None:
            result['RemainingAmortizationRoundDownDiscount'] = self.remaining_amortization_round_down_discount
        if self.round_down_discount is not None:
            result['RoundDownDiscount'] = self.round_down_discount
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AmortizationPeriod') is not None:
            self.amortization_period = m.get('AmortizationPeriod')
        if m.get('AmortizationStatus') is not None:
            self.amortization_status = m.get('AmortizationStatus')
        if m.get('BillAccountID') is not None:
            self.bill_account_id = m.get('BillAccountID')
        if m.get('BillAccountName') is not None:
            self.bill_account_name = m.get('BillAccountName')
        if m.get('BillOwnerID') is not None:
            self.bill_owner_id = m.get('BillOwnerID')
        if m.get('BillOwnerName') is not None:
            self.bill_owner_name = m.get('BillOwnerName')
        if m.get('BizType') is not None:
            self.biz_type = m.get('BizType')
        if m.get('ConsumePeriod') is not None:
            self.consume_period = m.get('ConsumePeriod')
        if m.get('CurrentAmortizationDeductedByCashCoupons') is not None:
            self.current_amortization_deducted_by_cash_coupons = m.get('CurrentAmortizationDeductedByCashCoupons')
        if m.get('CurrentAmortizationDeductedByCoupons') is not None:
            self.current_amortization_deducted_by_coupons = m.get('CurrentAmortizationDeductedByCoupons')
        if m.get('CurrentAmortizationDeductedByPrepaidCard') is not None:
            self.current_amortization_deducted_by_prepaid_card = m.get('CurrentAmortizationDeductedByPrepaidCard')
        if m.get('CurrentAmortizationExpenditureAmount') is not None:
            self.current_amortization_expenditure_amount = m.get('CurrentAmortizationExpenditureAmount')
        if m.get('CurrentAmortizationInvoiceDiscount') is not None:
            self.current_amortization_invoice_discount = m.get('CurrentAmortizationInvoiceDiscount')
        if m.get('CurrentAmortizationPretaxAmount') is not None:
            self.current_amortization_pretax_amount = m.get('CurrentAmortizationPretaxAmount')
        if m.get('CurrentAmortizationPretaxGrossAmount') is not None:
            self.current_amortization_pretax_gross_amount = m.get('CurrentAmortizationPretaxGrossAmount')
        if m.get('CurrentAmortizationRoundDownDiscount') is not None:
            self.current_amortization_round_down_discount = m.get('CurrentAmortizationRoundDownDiscount')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('ExpenditureAmount') is not None:
            self.expenditure_amount = m.get('ExpenditureAmount')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('PreviouslyAmortizedDeductedByCashCoupons') is not None:
            self.previously_amortized_deducted_by_cash_coupons = m.get('PreviouslyAmortizedDeductedByCashCoupons')
        if m.get('PreviouslyAmortizedDeductedByCoupons') is not None:
            self.previously_amortized_deducted_by_coupons = m.get('PreviouslyAmortizedDeductedByCoupons')
        if m.get('PreviouslyAmortizedDeductedByPrepaidCard') is not None:
            self.previously_amortized_deducted_by_prepaid_card = m.get('PreviouslyAmortizedDeductedByPrepaidCard')
        if m.get('PreviouslyAmortizedExpenditureAmount') is not None:
            self.previously_amortized_expenditure_amount = m.get('PreviouslyAmortizedExpenditureAmount')
        if m.get('PreviouslyAmortizedInvoiceDiscount') is not None:
            self.previously_amortized_invoice_discount = m.get('PreviouslyAmortizedInvoiceDiscount')
        if m.get('PreviouslyAmortizedPretaxAmount') is not None:
            self.previously_amortized_pretax_amount = m.get('PreviouslyAmortizedPretaxAmount')
        if m.get('PreviouslyAmortizedPretaxGrossAmount') is not None:
            self.previously_amortized_pretax_gross_amount = m.get('PreviouslyAmortizedPretaxGrossAmount')
        if m.get('PreviouslyAmortizedRoundDownDiscount') is not None:
            self.previously_amortized_round_down_discount = m.get('PreviouslyAmortizedRoundDownDiscount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('ProductDetailCode') is not None:
            self.product_detail_code = m.get('ProductDetailCode')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('RemainingAmortizationDeductedByCashCoupons') is not None:
            self.remaining_amortization_deducted_by_cash_coupons = m.get('RemainingAmortizationDeductedByCashCoupons')
        if m.get('RemainingAmortizationDeductedByCoupons') is not None:
            self.remaining_amortization_deducted_by_coupons = m.get('RemainingAmortizationDeductedByCoupons')
        if m.get('RemainingAmortizationDeductedByPrepaidCard') is not None:
            self.remaining_amortization_deducted_by_prepaid_card = m.get('RemainingAmortizationDeductedByPrepaidCard')
        if m.get('RemainingAmortizationExpenditureAmount') is not None:
            self.remaining_amortization_expenditure_amount = m.get('RemainingAmortizationExpenditureAmount')
        if m.get('RemainingAmortizationInvoiceDiscount') is not None:
            self.remaining_amortization_invoice_discount = m.get('RemainingAmortizationInvoiceDiscount')
        if m.get('RemainingAmortizationPretaxAmount') is not None:
            self.remaining_amortization_pretax_amount = m.get('RemainingAmortizationPretaxAmount')
        if m.get('RemainingAmortizationPretaxGrossAmount') is not None:
            self.remaining_amortization_pretax_gross_amount = m.get('RemainingAmortizationPretaxGrossAmount')
        if m.get('RemainingAmortizationRoundDownDiscount') is not None:
            self.remaining_amortization_round_down_discount = m.get('RemainingAmortizationRoundDownDiscount')
        if m.get('RoundDownDiscount') is not None:
            self.round_down_discount = m.get('RoundDownDiscount')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class DescribeProductAmortizedCostByConsumePeriodResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, items=None, max_results=None, next_token=None,
                 total_count=None):
        self.account_id = account_id  # type: str
        self.account_name = account_name  # type: str
        self.items = items  # type: list[DescribeProductAmortizedCostByConsumePeriodResponseBodyDataItems]
        self.max_results = max_results  # type: int
        self.next_token = next_token  # type: str
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeProductAmortizedCostByConsumePeriodResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = DescribeProductAmortizedCostByConsumePeriodResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class DescribeProductAmortizedCostByConsumePeriodResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        self.code = code  # type: str
        self.data = data  # type: DescribeProductAmortizedCostByConsumePeriodResponseBodyData
        self.message = message  # type: str
        self.request_id = request_id  # type: str
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeProductAmortizedCostByConsumePeriodResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeProductAmortizedCostByConsumePeriodResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeProductAmortizedCostByConsumePeriodResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeProductAmortizedCostByConsumePeriodResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeProductAmortizedCostByConsumePeriodResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeProductAmortizedCostByConsumePeriodResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeResourceCoverageDetailRequest(TeaModel):
    def __init__(self, bill_owner_id=None, end_period=None, max_results=None, next_token=None, period_type=None,
                 resource_type=None, start_period=None):
        # The ID of the account for which you want to query coverage details. If you do not set this parameter, the data of the current Alibaba Cloud account and its RAM users is queried. To query the data of a RAM user, specify the ID of the RAM user.
        self.bill_owner_id = bill_owner_id  # type: long
        # The end of the time range to query. The end is excluded from the time range. If you do not set this parameter, the end time is the current time. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.end_period = end_period  # type: str
        # The maximum number of entries to return. Default value: 20. Maximum value: 300.
        self.max_results = max_results  # type: int
        # The token that is used to retrieve the next page of results. You do not need to set this parameter if you query coverage details within a specific time range for the first time. The response returns a token that you can use to query coverage details that are displayed on the next page. If a null value is returned for the NextToken parameter, no more coverage details can be queried.
        self.next_token = next_token  # type: str
        # The time granularity at which coverage details are queried. Valid values: MONTH, DAY, and HOUR.
        self.period_type = period_type  # type: str
        # The type of deduction plans whose coverage details are queried. Valid values: RI and SCU.
        self.resource_type = resource_type  # type: str
        # The beginning of the time range to query.
        # 
        # The beginning is included in the time range. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.start_period = start_period  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeResourceCoverageDetailRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.end_period is not None:
            result['EndPeriod'] = self.end_period
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.period_type is not None:
            result['PeriodType'] = self.period_type
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.start_period is not None:
            result['StartPeriod'] = self.start_period
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('EndPeriod') is not None:
            self.end_period = m.get('EndPeriod')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('PeriodType') is not None:
            self.period_type = m.get('PeriodType')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('StartPeriod') is not None:
            self.start_period = m.get('StartPeriod')
        return self


class DescribeResourceCoverageDetailResponseBodyDataItems(TeaModel):
    def __init__(self, capacity_unit=None, commodity_code=None, commodity_name=None, coverage_percentage=None,
                 currency=None, deduct_quantity=None, end_time=None, instance_id=None, instance_spec=None,
                 payment_amount=None, product_code=None, product_name=None, region=None, region_no=None, start_time=None,
                 total_quantity=None, user_id=None, user_name=None, zone=None, zone_name=None):
        # The unit that is used to measure the resources deducted from deduction plans.
        self.capacity_unit = capacity_unit  # type: str
        # The code of the service.
        self.commodity_code = commodity_code  # type: str
        # The name and billing method of the service.
        self.commodity_name = commodity_name  # type: str
        # The coverage rate of a deduction plan.
        self.coverage_percentage = coverage_percentage  # type: float
        # The currency in which deduction plans were priced.
        self.currency = currency  # type: str
        # The amount of the resources deducted from a deduction plan.
        self.deduct_quantity = deduct_quantity  # type: float
        # The end of the time range in which the coverage details were queried.
        self.end_time = end_time  # type: str
        # The ID of a pay-as-you-go instance.
        self.instance_id = instance_id  # type: str
        # The specifications of a deduction plan.
        self.instance_spec = instance_spec  # type: str
        # The amount of the bill.
        self.payment_amount = payment_amount  # type: float
        # The code of the service.
        self.product_code = product_code  # type: str
        # The name of the service.
        self.product_name = product_name  # type: str
        # The region.
        self.region = region  # type: str
        # The code of the region.
        self.region_no = region_no  # type: str
        # The beginning of the time range in which the coverage details were queried.
        self.start_time = start_time  # type: str
        # The total amount of resources consumed.
        self.total_quantity = total_quantity  # type: float
        # The ID of the account.
        self.user_id = user_id  # type: str
        # The username of the account.
        self.user_name = user_name  # type: str
        # The code of the zone.
        self.zone = zone  # type: str
        # The zone.
        self.zone_name = zone_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeResourceCoverageDetailResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.capacity_unit is not None:
            result['CapacityUnit'] = self.capacity_unit
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.commodity_name is not None:
            result['CommodityName'] = self.commodity_name
        if self.coverage_percentage is not None:
            result['CoveragePercentage'] = self.coverage_percentage
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.deduct_quantity is not None:
            result['DeductQuantity'] = self.deduct_quantity
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.instance_spec is not None:
            result['InstanceSpec'] = self.instance_spec
        if self.payment_amount is not None:
            result['PaymentAmount'] = self.payment_amount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.region is not None:
            result['Region'] = self.region
        if self.region_no is not None:
            result['RegionNo'] = self.region_no
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.total_quantity is not None:
            result['TotalQuantity'] = self.total_quantity
        if self.user_id is not None:
            result['UserId'] = self.user_id
        if self.user_name is not None:
            result['UserName'] = self.user_name
        if self.zone is not None:
            result['Zone'] = self.zone
        if self.zone_name is not None:
            result['ZoneName'] = self.zone_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CapacityUnit') is not None:
            self.capacity_unit = m.get('CapacityUnit')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('CommodityName') is not None:
            self.commodity_name = m.get('CommodityName')
        if m.get('CoveragePercentage') is not None:
            self.coverage_percentage = m.get('CoveragePercentage')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DeductQuantity') is not None:
            self.deduct_quantity = m.get('DeductQuantity')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('InstanceSpec') is not None:
            self.instance_spec = m.get('InstanceSpec')
        if m.get('PaymentAmount') is not None:
            self.payment_amount = m.get('PaymentAmount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('RegionNo') is not None:
            self.region_no = m.get('RegionNo')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('TotalQuantity') is not None:
            self.total_quantity = m.get('TotalQuantity')
        if m.get('UserId') is not None:
            self.user_id = m.get('UserId')
        if m.get('UserName') is not None:
            self.user_name = m.get('UserName')
        if m.get('Zone') is not None:
            self.zone = m.get('Zone')
        if m.get('ZoneName') is not None:
            self.zone_name = m.get('ZoneName')
        return self


class DescribeResourceCoverageDetailResponseBodyData(TeaModel):
    def __init__(self, items=None, max_results=None, next_token=None, total_count=None):
        # The data entries.
        self.items = items  # type: list[DescribeResourceCoverageDetailResponseBodyDataItems]
        # The number of entries returned on the current page.
        self.max_results = max_results  # type: int
        # The token of the next page.
        self.next_token = next_token  # type: str
        # The total number of entries returned.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeResourceCoverageDetailResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = DescribeResourceCoverageDetailResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class DescribeResourceCoverageDetailResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The returned data.
        self.data = data  # type: DescribeResourceCoverageDetailResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the operation was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeResourceCoverageDetailResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeResourceCoverageDetailResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeResourceCoverageDetailResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeResourceCoverageDetailResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeResourceCoverageDetailResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeResourceCoverageDetailResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeResourceCoverageTotalRequest(TeaModel):
    def __init__(self, bill_owner_id=None, end_period=None, period_type=None, resource_type=None, start_period=None):
        # The ID of the account for which you want to query total coverage data. If you do not set this parameter, the data of the current Alibaba Cloud account and its RAM users is queried. To query the data of a RAM user, specify the ID of the RAM user.
        self.bill_owner_id = bill_owner_id  # type: long
        # The end of the time range to query. The end is excluded from the time range. If you do not set this parameter, the end time is the current time. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.end_period = end_period  # type: str
        # The time granularity at which total coverage data is queried. Valid values: MONTH, DAY, and HOUR.
        self.period_type = period_type  # type: str
        # The type of deduction plans whose total coverage data is queried. Valid values: RI and SCU.
        self.resource_type = resource_type  # type: str
        # The beginning of the time range to query. The beginning is included in the time range. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.start_period = start_period  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeResourceCoverageTotalRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.end_period is not None:
            result['EndPeriod'] = self.end_period
        if self.period_type is not None:
            result['PeriodType'] = self.period_type
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.start_period is not None:
            result['StartPeriod'] = self.start_period
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('EndPeriod') is not None:
            self.end_period = m.get('EndPeriod')
        if m.get('PeriodType') is not None:
            self.period_type = m.get('PeriodType')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('StartPeriod') is not None:
            self.start_period = m.get('StartPeriod')
        return self


class DescribeResourceCoverageTotalResponseBodyDataPeriodCoverage(TeaModel):
    def __init__(self, coverage_percentage=None, period=None):
        # The coverage rate of deduction plans within the specified period.
        self.coverage_percentage = coverage_percentage  # type: float
        # The period.
        # 
        # The value is in the format of yyyyMMddHH.
        self.period = period  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeResourceCoverageTotalResponseBodyDataPeriodCoverage, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.coverage_percentage is not None:
            result['CoveragePercentage'] = self.coverage_percentage
        if self.period is not None:
            result['Period'] = self.period
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CoveragePercentage') is not None:
            self.coverage_percentage = m.get('CoveragePercentage')
        if m.get('Period') is not None:
            self.period = m.get('Period')
        return self


class DescribeResourceCoverageTotalResponseBodyDataTotalCoverage(TeaModel):
    def __init__(self, capacity_unit=None, coverage_percentage=None, deduct_quantity=None, total_quantity=None):
        # The unit that is used to measure the resources deducted from deduction plans.
        self.capacity_unit = capacity_unit  # type: str
        # The total coverage rate of deduction plans.
        self.coverage_percentage = coverage_percentage  # type: float
        # The total amount of the resources deducted from deduction plans.
        self.deduct_quantity = deduct_quantity  # type: float
        # The total amount of resources consumed.
        self.total_quantity = total_quantity  # type: float

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeResourceCoverageTotalResponseBodyDataTotalCoverage, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.capacity_unit is not None:
            result['CapacityUnit'] = self.capacity_unit
        if self.coverage_percentage is not None:
            result['CoveragePercentage'] = self.coverage_percentage
        if self.deduct_quantity is not None:
            result['DeductQuantity'] = self.deduct_quantity
        if self.total_quantity is not None:
            result['TotalQuantity'] = self.total_quantity
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CapacityUnit') is not None:
            self.capacity_unit = m.get('CapacityUnit')
        if m.get('CoveragePercentage') is not None:
            self.coverage_percentage = m.get('CoveragePercentage')
        if m.get('DeductQuantity') is not None:
            self.deduct_quantity = m.get('DeductQuantity')
        if m.get('TotalQuantity') is not None:
            self.total_quantity = m.get('TotalQuantity')
        return self


class DescribeResourceCoverageTotalResponseBodyData(TeaModel):
    def __init__(self, period_coverage=None, total_coverage=None):
        # The information about the coverage rate of deduction plans within a period.
        self.period_coverage = period_coverage  # type: list[DescribeResourceCoverageTotalResponseBodyDataPeriodCoverage]
        # The information about the total coverage data of deduction plans.
        self.total_coverage = total_coverage  # type: DescribeResourceCoverageTotalResponseBodyDataTotalCoverage

    def validate(self):
        if self.period_coverage:
            for k in self.period_coverage:
                if k:
                    k.validate()
        if self.total_coverage:
            self.total_coverage.validate()

    def to_map(self):
        _map = super(DescribeResourceCoverageTotalResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['PeriodCoverage'] = []
        if self.period_coverage is not None:
            for k in self.period_coverage:
                result['PeriodCoverage'].append(k.to_map() if k else None)
        if self.total_coverage is not None:
            result['TotalCoverage'] = self.total_coverage.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.period_coverage = []
        if m.get('PeriodCoverage') is not None:
            for k in m.get('PeriodCoverage'):
                temp_model = DescribeResourceCoverageTotalResponseBodyDataPeriodCoverage()
                self.period_coverage.append(temp_model.from_map(k))
        if m.get('TotalCoverage') is not None:
            temp_model = DescribeResourceCoverageTotalResponseBodyDataTotalCoverage()
            self.total_coverage = temp_model.from_map(m['TotalCoverage'])
        return self


class DescribeResourceCoverageTotalResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The returned data.
        self.data = data  # type: DescribeResourceCoverageTotalResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the operation was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeResourceCoverageTotalResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeResourceCoverageTotalResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeResourceCoverageTotalResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeResourceCoverageTotalResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeResourceCoverageTotalResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeResourceCoverageTotalResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeResourcePackageProductRequest(TeaModel):
    def __init__(self, product_code=None):
        # The code of the service.
        self.product_code = product_code  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeResourcePackageProductRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        return self


class DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypePropertiesProperty(TeaModel):
    def __init__(self, name=None, value=None):
        # The name of the property.
        self.name = name  # type: str
        # The value of the property.
        self.value = value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypePropertiesProperty, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.name is not None:
            result['Name'] = self.name
        if self.value is not None:
            result['Value'] = self.value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Name') is not None:
            self.name = m.get('Name')
        if m.get('Value') is not None:
            self.value = m.get('Value')
        return self


class DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeProperties(TeaModel):
    def __init__(self, property=None):
        self.property = property  # type: list[DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypePropertiesProperty]

    def validate(self):
        if self.property:
            for k in self.property:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeProperties, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Property'] = []
        if self.property is not None:
            for k in self.property:
                result['Property'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.property = []
        if m.get('Property') is not None:
            for k in m.get('Property'):
                temp_model = DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypePropertiesProperty()
                self.property.append(temp_model.from_map(k))
        return self


class DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurationsAvailableDuration(TeaModel):
    def __init__(self, name=None, unit=None, value=None):
        # The name of the validity period.
        self.name = name  # type: str
        # The unit of the validity period for the resource plan. Valid values:
        # 
        # *   Month
        # *   Year
        # 
        # Default value: Month.
        self.unit = unit  # type: str
        # The value of the validity period.
        self.value = value  # type: int

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurationsAvailableDuration, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.name is not None:
            result['Name'] = self.name
        if self.unit is not None:
            result['Unit'] = self.unit
        if self.value is not None:
            result['Value'] = self.value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Name') is not None:
            self.name = m.get('Name')
        if m.get('Unit') is not None:
            self.unit = m.get('Unit')
        if m.get('Value') is not None:
            self.value = m.get('Value')
        return self


class DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurations(TeaModel):
    def __init__(self, available_duration=None):
        self.available_duration = available_duration  # type: list[DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurationsAvailableDuration]

    def validate(self):
        if self.available_duration:
            for k in self.available_duration:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurations, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['AvailableDuration'] = []
        if self.available_duration is not None:
            for k in self.available_duration:
                result['AvailableDuration'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.available_duration = []
        if m.get('AvailableDuration') is not None:
            for k in m.get('AvailableDuration'):
                temp_model = DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurationsAvailableDuration()
                self.available_duration.append(temp_model.from_map(k))
        return self


class DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecification(TeaModel):
    def __init__(self, available_durations=None, name=None, value=None):
        # The validity periods available for the resource plan.
        self.available_durations = available_durations  # type: DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurations
        # The name of the specification.
        self.name = name  # type: str
        # The value of the specification.
        self.value = value  # type: str

    def validate(self):
        if self.available_durations:
            self.available_durations.validate()

    def to_map(self):
        _map = super(DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecification, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.available_durations is not None:
            result['AvailableDurations'] = self.available_durations.to_map()
        if self.name is not None:
            result['Name'] = self.name
        if self.value is not None:
            result['Value'] = self.value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AvailableDurations') is not None:
            temp_model = DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurations()
            self.available_durations = temp_model.from_map(m['AvailableDurations'])
        if m.get('Name') is not None:
            self.name = m.get('Name')
        if m.get('Value') is not None:
            self.value = m.get('Value')
        return self


class DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecifications(TeaModel):
    def __init__(self, specification=None):
        self.specification = specification  # type: list[DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecification]

    def validate(self):
        if self.specification:
            for k in self.specification:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecifications, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Specification'] = []
        if self.specification is not None:
            for k in self.specification:
                result['Specification'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.specification = []
        if m.get('Specification') is not None:
            for k in m.get('Specification'):
                temp_model = DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecification()
                self.specification.append(temp_model.from_map(k))
        return self


class DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageType(TeaModel):
    def __init__(self, code=None, name=None, properties=None, specifications=None):
        # The code of the resource plan.
        self.code = code  # type: str
        # The name of the resource plan type.
        self.name = name  # type: str
        # The properties of the resource plan.
        self.properties = properties  # type: DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeProperties
        # The specifications of the resource plan.
        self.specifications = specifications  # type: DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecifications

    def validate(self):
        if self.properties:
            self.properties.validate()
        if self.specifications:
            self.specifications.validate()

    def to_map(self):
        _map = super(DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageType, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.name is not None:
            result['Name'] = self.name
        if self.properties is not None:
            result['Properties'] = self.properties.to_map()
        if self.specifications is not None:
            result['Specifications'] = self.specifications.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Name') is not None:
            self.name = m.get('Name')
        if m.get('Properties') is not None:
            temp_model = DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeProperties()
            self.properties = temp_model.from_map(m['Properties'])
        if m.get('Specifications') is not None:
            temp_model = DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageTypeSpecifications()
            self.specifications = temp_model.from_map(m['Specifications'])
        return self


class DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypes(TeaModel):
    def __init__(self, package_type=None):
        self.package_type = package_type  # type: list[DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageType]

    def validate(self):
        if self.package_type:
            for k in self.package_type:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypes, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['PackageType'] = []
        if self.package_type is not None:
            for k in self.package_type:
                result['PackageType'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.package_type = []
        if m.get('PackageType') is not None:
            for k in m.get('PackageType'):
                temp_model = DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypesPackageType()
                self.package_type.append(temp_model.from_map(k))
        return self


class DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackage(TeaModel):
    def __init__(self, name=None, package_types=None, product_code=None, product_type=None):
        # The name of the resource plan.
        self.name = name  # type: str
        # The types of the resource plans.
        self.package_types = package_types  # type: DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypes
        # The code of the service.
        self.product_code = product_code  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str

    def validate(self):
        if self.package_types:
            self.package_types.validate()

    def to_map(self):
        _map = super(DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackage, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.name is not None:
            result['Name'] = self.name
        if self.package_types is not None:
            result['PackageTypes'] = self.package_types.to_map()
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Name') is not None:
            self.name = m.get('Name')
        if m.get('PackageTypes') is not None:
            temp_model = DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackagePackageTypes()
            self.package_types = temp_model.from_map(m['PackageTypes'])
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        return self


class DescribeResourcePackageProductResponseBodyDataResourcePackages(TeaModel):
    def __init__(self, resource_package=None):
        self.resource_package = resource_package  # type: list[DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackage]

    def validate(self):
        if self.resource_package:
            for k in self.resource_package:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeResourcePackageProductResponseBodyDataResourcePackages, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['ResourcePackage'] = []
        if self.resource_package is not None:
            for k in self.resource_package:
                result['ResourcePackage'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.resource_package = []
        if m.get('ResourcePackage') is not None:
            for k in m.get('ResourcePackage'):
                temp_model = DescribeResourcePackageProductResponseBodyDataResourcePackagesResourcePackage()
                self.resource_package.append(temp_model.from_map(k))
        return self


class DescribeResourcePackageProductResponseBodyData(TeaModel):
    def __init__(self, resource_packages=None):
        # The details about the resource plans.
        self.resource_packages = resource_packages  # type: DescribeResourcePackageProductResponseBodyDataResourcePackages

    def validate(self):
        if self.resource_packages:
            self.resource_packages.validate()

    def to_map(self):
        _map = super(DescribeResourcePackageProductResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.resource_packages is not None:
            result['ResourcePackages'] = self.resource_packages.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ResourcePackages') is not None:
            temp_model = DescribeResourcePackageProductResponseBodyDataResourcePackages()
            self.resource_packages = temp_model.from_map(m['ResourcePackages'])
        return self


class DescribeResourcePackageProductResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, order_id=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: DescribeResourcePackageProductResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the order.
        self.order_id = order_id  # type: long
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeResourcePackageProductResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeResourcePackageProductResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeResourcePackageProductResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeResourcePackageProductResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeResourcePackageProductResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeResourcePackageProductResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeResourceUsageDetailRequest(TeaModel):
    def __init__(self, bill_owner_id=None, end_period=None, max_results=None, next_token=None, period_type=None,
                 resource_type=None, start_period=None):
        self.bill_owner_id = bill_owner_id  # type: long
        # The end of the time range to query. The end is excluded from the time range. If you do not set this parameter, the end time is the current time. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.end_period = end_period  # type: str
        # The maximum number of entries to return. Default value: 20. Maximum value: 300.
        self.max_results = max_results  # type: int
        # The token that is used to retrieve the next page of results. You do not need to set this parameter if you query usage details within a specific time range for the first time. The response returns a token that you can use to query usage details that are displayed on the next page. If a null value is returned for the NextToken parameter, no more usage details can be queried.
        self.next_token = next_token  # type: str
        # The time granularity at which usage details are queried. Valid values: MONTH, DAY, and HOUR.
        self.period_type = period_type  # type: str
        # The type of deduction plans whose usage details are queried. Valid values: RI and SCU.
        self.resource_type = resource_type  # type: str
        # The beginning of the time range to query. The beginning is included in the time range. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.start_period = start_period  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeResourceUsageDetailRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.end_period is not None:
            result['EndPeriod'] = self.end_period
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.period_type is not None:
            result['PeriodType'] = self.period_type
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.start_period is not None:
            result['StartPeriod'] = self.start_period
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('EndPeriod') is not None:
            self.end_period = m.get('EndPeriod')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('PeriodType') is not None:
            self.period_type = m.get('PeriodType')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('StartPeriod') is not None:
            self.start_period = m.get('StartPeriod')
        return self


class DescribeResourceUsageDetailResponseBodyDataItems(TeaModel):
    def __init__(self, capacity_unit=None, currency=None, deduct_quantity=None, end_time=None, image_type=None,
                 instance_spec=None, postpaid_cost=None, potential_saved_cost=None, quantity=None, region=None, region_no=None,
                 reservation_cost=None, resource_instance_id=None, saved_cost=None, start_time=None, status=None, status_name=None,
                 total_quantity=None, usage_percentage=None, user_id=None, user_name=None, zone=None, zone_name=None):
        # The unit that is used to measure the resources deducted from deduction plans.
        self.capacity_unit = capacity_unit  # type: str
        # The currency in which deduction plans were priced.
        self.currency = currency  # type: str
        # The amount of the resources deducted from deduction plans.
        self.deduct_quantity = deduct_quantity  # type: float
        # The end of the time range in which the usage details were queried.
        self.end_time = end_time  # type: str
        # The operating system.
        self.image_type = image_type  # type: str
        # The specifications of a deduction plan.
        self.instance_spec = instance_spec  # type: str
        # The equivalent of pay-as-you-go costs.
        self.postpaid_cost = postpaid_cost  # type: str
        # The potential net savings.
        self.potential_saved_cost = potential_saved_cost  # type: str
        # The number of deduction plans.
        self.quantity = quantity  # type: long
        # The region.
        self.region = region  # type: str
        # The code of the region.
        self.region_no = region_no  # type: str
        # The fee of purchased deduction plans.
        self.reservation_cost = reservation_cost  # type: str
        # The ID of a deduction plan.
        self.resource_instance_id = resource_instance_id  # type: str
        # The net savings.
        self.saved_cost = saved_cost  # type: str
        # The beginning of the time range in which the usage details were queried.
        self.start_time = start_time  # type: str
        # The status of the deduction plan.
        self.status = status  # type: str
        # The name of the state.
        self.status_name = status_name  # type: str
        # The total capacity of deduction plans.
        self.total_quantity = total_quantity  # type: float
        # The usage of deduction plans.
        self.usage_percentage = usage_percentage  # type: float
        # The ID of the account.
        self.user_id = user_id  # type: str
        # The username of the account.
        self.user_name = user_name  # type: str
        # The code of the zone.
        self.zone = zone  # type: str
        # The zone.
        self.zone_name = zone_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeResourceUsageDetailResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.capacity_unit is not None:
            result['CapacityUnit'] = self.capacity_unit
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.deduct_quantity is not None:
            result['DeductQuantity'] = self.deduct_quantity
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.image_type is not None:
            result['ImageType'] = self.image_type
        if self.instance_spec is not None:
            result['InstanceSpec'] = self.instance_spec
        if self.postpaid_cost is not None:
            result['PostpaidCost'] = self.postpaid_cost
        if self.potential_saved_cost is not None:
            result['PotentialSavedCost'] = self.potential_saved_cost
        if self.quantity is not None:
            result['Quantity'] = self.quantity
        if self.region is not None:
            result['Region'] = self.region
        if self.region_no is not None:
            result['RegionNo'] = self.region_no
        if self.reservation_cost is not None:
            result['ReservationCost'] = self.reservation_cost
        if self.resource_instance_id is not None:
            result['ResourceInstanceId'] = self.resource_instance_id
        if self.saved_cost is not None:
            result['SavedCost'] = self.saved_cost
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.status is not None:
            result['Status'] = self.status
        if self.status_name is not None:
            result['StatusName'] = self.status_name
        if self.total_quantity is not None:
            result['TotalQuantity'] = self.total_quantity
        if self.usage_percentage is not None:
            result['UsagePercentage'] = self.usage_percentage
        if self.user_id is not None:
            result['UserId'] = self.user_id
        if self.user_name is not None:
            result['UserName'] = self.user_name
        if self.zone is not None:
            result['Zone'] = self.zone
        if self.zone_name is not None:
            result['ZoneName'] = self.zone_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CapacityUnit') is not None:
            self.capacity_unit = m.get('CapacityUnit')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DeductQuantity') is not None:
            self.deduct_quantity = m.get('DeductQuantity')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('ImageType') is not None:
            self.image_type = m.get('ImageType')
        if m.get('InstanceSpec') is not None:
            self.instance_spec = m.get('InstanceSpec')
        if m.get('PostpaidCost') is not None:
            self.postpaid_cost = m.get('PostpaidCost')
        if m.get('PotentialSavedCost') is not None:
            self.potential_saved_cost = m.get('PotentialSavedCost')
        if m.get('Quantity') is not None:
            self.quantity = m.get('Quantity')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('RegionNo') is not None:
            self.region_no = m.get('RegionNo')
        if m.get('ReservationCost') is not None:
            self.reservation_cost = m.get('ReservationCost')
        if m.get('ResourceInstanceId') is not None:
            self.resource_instance_id = m.get('ResourceInstanceId')
        if m.get('SavedCost') is not None:
            self.saved_cost = m.get('SavedCost')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('StatusName') is not None:
            self.status_name = m.get('StatusName')
        if m.get('TotalQuantity') is not None:
            self.total_quantity = m.get('TotalQuantity')
        if m.get('UsagePercentage') is not None:
            self.usage_percentage = m.get('UsagePercentage')
        if m.get('UserId') is not None:
            self.user_id = m.get('UserId')
        if m.get('UserName') is not None:
            self.user_name = m.get('UserName')
        if m.get('Zone') is not None:
            self.zone = m.get('Zone')
        if m.get('ZoneName') is not None:
            self.zone_name = m.get('ZoneName')
        return self


class DescribeResourceUsageDetailResponseBodyData(TeaModel):
    def __init__(self, items=None, max_results=None, next_token=None, total_count=None):
        # The data entries.
        self.items = items  # type: list[DescribeResourceUsageDetailResponseBodyDataItems]
        # The number of entries returned on the current page.
        self.max_results = max_results  # type: int
        # The token of the next page.
        self.next_token = next_token  # type: str
        # The total number of entries returned.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeResourceUsageDetailResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = DescribeResourceUsageDetailResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class DescribeResourceUsageDetailResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The returned data.
        self.data = data  # type: DescribeResourceUsageDetailResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the operation was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeResourceUsageDetailResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeResourceUsageDetailResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeResourceUsageDetailResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeResourceUsageDetailResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeResourceUsageDetailResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeResourceUsageDetailResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeResourceUsageTotalRequest(TeaModel):
    def __init__(self, bill_owner_id=None, end_period=None, period_type=None, resource_type=None, start_period=None):
        # The ID of the account whose data you want to query. If you do not specify this parameter, the data of the current account and its linked accounts is queried. To query the data of a linked account, specify the ID of the linked account. You can specify only one account ID.
        self.bill_owner_id = bill_owner_id  # type: long
        # The end of the time range to query. Specify the time in the yyyy-MM-dd HH:mm:ss format. The specified time is excluded from the time range. If you do not specify this parameter, this parameter is set to the current time.
        self.end_period = end_period  # type: str
        # The time granularity at which the data is queried. Valid values: MONTH, DAY, and HOUR.
        self.period_type = period_type  # type: str
        # The type of the resource plan. Valid values: RI and SCU.
        self.resource_type = resource_type  # type: str
        # The beginning of the time range to query. Specify the time in the yyyy-MM-dd HH:mm:ss format. The specified time is included in the time range.
        self.start_period = start_period  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeResourceUsageTotalRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.end_period is not None:
            result['EndPeriod'] = self.end_period
        if self.period_type is not None:
            result['PeriodType'] = self.period_type
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.start_period is not None:
            result['StartPeriod'] = self.start_period
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('EndPeriod') is not None:
            self.end_period = m.get('EndPeriod')
        if m.get('PeriodType') is not None:
            self.period_type = m.get('PeriodType')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('StartPeriod') is not None:
            self.start_period = m.get('StartPeriod')
        return self


class DescribeResourceUsageTotalResponseBodyDataPeriodCoverage(TeaModel):
    def __init__(self, period=None, usage_percentage=None):
        # The period.
        self.period = period  # type: str
        # The usage of resource plans.
        self.usage_percentage = usage_percentage  # type: float

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeResourceUsageTotalResponseBodyDataPeriodCoverage, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.period is not None:
            result['Period'] = self.period
        if self.usage_percentage is not None:
            result['UsagePercentage'] = self.usage_percentage
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Period') is not None:
            self.period = m.get('Period')
        if m.get('UsagePercentage') is not None:
            self.usage_percentage = m.get('UsagePercentage')
        return self


class DescribeResourceUsageTotalResponseBodyDataTotalUsage(TeaModel):
    def __init__(self, postpaid_cost=None, potential_saved_cost=None, reservation_cost=None, saved_cost=None,
                 usage_percentage=None):
        # The total costs of pay-as-you-go instances.
        self.postpaid_cost = postpaid_cost  # type: float
        # The total potential savings.
        self.potential_saved_cost = potential_saved_cost  # type: float
        # The fee of purchased resource plans.
        self.reservation_cost = reservation_cost  # type: float
        # The total savings.
        self.saved_cost = saved_cost  # type: float
        # The total usage of resource plans.
        self.usage_percentage = usage_percentage  # type: float

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeResourceUsageTotalResponseBodyDataTotalUsage, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.postpaid_cost is not None:
            result['PostpaidCost'] = self.postpaid_cost
        if self.potential_saved_cost is not None:
            result['PotentialSavedCost'] = self.potential_saved_cost
        if self.reservation_cost is not None:
            result['ReservationCost'] = self.reservation_cost
        if self.saved_cost is not None:
            result['SavedCost'] = self.saved_cost
        if self.usage_percentage is not None:
            result['UsagePercentage'] = self.usage_percentage
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('PostpaidCost') is not None:
            self.postpaid_cost = m.get('PostpaidCost')
        if m.get('PotentialSavedCost') is not None:
            self.potential_saved_cost = m.get('PotentialSavedCost')
        if m.get('ReservationCost') is not None:
            self.reservation_cost = m.get('ReservationCost')
        if m.get('SavedCost') is not None:
            self.saved_cost = m.get('SavedCost')
        if m.get('UsagePercentage') is not None:
            self.usage_percentage = m.get('UsagePercentage')
        return self


class DescribeResourceUsageTotalResponseBodyData(TeaModel):
    def __init__(self, period_coverage=None, total_usage=None):
        # The usage of resource plans in the specified period.
        self.period_coverage = period_coverage  # type: list[DescribeResourceUsageTotalResponseBodyDataPeriodCoverage]
        # The total usage of resource plans.
        self.total_usage = total_usage  # type: DescribeResourceUsageTotalResponseBodyDataTotalUsage

    def validate(self):
        if self.period_coverage:
            for k in self.period_coverage:
                if k:
                    k.validate()
        if self.total_usage:
            self.total_usage.validate()

    def to_map(self):
        _map = super(DescribeResourceUsageTotalResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['PeriodCoverage'] = []
        if self.period_coverage is not None:
            for k in self.period_coverage:
                result['PeriodCoverage'].append(k.to_map() if k else None)
        if self.total_usage is not None:
            result['TotalUsage'] = self.total_usage.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.period_coverage = []
        if m.get('PeriodCoverage') is not None:
            for k in m.get('PeriodCoverage'):
                temp_model = DescribeResourceUsageTotalResponseBodyDataPeriodCoverage()
                self.period_coverage.append(temp_model.from_map(k))
        if m.get('TotalUsage') is not None:
            temp_model = DescribeResourceUsageTotalResponseBodyDataTotalUsage()
            self.total_usage = temp_model.from_map(m['TotalUsage'])
        return self


class DescribeResourceUsageTotalResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The response code.
        self.code = code  # type: str
        # The queried data.
        self.data = data  # type: DescribeResourceUsageTotalResponseBodyData
        # The returned message. If the request was successful, a success message is returned. If the request failed, an error message is returned.
        self.message = message  # type: str
        # The request ID.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeResourceUsageTotalResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeResourceUsageTotalResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeResourceUsageTotalResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeResourceUsageTotalResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeResourceUsageTotalResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeResourceUsageTotalResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeSavingsPlansCoverageDetailRequest(TeaModel):
    def __init__(self, bill_owner_id=None, end_period=None, max_results=None, period_type=None, start_period=None,
                 token=None):
        # The ID of the account for which you want to query coverage details. If you do not set this parameter, the data of the current Alibaba Cloud account and its RAM users is queried. To query the data of a RAM user, specify the ID of the RAM user.
        self.bill_owner_id = bill_owner_id  # type: long
        # The end of the time range to query. The end is excluded from the time range. If you do not set this parameter, the end time is the current time. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.end_period = end_period  # type: str
        # The maximum number of entries to return. Default value: 20. Maximum value: 300.
        self.max_results = max_results  # type: int
        # The time granularity at which coverage details are queried. Valid values: MONTH, DAY, and HOUR.
        self.period_type = period_type  # type: str
        # The beginning of the time range to query. The beginning is included in the time range. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.start_period = start_period  # type: str
        # The token that is used to retrieve the next page of results. You do not need to set this parameter if you query coverage details within a specific time range for the first time. The response returns a token that you can use to query coverage details that are displayed on the next page. If a null value is returned for the NextToken parameter, no more coverage details can be queried.
        self.token = token  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeSavingsPlansCoverageDetailRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.end_period is not None:
            result['EndPeriod'] = self.end_period
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.period_type is not None:
            result['PeriodType'] = self.period_type
        if self.start_period is not None:
            result['StartPeriod'] = self.start_period
        if self.token is not None:
            result['Token'] = self.token
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('EndPeriod') is not None:
            self.end_period = m.get('EndPeriod')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('PeriodType') is not None:
            self.period_type = m.get('PeriodType')
        if m.get('StartPeriod') is not None:
            self.start_period = m.get('StartPeriod')
        if m.get('Token') is not None:
            self.token = m.get('Token')
        return self


class DescribeSavingsPlansCoverageDetailResponseBodyDataItems(TeaModel):
    def __init__(self, coverage_percentage=None, currency=None, deduct_amount=None, end_period=None,
                 instance_id=None, instance_spec=None, owner_id=None, postpaid_cost=None, region=None, start_period=None,
                 total_amount=None, user_id=None, user_name=None):
        # The coverage.
        self.coverage_percentage = coverage_percentage  # type: float
        # The currency.
        self.currency = currency  # type: str
        # The deducted amount.
        self.deduct_amount = deduct_amount  # type: float
        # The end time.
        self.end_period = end_period  # type: str
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        # The specifications.
        self.instance_spec = instance_spec  # type: str
        self.owner_id = owner_id  # type: long
        # The pay-as-you-go cost.
        self.postpaid_cost = postpaid_cost  # type: float
        # The region.
        self.region = region  # type: str
        # The start time.
        self.start_period = start_period  # type: str
        # The total expenditure.
        self.total_amount = total_amount  # type: float
        # The ID of the account.
        self.user_id = user_id  # type: long
        # The username of the account.
        self.user_name = user_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeSavingsPlansCoverageDetailResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.coverage_percentage is not None:
            result['CoveragePercentage'] = self.coverage_percentage
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.deduct_amount is not None:
            result['DeductAmount'] = self.deduct_amount
        if self.end_period is not None:
            result['EndPeriod'] = self.end_period
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.instance_spec is not None:
            result['InstanceSpec'] = self.instance_spec
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.postpaid_cost is not None:
            result['PostpaidCost'] = self.postpaid_cost
        if self.region is not None:
            result['Region'] = self.region
        if self.start_period is not None:
            result['StartPeriod'] = self.start_period
        if self.total_amount is not None:
            result['TotalAmount'] = self.total_amount
        if self.user_id is not None:
            result['UserId'] = self.user_id
        if self.user_name is not None:
            result['UserName'] = self.user_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CoveragePercentage') is not None:
            self.coverage_percentage = m.get('CoveragePercentage')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DeductAmount') is not None:
            self.deduct_amount = m.get('DeductAmount')
        if m.get('EndPeriod') is not None:
            self.end_period = m.get('EndPeriod')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('InstanceSpec') is not None:
            self.instance_spec = m.get('InstanceSpec')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('PostpaidCost') is not None:
            self.postpaid_cost = m.get('PostpaidCost')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('StartPeriod') is not None:
            self.start_period = m.get('StartPeriod')
        if m.get('TotalAmount') is not None:
            self.total_amount = m.get('TotalAmount')
        if m.get('UserId') is not None:
            self.user_id = m.get('UserId')
        if m.get('UserName') is not None:
            self.user_name = m.get('UserName')
        return self


class DescribeSavingsPlansCoverageDetailResponseBodyData(TeaModel):
    def __init__(self, items=None, next_token=None, total_count=None):
        # The data entries.
        self.items = items  # type: list[DescribeSavingsPlansCoverageDetailResponseBodyDataItems]
        # The token of the next page.
        self.next_token = next_token  # type: str
        # The total number of entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeSavingsPlansCoverageDetailResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = DescribeSavingsPlansCoverageDetailResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class DescribeSavingsPlansCoverageDetailResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The return data.
        self.data = data  # type: DescribeSavingsPlansCoverageDetailResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the operation was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeSavingsPlansCoverageDetailResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeSavingsPlansCoverageDetailResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeSavingsPlansCoverageDetailResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeSavingsPlansCoverageDetailResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeSavingsPlansCoverageDetailResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeSavingsPlansCoverageDetailResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeSavingsPlansCoverageTotalRequest(TeaModel):
    def __init__(self, bill_owner_id=None, end_period=None, period_type=None, start_period=None):
        # The ID of the account for which you want to query coverage summary. If you do not set this parameter, the data of the current Alibaba Cloud account and its RAM users is queried. To query the data of a RAM user, specify the ID of the RAM user.
        self.bill_owner_id = bill_owner_id  # type: long
        # The end of the time range to query. The end is excluded from the time range. If you do not set this parameter, the end time is the current time. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.end_period = end_period  # type: str
        # The time granularity at which coverage summary are queried. Valid values: MONTH, DAY, and HOUR.
        self.period_type = period_type  # type: str
        # The beginning of the time range to query. The beginning is included in the time range. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.start_period = start_period  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeSavingsPlansCoverageTotalRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.end_period is not None:
            result['EndPeriod'] = self.end_period
        if self.period_type is not None:
            result['PeriodType'] = self.period_type
        if self.start_period is not None:
            result['StartPeriod'] = self.start_period
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('EndPeriod') is not None:
            self.end_period = m.get('EndPeriod')
        if m.get('PeriodType') is not None:
            self.period_type = m.get('PeriodType')
        if m.get('StartPeriod') is not None:
            self.start_period = m.get('StartPeriod')
        return self


class DescribeSavingsPlansCoverageTotalResponseBodyDataPeriodCoverage(TeaModel):
    def __init__(self, percentage=None, period=None):
        # The coverage.
        self.percentage = percentage  # type: float
        # The period.
        # 
        # The value is in the format of yyyyMMddHH.
        self.period = period  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeSavingsPlansCoverageTotalResponseBodyDataPeriodCoverage, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.percentage is not None:
            result['Percentage'] = self.percentage
        if self.period is not None:
            result['Period'] = self.period
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Percentage') is not None:
            self.percentage = m.get('Percentage')
        if m.get('Period') is not None:
            self.period = m.get('Period')
        return self


class DescribeSavingsPlansCoverageTotalResponseBodyDataTotalCoverage(TeaModel):
    def __init__(self, coverage_percentage=None, deduct_amount=None):
        # The total coverage.
        self.coverage_percentage = coverage_percentage  # type: float
        # The total deducted amount.
        self.deduct_amount = deduct_amount  # type: float

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeSavingsPlansCoverageTotalResponseBodyDataTotalCoverage, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.coverage_percentage is not None:
            result['CoveragePercentage'] = self.coverage_percentage
        if self.deduct_amount is not None:
            result['DeductAmount'] = self.deduct_amount
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CoveragePercentage') is not None:
            self.coverage_percentage = m.get('CoveragePercentage')
        if m.get('DeductAmount') is not None:
            self.deduct_amount = m.get('DeductAmount')
        return self


class DescribeSavingsPlansCoverageTotalResponseBodyData(TeaModel):
    def __init__(self, period_coverage=None, total_coverage=None):
        # The coverage in different periods.
        self.period_coverage = period_coverage  # type: list[DescribeSavingsPlansCoverageTotalResponseBodyDataPeriodCoverage]
        # The coverage summary.
        self.total_coverage = total_coverage  # type: DescribeSavingsPlansCoverageTotalResponseBodyDataTotalCoverage

    def validate(self):
        if self.period_coverage:
            for k in self.period_coverage:
                if k:
                    k.validate()
        if self.total_coverage:
            self.total_coverage.validate()

    def to_map(self):
        _map = super(DescribeSavingsPlansCoverageTotalResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['PeriodCoverage'] = []
        if self.period_coverage is not None:
            for k in self.period_coverage:
                result['PeriodCoverage'].append(k.to_map() if k else None)
        if self.total_coverage is not None:
            result['TotalCoverage'] = self.total_coverage.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.period_coverage = []
        if m.get('PeriodCoverage') is not None:
            for k in m.get('PeriodCoverage'):
                temp_model = DescribeSavingsPlansCoverageTotalResponseBodyDataPeriodCoverage()
                self.period_coverage.append(temp_model.from_map(k))
        if m.get('TotalCoverage') is not None:
            temp_model = DescribeSavingsPlansCoverageTotalResponseBodyDataTotalCoverage()
            self.total_coverage = temp_model.from_map(m['TotalCoverage'])
        return self


class DescribeSavingsPlansCoverageTotalResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The return data.
        self.data = data  # type: DescribeSavingsPlansCoverageTotalResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the operation was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeSavingsPlansCoverageTotalResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeSavingsPlansCoverageTotalResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeSavingsPlansCoverageTotalResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeSavingsPlansCoverageTotalResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeSavingsPlansCoverageTotalResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeSavingsPlansCoverageTotalResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeSavingsPlansUsageDetailRequest(TeaModel):
    def __init__(self, bill_owner_id=None, end_period=None, max_results=None, period_type=None, start_period=None,
                 token=None):
        # The ID of the account for which you want to query usage details. If you do not set this parameter, the data of the current Alibaba Cloud account and its RAM users is queried. To query the data of a RAM user, specify the ID of the RAM user.
        self.bill_owner_id = bill_owner_id  # type: long
        # The end of the time range to query. The end is excluded from the time range. If you do not set this parameter, the end time is the current time. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.end_period = end_period  # type: str
        # The maximum number of entries to return. Default value: 20. Maximum value: 300.
        self.max_results = max_results  # type: int
        # The time granularity at which usage details are queried. Valid values: MONTH, DAY, and HOUR.
        self.period_type = period_type  # type: str
        # The beginning of the time range to query. The beginning is included in the time range. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.start_period = start_period  # type: str
        # The token that is used to retrieve the next page of results. You do not need to set this parameter if you query usage details within a specific time range for the first time. The response returns a token that you can use to query usage details that are displayed on the next page. If a null value is returned for the NextToken parameter, no more coverage details can be queried.
        self.token = token  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeSavingsPlansUsageDetailRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.end_period is not None:
            result['EndPeriod'] = self.end_period
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.period_type is not None:
            result['PeriodType'] = self.period_type
        if self.start_period is not None:
            result['StartPeriod'] = self.start_period
        if self.token is not None:
            result['Token'] = self.token
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('EndPeriod') is not None:
            self.end_period = m.get('EndPeriod')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('PeriodType') is not None:
            self.period_type = m.get('PeriodType')
        if m.get('StartPeriod') is not None:
            self.start_period = m.get('StartPeriod')
        if m.get('Token') is not None:
            self.token = m.get('Token')
        return self


class DescribeSavingsPlansUsageDetailResponseBodyDataItems(TeaModel):
    def __init__(self, currency=None, deduct_value=None, end_period=None, instance_id=None, pool_value=None,
                 postpaid_cost=None, saved_cost=None, start_period=None, status=None, type=None, usage_percentage=None,
                 user_id=None, user_name=None):
        # The currency.
        self.currency = currency  # type: str
        # The used amount of the savings plan.
        self.deduct_value = deduct_value  # type: float
        # The end time.
        self.end_period = end_period  # type: str
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        # The total amount of the savings plan.
        self.pool_value = pool_value  # type: float
        # The pay-as-you-go cost.
        self.postpaid_cost = postpaid_cost  # type: float
        # The amount that is saved.
        self.saved_cost = saved_cost  # type: float
        # The start time.
        self.start_period = start_period  # type: str
        # The status of the instance.
        # 
        # A value of -1 indicates that the payment is overdue. A value of 1 indicates that the instance is active.
        self.status = status  # type: str
        # The type of the savings plan. Valid values: universal and ECS compute.
        self.type = type  # type: str
        # The usage.
        self.usage_percentage = usage_percentage  # type: float
        # The ID of the account.
        self.user_id = user_id  # type: long
        # The username of the account.
        self.user_name = user_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeSavingsPlansUsageDetailResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.deduct_value is not None:
            result['DeductValue'] = self.deduct_value
        if self.end_period is not None:
            result['EndPeriod'] = self.end_period
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.pool_value is not None:
            result['PoolValue'] = self.pool_value
        if self.postpaid_cost is not None:
            result['PostpaidCost'] = self.postpaid_cost
        if self.saved_cost is not None:
            result['SavedCost'] = self.saved_cost
        if self.start_period is not None:
            result['StartPeriod'] = self.start_period
        if self.status is not None:
            result['Status'] = self.status
        if self.type is not None:
            result['Type'] = self.type
        if self.usage_percentage is not None:
            result['UsagePercentage'] = self.usage_percentage
        if self.user_id is not None:
            result['UserId'] = self.user_id
        if self.user_name is not None:
            result['UserName'] = self.user_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DeductValue') is not None:
            self.deduct_value = m.get('DeductValue')
        if m.get('EndPeriod') is not None:
            self.end_period = m.get('EndPeriod')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('PoolValue') is not None:
            self.pool_value = m.get('PoolValue')
        if m.get('PostpaidCost') is not None:
            self.postpaid_cost = m.get('PostpaidCost')
        if m.get('SavedCost') is not None:
            self.saved_cost = m.get('SavedCost')
        if m.get('StartPeriod') is not None:
            self.start_period = m.get('StartPeriod')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        if m.get('UsagePercentage') is not None:
            self.usage_percentage = m.get('UsagePercentage')
        if m.get('UserId') is not None:
            self.user_id = m.get('UserId')
        if m.get('UserName') is not None:
            self.user_name = m.get('UserName')
        return self


class DescribeSavingsPlansUsageDetailResponseBodyData(TeaModel):
    def __init__(self, items=None, next_token=None, total_count=None):
        # The data entries.
        self.items = items  # type: list[DescribeSavingsPlansUsageDetailResponseBodyDataItems]
        # The token of the next page.
        self.next_token = next_token  # type: str
        # The total number of entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeSavingsPlansUsageDetailResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = DescribeSavingsPlansUsageDetailResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class DescribeSavingsPlansUsageDetailResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The return data.
        self.data = data  # type: DescribeSavingsPlansUsageDetailResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the operation was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeSavingsPlansUsageDetailResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeSavingsPlansUsageDetailResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeSavingsPlansUsageDetailResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeSavingsPlansUsageDetailResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeSavingsPlansUsageDetailResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeSavingsPlansUsageDetailResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeSavingsPlansUsageTotalRequest(TeaModel):
    def __init__(self, bill_owner_id=None, end_period=None, period_type=None, start_period=None):
        # The ID of the account for which you want to query usage summary. If you do not set this parameter, the data of the current Alibaba Cloud account and its RAM users is queried. To query the data of a RAM user, specify the ID of the RAM user.
        self.bill_owner_id = bill_owner_id  # type: long
        # The end of the time range to query. The end is excluded from the time range. If you do not set this parameter, the end time is the current time. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.end_period = end_period  # type: str
        # The time granularity at which usage summary are queried. Valid values: MONTH, DAY, and HOUR.
        self.period_type = period_type  # type: str
        # The beginning of the time range to query. The beginning is included in the time range. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.start_period = start_period  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeSavingsPlansUsageTotalRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.end_period is not None:
            result['EndPeriod'] = self.end_period
        if self.period_type is not None:
            result['PeriodType'] = self.period_type
        if self.start_period is not None:
            result['StartPeriod'] = self.start_period
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('EndPeriod') is not None:
            self.end_period = m.get('EndPeriod')
        if m.get('PeriodType') is not None:
            self.period_type = m.get('PeriodType')
        if m.get('StartPeriod') is not None:
            self.start_period = m.get('StartPeriod')
        return self


class DescribeSavingsPlansUsageTotalResponseBodyDataPeriodCoverage(TeaModel):
    def __init__(self, percentage=None, period=None):
        # The usage.
        self.percentage = percentage  # type: float
        # The period.
        # 
        # The value is in the format of yyyyMMddHH.
        self.period = period  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeSavingsPlansUsageTotalResponseBodyDataPeriodCoverage, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.percentage is not None:
            result['Percentage'] = self.percentage
        if self.period is not None:
            result['Period'] = self.period
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Percentage') is not None:
            self.percentage = m.get('Percentage')
        if m.get('Period') is not None:
            self.period = m.get('Period')
        return self


class DescribeSavingsPlansUsageTotalResponseBodyDataTotalUsage(TeaModel):
    def __init__(self, pool_value=None, postpaid_cost=None, saved_cost=None, usage_percentage=None):
        # The total amount of the savings plan.
        self.pool_value = pool_value  # type: float
        # The pay-as-you-go cost.
        self.postpaid_cost = postpaid_cost  # type: float
        # The amount that is saved.
        self.saved_cost = saved_cost  # type: float
        # The total usage.
        self.usage_percentage = usage_percentage  # type: float

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeSavingsPlansUsageTotalResponseBodyDataTotalUsage, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.pool_value is not None:
            result['PoolValue'] = self.pool_value
        if self.postpaid_cost is not None:
            result['PostpaidCost'] = self.postpaid_cost
        if self.saved_cost is not None:
            result['SavedCost'] = self.saved_cost
        if self.usage_percentage is not None:
            result['UsagePercentage'] = self.usage_percentage
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('PoolValue') is not None:
            self.pool_value = m.get('PoolValue')
        if m.get('PostpaidCost') is not None:
            self.postpaid_cost = m.get('PostpaidCost')
        if m.get('SavedCost') is not None:
            self.saved_cost = m.get('SavedCost')
        if m.get('UsagePercentage') is not None:
            self.usage_percentage = m.get('UsagePercentage')
        return self


class DescribeSavingsPlansUsageTotalResponseBodyData(TeaModel):
    def __init__(self, period_coverage=None, total_usage=None):
        # The usage in different periods.
        self.period_coverage = period_coverage  # type: list[DescribeSavingsPlansUsageTotalResponseBodyDataPeriodCoverage]
        # The usage summary.
        self.total_usage = total_usage  # type: DescribeSavingsPlansUsageTotalResponseBodyDataTotalUsage

    def validate(self):
        if self.period_coverage:
            for k in self.period_coverage:
                if k:
                    k.validate()
        if self.total_usage:
            self.total_usage.validate()

    def to_map(self):
        _map = super(DescribeSavingsPlansUsageTotalResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['PeriodCoverage'] = []
        if self.period_coverage is not None:
            for k in self.period_coverage:
                result['PeriodCoverage'].append(k.to_map() if k else None)
        if self.total_usage is not None:
            result['TotalUsage'] = self.total_usage.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.period_coverage = []
        if m.get('PeriodCoverage') is not None:
            for k in m.get('PeriodCoverage'):
                temp_model = DescribeSavingsPlansUsageTotalResponseBodyDataPeriodCoverage()
                self.period_coverage.append(temp_model.from_map(k))
        if m.get('TotalUsage') is not None:
            temp_model = DescribeSavingsPlansUsageTotalResponseBodyDataTotalUsage()
            self.total_usage = temp_model.from_map(m['TotalUsage'])
        return self


class DescribeSavingsPlansUsageTotalResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The return data.
        self.data = data  # type: DescribeSavingsPlansUsageTotalResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the operation was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeSavingsPlansUsageTotalResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeSavingsPlansUsageTotalResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeSavingsPlansUsageTotalResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeSavingsPlansUsageTotalResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeSavingsPlansUsageTotalResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeSavingsPlansUsageTotalResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeSplitItemBillRequestTagFilter(TeaModel):
    def __init__(self, tag_key=None, tag_values=None):
        # The TagFilter.N parameter is used to query bills that match a specified tag. The value of the TagFilter.N parameter must be a key-value pair. The tag key must be 1 to 128 characters in length. Valid values of N: 1 to 20.
        # 
        # *   If only the TagFilter.N.TagKey parameter is specified, all bills associated with the tag key are queried.
        # *   If you specify multiple tag key-value pairs at the same time, bills that meet any one of the tag key-value pairs are queried.
        # *   If the tags added to resources change, you can query only the bills that are generated within the period in which the tags and resources are associated.
        self.tag_key = tag_key  # type: str
        # You can specify the TagValues.N parameter to query bills that match the specified tag value. The value of the TagValues.N parameter must be a string. The tag value must be 1 to 128 characters in length. Valid values of N: 1 to 20.
        # 
        # *   If you specify the TagValues.N parameter, the TagFilter.N.TagKey parameter is required. Otherwise, the error message InvalidParameter.TagValues is returned.
        # *   If you specify multiple tag values, split bills that match one of the tag values are queried.
        self.tag_values = tag_values  # type: list[str]

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeSplitItemBillRequestTagFilter, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.tag_key is not None:
            result['TagKey'] = self.tag_key
        if self.tag_values is not None:
            result['TagValues'] = self.tag_values
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('TagKey') is not None:
            self.tag_key = m.get('TagKey')
        if m.get('TagValues') is not None:
            self.tag_values = m.get('TagValues')
        return self


class DescribeSplitItemBillRequest(TeaModel):
    def __init__(self, bill_owner_id=None, billing_cycle=None, billing_date=None, granularity=None,
                 instance_id=None, is_hide_zero_charge=None, max_results=None, next_token=None, owner_id=None,
                 product_code=None, product_type=None, split_item_id=None, subscription_type=None, tag_filter=None):
        # The ID of the member. If you specify this parameter, the bills of the member are queried. If you do not specify this parameter, the bills of the current account are queried by default.
        self.bill_owner_id = bill_owner_id  # type: long
        # The billing cycle. Specify the parameter in the YYYY-MM format.
        self.billing_cycle = billing_cycle  # type: str
        # The billing date. This parameter is required only when the Granularity parameter is set to DAILY. Format: YYYY-MM-DD.
        self.billing_date = billing_date  # type: str
        # The granularity at which bills are queried. Valid values:
        # 
        # *   MONTHLY: queries bills on a monthly basis. The data that you query is the same as the data that is queried by billing cycles in the Split Bill module of the User Center console.
        # *   DAILY: queries bills on a daily basis. The data that you query is the same as the data that is queried by days in the Split Bill module of the User Center console.
        # 
        # If you specify DAILY for this parameter, the BillingDate parameter is required.
        self.granularity = granularity  # type: str
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        self.is_hide_zero_charge = is_hide_zero_charge  # type: bool
        # The maximum number of entries to query. Default value: 20. Maximum value: 300.
        self.max_results = max_results  # type: int
        # The token that is used for the next query. The parameter must be left empty or set to the value of the NextToken parameter returned in the last call. Otherwise, an error is returned. If the parameter is left empty, the data is queried from the first entry.
        self.next_token = next_token  # type: str
        self.owner_id = owner_id  # type: long
        # The code of the service.
        self.product_code = product_code  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The ID of the split item.
        self.split_item_id = split_item_id  # type: str
        # The billing method. Valid values: Subscription: the subscription billing method. PayAsYouGo: the pay-as-you-go billing method. This parameter must be used with the ProductCode parameter.
        self.subscription_type = subscription_type  # type: str
        # The tags that are used to filter split bills. You can specify multiple tag values. If you specify multiple tag values, split bills that match one of the tag values are queried.
        self.tag_filter = tag_filter  # type: list[DescribeSplitItemBillRequestTagFilter]

    def validate(self):
        if self.tag_filter:
            for k in self.tag_filter:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeSplitItemBillRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.billing_date is not None:
            result['BillingDate'] = self.billing_date
        if self.granularity is not None:
            result['Granularity'] = self.granularity
        if self.instance_id is not None:
            result['InstanceID'] = self.instance_id
        if self.is_hide_zero_charge is not None:
            result['IsHideZeroCharge'] = self.is_hide_zero_charge
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.split_item_id is not None:
            result['SplitItemID'] = self.split_item_id
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        result['TagFilter'] = []
        if self.tag_filter is not None:
            for k in self.tag_filter:
                result['TagFilter'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('BillingDate') is not None:
            self.billing_date = m.get('BillingDate')
        if m.get('Granularity') is not None:
            self.granularity = m.get('Granularity')
        if m.get('InstanceID') is not None:
            self.instance_id = m.get('InstanceID')
        if m.get('IsHideZeroCharge') is not None:
            self.is_hide_zero_charge = m.get('IsHideZeroCharge')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('SplitItemID') is not None:
            self.split_item_id = m.get('SplitItemID')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        self.tag_filter = []
        if m.get('TagFilter') is not None:
            for k in m.get('TagFilter'):
                temp_model = DescribeSplitItemBillRequestTagFilter()
                self.tag_filter.append(temp_model.from_map(k))
        return self


class DescribeSplitItemBillResponseBodyDataItems(TeaModel):
    def __init__(self, adjust_amount=None, bill_account_id=None, bill_account_name=None, billing_date=None,
                 billing_item=None, billing_item_code=None, billing_type=None, biz_type=None, cash_amount=None,
                 commodity_code=None, cost_unit=None, currency=None, deducted_by_cash_coupons=None, deducted_by_coupons=None,
                 deducted_by_prepaid_card=None, deducted_by_resource_package=None, instance_config=None, instance_id=None,
                 instance_spec=None, internet_ip=None, intranet_ip=None, invoice_discount=None, item=None, item_name=None,
                 list_price=None, list_price_unit=None, nick_name=None, outstanding_amount=None, owner_id=None,
                 payment_amount=None, pip_code=None, pretax_amount=None, pretax_gross_amount=None, product_code=None,
                 product_detail=None, product_name=None, product_type=None, region=None, resource_group=None, service_period=None,
                 service_period_unit=None, split_account_id=None, split_account_name=None, split_billing_cycle=None,
                 split_billing_date=None, split_commodity_code=None, split_item_id=None, split_item_name=None,
                 split_product_detail=None, subscription_type=None, tag=None, usage=None, usage_unit=None, zone=None):
        # The amount deducted with credit refund.
        self.adjust_amount = adjust_amount  # type: float
        # The ID of the account to which the bill belongs.
        self.bill_account_id = bill_account_id  # type: str
        # The name of the account to which the bill belongs.
        self.bill_account_name = bill_account_name  # type: str
        # The billing date. Format: YYYY-MM-DD. This parameter is not supported.
        self.billing_date = billing_date  # type: str
        # The billable item.
        self.billing_item = billing_item  # type: str
        # The code of the billable item.
        self.billing_item_code = billing_item_code  # type: str
        # The billing method.
        self.billing_type = billing_type  # type: str
        # The type of the business.
        self.biz_type = biz_type  # type: str
        # The amount paid in cash. The amount deducted with credit refund is not included.
        self.cash_amount = cash_amount  # type: float
        # The code of the commodity. The code is the same as that displayed in the Split Bill module of the User Center console.
        self.commodity_code = commodity_code  # type: str
        # The cost center.
        self.cost_unit = cost_unit  # type: str
        # The type of currency. Valid values: CNY, USD, and JPY.
        self.currency = currency  # type: str
        # The amount deducted with vouchers.
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: float
        # The amount deducted with coupons.
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        # The amount deducted with prepaid cards.
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: float
        # The amount deducted with resource plans.
        self.deducted_by_resource_package = deducted_by_resource_package  # type: str
        # The configurations of the instance.
        self.instance_config = instance_config  # type: str
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        # The type of the instance.
        self.instance_spec = instance_spec  # type: str
        # The public IP address.
        self.internet_ip = internet_ip  # type: str
        # The private IP address.
        self.intranet_ip = intranet_ip  # type: str
        # The discount amount.
        self.invoice_discount = invoice_discount  # type: float
        # The type of the bill. Valid values: SubscriptionOrder: the subscription bill. PayAsYouGoBill: the pay-as-you-go bill. Refund: the refund. Adjustment: the adjustment bill.
        self.item = item  # type: str
        # The name of the split item.
        self.item_name = item_name  # type: str
        # The unit price.
        self.list_price = list_price  # type: str
        # The unit of the unit price.
        self.list_price_unit = list_price_unit  # type: str
        # The name of the instance.
        self.nick_name = nick_name  # type: str
        # The amount that is unsettled.
        self.outstanding_amount = outstanding_amount  # type: float
        # The ID of the account that owns the resource. This parameter is returned in multi-account scenario.
        self.owner_id = owner_id  # type: str
        # The amount paid in cash. The amount deducted with credit refund is included.
        self.payment_amount = payment_amount  # type: float
        # The code of the service. The code is the same as that displayed in the Split Bill module of the User Center console.
        self.pip_code = pip_code  # type: str
        # The pretax amount.
        self.pretax_amount = pretax_amount  # type: float
        # The pretax gross amount.
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        # The code of the service.
        self.product_code = product_code  # type: str
        # The details of the service.
        self.product_detail = product_detail  # type: str
        # The name of the service.
        self.product_name = product_name  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The ID of the region.
        self.region = region  # type: str
        # The ID of the resource group.
        self.resource_group = resource_group  # type: str
        # The duration of the service.
        self.service_period = service_period  # type: str
        # The unit of the service duration.
        self.service_period_unit = service_period_unit  # type: str
        # The ID of the account to which the split bill belongs.
        self.split_account_id = split_account_id  # type: str
        # The name of the account to which the split item belongs.
        self.split_account_name = split_account_name  # type: str
        # The billing cycle in which the bill is split.
        self.split_billing_cycle = split_billing_cycle  # type: str
        # The day on which the bill is split.
        self.split_billing_date = split_billing_date  # type: str
        # The code of the split item.
        self.split_commodity_code = split_commodity_code  # type: str
        # The ID of the split item.
        self.split_item_id = split_item_id  # type: str
        # The name of the split item.
        self.split_item_name = split_item_name  # type: str
        # The details of the service.
        self.split_product_detail = split_product_detail  # type: str
        # The billing method. Valid values: Subscription: the subscription billing method. PayAsYouGo: the pay-as-you-go billing method.
        self.subscription_type = subscription_type  # type: str
        # The tag of the resource. If tags added to resources change, the bills generated during the period in which resources and tags are associated are returned.
        self.tag = tag  # type: str
        # The amount of resource usage.
        self.usage = usage  # type: str
        # The unit of usage.
        self.usage_unit = usage_unit  # type: str
        # The zone.
        self.zone = zone  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeSplitItemBillResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.adjust_amount is not None:
            result['AdjustAmount'] = self.adjust_amount
        if self.bill_account_id is not None:
            result['BillAccountID'] = self.bill_account_id
        if self.bill_account_name is not None:
            result['BillAccountName'] = self.bill_account_name
        if self.billing_date is not None:
            result['BillingDate'] = self.billing_date
        if self.billing_item is not None:
            result['BillingItem'] = self.billing_item
        if self.billing_item_code is not None:
            result['BillingItemCode'] = self.billing_item_code
        if self.billing_type is not None:
            result['BillingType'] = self.billing_type
        if self.biz_type is not None:
            result['BizType'] = self.biz_type
        if self.cash_amount is not None:
            result['CashAmount'] = self.cash_amount
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.cost_unit is not None:
            result['CostUnit'] = self.cost_unit
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.deducted_by_resource_package is not None:
            result['DeductedByResourcePackage'] = self.deducted_by_resource_package
        if self.instance_config is not None:
            result['InstanceConfig'] = self.instance_config
        if self.instance_id is not None:
            result['InstanceID'] = self.instance_id
        if self.instance_spec is not None:
            result['InstanceSpec'] = self.instance_spec
        if self.internet_ip is not None:
            result['InternetIP'] = self.internet_ip
        if self.intranet_ip is not None:
            result['IntranetIP'] = self.intranet_ip
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.item is not None:
            result['Item'] = self.item
        if self.item_name is not None:
            result['ItemName'] = self.item_name
        if self.list_price is not None:
            result['ListPrice'] = self.list_price
        if self.list_price_unit is not None:
            result['ListPriceUnit'] = self.list_price_unit
        if self.nick_name is not None:
            result['NickName'] = self.nick_name
        if self.outstanding_amount is not None:
            result['OutstandingAmount'] = self.outstanding_amount
        if self.owner_id is not None:
            result['OwnerID'] = self.owner_id
        if self.payment_amount is not None:
            result['PaymentAmount'] = self.payment_amount
        if self.pip_code is not None:
            result['PipCode'] = self.pip_code
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_group is not None:
            result['ResourceGroup'] = self.resource_group
        if self.service_period is not None:
            result['ServicePeriod'] = self.service_period
        if self.service_period_unit is not None:
            result['ServicePeriodUnit'] = self.service_period_unit
        if self.split_account_id is not None:
            result['SplitAccountID'] = self.split_account_id
        if self.split_account_name is not None:
            result['SplitAccountName'] = self.split_account_name
        if self.split_billing_cycle is not None:
            result['SplitBillingCycle'] = self.split_billing_cycle
        if self.split_billing_date is not None:
            result['SplitBillingDate'] = self.split_billing_date
        if self.split_commodity_code is not None:
            result['SplitCommodityCode'] = self.split_commodity_code
        if self.split_item_id is not None:
            result['SplitItemID'] = self.split_item_id
        if self.split_item_name is not None:
            result['SplitItemName'] = self.split_item_name
        if self.split_product_detail is not None:
            result['SplitProductDetail'] = self.split_product_detail
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tag is not None:
            result['Tag'] = self.tag
        if self.usage is not None:
            result['Usage'] = self.usage
        if self.usage_unit is not None:
            result['UsageUnit'] = self.usage_unit
        if self.zone is not None:
            result['Zone'] = self.zone
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AdjustAmount') is not None:
            self.adjust_amount = m.get('AdjustAmount')
        if m.get('BillAccountID') is not None:
            self.bill_account_id = m.get('BillAccountID')
        if m.get('BillAccountName') is not None:
            self.bill_account_name = m.get('BillAccountName')
        if m.get('BillingDate') is not None:
            self.billing_date = m.get('BillingDate')
        if m.get('BillingItem') is not None:
            self.billing_item = m.get('BillingItem')
        if m.get('BillingItemCode') is not None:
            self.billing_item_code = m.get('BillingItemCode')
        if m.get('BillingType') is not None:
            self.billing_type = m.get('BillingType')
        if m.get('BizType') is not None:
            self.biz_type = m.get('BizType')
        if m.get('CashAmount') is not None:
            self.cash_amount = m.get('CashAmount')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('CostUnit') is not None:
            self.cost_unit = m.get('CostUnit')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('DeductedByResourcePackage') is not None:
            self.deducted_by_resource_package = m.get('DeductedByResourcePackage')
        if m.get('InstanceConfig') is not None:
            self.instance_config = m.get('InstanceConfig')
        if m.get('InstanceID') is not None:
            self.instance_id = m.get('InstanceID')
        if m.get('InstanceSpec') is not None:
            self.instance_spec = m.get('InstanceSpec')
        if m.get('InternetIP') is not None:
            self.internet_ip = m.get('InternetIP')
        if m.get('IntranetIP') is not None:
            self.intranet_ip = m.get('IntranetIP')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('Item') is not None:
            self.item = m.get('Item')
        if m.get('ItemName') is not None:
            self.item_name = m.get('ItemName')
        if m.get('ListPrice') is not None:
            self.list_price = m.get('ListPrice')
        if m.get('ListPriceUnit') is not None:
            self.list_price_unit = m.get('ListPriceUnit')
        if m.get('NickName') is not None:
            self.nick_name = m.get('NickName')
        if m.get('OutstandingAmount') is not None:
            self.outstanding_amount = m.get('OutstandingAmount')
        if m.get('OwnerID') is not None:
            self.owner_id = m.get('OwnerID')
        if m.get('PaymentAmount') is not None:
            self.payment_amount = m.get('PaymentAmount')
        if m.get('PipCode') is not None:
            self.pip_code = m.get('PipCode')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceGroup') is not None:
            self.resource_group = m.get('ResourceGroup')
        if m.get('ServicePeriod') is not None:
            self.service_period = m.get('ServicePeriod')
        if m.get('ServicePeriodUnit') is not None:
            self.service_period_unit = m.get('ServicePeriodUnit')
        if m.get('SplitAccountID') is not None:
            self.split_account_id = m.get('SplitAccountID')
        if m.get('SplitAccountName') is not None:
            self.split_account_name = m.get('SplitAccountName')
        if m.get('SplitBillingCycle') is not None:
            self.split_billing_cycle = m.get('SplitBillingCycle')
        if m.get('SplitBillingDate') is not None:
            self.split_billing_date = m.get('SplitBillingDate')
        if m.get('SplitCommodityCode') is not None:
            self.split_commodity_code = m.get('SplitCommodityCode')
        if m.get('SplitItemID') is not None:
            self.split_item_id = m.get('SplitItemID')
        if m.get('SplitItemName') is not None:
            self.split_item_name = m.get('SplitItemName')
        if m.get('SplitProductDetail') is not None:
            self.split_product_detail = m.get('SplitProductDetail')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tag') is not None:
            self.tag = m.get('Tag')
        if m.get('Usage') is not None:
            self.usage = m.get('Usage')
        if m.get('UsageUnit') is not None:
            self.usage_unit = m.get('UsageUnit')
        if m.get('Zone') is not None:
            self.zone = m.get('Zone')
        return self


class DescribeSplitItemBillResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, billing_cycle=None, items=None, max_results=None,
                 next_token=None, total_count=None):
        # The ID of the account.
        self.account_id = account_id  # type: str
        # The ID of the account.
        self.account_name = account_name  # type: str
        # The billing cycle. Format: YYYY-MM.
        self.billing_cycle = billing_cycle  # type: str
        # The details of the bill.
        self.items = items  # type: list[DescribeSplitItemBillResponseBodyDataItems]
        # The maximum number of entries returned.
        self.max_results = max_results  # type: int
        # The token used for the next query. If this parameter is empty, all the results are returned. When you perform the next query, you must set the NextToken parameter to this value.
        self.next_token = next_token  # type: str
        # The total number of entries returned.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(DescribeSplitItemBillResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = DescribeSplitItemBillResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class DescribeSplitItemBillResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: DescribeSplitItemBillResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(DescribeSplitItemBillResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = DescribeSplitItemBillResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DescribeSplitItemBillResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: DescribeSplitItemBillResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(DescribeSplitItemBillResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = DescribeSplitItemBillResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class EnableBillGenerationRequest(TeaModel):
    def __init__(self, owner_id=None, product_code=None):
        self.owner_id = owner_id  # type: long
        # The code of the product.
        self.product_code = product_code  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(EnableBillGenerationRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        return self


class EnableBillGenerationResponseBodyData(TeaModel):
    def __init__(self, boolean=None):
        # Indicates whether the feature is enabled.
        self.boolean = boolean  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(EnableBillGenerationResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.boolean is not None:
            result['Boolean'] = self.boolean
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Boolean') is not None:
            self.boolean = m.get('Boolean')
        return self


class EnableBillGenerationResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: EnableBillGenerationResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the call was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(EnableBillGenerationResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = EnableBillGenerationResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class EnableBillGenerationResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: EnableBillGenerationResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(EnableBillGenerationResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = EnableBillGenerationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAccountRelationRequest(TeaModel):
    def __init__(self, relation_id=None, request_id=None):
        # The ID of the financial relationship.
        self.relation_id = relation_id  # type: long
        # The unique ID of the request. The ID is used to mark a request and troubleshoot a problem.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetAccountRelationRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.relation_id is not None:
            result['RelationId'] = self.relation_id
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RelationId') is not None:
            self.relation_id = m.get('RelationId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAccountRelationResponseBodyData(TeaModel):
    def __init__(self, child_user_id=None, end_time=None, gmt_modified=None, id=None, parent_user_id=None,
                 start_time=None, status=None, type=None):
        # The ID of the Alibaba Cloud account that is used as a member.
        self.child_user_id = child_user_id  # type: long
        # The time when the financial relationship between the management account and the member was terminated.
        self.end_time = end_time  # type: long
        # The time when the financial relationship between the management account and the member was modified.
        self.gmt_modified = gmt_modified  # type: long
        # The ID of the financial relationship.
        self.id = id  # type: long
        # The ID of the Alibaba Cloud account that is used as the management account.
        self.parent_user_id = parent_user_id  # type: long
        # The time when the financial relationship between the management account and the member was established.
        self.start_time = start_time  # type: long
        # The status of the financial relationship between the management account and the member.
        self.status = status  # type: str
        # The type of the financial relationship.
        self.type = type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetAccountRelationResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.child_user_id is not None:
            result['ChildUserId'] = self.child_user_id
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.gmt_modified is not None:
            result['GmtModified'] = self.gmt_modified
        if self.id is not None:
            result['Id'] = self.id
        if self.parent_user_id is not None:
            result['ParentUserId'] = self.parent_user_id
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.status is not None:
            result['Status'] = self.status
        if self.type is not None:
            result['Type'] = self.type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ChildUserId') is not None:
            self.child_user_id = m.get('ChildUserId')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('GmtModified') is not None:
            self.gmt_modified = m.get('GmtModified')
        if m.get('Id') is not None:
            self.id = m.get('Id')
        if m.get('ParentUserId') is not None:
            self.parent_user_id = m.get('ParentUserId')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        return self


class GetAccountRelationResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # data
        self.data = data  # type: GetAccountRelationResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the call is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(GetAccountRelationResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = GetAccountRelationResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class GetAccountRelationResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: GetAccountRelationResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(GetAccountRelationResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = GetAccountRelationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetCustomerAccountInfoRequest(TeaModel):
    def __init__(self, owner_id=None):
        self.owner_id = owner_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetCustomerAccountInfoRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        return self


class GetCustomerAccountInfoResponseBodyData(TeaModel):
    def __init__(self, account_type=None, credit_limit_status=None, hosting_status=None, is_certified=None,
                 login_email=None, mpk=None):
        # The type of the account. A value of 1 indicates an enterprise account. A value of 0 indicates an individual account.
        self.account_type = account_type  # type: str
        # The business status of the customer. Valid values:
        # 
        # Freeze: The business is frozen.
        # 
        # Thaw: The business is unfrozen.
        # 
        # Trusteeship: The business is hosted.
        # 
        # TrusteeshipCancel: The business is not hosted.
        self.credit_limit_status = credit_limit_status  # type: str
        # The hosting status of the credit information and instances of the customer. If the credit information and instances of the customer are managed on Alibaba Cloud, Alibaba Cloud suspends a customer service upon overdue payment. Valid values:
        # 
        # FREEZE: The business of the customer is frozen.
        # 
        # TRUSTEESHIP: The business of the customer is hosted.
        self.hosting_status = hosting_status  # type: str
        # Indicates whether the account passes the real-name verification.
        self.is_certified = is_certified  # type: bool
        # The email address of the customer.
        self.login_email = login_email  # type: str
        # The ID of the management account.
        self.mpk = mpk  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetCustomerAccountInfoResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_type is not None:
            result['AccountType'] = self.account_type
        if self.credit_limit_status is not None:
            result['CreditLimitStatus'] = self.credit_limit_status
        if self.hosting_status is not None:
            result['HostingStatus'] = self.hosting_status
        if self.is_certified is not None:
            result['IsCertified'] = self.is_certified
        if self.login_email is not None:
            result['LoginEmail'] = self.login_email
        if self.mpk is not None:
            result['Mpk'] = self.mpk
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountType') is not None:
            self.account_type = m.get('AccountType')
        if m.get('CreditLimitStatus') is not None:
            self.credit_limit_status = m.get('CreditLimitStatus')
        if m.get('HostingStatus') is not None:
            self.hosting_status = m.get('HostingStatus')
        if m.get('IsCertified') is not None:
            self.is_certified = m.get('IsCertified')
        if m.get('LoginEmail') is not None:
            self.login_email = m.get('LoginEmail')
        if m.get('Mpk') is not None:
            self.mpk = m.get('Mpk')
        return self


class GetCustomerAccountInfoResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: GetCustomerAccountInfoResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call failed.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(GetCustomerAccountInfoResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = GetCustomerAccountInfoResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class GetCustomerAccountInfoResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: GetCustomerAccountInfoResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(GetCustomerAccountInfoResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = GetCustomerAccountInfoResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetCustomerListResponseBodyData(TeaModel):
    def __init__(self, uid_list=None):
        # The list of customer IDs.
        self.uid_list = uid_list  # type: list[str]

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetCustomerListResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.uid_list is not None:
            result['UidList'] = self.uid_list
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('UidList') is not None:
            self.uid_list = m.get('UidList')
        return self


class GetCustomerListResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: GetCustomerListResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request. You can use the ID to query logs and troubleshoot issues.
        self.request_id = request_id  # type: str
        # Indicates whether the call is successful. Valid values:
        # 
        # *   **true**: The call is successful.
        # *   **false**: The call failed.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(GetCustomerListResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = GetCustomerListResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class GetCustomerListResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: GetCustomerListResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(GetCustomerListResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = GetCustomerListResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetOrderDetailRequest(TeaModel):
    def __init__(self, order_id=None, owner_id=None):
        # The ID of the order.
        self.order_id = order_id  # type: str
        self.owner_id = owner_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetOrderDetailRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        return self


class GetOrderDetailResponseBodyDataOrderListOrder(TeaModel):
    def __init__(self, after_tax_amount=None, commodity_code=None, config=None, create_time=None, currency=None,
                 instance_ids=None, operator=None, order_id=None, order_sub_type=None, order_type=None, original_config=None,
                 payment_currency=None, payment_status=None, payment_time=None, pretax_amount=None, pretax_amount_local=None,
                 pretax_gross_amount=None, product_code=None, product_type=None, quantity=None, region=None, related_order_id=None,
                 sub_order_id=None, subscription_type=None, tax=None, usage_end_time=None, usage_start_time=None):
        # The after-tax amount of the order.
        self.after_tax_amount = after_tax_amount  # type: str
        # The service code.
        self.commodity_code = commodity_code  # type: str
        # The configurations of the main service.
        self.config = config  # type: str
        # The time when the order was created.
        self.create_time = create_time  # type: str
        # The currency.
        self.currency = currency  # type: str
        # The instance IDs.
        self.instance_ids = instance_ids  # type: str
        # The ID of the Resource Access Management (RAM) user who performs operations on the order. If no RAM user is involved, leave this parameter blank.
        self.operator = operator  # type: str
        # The ID of the order.
        self.order_id = order_id  # type: str
        # The type of the suborder. Valid values:
        # 
        # *   ProductSubOrder: the service suborder
        # *   RefundSubOrder: the refund suborder
        self.order_sub_type = order_sub_type  # type: str
        # The type of the order. Valid values:
        # 
        # *   New: purchases an instance.
        # *   Renew: renews an instance.
        # *   Upgrade: upgrades the configurations of an instance.
        # *   Refund: applies for a refund.
        # *   Convert: switches the billing method.
        # *   Downgrade: downgrades the configurations of an instance.
        # *   ResizeDisk: resizes the disk.
        self.order_type = order_type  # type: str
        # The module information without standardized conversion.
        self.original_config = original_config  # type: str
        # The currency of payment.
        self.payment_currency = payment_currency  # type: str
        # The status of payment. Valid values:
        # 
        # *   Unpaid: The order is not paid.
        # *   Paid: The order is paid.
        # *   Cancelled: The order is canceled.
        self.payment_status = payment_status  # type: str
        # The time of payment.
        self.payment_time = payment_time  # type: str
        # The pretax amount of the order.
        self.pretax_amount = pretax_amount  # type: str
        # The pretax amount of the order in local currency.
        self.pretax_amount_local = pretax_amount_local  # type: str
        # The pretax gross amount of the order.
        self.pretax_gross_amount = pretax_gross_amount  # type: str
        # The code of the main service.
        self.product_code = product_code  # type: str
        # The type of the main service.
        self.product_type = product_type  # type: str
        # The number of main services.
        self.quantity = quantity  # type: str
        # The ID of the region.
        self.region = region  # type: str
        # The ID of the associated order.
        self.related_order_id = related_order_id  # type: str
        # The ID of the suborder.
        self.sub_order_id = sub_order_id  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: subscription
        # *   PayAsYouGo: pay-as-you-go
        self.subscription_type = subscription_type  # type: str
        # The tax of the order.
        self.tax = tax  # type: str
        # The time when the service ends.
        self.usage_end_time = usage_end_time  # type: str
        # The time when the service starts.
        self.usage_start_time = usage_start_time  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetOrderDetailResponseBodyDataOrderListOrder, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.after_tax_amount is not None:
            result['AfterTaxAmount'] = self.after_tax_amount
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.config is not None:
            result['Config'] = self.config
        if self.create_time is not None:
            result['CreateTime'] = self.create_time
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.instance_ids is not None:
            result['InstanceIDs'] = self.instance_ids
        if self.operator is not None:
            result['Operator'] = self.operator
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        if self.order_sub_type is not None:
            result['OrderSubType'] = self.order_sub_type
        if self.order_type is not None:
            result['OrderType'] = self.order_type
        if self.original_config is not None:
            result['OriginalConfig'] = self.original_config
        if self.payment_currency is not None:
            result['PaymentCurrency'] = self.payment_currency
        if self.payment_status is not None:
            result['PaymentStatus'] = self.payment_status
        if self.payment_time is not None:
            result['PaymentTime'] = self.payment_time
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_amount_local is not None:
            result['PretaxAmountLocal'] = self.pretax_amount_local
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.quantity is not None:
            result['Quantity'] = self.quantity
        if self.region is not None:
            result['Region'] = self.region
        if self.related_order_id is not None:
            result['RelatedOrderId'] = self.related_order_id
        if self.sub_order_id is not None:
            result['SubOrderId'] = self.sub_order_id
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tax is not None:
            result['Tax'] = self.tax
        if self.usage_end_time is not None:
            result['UsageEndTime'] = self.usage_end_time
        if self.usage_start_time is not None:
            result['UsageStartTime'] = self.usage_start_time
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AfterTaxAmount') is not None:
            self.after_tax_amount = m.get('AfterTaxAmount')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('Config') is not None:
            self.config = m.get('Config')
        if m.get('CreateTime') is not None:
            self.create_time = m.get('CreateTime')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('InstanceIDs') is not None:
            self.instance_ids = m.get('InstanceIDs')
        if m.get('Operator') is not None:
            self.operator = m.get('Operator')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        if m.get('OrderSubType') is not None:
            self.order_sub_type = m.get('OrderSubType')
        if m.get('OrderType') is not None:
            self.order_type = m.get('OrderType')
        if m.get('OriginalConfig') is not None:
            self.original_config = m.get('OriginalConfig')
        if m.get('PaymentCurrency') is not None:
            self.payment_currency = m.get('PaymentCurrency')
        if m.get('PaymentStatus') is not None:
            self.payment_status = m.get('PaymentStatus')
        if m.get('PaymentTime') is not None:
            self.payment_time = m.get('PaymentTime')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxAmountLocal') is not None:
            self.pretax_amount_local = m.get('PretaxAmountLocal')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('Quantity') is not None:
            self.quantity = m.get('Quantity')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('RelatedOrderId') is not None:
            self.related_order_id = m.get('RelatedOrderId')
        if m.get('SubOrderId') is not None:
            self.sub_order_id = m.get('SubOrderId')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tax') is not None:
            self.tax = m.get('Tax')
        if m.get('UsageEndTime') is not None:
            self.usage_end_time = m.get('UsageEndTime')
        if m.get('UsageStartTime') is not None:
            self.usage_start_time = m.get('UsageStartTime')
        return self


class GetOrderDetailResponseBodyDataOrderList(TeaModel):
    def __init__(self, order=None):
        self.order = order  # type: list[GetOrderDetailResponseBodyDataOrderListOrder]

    def validate(self):
        if self.order:
            for k in self.order:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(GetOrderDetailResponseBodyDataOrderList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Order'] = []
        if self.order is not None:
            for k in self.order:
                result['Order'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.order = []
        if m.get('Order') is not None:
            for k in m.get('Order'):
                temp_model = GetOrderDetailResponseBodyDataOrderListOrder()
                self.order.append(temp_model.from_map(k))
        return self


class GetOrderDetailResponseBodyData(TeaModel):
    def __init__(self, host_name=None, order_list=None, page_num=None, page_size=None, total_count=None):
        # The hostname.
        self.host_name = host_name  # type: str
        # The details of the order.
        self.order_list = order_list  # type: GetOrderDetailResponseBodyDataOrderList
        # The page number of the returned page.
        self.page_num = page_num  # type: int
        # The number of entries returned on each page.
        self.page_size = page_size  # type: int
        # The total number of returned entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.order_list:
            self.order_list.validate()

    def to_map(self):
        _map = super(GetOrderDetailResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_name is not None:
            result['HostName'] = self.host_name
        if self.order_list is not None:
            result['OrderList'] = self.order_list.to_map()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostName') is not None:
            self.host_name = m.get('HostName')
        if m.get('OrderList') is not None:
            temp_model = GetOrderDetailResponseBodyDataOrderList()
            self.order_list = temp_model.from_map(m['OrderList'])
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class GetOrderDetailResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: GetOrderDetailResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(GetOrderDetailResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = GetOrderDetailResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class GetOrderDetailResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: GetOrderDetailResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(GetOrderDetailResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = GetOrderDetailResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetPayAsYouGoPriceRequestModuleList(TeaModel):
    def __init__(self, config=None, module_code=None, price_type=None):
        # The configuration of the Nth pricing module. Valid values of N: 1 to 50. Format: AA:aa,BB:bb. The values of AA and BB are the property IDs of the pricing module. The values of aa and bb are the property values of the pricing module.
        # 
        # >  You can call the [DescribePricingModule](~~96469~~) operation to obtain the configuration parameters of the pricing module.
        self.config = config  # type: str
        # The code of the Nth pricing module.
        # 
        # >  You can call the [DescribePricingModule](~~96469~~) operation to obtain the module code.
        self.module_code = module_code  # type: str
        # The price type of the Nth pricing module. Valid values:
        # 
        # *   Hour: hourly price
        # *   Usage: usage price
        # *   Month: monthly price
        # *   Year: annual price
        # 
        # >  You can call the [DescribePricingModule](~~96469~~) operation to obtain the configuration parameters of the pricing module.
        self.price_type = price_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetPayAsYouGoPriceRequestModuleList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.config is not None:
            result['Config'] = self.config
        if self.module_code is not None:
            result['ModuleCode'] = self.module_code
        if self.price_type is not None:
            result['PriceType'] = self.price_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Config') is not None:
            self.config = m.get('Config')
        if m.get('ModuleCode') is not None:
            self.module_code = m.get('ModuleCode')
        if m.get('PriceType') is not None:
            self.price_type = m.get('PriceType')
        return self


class GetPayAsYouGoPriceRequest(TeaModel):
    def __init__(self, module_list=None, owner_id=None, product_code=None, product_type=None, region=None,
                 subscription_type=None):
        # The details of pricing modules.
        self.module_list = module_list  # type: list[GetPayAsYouGoPriceRequestModuleList]
        self.owner_id = owner_id  # type: long
        # The code of the service.
        self.product_code = product_code  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The ID of the region in which the instance resides.
        self.region = region  # type: str
        # The billing method. Set the value to PayAsYouGo.
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        if self.module_list:
            for k in self.module_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(GetPayAsYouGoPriceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['ModuleList'] = []
        if self.module_list is not None:
            for k in self.module_list:
                result['ModuleList'].append(k.to_map() if k else None)
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.region is not None:
            result['Region'] = self.region
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.module_list = []
        if m.get('ModuleList') is not None:
            for k in m.get('ModuleList'):
                temp_model = GetPayAsYouGoPriceRequestModuleList()
                self.module_list.append(temp_model.from_map(k))
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class GetPayAsYouGoPriceResponseBodyDataModuleDetailsModuleDetail(TeaModel):
    def __init__(self, cost_after_discount=None, invoice_discount=None, module_code=None, original_cost=None,
                 unit_price=None):
        # The discount price.
        self.cost_after_discount = cost_after_discount  # type: float
        # The discount that was applied.
        self.invoice_discount = invoice_discount  # type: float
        # The code of the pricing module.
        self.module_code = module_code  # type: str
        # The original price.
        self.original_cost = original_cost  # type: float
        # The unit price.
        self.unit_price = unit_price  # type: float

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetPayAsYouGoPriceResponseBodyDataModuleDetailsModuleDetail, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.cost_after_discount is not None:
            result['CostAfterDiscount'] = self.cost_after_discount
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.module_code is not None:
            result['ModuleCode'] = self.module_code
        if self.original_cost is not None:
            result['OriginalCost'] = self.original_cost
        if self.unit_price is not None:
            result['UnitPrice'] = self.unit_price
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CostAfterDiscount') is not None:
            self.cost_after_discount = m.get('CostAfterDiscount')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('ModuleCode') is not None:
            self.module_code = m.get('ModuleCode')
        if m.get('OriginalCost') is not None:
            self.original_cost = m.get('OriginalCost')
        if m.get('UnitPrice') is not None:
            self.unit_price = m.get('UnitPrice')
        return self


class GetPayAsYouGoPriceResponseBodyDataModuleDetails(TeaModel):
    def __init__(self, module_detail=None):
        self.module_detail = module_detail  # type: list[GetPayAsYouGoPriceResponseBodyDataModuleDetailsModuleDetail]

    def validate(self):
        if self.module_detail:
            for k in self.module_detail:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(GetPayAsYouGoPriceResponseBodyDataModuleDetails, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['ModuleDetail'] = []
        if self.module_detail is not None:
            for k in self.module_detail:
                result['ModuleDetail'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.module_detail = []
        if m.get('ModuleDetail') is not None:
            for k in m.get('ModuleDetail'):
                temp_model = GetPayAsYouGoPriceResponseBodyDataModuleDetailsModuleDetail()
                self.module_detail.append(temp_model.from_map(k))
        return self


class GetPayAsYouGoPriceResponseBodyDataPromotionDetailsPromotionDetail(TeaModel):
    def __init__(self, promotion_desc=None, promotion_id=None, promotion_name=None):
        # The description of the discount.
        self.promotion_desc = promotion_desc  # type: str
        # The ID of the discount.
        self.promotion_id = promotion_id  # type: long
        # The name of the discount.
        self.promotion_name = promotion_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetPayAsYouGoPriceResponseBodyDataPromotionDetailsPromotionDetail, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.promotion_desc is not None:
            result['PromotionDesc'] = self.promotion_desc
        if self.promotion_id is not None:
            result['PromotionId'] = self.promotion_id
        if self.promotion_name is not None:
            result['PromotionName'] = self.promotion_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('PromotionDesc') is not None:
            self.promotion_desc = m.get('PromotionDesc')
        if m.get('PromotionId') is not None:
            self.promotion_id = m.get('PromotionId')
        if m.get('PromotionName') is not None:
            self.promotion_name = m.get('PromotionName')
        return self


class GetPayAsYouGoPriceResponseBodyDataPromotionDetails(TeaModel):
    def __init__(self, promotion_detail=None):
        self.promotion_detail = promotion_detail  # type: list[GetPayAsYouGoPriceResponseBodyDataPromotionDetailsPromotionDetail]

    def validate(self):
        if self.promotion_detail:
            for k in self.promotion_detail:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(GetPayAsYouGoPriceResponseBodyDataPromotionDetails, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['PromotionDetail'] = []
        if self.promotion_detail is not None:
            for k in self.promotion_detail:
                result['PromotionDetail'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.promotion_detail = []
        if m.get('PromotionDetail') is not None:
            for k in m.get('PromotionDetail'):
                temp_model = GetPayAsYouGoPriceResponseBodyDataPromotionDetailsPromotionDetail()
                self.promotion_detail.append(temp_model.from_map(k))
        return self


class GetPayAsYouGoPriceResponseBodyData(TeaModel):
    def __init__(self, currency=None, module_details=None, promotion_details=None):
        # The type of the currency. Valid values:
        # 
        # *   CNY: Chinese Yuan
        # *   USD: US dollar
        # *   JPY: Japanese Yen
        self.currency = currency  # type: str
        # The price details of the pricing module.
        self.module_details = module_details  # type: GetPayAsYouGoPriceResponseBodyDataModuleDetails
        # The details of the discount.
        self.promotion_details = promotion_details  # type: GetPayAsYouGoPriceResponseBodyDataPromotionDetails

    def validate(self):
        if self.module_details:
            self.module_details.validate()
        if self.promotion_details:
            self.promotion_details.validate()

    def to_map(self):
        _map = super(GetPayAsYouGoPriceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.module_details is not None:
            result['ModuleDetails'] = self.module_details.to_map()
        if self.promotion_details is not None:
            result['PromotionDetails'] = self.promotion_details.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('ModuleDetails') is not None:
            temp_model = GetPayAsYouGoPriceResponseBodyDataModuleDetails()
            self.module_details = temp_model.from_map(m['ModuleDetails'])
        if m.get('PromotionDetails') is not None:
            temp_model = GetPayAsYouGoPriceResponseBodyDataPromotionDetails()
            self.promotion_details = temp_model.from_map(m['PromotionDetails'])
        return self


class GetPayAsYouGoPriceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: GetPayAsYouGoPriceResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(GetPayAsYouGoPriceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = GetPayAsYouGoPriceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class GetPayAsYouGoPriceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: GetPayAsYouGoPriceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(GetPayAsYouGoPriceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = GetPayAsYouGoPriceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetResourcePackagePriceRequest(TeaModel):
    def __init__(self, duration=None, effective_date=None, instance_id=None, order_type=None, owner_id=None,
                 package_type=None, pricing_cycle=None, product_code=None, specification=None):
        # The validity period of the resource plan. The value must be the same as the duration of the resource plan specified in the specifications.
        self.duration = duration  # type: int
        # The time when the resource plan takes effect. If you do not specify this parameter, the resource plan immediately takes effect by default. Specify the time in the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time must be in UTC.
        self.effective_date = effective_date  # type: str
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        # The type of the order. Valid values:
        # 
        # *   BUY: You place the order to purchase an instance.
        # *   UPGRADE: You place the order to upgrade an instance.
        # *   RENEW: You place the order to renew an instance.
        # 
        # Default value: BUY.
        self.order_type = order_type  # type: str
        self.owner_id = owner_id  # type: long
        # The type of the resource plan. The value must be the same as the value of the **ProductCode** parameter that is returned when you call the **DescribeResourcePackageProduct** operation.
        self.package_type = package_type  # type: str
        # The unit of validity period of the resource plan. Valid values:
        # 
        # *   Month
        # *   Year
        self.pricing_cycle = pricing_cycle  # type: str
        # The code of service. You can query the service code by calling the **QueryProductList** operation or viewing **Codes of Alibaba Cloud Services**.
        self.product_code = product_code  # type: str
        # The specifications of the resource plan.
        self.specification = specification  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetResourcePackagePriceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.duration is not None:
            result['Duration'] = self.duration
        if self.effective_date is not None:
            result['EffectiveDate'] = self.effective_date
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.order_type is not None:
            result['OrderType'] = self.order_type
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.package_type is not None:
            result['PackageType'] = self.package_type
        if self.pricing_cycle is not None:
            result['PricingCycle'] = self.pricing_cycle
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.specification is not None:
            result['Specification'] = self.specification
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Duration') is not None:
            self.duration = m.get('Duration')
        if m.get('EffectiveDate') is not None:
            self.effective_date = m.get('EffectiveDate')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('OrderType') is not None:
            self.order_type = m.get('OrderType')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('PackageType') is not None:
            self.package_type = m.get('PackageType')
        if m.get('PricingCycle') is not None:
            self.pricing_cycle = m.get('PricingCycle')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('Specification') is not None:
            self.specification = m.get('Specification')
        return self


class GetResourcePackagePriceResponseBodyDataPromotionsPromotion(TeaModel):
    def __init__(self, id=None, name=None):
        # The ID of the promotion.
        self.id = id  # type: long
        # The description of the discount.
        self.name = name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetResourcePackagePriceResponseBodyDataPromotionsPromotion, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.id is not None:
            result['Id'] = self.id
        if self.name is not None:
            result['Name'] = self.name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Id') is not None:
            self.id = m.get('Id')
        if m.get('Name') is not None:
            self.name = m.get('Name')
        return self


class GetResourcePackagePriceResponseBodyDataPromotions(TeaModel):
    def __init__(self, promotion=None):
        self.promotion = promotion  # type: list[GetResourcePackagePriceResponseBodyDataPromotionsPromotion]

    def validate(self):
        if self.promotion:
            for k in self.promotion:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(GetResourcePackagePriceResponseBodyDataPromotions, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Promotion'] = []
        if self.promotion is not None:
            for k in self.promotion:
                result['Promotion'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.promotion = []
        if m.get('Promotion') is not None:
            for k in m.get('Promotion'):
                temp_model = GetResourcePackagePriceResponseBodyDataPromotionsPromotion()
                self.promotion.append(temp_model.from_map(k))
        return self


class GetResourcePackagePriceResponseBodyData(TeaModel):
    def __init__(self, currency=None, discount_price=None, original_price=None, promotions=None, trade_price=None):
        # The type of the currency.
        self.currency = currency  # type: str
        # The discounted amount. Unit: CNY.
        self.discount_price = discount_price  # type: float
        # The original price. Unit: CNY.
        self.original_price = original_price  # type: float
        # The details of the discount.
        self.promotions = promotions  # type: GetResourcePackagePriceResponseBodyDataPromotions
        # The price at which the transaction is made. Unit: CNY.
        self.trade_price = trade_price  # type: float

    def validate(self):
        if self.promotions:
            self.promotions.validate()

    def to_map(self):
        _map = super(GetResourcePackagePriceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.discount_price is not None:
            result['DiscountPrice'] = self.discount_price
        if self.original_price is not None:
            result['OriginalPrice'] = self.original_price
        if self.promotions is not None:
            result['Promotions'] = self.promotions.to_map()
        if self.trade_price is not None:
            result['TradePrice'] = self.trade_price
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DiscountPrice') is not None:
            self.discount_price = m.get('DiscountPrice')
        if m.get('OriginalPrice') is not None:
            self.original_price = m.get('OriginalPrice')
        if m.get('Promotions') is not None:
            temp_model = GetResourcePackagePriceResponseBodyDataPromotions()
            self.promotions = temp_model.from_map(m['Promotions'])
        if m.get('TradePrice') is not None:
            self.trade_price = m.get('TradePrice')
        return self


class GetResourcePackagePriceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: GetResourcePackagePriceResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(GetResourcePackagePriceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = GetResourcePackagePriceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class GetResourcePackagePriceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: GetResourcePackagePriceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(GetResourcePackagePriceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = GetResourcePackagePriceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetSubscriptionPriceRequestModuleList(TeaModel):
    def __init__(self, config=None, module_code=None, module_status=None, tag=None):
        # The configurations of the Nth pricing module. Valid values of N: 1 to 50. Format: AA:aa,BB:bb. The values of AA and BB are the property IDs of the pricing module. The values of aa and bb are the property values of the pricing module.
        self.config = config  # type: str
        # The identifier of the Nth pricing module.
        self.module_code = module_code  # type: str
        # The status of the pricing module. This parameter is required only if the order type is Upgrade. Valid values:
        # 
        # *   1: adds one or more instances.
        # *   2: modifies the configurations of an instance. In the upgrade scenario, if the configurations of the pricing module change, you must specify this value for the parameter.
        # 
        # Default value: 1.
        self.module_status = module_status  # type: int
        # The tag of the specified resource. This parameter is required only if you upgrade or modify the configurations of an Alibaba Cloud service. For example, if you want to modify the configurations of a disk, you can use a tag to identify the ID of the disk.
        self.tag = tag  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetSubscriptionPriceRequestModuleList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.config is not None:
            result['Config'] = self.config
        if self.module_code is not None:
            result['ModuleCode'] = self.module_code
        if self.module_status is not None:
            result['ModuleStatus'] = self.module_status
        if self.tag is not None:
            result['Tag'] = self.tag
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Config') is not None:
            self.config = m.get('Config')
        if m.get('ModuleCode') is not None:
            self.module_code = m.get('ModuleCode')
        if m.get('ModuleStatus') is not None:
            self.module_status = m.get('ModuleStatus')
        if m.get('Tag') is not None:
            self.tag = m.get('Tag')
        return self


class GetSubscriptionPriceRequest(TeaModel):
    def __init__(self, instance_id=None, module_list=None, order_type=None, owner_id=None, product_code=None,
                 product_type=None, quantity=None, region=None, service_period_quantity=None, service_period_unit=None,
                 subscription_type=None):
        # The ID of the instance for which the price is queried. This parameter is required if you upgrade an instance. You can specify this parameter to obtain the pre-upgrade configurations of the instance.
        self.instance_id = instance_id  # type: str
        # The information about the pricing module.
        self.module_list = module_list  # type: list[GetSubscriptionPriceRequestModuleList]
        # The type of the order. Valid values:
        # 
        # *   NewOrder: purchases an instance of an Alibaba Cloud service.
        # *   Renewal: renews an instance of an Alibaba Cloud service.
        # *   Upgrade: upgrades an instance of an Alibaba Cloud service.
        self.order_type = order_type  # type: str
        self.owner_id = owner_id  # type: long
        # The code of the service. For more information about the service code, see **Codes of Alibaba Cloud Services**.
        self.product_code = product_code  # type: str
        # The type of the service. Specify the parameter based on the pricing document of the specific service.
        self.product_type = product_type  # type: str
        # The quantity.
        self.quantity = quantity  # type: int
        # The ID of the region in which the instance resides.
        self.region = region  # type: str
        # The service duration.
        self.service_period_quantity = service_period_quantity  # type: int
        # The unit of the service duration. Valid values:
        # 
        # *   Year
        # *   Month
        self.service_period_unit = service_period_unit  # type: str
        # The billing method. Set the value to Subscription.
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        if self.module_list:
            for k in self.module_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(GetSubscriptionPriceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        result['ModuleList'] = []
        if self.module_list is not None:
            for k in self.module_list:
                result['ModuleList'].append(k.to_map() if k else None)
        if self.order_type is not None:
            result['OrderType'] = self.order_type
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.quantity is not None:
            result['Quantity'] = self.quantity
        if self.region is not None:
            result['Region'] = self.region
        if self.service_period_quantity is not None:
            result['ServicePeriodQuantity'] = self.service_period_quantity
        if self.service_period_unit is not None:
            result['ServicePeriodUnit'] = self.service_period_unit
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        self.module_list = []
        if m.get('ModuleList') is not None:
            for k in m.get('ModuleList'):
                temp_model = GetSubscriptionPriceRequestModuleList()
                self.module_list.append(temp_model.from_map(k))
        if m.get('OrderType') is not None:
            self.order_type = m.get('OrderType')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('Quantity') is not None:
            self.quantity = m.get('Quantity')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ServicePeriodQuantity') is not None:
            self.service_period_quantity = m.get('ServicePeriodQuantity')
        if m.get('ServicePeriodUnit') is not None:
            self.service_period_unit = m.get('ServicePeriodUnit')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class GetSubscriptionPriceResponseBodyDataModuleDetailsModuleDetail(TeaModel):
    def __init__(self, cost_after_discount=None, invoice_discount=None, module_code=None, original_cost=None,
                 unit_price=None):
        # The discount price.
        self.cost_after_discount = cost_after_discount  # type: float
        # The discount that was applied.
        self.invoice_discount = invoice_discount  # type: float
        # The identifier of the pricing module.
        self.module_code = module_code  # type: str
        # The original price of the service.
        self.original_cost = original_cost  # type: float
        # The unit price.
        self.unit_price = unit_price  # type: float

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetSubscriptionPriceResponseBodyDataModuleDetailsModuleDetail, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.cost_after_discount is not None:
            result['CostAfterDiscount'] = self.cost_after_discount
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.module_code is not None:
            result['ModuleCode'] = self.module_code
        if self.original_cost is not None:
            result['OriginalCost'] = self.original_cost
        if self.unit_price is not None:
            result['UnitPrice'] = self.unit_price
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CostAfterDiscount') is not None:
            self.cost_after_discount = m.get('CostAfterDiscount')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('ModuleCode') is not None:
            self.module_code = m.get('ModuleCode')
        if m.get('OriginalCost') is not None:
            self.original_cost = m.get('OriginalCost')
        if m.get('UnitPrice') is not None:
            self.unit_price = m.get('UnitPrice')
        return self


class GetSubscriptionPriceResponseBodyDataModuleDetails(TeaModel):
    def __init__(self, module_detail=None):
        self.module_detail = module_detail  # type: list[GetSubscriptionPriceResponseBodyDataModuleDetailsModuleDetail]

    def validate(self):
        if self.module_detail:
            for k in self.module_detail:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(GetSubscriptionPriceResponseBodyDataModuleDetails, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['ModuleDetail'] = []
        if self.module_detail is not None:
            for k in self.module_detail:
                result['ModuleDetail'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.module_detail = []
        if m.get('ModuleDetail') is not None:
            for k in m.get('ModuleDetail'):
                temp_model = GetSubscriptionPriceResponseBodyDataModuleDetailsModuleDetail()
                self.module_detail.append(temp_model.from_map(k))
        return self


class GetSubscriptionPriceResponseBodyDataPromotionDetailsPromotionDetail(TeaModel):
    def __init__(self, promotion_desc=None, promotion_id=None, promotion_name=None):
        # The description of the discount.
        self.promotion_desc = promotion_desc  # type: str
        # The ID of the discount.
        self.promotion_id = promotion_id  # type: long
        # The name of the discount.
        self.promotion_name = promotion_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetSubscriptionPriceResponseBodyDataPromotionDetailsPromotionDetail, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.promotion_desc is not None:
            result['PromotionDesc'] = self.promotion_desc
        if self.promotion_id is not None:
            result['PromotionId'] = self.promotion_id
        if self.promotion_name is not None:
            result['PromotionName'] = self.promotion_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('PromotionDesc') is not None:
            self.promotion_desc = m.get('PromotionDesc')
        if m.get('PromotionId') is not None:
            self.promotion_id = m.get('PromotionId')
        if m.get('PromotionName') is not None:
            self.promotion_name = m.get('PromotionName')
        return self


class GetSubscriptionPriceResponseBodyDataPromotionDetails(TeaModel):
    def __init__(self, promotion_detail=None):
        self.promotion_detail = promotion_detail  # type: list[GetSubscriptionPriceResponseBodyDataPromotionDetailsPromotionDetail]

    def validate(self):
        if self.promotion_detail:
            for k in self.promotion_detail:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(GetSubscriptionPriceResponseBodyDataPromotionDetails, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['PromotionDetail'] = []
        if self.promotion_detail is not None:
            for k in self.promotion_detail:
                result['PromotionDetail'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.promotion_detail = []
        if m.get('PromotionDetail') is not None:
            for k in m.get('PromotionDetail'):
                temp_model = GetSubscriptionPriceResponseBodyDataPromotionDetailsPromotionDetail()
                self.promotion_detail.append(temp_model.from_map(k))
        return self


class GetSubscriptionPriceResponseBodyData(TeaModel):
    def __init__(self, currency=None, discount_price=None, module_details=None, original_price=None,
                 promotion_details=None, quantity=None, trade_price=None):
        # The type of currency. Valid values:
        # 
        # *   CNY: Chinese Yuan
        # *   USD: US dollar
        # *   JPY: Japanese Yen
        self.currency = currency  # type: str
        # The discount that was applied.
        self.discount_price = discount_price  # type: float
        # The price details of the pricing module.
        self.module_details = module_details  # type: GetSubscriptionPriceResponseBodyDataModuleDetails
        # The original price of the service.
        self.original_price = original_price  # type: float
        # The details of the discount.
        self.promotion_details = promotion_details  # type: GetSubscriptionPriceResponseBodyDataPromotionDetails
        # The quantity.
        self.quantity = quantity  # type: int
        # The discount price.
        self.trade_price = trade_price  # type: float

    def validate(self):
        if self.module_details:
            self.module_details.validate()
        if self.promotion_details:
            self.promotion_details.validate()

    def to_map(self):
        _map = super(GetSubscriptionPriceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.discount_price is not None:
            result['DiscountPrice'] = self.discount_price
        if self.module_details is not None:
            result['ModuleDetails'] = self.module_details.to_map()
        if self.original_price is not None:
            result['OriginalPrice'] = self.original_price
        if self.promotion_details is not None:
            result['PromotionDetails'] = self.promotion_details.to_map()
        if self.quantity is not None:
            result['Quantity'] = self.quantity
        if self.trade_price is not None:
            result['TradePrice'] = self.trade_price
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DiscountPrice') is not None:
            self.discount_price = m.get('DiscountPrice')
        if m.get('ModuleDetails') is not None:
            temp_model = GetSubscriptionPriceResponseBodyDataModuleDetails()
            self.module_details = temp_model.from_map(m['ModuleDetails'])
        if m.get('OriginalPrice') is not None:
            self.original_price = m.get('OriginalPrice')
        if m.get('PromotionDetails') is not None:
            temp_model = GetSubscriptionPriceResponseBodyDataPromotionDetails()
            self.promotion_details = temp_model.from_map(m['PromotionDetails'])
        if m.get('Quantity') is not None:
            self.quantity = m.get('Quantity')
        if m.get('TradePrice') is not None:
            self.trade_price = m.get('TradePrice')
        return self


class GetSubscriptionPriceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The information about the service price.
        self.data = data  # type: GetSubscriptionPriceResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(GetSubscriptionPriceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = GetSubscriptionPriceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class GetSubscriptionPriceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: GetSubscriptionPriceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(GetSubscriptionPriceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = GetSubscriptionPriceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class InquiryPriceRefundInstanceRequest(TeaModel):
    def __init__(self, client_token=None, instance_id=None, product_code=None, product_type=None):
        # This parameter is required for scenarios that need idempotence. The UUID that is used to ensure the idempotence of the request.
        self.client_token = client_token  # type: str
        # The ID of the instance. This parameter is required for unsubscription scenarios.
        self.instance_id = instance_id  # type: str
        # The code of the service. This parameter is required for unsubscription scenarios.
        self.product_code = product_code  # type: str
        # The type of the service. This parameter is required for unsubscription scenarios. Unless otherwise specified, set this parameter to an empty string.
        self.product_type = product_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(InquiryPriceRefundInstanceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        return self


class InquiryPriceRefundInstanceResponseBodyData(TeaModel):
    def __init__(self, currency=None, host_id=None, instance_id=None, refund_amount=None):
        # The currency.
        self.currency = currency  # type: str
        # The site of the execution host.
        self.host_id = host_id  # type: str
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        # The refundable amount.
        self.refund_amount = refund_amount  # type: float

    def validate(self):
        pass

    def to_map(self):
        _map = super(InquiryPriceRefundInstanceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.host_id is not None:
            result['HostId'] = self.host_id
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.refund_amount is not None:
            result['RefundAmount'] = self.refund_amount
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('RefundAmount') is not None:
            self.refund_amount = m.get('RefundAmount')
        return self


class InquiryPriceRefundInstanceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The HTTP status code.
        self.code = code  # type: str
        # data
        self.data = data  # type: InquiryPriceRefundInstanceResponseBodyData
        # The description of the execution result.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful. Valid values: true and false.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(InquiryPriceRefundInstanceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = InquiryPriceRefundInstanceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class InquiryPriceRefundInstanceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: InquiryPriceRefundInstanceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(InquiryPriceRefundInstanceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = InquiryPriceRefundInstanceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ModifyAccountRelationRequest(TeaModel):
    def __init__(self, child_nick=None, child_user_id=None, parent_user_id=None, permission_codes=None,
                 relation_id=None, relation_operation=None, relation_type=None, request_id=None, role_codes=None):
        # The display name of the member. This helps clarify the scenario in which the account is used.
        self.child_nick = child_nick  # type: str
        # The ID of the Alibaba Cloud account that is used as the member.
        self.child_user_id = child_user_id  # type: long
        # The ID of the Alibaba Cloud account that is used as the management account.
        self.parent_user_id = parent_user_id  # type: long
        # The permissions that can be modified. Valid values:
        # 
        # *   SYNCHRONIZE_FINANCE_IDENTITY: allows the credit control identity to be shared with the member.
        # *   SYNCHRONIZE_FINANCE_DISCOUNT_POLICY_TO_TARGET: allows the discount policy to be shared with the member.
        # *   FORBID_WITHDRAW_CASH: does not allow the member to withdraw the balance.
        # *   FORBID_MANAGE_INVOICE: does not allow the member to manage invoices.
        # *   CHECK_FINANCE_INFO: requests to view information about the financial relationship.
        # *   MANAGE_TARGET_INVOICE: allows the member to manage invoices.
        # *   CHECK_TARGET_CONSUMPTION: allows the member to view the bills.
        self.permission_codes = permission_codes  # type: list[str]
        # The ID of the financial relationship. Set this parameter to the value of the relationId response parameter returned by calling the QueryRelationList operation.
        self.relation_id = relation_id  # type: long
        # The operation to be performed. Valid values:
        # 
        # *   ADD
        # *   DELETE
        self.relation_operation = relation_operation  # type: str
        # The type of the financial relationship. Set the value to enterprise_group.
        self.relation_type = relation_type  # type: str
        # The unique ID of the request. The ID is used to mark a request and troubleshoot a problem.
        self.request_id = request_id  # type: str
        # The roles that can be assigned to the member. You cannot modify the roles.
        self.role_codes = role_codes  # type: list[str]

    def validate(self):
        pass

    def to_map(self):
        _map = super(ModifyAccountRelationRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.child_nick is not None:
            result['ChildNick'] = self.child_nick
        if self.child_user_id is not None:
            result['ChildUserId'] = self.child_user_id
        if self.parent_user_id is not None:
            result['ParentUserId'] = self.parent_user_id
        if self.permission_codes is not None:
            result['PermissionCodes'] = self.permission_codes
        if self.relation_id is not None:
            result['RelationId'] = self.relation_id
        if self.relation_operation is not None:
            result['RelationOperation'] = self.relation_operation
        if self.relation_type is not None:
            result['RelationType'] = self.relation_type
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.role_codes is not None:
            result['RoleCodes'] = self.role_codes
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ChildNick') is not None:
            self.child_nick = m.get('ChildNick')
        if m.get('ChildUserId') is not None:
            self.child_user_id = m.get('ChildUserId')
        if m.get('ParentUserId') is not None:
            self.parent_user_id = m.get('ParentUserId')
        if m.get('PermissionCodes') is not None:
            self.permission_codes = m.get('PermissionCodes')
        if m.get('RelationId') is not None:
            self.relation_id = m.get('RelationId')
        if m.get('RelationOperation') is not None:
            self.relation_operation = m.get('RelationOperation')
        if m.get('RelationType') is not None:
            self.relation_type = m.get('RelationType')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('RoleCodes') is not None:
            self.role_codes = m.get('RoleCodes')
        return self


class ModifyAccountRelationResponseBodyData(TeaModel):
    def __init__(self, host_id=None):
        # HostId
        self.host_id = host_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ModifyAccountRelationResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        return self


class ModifyAccountRelationResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: ModifyAccountRelationResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The unique ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(ModifyAccountRelationResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = ModifyAccountRelationResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class ModifyAccountRelationResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: ModifyAccountRelationResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(ModifyAccountRelationResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = ModifyAccountRelationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ModifyCostUnitRequestUnitEntityList(TeaModel):
    def __init__(self, new_unit_name=None, owner_uid=None, unit_id=None):
        # The new name of the cost center.
        self.new_unit_name = new_unit_name  # type: str
        # The user ID of the cost center owner.
        self.owner_uid = owner_uid  # type: long
        # The ID of the cost center.
        self.unit_id = unit_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(ModifyCostUnitRequestUnitEntityList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.new_unit_name is not None:
            result['NewUnitName'] = self.new_unit_name
        if self.owner_uid is not None:
            result['OwnerUid'] = self.owner_uid
        if self.unit_id is not None:
            result['UnitId'] = self.unit_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('NewUnitName') is not None:
            self.new_unit_name = m.get('NewUnitName')
        if m.get('OwnerUid') is not None:
            self.owner_uid = m.get('OwnerUid')
        if m.get('UnitId') is not None:
            self.unit_id = m.get('UnitId')
        return self


class ModifyCostUnitRequest(TeaModel):
    def __init__(self, unit_entity_list=None):
        # The cost centers to be modified.
        self.unit_entity_list = unit_entity_list  # type: list[ModifyCostUnitRequestUnitEntityList]

    def validate(self):
        if self.unit_entity_list:
            for k in self.unit_entity_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(ModifyCostUnitRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['UnitEntityList'] = []
        if self.unit_entity_list is not None:
            for k in self.unit_entity_list:
                result['UnitEntityList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.unit_entity_list = []
        if m.get('UnitEntityList') is not None:
            for k in m.get('UnitEntityList'):
                temp_model = ModifyCostUnitRequestUnitEntityList()
                self.unit_entity_list.append(temp_model.from_map(k))
        return self


class ModifyCostUnitResponseBodyData(TeaModel):
    def __init__(self, is_success=None, owner_uid=None, unit_id=None):
        # Indicates whether the cost center was modified.
        self.is_success = is_success  # type: bool
        # The user ID of the cost center owner.
        self.owner_uid = owner_uid  # type: long
        # The ID of the cost center.
        self.unit_id = unit_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(ModifyCostUnitResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.is_success is not None:
            result['IsSuccess'] = self.is_success
        if self.owner_uid is not None:
            result['OwnerUid'] = self.owner_uid
        if self.unit_id is not None:
            result['UnitId'] = self.unit_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('IsSuccess') is not None:
            self.is_success = m.get('IsSuccess')
        if m.get('OwnerUid') is not None:
            self.owner_uid = m.get('OwnerUid')
        if m.get('UnitId') is not None:
            self.unit_id = m.get('UnitId')
        return self


class ModifyCostUnitResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: list[ModifyCostUnitResponseBodyData]
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the call was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            for k in self.data:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(ModifyCostUnitResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        result['Data'] = []
        if self.data is not None:
            for k in self.data:
                result['Data'].append(k.to_map() if k else None)
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        self.data = []
        if m.get('Data') is not None:
            for k in m.get('Data'):
                temp_model = ModifyCostUnitResponseBodyData()
                self.data.append(temp_model.from_map(k))
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class ModifyCostUnitResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: ModifyCostUnitResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(ModifyCostUnitResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = ModifyCostUnitResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ModifyInstanceRequestParameter(TeaModel):
    def __init__(self, code=None, value=None):
        # The code of the parameter n. Valid values of n: 1 to 100. Multiple parameters are concatenated in the order of n.
        # 
        # >  Only the parameters of the attributes that you want to modify for the instance must be configured. For example, if the instance has Attribute A and Attribute B and only Attribute A must be modified, configure only the parameter of Attribute A.
        self.code = code  # type: str
        # The value of the parameter n. Valid values of n: 1 to 100.
        self.value = value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ModifyInstanceRequestParameter, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.value is not None:
            result['Value'] = self.value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Value') is not None:
            self.value = m.get('Value')
        return self


class ModifyInstanceRequest(TeaModel):
    def __init__(self, client_token=None, instance_id=None, modify_type=None, owner_id=None, parameter=None,
                 product_code=None, product_type=None, subscription_type=None):
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests.
        self.client_token = client_token  # type: str
        # The ID of the instance for which you want to modify the configurations.
        self.instance_id = instance_id  # type: str
        # The type of configuration modifications. Valid values:
        # 
        # *   Upgrade: upgrades the configurations of the instance.
        # *   Downgrade: downgrades the configurations of the instance.
        self.modify_type = modify_type  # type: str
        self.owner_id = owner_id  # type: long
        # The details about the parameters.
        self.parameter = parameter  # type: list[ModifyInstanceRequestParameter]
        # The code of the service to which the instance belongs.
        self.product_code = product_code  # type: str
        # The type of the service to which the instance belongs.
        self.product_type = product_type  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: subscription
        # *   PayAsYouGo: pay-as-you-go
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        if self.parameter:
            for k in self.parameter:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(ModifyInstanceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.modify_type is not None:
            result['ModifyType'] = self.modify_type
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        result['Parameter'] = []
        if self.parameter is not None:
            for k in self.parameter:
                result['Parameter'].append(k.to_map() if k else None)
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('ModifyType') is not None:
            self.modify_type = m.get('ModifyType')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        self.parameter = []
        if m.get('Parameter') is not None:
            for k in m.get('Parameter'):
                temp_model = ModifyInstanceRequestParameter()
                self.parameter.append(temp_model.from_map(k))
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class ModifyInstanceResponseBodyData(TeaModel):
    def __init__(self, host_id=None, order_id=None):
        # The ID of the host.
        self.host_id = host_id  # type: str
        # The ID of the order that was created.
        self.order_id = order_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ModifyInstanceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        return self


class ModifyInstanceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: ModifyInstanceResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(ModifyInstanceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = ModifyInstanceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class ModifyInstanceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: ModifyInstanceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(ModifyInstanceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = ModifyInstanceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryAccountBalanceResponseBodyData(TeaModel):
    def __init__(self, available_amount=None, available_cash_amount=None, credit_amount=None, currency=None,
                 mybank_credit_amount=None):
        # The available balance of the account.
        self.available_amount = available_amount  # type: str
        # The available balance in cash.
        self.available_cash_amount = available_cash_amount  # type: str
        # The credit balance of the account.
        self.credit_amount = credit_amount  # type: str
        # The type of the currency. Valid values:
        # 
        # *   CNY: Chinese Yuan
        # *   USD: US dollar
        # *   JPY: Japanese Yen
        self.currency = currency  # type: str
        # The credit line controlled by MYbank.
        self.mybank_credit_amount = mybank_credit_amount  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryAccountBalanceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.available_amount is not None:
            result['AvailableAmount'] = self.available_amount
        if self.available_cash_amount is not None:
            result['AvailableCashAmount'] = self.available_cash_amount
        if self.credit_amount is not None:
            result['CreditAmount'] = self.credit_amount
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.mybank_credit_amount is not None:
            result['MybankCreditAmount'] = self.mybank_credit_amount
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AvailableAmount') is not None:
            self.available_amount = m.get('AvailableAmount')
        if m.get('AvailableCashAmount') is not None:
            self.available_cash_amount = m.get('AvailableCashAmount')
        if m.get('CreditAmount') is not None:
            self.credit_amount = m.get('CreditAmount')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('MybankCreditAmount') is not None:
            self.mybank_credit_amount = m.get('MybankCreditAmount')
        return self


class QueryAccountBalanceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryAccountBalanceResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryAccountBalanceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryAccountBalanceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryAccountBalanceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryAccountBalanceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryAccountBalanceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryAccountBalanceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryAccountBillRequest(TeaModel):
    def __init__(self, bill_owner_id=None, billing_cycle=None, billing_date=None, granularity=None,
                 is_group_by_product=None, owner_id=None, page_num=None, page_size=None, product_code=None):
        # The ID of the member. If you specify a value for this parameter, you can query the bills of the specified member. If you leave this parameter empty, the bills of the current account are queried by default.
        self.bill_owner_id = bill_owner_id  # type: long
        # The billing cycle. Format: YYYY-MM.
        self.billing_cycle = billing_cycle  # type: str
        # The billing date. This parameter is required only if the Granularity parameter is set to DAILY. Format: YYYY-MM-DD.
        self.billing_date = billing_date  # type: str
        # The granularity at which bills are queried. Valid values:
        # 
        # *   MONTHLY: queries bills by month. The data queried is consistent with the data that is displayed for the specified billing cycle on the Billing Details tab of the Bill Details page in User Center.
        # *   DAILY: queries bills by day. The data queried is consistent with the data that is displayed for the specified day on the Billing Details tab of the Bill Details page in User Center.
        # 
        # You must set the BillingDate parameter before you can set the Granularity parameter to DAILY.
        self.granularity = granularity  # type: str
        # Specifies whether to summarize bills based on service codes. Valid values:
        # 
        # *   true: summarizes bills based on service codes.
        # *   false: does not summarize bills based on service codes.
        # 
        # Default value: false.
        self.is_group_by_product = is_group_by_product  # type: bool
        self.owner_id = owner_id  # type: long
        # The number of the page to return. Default value: 1.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page. Default value: 20. Maximum value: 300.
        self.page_size = page_size  # type: int
        # The code of the service.
        self.product_code = product_code  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryAccountBillRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.billing_date is not None:
            result['BillingDate'] = self.billing_date
        if self.granularity is not None:
            result['Granularity'] = self.granularity
        if self.is_group_by_product is not None:
            result['IsGroupByProduct'] = self.is_group_by_product
        if self.owner_id is not None:
            result['OwnerID'] = self.owner_id
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('BillingDate') is not None:
            self.billing_date = m.get('BillingDate')
        if m.get('Granularity') is not None:
            self.granularity = m.get('Granularity')
        if m.get('IsGroupByProduct') is not None:
            self.is_group_by_product = m.get('IsGroupByProduct')
        if m.get('OwnerID') is not None:
            self.owner_id = m.get('OwnerID')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        return self


class QueryAccountBillResponseBodyDataItemsItem(TeaModel):
    def __init__(self, adjust_amount=None, bill_account_id=None, bill_account_name=None, billing_date=None,
                 biz_type=None, cash_amount=None, cost_unit=None, currency=None, deducted_by_cash_coupons=None,
                 deducted_by_coupons=None, deducted_by_prepaid_card=None, invoice_discount=None, outstanding_amount=None,
                 owner_id=None, owner_name=None, payment_amount=None, pip_code=None, pretax_amount=None,
                 pretax_gross_amount=None, product_code=None, product_name=None, subscription_type=None):
        # The amount deducted by using credit refunds.
        self.adjust_amount = adjust_amount  # type: float
        # The ID of the account to which the bill belongs.
        self.bill_account_id = bill_account_id  # type: str
        # The name of the account to which the bill belongs.
        self.bill_account_name = bill_account_name  # type: str
        # The billing date.
        self.billing_date = billing_date  # type: str
        # The business type.
        self.biz_type = biz_type  # type: str
        # The amount paid in cash. The amount that was deducted by using credit refunds is not included.
        self.cash_amount = cash_amount  # type: float
        # The cost center.
        self.cost_unit = cost_unit  # type: str
        # The type of the currency. Valid values:
        # 
        # *   CNY
        # *   USD
        # *   JPY
        self.currency = currency  # type: str
        # The amount deducted by using vouchers.
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: float
        # The amount deducted by using coupons.
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        # The amount deducted by using prepaid cards.
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: float
        # The discount amount.
        self.invoice_discount = invoice_discount  # type: float
        # The unsettled amount or the amount settled with credits.
        self.outstanding_amount = outstanding_amount  # type: float
        # The ID of the member.
        self.owner_id = owner_id  # type: str
        # The name of the member.
        self.owner_name = owner_name  # type: str
        # The amount paid in cash. The amount that was deducted by using credit refunds is included.
        self.payment_amount = payment_amount  # type: float
        # The code of the service. The service code is consistent with that displayed in User Center.
        self.pip_code = pip_code  # type: str
        # The pretax amount.
        self.pretax_amount = pretax_amount  # type: float
        # The pretax gross amount.
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        # The code of the service.
        # 
        # >A value is returned only if the **IsGroupByProduct** parameter is set to true.
        self.product_code = product_code  # type: str
        # The name of the service.
        # 
        # > A value is returned only if the **IsGroupByProduct** parameter is set to true.
        self.product_name = product_name  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: the subscription billing method
        # *   PayAsYouGo: the pay-as-you-go billing method
        # 
        # > A value is returned only if the IsGroupByProduct parameter is set to true.
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryAccountBillResponseBodyDataItemsItem, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.adjust_amount is not None:
            result['AdjustAmount'] = self.adjust_amount
        if self.bill_account_id is not None:
            result['BillAccountID'] = self.bill_account_id
        if self.bill_account_name is not None:
            result['BillAccountName'] = self.bill_account_name
        if self.billing_date is not None:
            result['BillingDate'] = self.billing_date
        if self.biz_type is not None:
            result['BizType'] = self.biz_type
        if self.cash_amount is not None:
            result['CashAmount'] = self.cash_amount
        if self.cost_unit is not None:
            result['CostUnit'] = self.cost_unit
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.outstanding_amount is not None:
            result['OutstandingAmount'] = self.outstanding_amount
        if self.owner_id is not None:
            result['OwnerID'] = self.owner_id
        if self.owner_name is not None:
            result['OwnerName'] = self.owner_name
        if self.payment_amount is not None:
            result['PaymentAmount'] = self.payment_amount
        if self.pip_code is not None:
            result['PipCode'] = self.pip_code
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AdjustAmount') is not None:
            self.adjust_amount = m.get('AdjustAmount')
        if m.get('BillAccountID') is not None:
            self.bill_account_id = m.get('BillAccountID')
        if m.get('BillAccountName') is not None:
            self.bill_account_name = m.get('BillAccountName')
        if m.get('BillingDate') is not None:
            self.billing_date = m.get('BillingDate')
        if m.get('BizType') is not None:
            self.biz_type = m.get('BizType')
        if m.get('CashAmount') is not None:
            self.cash_amount = m.get('CashAmount')
        if m.get('CostUnit') is not None:
            self.cost_unit = m.get('CostUnit')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('OutstandingAmount') is not None:
            self.outstanding_amount = m.get('OutstandingAmount')
        if m.get('OwnerID') is not None:
            self.owner_id = m.get('OwnerID')
        if m.get('OwnerName') is not None:
            self.owner_name = m.get('OwnerName')
        if m.get('PaymentAmount') is not None:
            self.payment_amount = m.get('PaymentAmount')
        if m.get('PipCode') is not None:
            self.pip_code = m.get('PipCode')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class QueryAccountBillResponseBodyDataItems(TeaModel):
    def __init__(self, item=None):
        self.item = item  # type: list[QueryAccountBillResponseBodyDataItemsItem]

    def validate(self):
        if self.item:
            for k in self.item:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryAccountBillResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Item'] = []
        if self.item is not None:
            for k in self.item:
                result['Item'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.item = []
        if m.get('Item') is not None:
            for k in m.get('Item'):
                temp_model = QueryAccountBillResponseBodyDataItemsItem()
                self.item.append(temp_model.from_map(k))
        return self


class QueryAccountBillResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, billing_cycle=None, items=None, page_num=None,
                 page_size=None, total_count=None):
        # The ID of your Alibaba Cloud account.
        self.account_id = account_id  # type: str
        # The name of the Alibaba Cloud account.
        self.account_name = account_name  # type: str
        # The billing cycle. Format: YYYY-MM.
        self.billing_cycle = billing_cycle  # type: str
        # The details of the bills.
        self.items = items  # type: QueryAccountBillResponseBodyDataItems
        # The page number of the returned page.
        self.page_num = page_num  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The total number of returned entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            self.items.validate()

    def to_map(self):
        _map = super(QueryAccountBillResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.items is not None:
            result['Items'] = self.items.to_map()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('Items') is not None:
            temp_model = QueryAccountBillResponseBodyDataItems()
            self.items = temp_model.from_map(m['Items'])
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryAccountBillResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryAccountBillResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryAccountBillResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryAccountBillResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryAccountBillResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryAccountBillResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryAccountBillResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryAccountBillResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryAccountTransactionDetailsRequest(TeaModel):
    def __init__(self, create_time_end=None, create_time_start=None, max_results=None, next_token=None,
                 record_id=None, transaction_channel=None, transaction_channel_sn=None, transaction_number=None,
                 transaction_type=None):
        # The end of the creation time range to query.
        self.create_time_end = create_time_end  # type: str
        # The beginning of the creation time range to query.
        self.create_time_start = create_time_start  # type: str
        # This parameter is invalid.
        self.max_results = max_results  # type: int
        # The token that is used for paging.
        self.next_token = next_token  # type: str
        # The ID of the order or bill.
        self.record_id = record_id  # type: str
        # The transaction channel.
        self.transaction_channel = transaction_channel  # type: str
        # The serial number of the transaction channel.
        self.transaction_channel_sn = transaction_channel_sn  # type: str
        # The number of the transaction.
        self.transaction_number = transaction_number  # type: str
        # The type of the transaction.
        self.transaction_type = transaction_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryAccountTransactionDetailsRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time_end is not None:
            result['CreateTimeEnd'] = self.create_time_end
        if self.create_time_start is not None:
            result['CreateTimeStart'] = self.create_time_start
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.record_id is not None:
            result['RecordID'] = self.record_id
        if self.transaction_channel is not None:
            result['TransactionChannel'] = self.transaction_channel
        if self.transaction_channel_sn is not None:
            result['TransactionChannelSN'] = self.transaction_channel_sn
        if self.transaction_number is not None:
            result['TransactionNumber'] = self.transaction_number
        if self.transaction_type is not None:
            result['TransactionType'] = self.transaction_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CreateTimeEnd') is not None:
            self.create_time_end = m.get('CreateTimeEnd')
        if m.get('CreateTimeStart') is not None:
            self.create_time_start = m.get('CreateTimeStart')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('RecordID') is not None:
            self.record_id = m.get('RecordID')
        if m.get('TransactionChannel') is not None:
            self.transaction_channel = m.get('TransactionChannel')
        if m.get('TransactionChannelSN') is not None:
            self.transaction_channel_sn = m.get('TransactionChannelSN')
        if m.get('TransactionNumber') is not None:
            self.transaction_number = m.get('TransactionNumber')
        if m.get('TransactionType') is not None:
            self.transaction_type = m.get('TransactionType')
        return self


class QueryAccountTransactionDetailsResponseBodyDataAccountTransactionsListAccountTransactionsList(TeaModel):
    def __init__(self, amount=None, balance=None, billing_cycle=None, fund_type=None, record_id=None, remarks=None,
                 transaction_account=None, transaction_channel=None, transaction_channel_sn=None, transaction_flow=None,
                 transaction_number=None, transaction_time=None, transaction_type=None):
        # The amount of the transaction.
        self.amount = amount  # type: str
        # The balance of the account.
        self.balance = balance  # type: str
        # The billing cycle.
        self.billing_cycle = billing_cycle  # type: str
        # The type of transaction payment. Valid values:
        # 
        # Cash: pay for the transaction in cash. Deposit: pay for the transaction with deposit. RegularBankCreditRefund: pay for the transaction with credit refund controlled by a bank. DirectPay: directly pay for the transaction.
        self.fund_type = fund_type  # type: str
        # The ID of the order or bill.
        self.record_id = record_id  # type: str
        # The remarks.
        self.remarks = remarks  # type: str
        # The transaction account.
        self.transaction_account = transaction_account  # type: str
        # The transaction channel.
        self.transaction_channel = transaction_channel  # type: str
        # The serial number of the transaction channel.
        self.transaction_channel_sn = transaction_channel_sn  # type: str
        # Indicates whether the transaction is of the income type or the expenditure type. If one of the following types is specified, results for the specific type are returned. If the type that you specified for the parameter does not belong to the following types, no result is returned. If the parameter is left empty, results for transactions of the income and expenditure types are all returned. Valid values:
        # 
        # Income and Expense.
        self.transaction_flow = transaction_flow  # type: str
        # The number of the transaction.
        self.transaction_number = transaction_number  # type: str
        # The time when the transaction was made.
        self.transaction_time = transaction_time  # type: str
        # The type of the transaction. If one of the following transaction types is specified, results for the specified transaction type are returned. If the transaction type that you specified does not belong to the following transaction types, no result is returned. If the parameter is left empty, results for all transaction types are returned. Valid values:
        # 
        # Payment, Withdraw, Refund, Consumption, Transfer, and Adjust.
        self.transaction_type = transaction_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryAccountTransactionDetailsResponseBodyDataAccountTransactionsListAccountTransactionsList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.amount is not None:
            result['Amount'] = self.amount
        if self.balance is not None:
            result['Balance'] = self.balance
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.fund_type is not None:
            result['FundType'] = self.fund_type
        if self.record_id is not None:
            result['RecordID'] = self.record_id
        if self.remarks is not None:
            result['Remarks'] = self.remarks
        if self.transaction_account is not None:
            result['TransactionAccount'] = self.transaction_account
        if self.transaction_channel is not None:
            result['TransactionChannel'] = self.transaction_channel
        if self.transaction_channel_sn is not None:
            result['TransactionChannelSN'] = self.transaction_channel_sn
        if self.transaction_flow is not None:
            result['TransactionFlow'] = self.transaction_flow
        if self.transaction_number is not None:
            result['TransactionNumber'] = self.transaction_number
        if self.transaction_time is not None:
            result['TransactionTime'] = self.transaction_time
        if self.transaction_type is not None:
            result['TransactionType'] = self.transaction_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Amount') is not None:
            self.amount = m.get('Amount')
        if m.get('Balance') is not None:
            self.balance = m.get('Balance')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('FundType') is not None:
            self.fund_type = m.get('FundType')
        if m.get('RecordID') is not None:
            self.record_id = m.get('RecordID')
        if m.get('Remarks') is not None:
            self.remarks = m.get('Remarks')
        if m.get('TransactionAccount') is not None:
            self.transaction_account = m.get('TransactionAccount')
        if m.get('TransactionChannel') is not None:
            self.transaction_channel = m.get('TransactionChannel')
        if m.get('TransactionChannelSN') is not None:
            self.transaction_channel_sn = m.get('TransactionChannelSN')
        if m.get('TransactionFlow') is not None:
            self.transaction_flow = m.get('TransactionFlow')
        if m.get('TransactionNumber') is not None:
            self.transaction_number = m.get('TransactionNumber')
        if m.get('TransactionTime') is not None:
            self.transaction_time = m.get('TransactionTime')
        if m.get('TransactionType') is not None:
            self.transaction_type = m.get('TransactionType')
        return self


class QueryAccountTransactionDetailsResponseBodyDataAccountTransactionsList(TeaModel):
    def __init__(self, account_transactions_list=None):
        self.account_transactions_list = account_transactions_list  # type: list[QueryAccountTransactionDetailsResponseBodyDataAccountTransactionsListAccountTransactionsList]

    def validate(self):
        if self.account_transactions_list:
            for k in self.account_transactions_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryAccountTransactionDetailsResponseBodyDataAccountTransactionsList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['AccountTransactionsList'] = []
        if self.account_transactions_list is not None:
            for k in self.account_transactions_list:
                result['AccountTransactionsList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.account_transactions_list = []
        if m.get('AccountTransactionsList') is not None:
            for k in m.get('AccountTransactionsList'):
                temp_model = QueryAccountTransactionDetailsResponseBodyDataAccountTransactionsListAccountTransactionsList()
                self.account_transactions_list.append(temp_model.from_map(k))
        return self


class QueryAccountTransactionDetailsResponseBodyData(TeaModel):
    def __init__(self, account_name=None, account_transactions_list=None, max_results=None, next_token=None,
                 total_count=None):
        # The name of the account.
        self.account_name = account_name  # type: str
        # The details of the transactions within the account.
        self.account_transactions_list = account_transactions_list  # type: QueryAccountTransactionDetailsResponseBodyDataAccountTransactionsList
        # This parameter is invalid.
        self.max_results = max_results  # type: int
        # The token that is used for paging.
        self.next_token = next_token  # type: str
        # The total number of entries returned.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.account_transactions_list:
            self.account_transactions_list.validate()

    def to_map(self):
        _map = super(QueryAccountTransactionDetailsResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        if self.account_transactions_list is not None:
            result['AccountTransactionsList'] = self.account_transactions_list.to_map()
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        if m.get('AccountTransactionsList') is not None:
            temp_model = QueryAccountTransactionDetailsResponseBodyDataAccountTransactionsList()
            self.account_transactions_list = temp_model.from_map(m['AccountTransactionsList'])
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryAccountTransactionDetailsResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryAccountTransactionDetailsResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryAccountTransactionDetailsResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryAccountTransactionDetailsResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryAccountTransactionDetailsResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryAccountTransactionDetailsResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryAccountTransactionDetailsResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryAccountTransactionDetailsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryAccountTransactionsRequest(TeaModel):
    def __init__(self, create_time_end=None, create_time_start=None, page_num=None, page_size=None, record_id=None,
                 transaction_channel=None, transaction_channel_sn=None, transaction_flow=None, transaction_number=None,
                 transaction_type=None):
        # The end of the creation time range to query. By default, the transactions in the last month are queried. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. Example: 2018-01-01T00:00:00Z.
        self.create_time_end = create_time_end  # type: str
        # The beginning of the creation time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. Example: 2018-01-01T00:00:00Z.
        self.create_time_start = create_time_start  # type: str
        # The number of the page to return.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page.
        self.page_size = page_size  # type: int
        # The ID of the order or bill.
        self.record_id = record_id  # type: str
        # The transaction channel. If you specify one of the following transaction channels for this parameter, the results for the specified transaction channel are returned. If the transaction channel that you specify does not belong to the following transaction channels, no result is returned. If you leave this parameter empty, the results for all the following transaction channels are returned by default. Valid values:
        # 
        # *   AccountBalance
        # *   BankTransfer
        # *   Alipay
        # *   AntCreditPay
        # *   OfflineRemittance
        # *   RegularBankCreditRefund
        # *   CreditCard
        # *   MyBankCredit
        # *   HuaxiaBankCInstallment
        # *   ApplePay
        self.transaction_channel = transaction_channel  # type: str
        # The serial number of the transaction channel.
        self.transaction_channel_sn = transaction_channel_sn  # type: str
        # The type of the transaction flow. If you specify one of the following types for this parameter, the results for the specified type are returned. If the type that you specify does not belong to the following types, no result is returned. If you leave this parameter empty, the results for the following two types are returned by default. Valid values:
        # 
        # *   Income
        # *   Expense
        self.transaction_flow = transaction_flow  # type: str
        # The number of the transaction.
        self.transaction_number = transaction_number  # type: str
        # The type of the transaction. If you specify one of the following transaction types for this parameter, the results for the specified transaction type are returned. If the transaction type that you specify does not belong to the following types, no result is returned. If you leave this parameter empty, the results for all the following transaction types are returned by default. Valid values:
        # 
        # *   Payment
        # *   Withdraw
        # *   Refund
        # *   Consumption
        # *   Transfer
        # *   Adjust
        self.transaction_type = transaction_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryAccountTransactionsRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time_end is not None:
            result['CreateTimeEnd'] = self.create_time_end
        if self.create_time_start is not None:
            result['CreateTimeStart'] = self.create_time_start
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.record_id is not None:
            result['RecordID'] = self.record_id
        if self.transaction_channel is not None:
            result['TransactionChannel'] = self.transaction_channel
        if self.transaction_channel_sn is not None:
            result['TransactionChannelSN'] = self.transaction_channel_sn
        if self.transaction_flow is not None:
            result['TransactionFlow'] = self.transaction_flow
        if self.transaction_number is not None:
            result['TransactionNumber'] = self.transaction_number
        if self.transaction_type is not None:
            result['TransactionType'] = self.transaction_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CreateTimeEnd') is not None:
            self.create_time_end = m.get('CreateTimeEnd')
        if m.get('CreateTimeStart') is not None:
            self.create_time_start = m.get('CreateTimeStart')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('RecordID') is not None:
            self.record_id = m.get('RecordID')
        if m.get('TransactionChannel') is not None:
            self.transaction_channel = m.get('TransactionChannel')
        if m.get('TransactionChannelSN') is not None:
            self.transaction_channel_sn = m.get('TransactionChannelSN')
        if m.get('TransactionFlow') is not None:
            self.transaction_flow = m.get('TransactionFlow')
        if m.get('TransactionNumber') is not None:
            self.transaction_number = m.get('TransactionNumber')
        if m.get('TransactionType') is not None:
            self.transaction_type = m.get('TransactionType')
        return self


class QueryAccountTransactionsResponseBodyDataAccountTransactionsListAccountTransactionsList(TeaModel):
    def __init__(self, amount=None, balance=None, billing_cycle=None, fund_type=None, record_id=None, remarks=None,
                 transaction_account=None, transaction_channel=None, transaction_channel_sn=None, transaction_flow=None,
                 transaction_number=None, transaction_time=None, transaction_type=None):
        # The amount.
        self.amount = amount  # type: str
        # The balance of the account.
        self.balance = balance  # type: str
        # The billing cycle. Format: YYYY-MM.
        self.billing_cycle = billing_cycle  # type: str
        # The type of transaction payment. Valid values:
        # 
        # *   Cash: pay for the transaction in cash.
        # *   Deposit: pay for the transaction with deposit.
        # *   RegularBankCreditRefund: pay for the transaction with credit refund controlled by a bank.
        # *   DirectPay: directly pay for the transaction.
        self.fund_type = fund_type  # type: str
        # The number of the order or bill.
        self.record_id = record_id  # type: str
        # The remarks on the transaction.
        self.remarks = remarks  # type: str
        # The transaction account. For example, the account is a recharge account in Alipay or a transfer account.
        self.transaction_account = transaction_account  # type: str
        # The transaction channel.
        # 
        # *   AccountBalance
        # *   BankTransfer
        # *   Alipay
        # *   AntCreditPay
        # *   OfflineRemittance
        # *   RegularBankCreditRefund
        # *   CreditCard
        # *   MyBankCredit
        # *   HuaxiaBankCInstallment
        # *   ApplePay
        self.transaction_channel = transaction_channel  # type: str
        # The serial number of the transaction channel.
        self.transaction_channel_sn = transaction_channel_sn  # type: str
        # The type of the transaction flow.
        # 
        # *   Income
        # *   Expense
        self.transaction_flow = transaction_flow  # type: str
        # The number of the transaction.
        self.transaction_number = transaction_number  # type: str
        # The time when the transaction was made.
        self.transaction_time = transaction_time  # type: str
        # The type of the transaction.
        # 
        # *   Payment
        # *   Withdraw
        # *   Refund
        # *   Consumption
        # *   Transfer
        # *   Adjust
        self.transaction_type = transaction_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryAccountTransactionsResponseBodyDataAccountTransactionsListAccountTransactionsList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.amount is not None:
            result['Amount'] = self.amount
        if self.balance is not None:
            result['Balance'] = self.balance
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.fund_type is not None:
            result['FundType'] = self.fund_type
        if self.record_id is not None:
            result['RecordID'] = self.record_id
        if self.remarks is not None:
            result['Remarks'] = self.remarks
        if self.transaction_account is not None:
            result['TransactionAccount'] = self.transaction_account
        if self.transaction_channel is not None:
            result['TransactionChannel'] = self.transaction_channel
        if self.transaction_channel_sn is not None:
            result['TransactionChannelSN'] = self.transaction_channel_sn
        if self.transaction_flow is not None:
            result['TransactionFlow'] = self.transaction_flow
        if self.transaction_number is not None:
            result['TransactionNumber'] = self.transaction_number
        if self.transaction_time is not None:
            result['TransactionTime'] = self.transaction_time
        if self.transaction_type is not None:
            result['TransactionType'] = self.transaction_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Amount') is not None:
            self.amount = m.get('Amount')
        if m.get('Balance') is not None:
            self.balance = m.get('Balance')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('FundType') is not None:
            self.fund_type = m.get('FundType')
        if m.get('RecordID') is not None:
            self.record_id = m.get('RecordID')
        if m.get('Remarks') is not None:
            self.remarks = m.get('Remarks')
        if m.get('TransactionAccount') is not None:
            self.transaction_account = m.get('TransactionAccount')
        if m.get('TransactionChannel') is not None:
            self.transaction_channel = m.get('TransactionChannel')
        if m.get('TransactionChannelSN') is not None:
            self.transaction_channel_sn = m.get('TransactionChannelSN')
        if m.get('TransactionFlow') is not None:
            self.transaction_flow = m.get('TransactionFlow')
        if m.get('TransactionNumber') is not None:
            self.transaction_number = m.get('TransactionNumber')
        if m.get('TransactionTime') is not None:
            self.transaction_time = m.get('TransactionTime')
        if m.get('TransactionType') is not None:
            self.transaction_type = m.get('TransactionType')
        return self


class QueryAccountTransactionsResponseBodyDataAccountTransactionsList(TeaModel):
    def __init__(self, account_transactions_list=None):
        self.account_transactions_list = account_transactions_list  # type: list[QueryAccountTransactionsResponseBodyDataAccountTransactionsListAccountTransactionsList]

    def validate(self):
        if self.account_transactions_list:
            for k in self.account_transactions_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryAccountTransactionsResponseBodyDataAccountTransactionsList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['AccountTransactionsList'] = []
        if self.account_transactions_list is not None:
            for k in self.account_transactions_list:
                result['AccountTransactionsList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.account_transactions_list = []
        if m.get('AccountTransactionsList') is not None:
            for k in m.get('AccountTransactionsList'):
                temp_model = QueryAccountTransactionsResponseBodyDataAccountTransactionsListAccountTransactionsList()
                self.account_transactions_list.append(temp_model.from_map(k))
        return self


class QueryAccountTransactionsResponseBodyData(TeaModel):
    def __init__(self, account_name=None, account_transactions_list=None, page_num=None, page_size=None,
                 total_count=None):
        # The name of your Alibaba Cloud account.
        self.account_name = account_name  # type: str
        # The information about transactions.
        self.account_transactions_list = account_transactions_list  # type: QueryAccountTransactionsResponseBodyDataAccountTransactionsList
        # The page number of the returned page.
        self.page_num = page_num  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The total number of returned entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.account_transactions_list:
            self.account_transactions_list.validate()

    def to_map(self):
        _map = super(QueryAccountTransactionsResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        if self.account_transactions_list is not None:
            result['AccountTransactionsList'] = self.account_transactions_list.to_map()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        if m.get('AccountTransactionsList') is not None:
            temp_model = QueryAccountTransactionsResponseBodyDataAccountTransactionsList()
            self.account_transactions_list = temp_model.from_map(m['AccountTransactionsList'])
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryAccountTransactionsResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryAccountTransactionsResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryAccountTransactionsResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryAccountTransactionsResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryAccountTransactionsResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryAccountTransactionsResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryAccountTransactionsResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryAccountTransactionsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryAvailableInstancesRequest(TeaModel):
    def __init__(self, create_time_end=None, create_time_start=None, end_time_end=None, end_time_start=None,
                 instance_ids=None, owner_id=None, page_num=None, page_size=None, product_code=None, product_type=None,
                 region=None, renew_status=None, subscription_type=None):
        # The end time when the specified instance is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        self.create_time_end = create_time_end  # type: str
        # The start time when the specified instance is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        self.create_time_start = create_time_start  # type: str
        # The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Example: 2016-05-23T12:00:00Z.
        self.end_time_end = end_time_end  # type: str
        # The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Example: 2016-05-23T12:00:00Z.
        self.end_time_start = end_time_start  # type: str
        # The ID of the instance. Separate multiple IDs with commas (,). You can specify a maximum of 100 IDs.
        self.instance_ids = instance_ids  # type: str
        self.owner_id = owner_id  # type: long
        # The number of the page to return.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page.
        self.page_size = page_size  # type: int
        # The code of the service. You can query the service code by calling the **QueryProductList** operation or viewing **Codes of Alibaba Cloud services**.
        # 
        # >This parameter cannot be left empty if the region is specified.
        self.product_code = product_code  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The ID of the region in which the instance resides.
        self.region = region  # type: str
        # The renewal status of the specified instance. Valid values:
        # 
        # *   AutoRenewal: The instance is automatically renewed.
        # *   ManualRenewal: The instance is manually renewed.
        # *   NotRenewal: The instance is not renewed.
        self.renew_status = renew_status  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: subscription
        # *   PayAsYouGo: pay-as-you-go
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryAvailableInstancesRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time_end is not None:
            result['CreateTimeEnd'] = self.create_time_end
        if self.create_time_start is not None:
            result['CreateTimeStart'] = self.create_time_start
        if self.end_time_end is not None:
            result['EndTimeEnd'] = self.end_time_end
        if self.end_time_start is not None:
            result['EndTimeStart'] = self.end_time_start
        if self.instance_ids is not None:
            result['InstanceIDs'] = self.instance_ids
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.region is not None:
            result['Region'] = self.region
        if self.renew_status is not None:
            result['RenewStatus'] = self.renew_status
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CreateTimeEnd') is not None:
            self.create_time_end = m.get('CreateTimeEnd')
        if m.get('CreateTimeStart') is not None:
            self.create_time_start = m.get('CreateTimeStart')
        if m.get('EndTimeEnd') is not None:
            self.end_time_end = m.get('EndTimeEnd')
        if m.get('EndTimeStart') is not None:
            self.end_time_start = m.get('EndTimeStart')
        if m.get('InstanceIDs') is not None:
            self.instance_ids = m.get('InstanceIDs')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('RenewStatus') is not None:
            self.renew_status = m.get('RenewStatus')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class QueryAvailableInstancesResponseBodyDataInstanceList(TeaModel):
    def __init__(self, create_time=None, end_time=None, expected_release_time=None, instance_id=None, owner_id=None,
                 product_code=None, product_type=None, region=None, release_time=None, renew_status=None, renewal_duration=None,
                 renewal_duration_unit=None, seller=None, seller_id=None, status=None, stop_time=None, sub_status=None,
                 subscription_type=None):
        # The time when the specified instance was created.
        self.create_time = create_time  # type: str
        # The time when the instance was expired.
        self.end_time = end_time  # type: str
        # The time when the specified instance was expected to be released.
        self.expected_release_time = expected_release_time  # type: str
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        # The ID of the instance owner.
        self.owner_id = owner_id  # type: long
        # The code of the service.
        self.product_code = product_code  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The ID of the region in which the instance resides.
        self.region = region  # type: str
        # The time when the instance was released.
        self.release_time = release_time  # type: str
        # The renewal status of the specified instance. Valid values:
        # 
        # *   AutoRenewal: The instance is automatically renewed.
        # *   ManualRenewal: The instance is manually renewed.
        # *   NotRenewal: The instance is not renewed.
        self.renew_status = renew_status  # type: str
        # The number of auto-renewal cycles.
        self.renewal_duration = renewal_duration  # type: int
        # The unit of the auto-renewal cycle. Valid values:
        # 
        # *   M: month
        # *   Y: year
        self.renewal_duration_unit = renewal_duration_unit  # type: str
        # The seller.
        self.seller = seller  # type: str
        # The ID of the seller.
        self.seller_id = seller_id  # type: long
        # The status of the instance.
        self.status = status  # type: str
        # The time when the specified instance was suspended.
        self.stop_time = stop_time  # type: str
        # The sub-status of the specified instance.
        self.sub_status = sub_status  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: subscription
        # *   PayAsYouGo: pay-as-you-go
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryAvailableInstancesResponseBodyDataInstanceList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['CreateTime'] = self.create_time
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.expected_release_time is not None:
            result['ExpectedReleaseTime'] = self.expected_release_time
        if self.instance_id is not None:
            result['InstanceID'] = self.instance_id
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.region is not None:
            result['Region'] = self.region
        if self.release_time is not None:
            result['ReleaseTime'] = self.release_time
        if self.renew_status is not None:
            result['RenewStatus'] = self.renew_status
        if self.renewal_duration is not None:
            result['RenewalDuration'] = self.renewal_duration
        if self.renewal_duration_unit is not None:
            result['RenewalDurationUnit'] = self.renewal_duration_unit
        if self.seller is not None:
            result['Seller'] = self.seller
        if self.seller_id is not None:
            result['SellerId'] = self.seller_id
        if self.status is not None:
            result['Status'] = self.status
        if self.stop_time is not None:
            result['StopTime'] = self.stop_time
        if self.sub_status is not None:
            result['SubStatus'] = self.sub_status
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CreateTime') is not None:
            self.create_time = m.get('CreateTime')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('ExpectedReleaseTime') is not None:
            self.expected_release_time = m.get('ExpectedReleaseTime')
        if m.get('InstanceID') is not None:
            self.instance_id = m.get('InstanceID')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ReleaseTime') is not None:
            self.release_time = m.get('ReleaseTime')
        if m.get('RenewStatus') is not None:
            self.renew_status = m.get('RenewStatus')
        if m.get('RenewalDuration') is not None:
            self.renewal_duration = m.get('RenewalDuration')
        if m.get('RenewalDurationUnit') is not None:
            self.renewal_duration_unit = m.get('RenewalDurationUnit')
        if m.get('Seller') is not None:
            self.seller = m.get('Seller')
        if m.get('SellerId') is not None:
            self.seller_id = m.get('SellerId')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('StopTime') is not None:
            self.stop_time = m.get('StopTime')
        if m.get('SubStatus') is not None:
            self.sub_status = m.get('SubStatus')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class QueryAvailableInstancesResponseBodyData(TeaModel):
    def __init__(self, instance_list=None, page_num=None, page_size=None, total_count=None):
        # The instances returned.
        self.instance_list = instance_list  # type: list[QueryAvailableInstancesResponseBodyDataInstanceList]
        # The page number of the returned page.
        self.page_num = page_num  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The total number of returned entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.instance_list:
            for k in self.instance_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryAvailableInstancesResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['InstanceList'] = []
        if self.instance_list is not None:
            for k in self.instance_list:
                result['InstanceList'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.instance_list = []
        if m.get('InstanceList') is not None:
            for k in m.get('InstanceList'):
                temp_model = QueryAvailableInstancesResponseBodyDataInstanceList()
                self.instance_list.append(temp_model.from_map(k))
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryAvailableInstancesResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryAvailableInstancesResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryAvailableInstancesResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryAvailableInstancesResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryAvailableInstancesResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryAvailableInstancesResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryAvailableInstancesResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryAvailableInstancesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryBillRequest(TeaModel):
    def __init__(self, bill_owner_id=None, billing_cycle=None, is_display_local_currency=None,
                 is_hide_zero_charge=None, owner_id=None, page_num=None, page_size=None, product_code=None, product_type=None,
                 subscription_type=None, type=None):
        # The ID of the member.
        self.bill_owner_id = bill_owner_id  # type: long
        # The billing cycle, in the YYYY-MM format.
        self.billing_cycle = billing_cycle  # type: str
        # Specifies whether to display local currency information in bills. The parameter will be discontinued.
        self.is_display_local_currency = is_display_local_currency  # type: bool
        # Specifies whether to filter out a bill whose pretax gross amount is 0. By default, a bill whose pretax gross amount is 0 is not filtered out. Valid values:
        # 
        # *   true: filters out a bill whose pretax gross amount is 0.
        # *   false: does not filter out a bill whose pretax gross amount is 0.
        self.is_hide_zero_charge = is_hide_zero_charge  # type: bool
        self.owner_id = owner_id  # type: long
        # The number of the page to return. Default value: 1.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page. Default value: 20. Maximum value: 300.
        self.page_size = page_size  # type: int
        # The code of the service.
        self.product_code = product_code  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription
        # *   PayAsYouGo
        # 
        # **\
        # 
        # ****This parameter must be used together with the ProductCode parameter.
        self.subscription_type = subscription_type  # type: str
        # The type of the bill. Valid values:
        # 
        # *   SubscriptionOrder
        # *   PayAsYouGoBill
        # *   Refund
        # *   Adjustment
        self.type = type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryBillRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.is_display_local_currency is not None:
            result['IsDisplayLocalCurrency'] = self.is_display_local_currency
        if self.is_hide_zero_charge is not None:
            result['IsHideZeroCharge'] = self.is_hide_zero_charge
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.type is not None:
            result['Type'] = self.type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('IsDisplayLocalCurrency') is not None:
            self.is_display_local_currency = m.get('IsDisplayLocalCurrency')
        if m.get('IsHideZeroCharge') is not None:
            self.is_hide_zero_charge = m.get('IsHideZeroCharge')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        return self


class QueryBillResponseBodyDataItemsItem(TeaModel):
    def __init__(self, adjust_amount=None, after_tax_amount=None, cash_amount=None, commodity_code=None,
                 currency=None, deducted_by_cash_coupons=None, deducted_by_coupons=None, deducted_by_prepaid_card=None,
                 invoice_discount=None, item=None, outstanding_amount=None, owner_id=None, payment_amount=None,
                 payment_currency=None, payment_time=None, payment_transaction_id=None, pip_code=None, pretax_amount=None,
                 pretax_amount_local=None, pretax_gross_amount=None, product_code=None, product_detail=None, product_name=None,
                 product_type=None, record_id=None, round_down_discount=None, status=None, sub_order_id=None,
                 subscription_type=None, tax=None, usage_end_time=None, usage_start_time=None):
        # The amount deducted by using credit refunds.
        self.adjust_amount = adjust_amount  # type: float
        # The amount paid after tax is deducted.
        self.after_tax_amount = after_tax_amount  # type: float
        # The amount paid in cash. The amount that was deducted by using credit refunds is not included.
        self.cash_amount = cash_amount  # type: float
        # The code of the commodity.
        self.commodity_code = commodity_code  # type: str
        # The type of the currency.
        # 
        # *   CNY
        # *   USD
        # *   JPY
        self.currency = currency  # type: str
        # The amount deducted by using vouchers.
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: float
        # The amount deducted by using coupons.
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        # The amount deducted by using prepaid cards.
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: float
        # The discount amount.
        self.invoice_discount = invoice_discount  # type: float
        # The type of the bill.
        # 
        # *   SubscriptionOrder
        # *   PayAsYouGoBill
        # *   Refund
        # *   Adjustment
        self.item = item  # type: str
        # The unsettled amount of the bill.
        self.outstanding_amount = outstanding_amount  # type: float
        # The ID of the member. This parameter is returned in a multi-account payment scenario.
        self.owner_id = owner_id  # type: str
        # The amount paid with cash.
        self.payment_amount = payment_amount  # type: float
        # The currency used for payment.
        self.payment_currency = payment_currency  # type: str
        # The time when the order was paid.
        self.payment_time = payment_time  # type: str
        # The ID of the transaction.
        self.payment_transaction_id = payment_transaction_id  # type: str
        # The code of the service.
        self.pip_code = pip_code  # type: str
        # The pretax amount
        self.pretax_amount = pretax_amount  # type: float
        # The pretax amount paid in local currency.
        self.pretax_amount_local = pretax_amount_local  # type: float
        # The pretax gross amount.
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        # The code of the service.
        self.product_code = product_code  # type: str
        # The details of the service.
        self.product_detail = product_detail  # type: str
        # The name of the service.
        self.product_name = product_name  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The ID of the order or bill.
        self.record_id = record_id  # type: str
        # The round down discount.
        self.round_down_discount = round_down_discount  # type: str
        # The payment status of the bill. Valid values:
        # 
        # *   PayFinish: The bill is paid.
        # *   PayUnclear: The bill is not cleared.
        # *   PayUnsettle: The bill is not settled.
        # *   NoSettle: The bill is free of settlement.
        self.status = status  # type: str
        # The ID of the order corresponding to the bill.
        self.sub_order_id = sub_order_id  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription
        # *   PayAsYouGo
        self.subscription_type = subscription_type  # type: str
        # The tax.
        self.tax = tax  # type: float
        # The time when the bill ends.
        self.usage_end_time = usage_end_time  # type: str
        # The time when the bill starts.
        self.usage_start_time = usage_start_time  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryBillResponseBodyDataItemsItem, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.adjust_amount is not None:
            result['AdjustAmount'] = self.adjust_amount
        if self.after_tax_amount is not None:
            result['AfterTaxAmount'] = self.after_tax_amount
        if self.cash_amount is not None:
            result['CashAmount'] = self.cash_amount
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.item is not None:
            result['Item'] = self.item
        if self.outstanding_amount is not None:
            result['OutstandingAmount'] = self.outstanding_amount
        if self.owner_id is not None:
            result['OwnerID'] = self.owner_id
        if self.payment_amount is not None:
            result['PaymentAmount'] = self.payment_amount
        if self.payment_currency is not None:
            result['PaymentCurrency'] = self.payment_currency
        if self.payment_time is not None:
            result['PaymentTime'] = self.payment_time
        if self.payment_transaction_id is not None:
            result['PaymentTransactionID'] = self.payment_transaction_id
        if self.pip_code is not None:
            result['PipCode'] = self.pip_code
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_amount_local is not None:
            result['PretaxAmountLocal'] = self.pretax_amount_local
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.record_id is not None:
            result['RecordID'] = self.record_id
        if self.round_down_discount is not None:
            result['RoundDownDiscount'] = self.round_down_discount
        if self.status is not None:
            result['Status'] = self.status
        if self.sub_order_id is not None:
            result['SubOrderId'] = self.sub_order_id
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tax is not None:
            result['Tax'] = self.tax
        if self.usage_end_time is not None:
            result['UsageEndTime'] = self.usage_end_time
        if self.usage_start_time is not None:
            result['UsageStartTime'] = self.usage_start_time
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AdjustAmount') is not None:
            self.adjust_amount = m.get('AdjustAmount')
        if m.get('AfterTaxAmount') is not None:
            self.after_tax_amount = m.get('AfterTaxAmount')
        if m.get('CashAmount') is not None:
            self.cash_amount = m.get('CashAmount')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('Item') is not None:
            self.item = m.get('Item')
        if m.get('OutstandingAmount') is not None:
            self.outstanding_amount = m.get('OutstandingAmount')
        if m.get('OwnerID') is not None:
            self.owner_id = m.get('OwnerID')
        if m.get('PaymentAmount') is not None:
            self.payment_amount = m.get('PaymentAmount')
        if m.get('PaymentCurrency') is not None:
            self.payment_currency = m.get('PaymentCurrency')
        if m.get('PaymentTime') is not None:
            self.payment_time = m.get('PaymentTime')
        if m.get('PaymentTransactionID') is not None:
            self.payment_transaction_id = m.get('PaymentTransactionID')
        if m.get('PipCode') is not None:
            self.pip_code = m.get('PipCode')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxAmountLocal') is not None:
            self.pretax_amount_local = m.get('PretaxAmountLocal')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('RecordID') is not None:
            self.record_id = m.get('RecordID')
        if m.get('RoundDownDiscount') is not None:
            self.round_down_discount = m.get('RoundDownDiscount')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('SubOrderId') is not None:
            self.sub_order_id = m.get('SubOrderId')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tax') is not None:
            self.tax = m.get('Tax')
        if m.get('UsageEndTime') is not None:
            self.usage_end_time = m.get('UsageEndTime')
        if m.get('UsageStartTime') is not None:
            self.usage_start_time = m.get('UsageStartTime')
        return self


class QueryBillResponseBodyDataItems(TeaModel):
    def __init__(self, item=None):
        self.item = item  # type: list[QueryBillResponseBodyDataItemsItem]

    def validate(self):
        if self.item:
            for k in self.item:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryBillResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Item'] = []
        if self.item is not None:
            for k in self.item:
                result['Item'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.item = []
        if m.get('Item') is not None:
            for k in m.get('Item'):
                temp_model = QueryBillResponseBodyDataItemsItem()
                self.item.append(temp_model.from_map(k))
        return self


class QueryBillResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, billing_cycle=None, items=None, page_num=None,
                 page_size=None, total_count=None):
        # The ID of the account.
        self.account_id = account_id  # type: str
        # The name of the account.
        self.account_name = account_name  # type: str
        # The billing cycle, in the YYYY-MM format.
        self.billing_cycle = billing_cycle  # type: str
        # The details of the bills.
        self.items = items  # type: QueryBillResponseBodyDataItems
        # The page number of the returned page.
        self.page_num = page_num  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The total number of returned entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            self.items.validate()

    def to_map(self):
        _map = super(QueryBillResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.items is not None:
            result['Items'] = self.items.to_map()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('Items') is not None:
            temp_model = QueryBillResponseBodyDataItems()
            self.items = temp_model.from_map(m['Items'])
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryBillResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The returned data.
        self.data = data  # type: QueryBillResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryBillResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryBillResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryBillResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryBillResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryBillResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryBillResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryBillOverviewRequest(TeaModel):
    def __init__(self, bill_owner_id=None, billing_cycle=None, product_code=None, product_type=None,
                 subscription_type=None):
        # The ID of the member. If you specify a value for this parameter, you can query the bills of the specified member. If you leave this parameter empty, the bills of the current account are queried by default.
        self.bill_owner_id = bill_owner_id  # type: long
        # The billing cycle, in the YYYY-MM format.
        self.billing_cycle = billing_cycle  # type: str
        # The code of the service.
        self.product_code = product_code  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: the subscription billing method
        # *   PayAsYouGo: the pay-as-you-go billing method
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryBillOverviewRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class QueryBillOverviewResponseBodyDataItemsItem(TeaModel):
    def __init__(self, adjust_amount=None, after_tax_amount=None, bill_account_id=None, bill_account_name=None,
                 biz_type=None, cash_amount=None, commodity_code=None, currency=None, deducted_by_cash_coupons=None,
                 deducted_by_coupons=None, deducted_by_prepaid_card=None, invoice_discount=None, item=None, outstanding_amount=None,
                 owner_id=None, payment_amount=None, payment_currency=None, pip_code=None, pretax_amount=None,
                 pretax_amount_local=None, pretax_gross_amount=None, product_code=None, product_detail=None, product_name=None,
                 product_type=None, round_down_discount=None, subscription_type=None, tax=None):
        # The amount deducted by using credit refunds.
        self.adjust_amount = adjust_amount  # type: float
        self.after_tax_amount = after_tax_amount  # type: float
        # The ID of the account to which the bill belongs.
        self.bill_account_id = bill_account_id  # type: str
        # The name of the account to which the bill belongs.
        self.bill_account_name = bill_account_name  # type: str
        # The business type.
        self.biz_type = biz_type  # type: str
        # The amount paid in cash. The amount that was deducted by using credit refunds is not included.
        self.cash_amount = cash_amount  # type: float
        # The code of the commodity. The commodity code is the same as that displayed in User Center.
        self.commodity_code = commodity_code  # type: str
        # The type of the currency. Valid values:
        # 
        # *   CNY
        # *   USD
        # *   JPY
        self.currency = currency  # type: str
        # The amount deducted by using vouchers.
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: float
        # The amount deducted by using coupons.
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        # The amount deducted by using prepaid cards.
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: float
        # The discount amount.
        self.invoice_discount = invoice_discount  # type: float
        # The type of the bill. Valid values:
        # 
        # *   SubscriptionOrder
        # *   PayAsYouGoBill
        # *   Refund
        # *   Adjustment
        self.item = item  # type: str
        # The unsettled amount or the amount deducted by using credits. This may be an unsettled amount of a regular user or credits consumed by a credit user.
        self.outstanding_amount = outstanding_amount  # type: float
        # The ID of the bill owner.
        self.owner_id = owner_id  # type: str
        # The amount paid in cash. The amount that was deducted by using credit refunds is included.
        self.payment_amount = payment_amount  # type: float
        self.payment_currency = payment_currency  # type: str
        # The code of the service. The service code is the same as that displayed in User Center.
        self.pip_code = pip_code  # type: str
        # The pretax amount.
        self.pretax_amount = pretax_amount  # type: float
        self.pretax_amount_local = pretax_amount_local  # type: float
        # The pretax gross amount.
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        # The code of the service.
        self.product_code = product_code  # type: str
        # The details of the service.
        self.product_detail = product_detail  # type: str
        # The name of the service.
        self.product_name = product_name  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The round down discount.
        self.round_down_discount = round_down_discount  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: the subscription billing method
        # *   PayAsYouGo: the pay-as-you-go billing method
        self.subscription_type = subscription_type  # type: str
        self.tax = tax  # type: float

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryBillOverviewResponseBodyDataItemsItem, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.adjust_amount is not None:
            result['AdjustAmount'] = self.adjust_amount
        if self.after_tax_amount is not None:
            result['AfterTaxAmount'] = self.after_tax_amount
        if self.bill_account_id is not None:
            result['BillAccountID'] = self.bill_account_id
        if self.bill_account_name is not None:
            result['BillAccountName'] = self.bill_account_name
        if self.biz_type is not None:
            result['BizType'] = self.biz_type
        if self.cash_amount is not None:
            result['CashAmount'] = self.cash_amount
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.item is not None:
            result['Item'] = self.item
        if self.outstanding_amount is not None:
            result['OutstandingAmount'] = self.outstanding_amount
        if self.owner_id is not None:
            result['OwnerID'] = self.owner_id
        if self.payment_amount is not None:
            result['PaymentAmount'] = self.payment_amount
        if self.payment_currency is not None:
            result['PaymentCurrency'] = self.payment_currency
        if self.pip_code is not None:
            result['PipCode'] = self.pip_code
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_amount_local is not None:
            result['PretaxAmountLocal'] = self.pretax_amount_local
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.round_down_discount is not None:
            result['RoundDownDiscount'] = self.round_down_discount
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tax is not None:
            result['Tax'] = self.tax
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AdjustAmount') is not None:
            self.adjust_amount = m.get('AdjustAmount')
        if m.get('AfterTaxAmount') is not None:
            self.after_tax_amount = m.get('AfterTaxAmount')
        if m.get('BillAccountID') is not None:
            self.bill_account_id = m.get('BillAccountID')
        if m.get('BillAccountName') is not None:
            self.bill_account_name = m.get('BillAccountName')
        if m.get('BizType') is not None:
            self.biz_type = m.get('BizType')
        if m.get('CashAmount') is not None:
            self.cash_amount = m.get('CashAmount')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('Item') is not None:
            self.item = m.get('Item')
        if m.get('OutstandingAmount') is not None:
            self.outstanding_amount = m.get('OutstandingAmount')
        if m.get('OwnerID') is not None:
            self.owner_id = m.get('OwnerID')
        if m.get('PaymentAmount') is not None:
            self.payment_amount = m.get('PaymentAmount')
        if m.get('PaymentCurrency') is not None:
            self.payment_currency = m.get('PaymentCurrency')
        if m.get('PipCode') is not None:
            self.pip_code = m.get('PipCode')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxAmountLocal') is not None:
            self.pretax_amount_local = m.get('PretaxAmountLocal')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('RoundDownDiscount') is not None:
            self.round_down_discount = m.get('RoundDownDiscount')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tax') is not None:
            self.tax = m.get('Tax')
        return self


class QueryBillOverviewResponseBodyDataItems(TeaModel):
    def __init__(self, item=None):
        self.item = item  # type: list[QueryBillOverviewResponseBodyDataItemsItem]

    def validate(self):
        if self.item:
            for k in self.item:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryBillOverviewResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Item'] = []
        if self.item is not None:
            for k in self.item:
                result['Item'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.item = []
        if m.get('Item') is not None:
            for k in m.get('Item'):
                temp_model = QueryBillOverviewResponseBodyDataItemsItem()
                self.item.append(temp_model.from_map(k))
        return self


class QueryBillOverviewResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, billing_cycle=None, items=None):
        # The ID of the account.
        self.account_id = account_id  # type: str
        # The name of the account.
        self.account_name = account_name  # type: str
        # The billing cycle, in the YYYY-MM format.
        self.billing_cycle = billing_cycle  # type: str
        # The details of the bills.
        self.items = items  # type: QueryBillOverviewResponseBodyDataItems

    def validate(self):
        if self.items:
            self.items.validate()

    def to_map(self):
        _map = super(QueryBillOverviewResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.items is not None:
            result['Items'] = self.items.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('Items') is not None:
            temp_model = QueryBillOverviewResponseBodyDataItems()
            self.items = temp_model.from_map(m['Items'])
        return self


class QueryBillOverviewResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryBillOverviewResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryBillOverviewResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryBillOverviewResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryBillOverviewResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryBillOverviewResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryBillOverviewResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryBillOverviewResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryBillToOSSSubscriptionResponseBodyDataItemsItem(TeaModel):
    def __init__(self, bucket_owner_id=None, bucket_path=None, row_limit_per_file=None, subscribe_bucket=None,
                 subscribe_language=None, subscribe_time=None, subscribe_type=None):
        # The owner ID of the Object Storage Service (OSS) bucket.
        self.bucket_owner_id = bucket_owner_id  # type: long
        # The path in the OSS bucket.
        self.bucket_path = bucket_path  # type: str
        # The maximum number of data rows in a single file. If the number of data rows in a bill exceeds the upper limit, the bill is split into multiple files. Then, multiple files are merged and compressed into a package.
        self.row_limit_per_file = row_limit_per_file  # type: int
        # The ID of the OSS bucket that stores the subscribed bill.
        self.subscribe_bucket = subscribe_bucket  # type: str
        # The code of the language.
        # 
        # Valid values:
        # 
        # *   en: English
        # *   zh: Chinese
        self.subscribe_language = subscribe_language  # type: str
        # The time when the subscribed bill was stored in the OSS bucket. The time is displayed in the YYYY-MM-DD hh:mm:ss format.
        self.subscribe_time = subscribe_time  # type: str
        # The type of the subscribed bill. Valid values:
        # 
        # *   BillingItemDetailForBillingPeriod: the bill of a billable item.
        # *   InstanceDetailForBillingPeriod: the bill of an instance.
        self.subscribe_type = subscribe_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryBillToOSSSubscriptionResponseBodyDataItemsItem, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bucket_owner_id is not None:
            result['BucketOwnerId'] = self.bucket_owner_id
        if self.bucket_path is not None:
            result['BucketPath'] = self.bucket_path
        if self.row_limit_per_file is not None:
            result['RowLimitPerFile'] = self.row_limit_per_file
        if self.subscribe_bucket is not None:
            result['SubscribeBucket'] = self.subscribe_bucket
        if self.subscribe_language is not None:
            result['SubscribeLanguage'] = self.subscribe_language
        if self.subscribe_time is not None:
            result['SubscribeTime'] = self.subscribe_time
        if self.subscribe_type is not None:
            result['SubscribeType'] = self.subscribe_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BucketOwnerId') is not None:
            self.bucket_owner_id = m.get('BucketOwnerId')
        if m.get('BucketPath') is not None:
            self.bucket_path = m.get('BucketPath')
        if m.get('RowLimitPerFile') is not None:
            self.row_limit_per_file = m.get('RowLimitPerFile')
        if m.get('SubscribeBucket') is not None:
            self.subscribe_bucket = m.get('SubscribeBucket')
        if m.get('SubscribeLanguage') is not None:
            self.subscribe_language = m.get('SubscribeLanguage')
        if m.get('SubscribeTime') is not None:
            self.subscribe_time = m.get('SubscribeTime')
        if m.get('SubscribeType') is not None:
            self.subscribe_type = m.get('SubscribeType')
        return self


class QueryBillToOSSSubscriptionResponseBodyDataItems(TeaModel):
    def __init__(self, item=None):
        self.item = item  # type: list[QueryBillToOSSSubscriptionResponseBodyDataItemsItem]

    def validate(self):
        if self.item:
            for k in self.item:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryBillToOSSSubscriptionResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Item'] = []
        if self.item is not None:
            for k in self.item:
                result['Item'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.item = []
        if m.get('Item') is not None:
            for k in m.get('Item'):
                temp_model = QueryBillToOSSSubscriptionResponseBodyDataItemsItem()
                self.item.append(temp_model.from_map(k))
        return self


class QueryBillToOSSSubscriptionResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, items=None):
        # The ID of the account used to perform the query.
        self.account_id = account_id  # type: str
        # The name of the account used to perform the query.
        self.account_name = account_name  # type: str
        # The details of the subscribed bill.
        self.items = items  # type: QueryBillToOSSSubscriptionResponseBodyDataItems

    def validate(self):
        if self.items:
            self.items.validate()

    def to_map(self):
        _map = super(QueryBillToOSSSubscriptionResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        if self.items is not None:
            result['Items'] = self.items.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        if m.get('Items') is not None:
            temp_model = QueryBillToOSSSubscriptionResponseBodyDataItems()
            self.items = temp_model.from_map(m['Items'])
        return self


class QueryBillToOSSSubscriptionResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The returned data.
        self.data = data  # type: QueryBillToOSSSubscriptionResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryBillToOSSSubscriptionResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryBillToOSSSubscriptionResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryBillToOSSSubscriptionResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryBillToOSSSubscriptionResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryBillToOSSSubscriptionResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryBillToOSSSubscriptionResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryCashCouponsRequest(TeaModel):
    def __init__(self, effective_or_not=None, expiry_time_end=None, expiry_time_start=None):
        # Specifies whether the voucher takes effect. Valid values:
        # 
        # *   true: The voucher takes effect.
        # *   false: The voucher does not take effect.
        self.effective_or_not = effective_or_not  # type: bool
        # The end time of the validity period of the voucher. Specify the parameter in the yyyy-MM-ddTHH:mm:ssZ format. Example: 2018-08-01T00:00:00Z.
        self.expiry_time_end = expiry_time_end  # type: str
        # The start time of the validity period of the voucher. Specify the parameter in the yyyy-MM-ddTHH:mm:ssZ format. Example: 2018-08-01T00:00:00Z.
        self.expiry_time_start = expiry_time_start  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryCashCouponsRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.effective_or_not is not None:
            result['EffectiveOrNot'] = self.effective_or_not
        if self.expiry_time_end is not None:
            result['ExpiryTimeEnd'] = self.expiry_time_end
        if self.expiry_time_start is not None:
            result['ExpiryTimeStart'] = self.expiry_time_start
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EffectiveOrNot') is not None:
            self.effective_or_not = m.get('EffectiveOrNot')
        if m.get('ExpiryTimeEnd') is not None:
            self.expiry_time_end = m.get('ExpiryTimeEnd')
        if m.get('ExpiryTimeStart') is not None:
            self.expiry_time_start = m.get('ExpiryTimeStart')
        return self


class QueryCashCouponsResponseBodyDataCashCoupon(TeaModel):
    def __init__(self, applicable_products=None, applicable_scenarios=None, balance=None, cash_coupon_id=None,
                 cash_coupon_no=None, description=None, effective_time=None, expiry_time=None, granted_time=None,
                 nominal_value=None, status=None):
        # The service to which the voucher is applicable.
        self.applicable_products = applicable_products  # type: str
        # The scenario to which the voucher is applicable.
        self.applicable_scenarios = applicable_scenarios  # type: str
        # The remaining quota of the voucher.
        self.balance = balance  # type: str
        # The ID of the voucher.
        self.cash_coupon_id = cash_coupon_id  # type: long
        # The code of the voucher.
        self.cash_coupon_no = cash_coupon_no  # type: str
        self.description = description  # type: str
        # The time when the voucher took effect.
        self.effective_time = effective_time  # type: str
        # The time when the voucher expired.
        self.expiry_time = expiry_time  # type: str
        # The time when the voucher was released.
        self.granted_time = granted_time  # type: str
        # The denomination of the voucher.
        self.nominal_value = nominal_value  # type: str
        # The state of the voucher. Valid values:
        # 
        # *   Available: The voucher is valid.
        # *   Expired: The voucher has expired.
        # *   Cancelled: The voucher is canceled.
        self.status = status  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryCashCouponsResponseBodyDataCashCoupon, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.applicable_products is not None:
            result['ApplicableProducts'] = self.applicable_products
        if self.applicable_scenarios is not None:
            result['ApplicableScenarios'] = self.applicable_scenarios
        if self.balance is not None:
            result['Balance'] = self.balance
        if self.cash_coupon_id is not None:
            result['CashCouponId'] = self.cash_coupon_id
        if self.cash_coupon_no is not None:
            result['CashCouponNo'] = self.cash_coupon_no
        if self.description is not None:
            result['Description'] = self.description
        if self.effective_time is not None:
            result['EffectiveTime'] = self.effective_time
        if self.expiry_time is not None:
            result['ExpiryTime'] = self.expiry_time
        if self.granted_time is not None:
            result['GrantedTime'] = self.granted_time
        if self.nominal_value is not None:
            result['NominalValue'] = self.nominal_value
        if self.status is not None:
            result['Status'] = self.status
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ApplicableProducts') is not None:
            self.applicable_products = m.get('ApplicableProducts')
        if m.get('ApplicableScenarios') is not None:
            self.applicable_scenarios = m.get('ApplicableScenarios')
        if m.get('Balance') is not None:
            self.balance = m.get('Balance')
        if m.get('CashCouponId') is not None:
            self.cash_coupon_id = m.get('CashCouponId')
        if m.get('CashCouponNo') is not None:
            self.cash_coupon_no = m.get('CashCouponNo')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('EffectiveTime') is not None:
            self.effective_time = m.get('EffectiveTime')
        if m.get('ExpiryTime') is not None:
            self.expiry_time = m.get('ExpiryTime')
        if m.get('GrantedTime') is not None:
            self.granted_time = m.get('GrantedTime')
        if m.get('NominalValue') is not None:
            self.nominal_value = m.get('NominalValue')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class QueryCashCouponsResponseBodyData(TeaModel):
    def __init__(self, cash_coupon=None):
        self.cash_coupon = cash_coupon  # type: list[QueryCashCouponsResponseBodyDataCashCoupon]

    def validate(self):
        if self.cash_coupon:
            for k in self.cash_coupon:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryCashCouponsResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['CashCoupon'] = []
        if self.cash_coupon is not None:
            for k in self.cash_coupon:
                result['CashCoupon'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.cash_coupon = []
        if m.get('CashCoupon') is not None:
            for k in m.get('CashCoupon'):
                temp_model = QueryCashCouponsResponseBodyDataCashCoupon()
                self.cash_coupon.append(temp_model.from_map(k))
        return self


class QueryCashCouponsResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryCashCouponsResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryCashCouponsResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryCashCouponsResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryCashCouponsResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryCashCouponsResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryCashCouponsResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryCashCouponsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryCommodityListRequest(TeaModel):
    def __init__(self, lang=None, product_code=None):
        self.lang = lang  # type: str
        # The code of the service.
        self.product_code = product_code  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryCommodityListRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.lang is not None:
            result['Lang'] = self.lang
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Lang') is not None:
            self.lang = m.get('Lang')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        return self


class QueryCommodityListResponseBodyDataCommodityList(TeaModel):
    def __init__(self, charge_type=None, commodity_code=None, commodity_name=None):
        # The payment type. Valid values: POSTPAY (pay-as-you-go) and PREPAY (subscription).
        self.charge_type = charge_type  # type: str
        # The code of the service, which is the same as that on the Billing Management page.
        self.commodity_code = commodity_code  # type: str
        # The name of the service.
        self.commodity_name = commodity_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryCommodityListResponseBodyDataCommodityList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.charge_type is not None:
            result['ChargeType'] = self.charge_type
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.commodity_name is not None:
            result['CommodityName'] = self.commodity_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ChargeType') is not None:
            self.charge_type = m.get('ChargeType')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('CommodityName') is not None:
            self.commodity_name = m.get('CommodityName')
        return self


class QueryCommodityListResponseBodyData(TeaModel):
    def __init__(self, commodity_list=None):
        # The information about the service.
        self.commodity_list = commodity_list  # type: list[QueryCommodityListResponseBodyDataCommodityList]

    def validate(self):
        if self.commodity_list:
            for k in self.commodity_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryCommodityListResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['CommodityList'] = []
        if self.commodity_list is not None:
            for k in self.commodity_list:
                result['CommodityList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.commodity_list = []
        if m.get('CommodityList') is not None:
            for k in m.get('CommodityList'):
                temp_model = QueryCommodityListResponseBodyDataCommodityList()
                self.commodity_list.append(temp_model.from_map(k))
        return self


class QueryCommodityListResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The HTTP status code.
        self.code = code  # type: str
        # The returned data.
        self.data = data  # type: QueryCommodityListResponseBodyData
        # The returned message.
        self.message = message  # type: str
        # Id of the request
        self.request_id = request_id  # type: str
        # Indicates whether the information about the service was queried.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryCommodityListResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryCommodityListResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryCommodityListResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryCommodityListResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryCommodityListResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryCommodityListResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryCostUnitRequest(TeaModel):
    def __init__(self, owner_uid=None, page_num=None, page_size=None, parent_unit_id=None):
        # The user ID of the cost center owner.
        self.owner_uid = owner_uid  # type: long
        # The page number of the page to return.
        self.page_num = page_num  # type: int
        # The number of entries per page. A maximum of 300 entries can be returned per page.
        self.page_size = page_size  # type: int
        # The ID of the parent cost center. A value of -1 indicates the root cost center.
        self.parent_unit_id = parent_unit_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryCostUnitRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.owner_uid is not None:
            result['OwnerUid'] = self.owner_uid
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.parent_unit_id is not None:
            result['ParentUnitId'] = self.parent_unit_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OwnerUid') is not None:
            self.owner_uid = m.get('OwnerUid')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ParentUnitId') is not None:
            self.parent_unit_id = m.get('ParentUnitId')
        return self


class QueryCostUnitResponseBodyDataCostUnitDtoList(TeaModel):
    def __init__(self, owner_uid=None, parent_unit_id=None, unit_id=None, unit_name=None):
        # The user ID of the cost center owner.
        self.owner_uid = owner_uid  # type: long
        # The ID of the parent cost center. A value of -1 indicates the root cost center.
        self.parent_unit_id = parent_unit_id  # type: long
        # The ID of the cost center.
        self.unit_id = unit_id  # type: long
        # The name of the cost center.
        self.unit_name = unit_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryCostUnitResponseBodyDataCostUnitDtoList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.owner_uid is not None:
            result['OwnerUid'] = self.owner_uid
        if self.parent_unit_id is not None:
            result['ParentUnitId'] = self.parent_unit_id
        if self.unit_id is not None:
            result['UnitId'] = self.unit_id
        if self.unit_name is not None:
            result['UnitName'] = self.unit_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OwnerUid') is not None:
            self.owner_uid = m.get('OwnerUid')
        if m.get('ParentUnitId') is not None:
            self.parent_unit_id = m.get('ParentUnitId')
        if m.get('UnitId') is not None:
            self.unit_id = m.get('UnitId')
        if m.get('UnitName') is not None:
            self.unit_name = m.get('UnitName')
        return self


class QueryCostUnitResponseBodyData(TeaModel):
    def __init__(self, cost_unit_dto_list=None, page_num=None, page_size=None, total_count=None):
        # The cost centers.
        self.cost_unit_dto_list = cost_unit_dto_list  # type: list[QueryCostUnitResponseBodyDataCostUnitDtoList]
        # The page number of the returned page.
        self.page_num = page_num  # type: int
        # The number of entries returned on each page.
        self.page_size = page_size  # type: int
        # The total number of returned entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.cost_unit_dto_list:
            for k in self.cost_unit_dto_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryCostUnitResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['CostUnitDtoList'] = []
        if self.cost_unit_dto_list is not None:
            for k in self.cost_unit_dto_list:
                result['CostUnitDtoList'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.cost_unit_dto_list = []
        if m.get('CostUnitDtoList') is not None:
            for k in m.get('CostUnitDtoList'):
                temp_model = QueryCostUnitResponseBodyDataCostUnitDtoList()
                self.cost_unit_dto_list.append(temp_model.from_map(k))
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryCostUnitResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryCostUnitResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryCostUnitResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryCostUnitResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryCostUnitResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryCostUnitResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryCostUnitResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryCostUnitResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryCostUnitResourceRequest(TeaModel):
    def __init__(self, owner_uid=None, page_num=None, page_size=None, unit_id=None):
        # The user ID of the cost center owner.
        self.owner_uid = owner_uid  # type: long
        # The number of the page to return.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page.
        self.page_size = page_size  # type: int
        # The ID of the cost center.
        self.unit_id = unit_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryCostUnitResourceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.owner_uid is not None:
            result['OwnerUid'] = self.owner_uid
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.unit_id is not None:
            result['UnitId'] = self.unit_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OwnerUid') is not None:
            self.owner_uid = m.get('OwnerUid')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('UnitId') is not None:
            self.unit_id = m.get('UnitId')
        return self


class QueryCostUnitResourceResponseBodyDataCostUnit(TeaModel):
    def __init__(self, owner_uid=None, parent_unit_id=None, unit_id=None, unit_name=None):
        # The user ID of the cost center owner.
        self.owner_uid = owner_uid  # type: long
        # The ID of the parent cost center. A value of -1 indicates the root cost center.
        self.parent_unit_id = parent_unit_id  # type: long
        # The ID of the cost center.
        self.unit_id = unit_id  # type: long
        # The name of the cost center.
        self.unit_name = unit_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryCostUnitResourceResponseBodyDataCostUnit, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.owner_uid is not None:
            result['OwnerUid'] = self.owner_uid
        if self.parent_unit_id is not None:
            result['ParentUnitId'] = self.parent_unit_id
        if self.unit_id is not None:
            result['UnitId'] = self.unit_id
        if self.unit_name is not None:
            result['UnitName'] = self.unit_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OwnerUid') is not None:
            self.owner_uid = m.get('OwnerUid')
        if m.get('ParentUnitId') is not None:
            self.parent_unit_id = m.get('ParentUnitId')
        if m.get('UnitId') is not None:
            self.unit_id = m.get('UnitId')
        if m.get('UnitName') is not None:
            self.unit_name = m.get('UnitName')
        return self


class QueryCostUnitResourceResponseBodyDataCostUnitStatisInfo(TeaModel):
    def __init__(self, resource_count=None, resource_group_count=None, sub_unit_count=None,
                 total_resource_count=None, total_resource_group_count=None, total_user_count=None, user_count=None):
        # The number of resource instances in the cost center.
        self.resource_count = resource_count  # type: long
        # The number of resource groups in the cost center.
        self.resource_group_count = resource_group_count  # type: long
        # The number of sub-cost centers in the cost center.
        self.sub_unit_count = sub_unit_count  # type: long
        # The total number of resource instances, including resource instances of sub-cost centers, in the cost center.
        self.total_resource_count = total_resource_count  # type: long
        # The total number of resource groups, including resource groups of sub-cost centers, in the cost center.
        self.total_resource_group_count = total_resource_group_count  # type: long
        # The total number of the associated accounts, including associated accounts of sub-cost centers, in the cost center.
        self.total_user_count = total_user_count  # type: long
        # The number of sub-cost centers in the cost center.
        self.user_count = user_count  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryCostUnitResourceResponseBodyDataCostUnitStatisInfo, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.resource_count is not None:
            result['ResourceCount'] = self.resource_count
        if self.resource_group_count is not None:
            result['ResourceGroupCount'] = self.resource_group_count
        if self.sub_unit_count is not None:
            result['SubUnitCount'] = self.sub_unit_count
        if self.total_resource_count is not None:
            result['TotalResourceCount'] = self.total_resource_count
        if self.total_resource_group_count is not None:
            result['TotalResourceGroupCount'] = self.total_resource_group_count
        if self.total_user_count is not None:
            result['TotalUserCount'] = self.total_user_count
        if self.user_count is not None:
            result['UserCount'] = self.user_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ResourceCount') is not None:
            self.resource_count = m.get('ResourceCount')
        if m.get('ResourceGroupCount') is not None:
            self.resource_group_count = m.get('ResourceGroupCount')
        if m.get('SubUnitCount') is not None:
            self.sub_unit_count = m.get('SubUnitCount')
        if m.get('TotalResourceCount') is not None:
            self.total_resource_count = m.get('TotalResourceCount')
        if m.get('TotalResourceGroupCount') is not None:
            self.total_resource_group_count = m.get('TotalResourceGroupCount')
        if m.get('TotalUserCount') is not None:
            self.total_user_count = m.get('TotalUserCount')
        if m.get('UserCount') is not None:
            self.user_count = m.get('UserCount')
        return self


class QueryCostUnitResourceResponseBodyDataResourceInstanceDtoList(TeaModel):
    def __init__(self, apportion_code=None, apportion_name=None, commodity_code=None, commodity_name=None,
                 related_resources=None, resource_group=None, resource_id=None, resource_nick=None, resource_status=None,
                 resource_tag=None, resource_type=None, resource_user_id=None, resource_user_name=None):
        # The split code of the resource.
        self.apportion_code = apportion_code  # type: str
        # The split name of the resource.
        self.apportion_name = apportion_name  # type: str
        # The product code of the resource.
        self.commodity_code = commodity_code  # type: str
        # The commodity name of the resource.
        self.commodity_name = commodity_name  # type: str
        # The resources related to the resource instance.
        self.related_resources = related_resources  # type: str
        # The resource group to which the resource belongs.
        self.resource_group = resource_group  # type: str
        # The instance ID of the resource.
        self.resource_id = resource_id  # type: str
        # The custom name of the resource.
        self.resource_nick = resource_nick  # type: str
        # The status of the resource.
        self.resource_status = resource_status  # type: str
        # The tags of the resource.
        self.resource_tag = resource_tag  # type: str
        # The type of the resource.
        self.resource_type = resource_type  # type: str
        # The user ID of the resource owner.
        self.resource_user_id = resource_user_id  # type: long
        # The username of the resource owner.
        self.resource_user_name = resource_user_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryCostUnitResourceResponseBodyDataResourceInstanceDtoList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.apportion_code is not None:
            result['ApportionCode'] = self.apportion_code
        if self.apportion_name is not None:
            result['ApportionName'] = self.apportion_name
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.commodity_name is not None:
            result['CommodityName'] = self.commodity_name
        if self.related_resources is not None:
            result['RelatedResources'] = self.related_resources
        if self.resource_group is not None:
            result['ResourceGroup'] = self.resource_group
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_nick is not None:
            result['ResourceNick'] = self.resource_nick
        if self.resource_status is not None:
            result['ResourceStatus'] = self.resource_status
        if self.resource_tag is not None:
            result['ResourceTag'] = self.resource_tag
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.resource_user_id is not None:
            result['ResourceUserId'] = self.resource_user_id
        if self.resource_user_name is not None:
            result['ResourceUserName'] = self.resource_user_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ApportionCode') is not None:
            self.apportion_code = m.get('ApportionCode')
        if m.get('ApportionName') is not None:
            self.apportion_name = m.get('ApportionName')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('CommodityName') is not None:
            self.commodity_name = m.get('CommodityName')
        if m.get('RelatedResources') is not None:
            self.related_resources = m.get('RelatedResources')
        if m.get('ResourceGroup') is not None:
            self.resource_group = m.get('ResourceGroup')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceNick') is not None:
            self.resource_nick = m.get('ResourceNick')
        if m.get('ResourceStatus') is not None:
            self.resource_status = m.get('ResourceStatus')
        if m.get('ResourceTag') is not None:
            self.resource_tag = m.get('ResourceTag')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('ResourceUserId') is not None:
            self.resource_user_id = m.get('ResourceUserId')
        if m.get('ResourceUserName') is not None:
            self.resource_user_name = m.get('ResourceUserName')
        return self


class QueryCostUnitResourceResponseBodyData(TeaModel):
    def __init__(self, cost_unit=None, cost_unit_statis_info=None, page_num=None, page_size=None,
                 resource_instance_dto_list=None, total_count=None):
        # The information about the cost center.
        self.cost_unit = cost_unit  # type: QueryCostUnitResourceResponseBodyDataCostUnit
        # The statistical information about the cost center.
        self.cost_unit_statis_info = cost_unit_statis_info  # type: QueryCostUnitResourceResponseBodyDataCostUnitStatisInfo
        # The page number of the returned page.
        self.page_num = page_num  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The resource instances.
        self.resource_instance_dto_list = resource_instance_dto_list  # type: list[QueryCostUnitResourceResponseBodyDataResourceInstanceDtoList]
        # The total number of returned entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.cost_unit:
            self.cost_unit.validate()
        if self.cost_unit_statis_info:
            self.cost_unit_statis_info.validate()
        if self.resource_instance_dto_list:
            for k in self.resource_instance_dto_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryCostUnitResourceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.cost_unit is not None:
            result['CostUnit'] = self.cost_unit.to_map()
        if self.cost_unit_statis_info is not None:
            result['CostUnitStatisInfo'] = self.cost_unit_statis_info.to_map()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        result['ResourceInstanceDtoList'] = []
        if self.resource_instance_dto_list is not None:
            for k in self.resource_instance_dto_list:
                result['ResourceInstanceDtoList'].append(k.to_map() if k else None)
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CostUnit') is not None:
            temp_model = QueryCostUnitResourceResponseBodyDataCostUnit()
            self.cost_unit = temp_model.from_map(m['CostUnit'])
        if m.get('CostUnitStatisInfo') is not None:
            temp_model = QueryCostUnitResourceResponseBodyDataCostUnitStatisInfo()
            self.cost_unit_statis_info = temp_model.from_map(m['CostUnitStatisInfo'])
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        self.resource_instance_dto_list = []
        if m.get('ResourceInstanceDtoList') is not None:
            for k in m.get('ResourceInstanceDtoList'):
                temp_model = QueryCostUnitResourceResponseBodyDataResourceInstanceDtoList()
                self.resource_instance_dto_list.append(temp_model.from_map(k))
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryCostUnitResourceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryCostUnitResourceResponseBodyData
        # The error message.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryCostUnitResourceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryCostUnitResourceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryCostUnitResourceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryCostUnitResourceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryCostUnitResourceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryCostUnitResourceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryCustomerAddressListRequest(TeaModel):
    def __init__(self, owner_id=None):
        self.owner_id = owner_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryCustomerAddressListRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        return self


class QueryCustomerAddressListResponseBodyDataCustomerInvoiceAddressListCustomerInvoiceAddress(TeaModel):
    def __init__(self, addressee=None, biz_type=None, city=None, county=None, delivery_address=None, id=None,
                 phone=None, postal_code=None, province=None, street=None, user_id=None, user_nick=None):
        # The addressee.
        self.addressee = addressee  # type: str
        # The business type.
        self.biz_type = biz_type  # type: str
        # The city to which the invoice is mailed.
        self.city = city  # type: str
        # The name of the district to which the invoice is mailed.
        self.county = county  # type: str
        # The detailed address to which the invoice is mailed. This parameter is returned after fields are concatenated.
        self.delivery_address = delivery_address  # type: str
        # The ID.
        self.id = id  # type: long
        # The phone number of the addressee.
        self.phone = phone  # type: str
        # The postcode.
        self.postal_code = postal_code  # type: str
        # The province to which the invoice is mailed.
        self.province = province  # type: str
        # The name of the street to which the invoice is mailed.
        self.street = street  # type: str
        # The ID of the user.
        self.user_id = user_id  # type: long
        # The nickname of the user.
        self.user_nick = user_nick  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryCustomerAddressListResponseBodyDataCustomerInvoiceAddressListCustomerInvoiceAddress, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addressee is not None:
            result['Addressee'] = self.addressee
        if self.biz_type is not None:
            result['BizType'] = self.biz_type
        if self.city is not None:
            result['City'] = self.city
        if self.county is not None:
            result['County'] = self.county
        if self.delivery_address is not None:
            result['DeliveryAddress'] = self.delivery_address
        if self.id is not None:
            result['Id'] = self.id
        if self.phone is not None:
            result['Phone'] = self.phone
        if self.postal_code is not None:
            result['PostalCode'] = self.postal_code
        if self.province is not None:
            result['Province'] = self.province
        if self.street is not None:
            result['Street'] = self.street
        if self.user_id is not None:
            result['UserId'] = self.user_id
        if self.user_nick is not None:
            result['UserNick'] = self.user_nick
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Addressee') is not None:
            self.addressee = m.get('Addressee')
        if m.get('BizType') is not None:
            self.biz_type = m.get('BizType')
        if m.get('City') is not None:
            self.city = m.get('City')
        if m.get('County') is not None:
            self.county = m.get('County')
        if m.get('DeliveryAddress') is not None:
            self.delivery_address = m.get('DeliveryAddress')
        if m.get('Id') is not None:
            self.id = m.get('Id')
        if m.get('Phone') is not None:
            self.phone = m.get('Phone')
        if m.get('PostalCode') is not None:
            self.postal_code = m.get('PostalCode')
        if m.get('Province') is not None:
            self.province = m.get('Province')
        if m.get('Street') is not None:
            self.street = m.get('Street')
        if m.get('UserId') is not None:
            self.user_id = m.get('UserId')
        if m.get('UserNick') is not None:
            self.user_nick = m.get('UserNick')
        return self


class QueryCustomerAddressListResponseBodyDataCustomerInvoiceAddressList(TeaModel):
    def __init__(self, customer_invoice_address=None):
        self.customer_invoice_address = customer_invoice_address  # type: list[QueryCustomerAddressListResponseBodyDataCustomerInvoiceAddressListCustomerInvoiceAddress]

    def validate(self):
        if self.customer_invoice_address:
            for k in self.customer_invoice_address:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryCustomerAddressListResponseBodyDataCustomerInvoiceAddressList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['CustomerInvoiceAddress'] = []
        if self.customer_invoice_address is not None:
            for k in self.customer_invoice_address:
                result['CustomerInvoiceAddress'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.customer_invoice_address = []
        if m.get('CustomerInvoiceAddress') is not None:
            for k in m.get('CustomerInvoiceAddress'):
                temp_model = QueryCustomerAddressListResponseBodyDataCustomerInvoiceAddressListCustomerInvoiceAddress()
                self.customer_invoice_address.append(temp_model.from_map(k))
        return self


class QueryCustomerAddressListResponseBodyData(TeaModel):
    def __init__(self, customer_invoice_address_list=None):
        # The details of addresses to which invoices are mailed.
        self.customer_invoice_address_list = customer_invoice_address_list  # type: QueryCustomerAddressListResponseBodyDataCustomerInvoiceAddressList

    def validate(self):
        if self.customer_invoice_address_list:
            self.customer_invoice_address_list.validate()

    def to_map(self):
        _map = super(QueryCustomerAddressListResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.customer_invoice_address_list is not None:
            result['CustomerInvoiceAddressList'] = self.customer_invoice_address_list.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CustomerInvoiceAddressList') is not None:
            temp_model = QueryCustomerAddressListResponseBodyDataCustomerInvoiceAddressList()
            self.customer_invoice_address_list = temp_model.from_map(m['CustomerInvoiceAddressList'])
        return self


class QueryCustomerAddressListResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryCustomerAddressListResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryCustomerAddressListResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryCustomerAddressListResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryCustomerAddressListResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryCustomerAddressListResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryCustomerAddressListResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryCustomerAddressListResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryDPUtilizationDetailRequest(TeaModel):
    def __init__(self, commodity_code=None, deducted_instance_id=None, end_time=None, include_share=None,
                 instance_id=None, instance_spec=None, last_token=None, limit=None, prod_code=None, start_time=None):
        # The code of the resource, such as ecsRi and scu_bag. If this parameter is specified, the ProdCode parameter does not take effect for the request.
        self.commodity_code = commodity_code  # type: str
        # The ID of the deducted instance. If this parameter is not specified, the details of all instances are returned.
        self.deducted_instance_id = deducted_instance_id  # type: str
        # The end of the time range to query. Specify the time in the YYYY-MM-DD HH:mm:ss format.
        self.end_time = end_time  # type: str
        # Specifies whether to query the resource plan usage of linked accounts. Valid values:
        # 
        # *   true: queries the resource plan usage of linked accounts.
        # *   false: does not query the resource plan usage of linked accounts.
        self.include_share = include_share  # type: bool
        # The ID of the instance to query. If this parameter is not specified, the details of all used instances are returned.
        self.instance_id = instance_id  # type: str
        # The instance type of the instance.
        self.instance_spec = instance_spec  # type: str
        # The token that is used to retrieve the next page of results. For the first query, set the value to null. For subsequent queries, set the value to the token that is obtained from the NextToken parameter.
        self.last_token = last_token  # type: str
        # The number of entries to return on each page. Default value: 20. Maximum value: 300.
        self.limit = limit  # type: int
        # The code of the service. Example: ecs.
        self.prod_code = prod_code  # type: str
        # The beginning of the time range to query. Specify the time in the YYYY-MM-DD HH:mm:ss format.
        self.start_time = start_time  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryDPUtilizationDetailRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.deducted_instance_id is not None:
            result['DeductedInstanceId'] = self.deducted_instance_id
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.include_share is not None:
            result['IncludeShare'] = self.include_share
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.instance_spec is not None:
            result['InstanceSpec'] = self.instance_spec
        if self.last_token is not None:
            result['LastToken'] = self.last_token
        if self.limit is not None:
            result['Limit'] = self.limit
        if self.prod_code is not None:
            result['ProdCode'] = self.prod_code
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('DeductedInstanceId') is not None:
            self.deducted_instance_id = m.get('DeductedInstanceId')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('IncludeShare') is not None:
            self.include_share = m.get('IncludeShare')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('InstanceSpec') is not None:
            self.instance_spec = m.get('InstanceSpec')
        if m.get('LastToken') is not None:
            self.last_token = m.get('LastToken')
        if m.get('Limit') is not None:
            self.limit = m.get('Limit')
        if m.get('ProdCode') is not None:
            self.prod_code = m.get('ProdCode')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        return self


class QueryDPUtilizationDetailResponseBodyDataDetailListDetailList(TeaModel):
    def __init__(self, deduct_date=None, deduct_factor_total=None, deduct_hours=None, deduct_measure=None,
                 deduct_quantity=None, deducted_commodity_code=None, deducted_instance_id=None, deducted_product_detail=None,
                 instance_id=None, instance_spec=None, region=None, res_code=None, share_uid=None, uid=None):
        # The deduction date.
        self.deduct_date = deduct_date  # type: str
        # The total computing capacity or storage capacity of the RI or SCU during the deduction.
        self.deduct_factor_total = deduct_factor_total  # type: float
        # The deduct factor. This parameter is returned only if the CommodityCode parameter is set to ecsRi.
        self.deduct_hours = deduct_hours  # type: float
        # The original measured amount.
        self.deduct_measure = deduct_measure  # type: float
        # The computing capacity or storage capacity that is deducted in a pay-as-you-go instance.
        self.deduct_quantity = deduct_quantity  # type: float
        # The code of the deducted service.
        self.deducted_commodity_code = deducted_commodity_code  # type: str
        # The ID of the deducted instance.
        self.deducted_instance_id = deducted_instance_id  # type: str
        # The name of the deducted service.
        self.deducted_product_detail = deducted_product_detail  # type: str
        # The ID of the RI.
        self.instance_id = instance_id  # type: str
        # The instance type of the deducted instance.
        self.instance_spec = instance_spec  # type: str
        # The region in which the instance resides. This parameter can be left empty.
        self.region = region  # type: str
        # The billable item.
        self.res_code = res_code  # type: str
        # The UID of the deducted instance.
        # 
        # *   If the deduction is shared, the value of this parameter indicates the UID of the deducted instance.
        # *   If the deduction is not shared, the value of this parameter is the same as that of the uid parameter.
        self.share_uid = share_uid  # type: long
        # The UID of the deducted instance.
        self.uid = uid  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryDPUtilizationDetailResponseBodyDataDetailListDetailList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.deduct_date is not None:
            result['DeductDate'] = self.deduct_date
        if self.deduct_factor_total is not None:
            result['DeductFactorTotal'] = self.deduct_factor_total
        if self.deduct_hours is not None:
            result['DeductHours'] = self.deduct_hours
        if self.deduct_measure is not None:
            result['DeductMeasure'] = self.deduct_measure
        if self.deduct_quantity is not None:
            result['DeductQuantity'] = self.deduct_quantity
        if self.deducted_commodity_code is not None:
            result['DeductedCommodityCode'] = self.deducted_commodity_code
        if self.deducted_instance_id is not None:
            result['DeductedInstanceId'] = self.deducted_instance_id
        if self.deducted_product_detail is not None:
            result['DeductedProductDetail'] = self.deducted_product_detail
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.instance_spec is not None:
            result['InstanceSpec'] = self.instance_spec
        if self.region is not None:
            result['Region'] = self.region
        if self.res_code is not None:
            result['ResCode'] = self.res_code
        if self.share_uid is not None:
            result['ShareUid'] = self.share_uid
        if self.uid is not None:
            result['Uid'] = self.uid
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('DeductDate') is not None:
            self.deduct_date = m.get('DeductDate')
        if m.get('DeductFactorTotal') is not None:
            self.deduct_factor_total = m.get('DeductFactorTotal')
        if m.get('DeductHours') is not None:
            self.deduct_hours = m.get('DeductHours')
        if m.get('DeductMeasure') is not None:
            self.deduct_measure = m.get('DeductMeasure')
        if m.get('DeductQuantity') is not None:
            self.deduct_quantity = m.get('DeductQuantity')
        if m.get('DeductedCommodityCode') is not None:
            self.deducted_commodity_code = m.get('DeductedCommodityCode')
        if m.get('DeductedInstanceId') is not None:
            self.deducted_instance_id = m.get('DeductedInstanceId')
        if m.get('DeductedProductDetail') is not None:
            self.deducted_product_detail = m.get('DeductedProductDetail')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('InstanceSpec') is not None:
            self.instance_spec = m.get('InstanceSpec')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResCode') is not None:
            self.res_code = m.get('ResCode')
        if m.get('ShareUid') is not None:
            self.share_uid = m.get('ShareUid')
        if m.get('Uid') is not None:
            self.uid = m.get('Uid')
        return self


class QueryDPUtilizationDetailResponseBodyDataDetailList(TeaModel):
    def __init__(self, detail_list=None):
        self.detail_list = detail_list  # type: list[QueryDPUtilizationDetailResponseBodyDataDetailListDetailList]

    def validate(self):
        if self.detail_list:
            for k in self.detail_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryDPUtilizationDetailResponseBodyDataDetailList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['DetailList'] = []
        if self.detail_list is not None:
            for k in self.detail_list:
                result['DetailList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.detail_list = []
        if m.get('DetailList') is not None:
            for k in m.get('DetailList'):
                temp_model = QueryDPUtilizationDetailResponseBodyDataDetailListDetailList()
                self.detail_list.append(temp_model.from_map(k))
        return self


class QueryDPUtilizationDetailResponseBodyData(TeaModel):
    def __init__(self, detail_list=None, next_token=None):
        # The detailed resource plan usage.
        self.detail_list = detail_list  # type: QueryDPUtilizationDetailResponseBodyDataDetailList
        # The token that is used to retrieve the next page of results. You can set the LastToken parameter to this value in the next request. If null is returned, all results are queried.
        self.next_token = next_token  # type: str

    def validate(self):
        if self.detail_list:
            self.detail_list.validate()

    def to_map(self):
        _map = super(QueryDPUtilizationDetailResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.detail_list is not None:
            result['DetailList'] = self.detail_list.to_map()
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('DetailList') is not None:
            temp_model = QueryDPUtilizationDetailResponseBodyDataDetailList()
            self.detail_list = temp_model.from_map(m['DetailList'])
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        return self


class QueryDPUtilizationDetailResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The HTTP status code.
        self.code = code  # type: str
        # The returned data.
        self.data = data  # type: QueryDPUtilizationDetailResponseBodyData
        # The error message.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryDPUtilizationDetailResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryDPUtilizationDetailResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryDPUtilizationDetailResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryDPUtilizationDetailResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryDPUtilizationDetailResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryDPUtilizationDetailResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryEvaluateListRequest(TeaModel):
    def __init__(self, bill_cycle=None, biz_type_list=None, end_amount=None, end_biz_time=None,
                 end_search_time=None, out_biz_id=None, owner_id=None, page_num=None, page_size=None, sort_type=None,
                 start_amount=None, start_biz_time=None, start_search_time=None, type=None):
        # The billing cycle.
        self.bill_cycle = bill_cycle  # type: str
        # The market types in invoices.
        # 
        # >  By default, this parameter is left empty. If this parameter is left empty, all market types are queried.
        self.biz_type_list = biz_type_list  # type: list[str]
        # The maximum amount to be queried.
        self.end_amount = end_amount  # type: long
        # The latest time when an order is paid Specify the time in the yyyy-mm-dd hh:mm:ss format.
        self.end_biz_time = end_biz_time  # type: str
        # The end of the time range to query.
        self.end_search_time = end_search_time  # type: str
        # The ID of the external order.
        self.out_biz_id = out_biz_id  # type: str
        self.owner_id = owner_id  # type: long
        # The number of the page to return.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page.
        self.page_size = page_size  # type: int
        # The type of the sort. Valid values:
        # 
        # *   1: Sort invoices by ID in descending order.
        # *   2: Sort invoices by invoice type in descending order, and then sort invoices of the same type by ID in descending order.
        # *   3: Sort invoices by invoice type in ascending order, and then sort invoices of the same type by ID in descending order.
        self.sort_type = sort_type  # type: int
        # The minimum amount to be queried.
        self.start_amount = start_amount  # type: long
        # The earliest time when an order is paid. Specify the time in the yyyy-mm-dd hh:mm:ss format.
        self.start_biz_time = start_biz_time  # type: str
        # The beginning of the time range to query.
        self.start_search_time = start_search_time  # type: str
        # The type of orders to be queried. Valid values:
        # 
        # *   1: the orders in which the invoiceable amount is negative.
        # *   2: the orders in which the invoiceable amount is positive.
        # *   3: the orders in which the invoiceable amount is not 0.
        # *   4: the orders in which the amount that has been invoiced is greater than 0.
        # 
        # >  By default, this parameter is left empty. If this parameter is left empty, all orders are queried.
        self.type = type  # type: int

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryEvaluateListRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_cycle is not None:
            result['BillCycle'] = self.bill_cycle
        if self.biz_type_list is not None:
            result['BizTypeList'] = self.biz_type_list
        if self.end_amount is not None:
            result['EndAmount'] = self.end_amount
        if self.end_biz_time is not None:
            result['EndBizTime'] = self.end_biz_time
        if self.end_search_time is not None:
            result['EndSearchTime'] = self.end_search_time
        if self.out_biz_id is not None:
            result['OutBizId'] = self.out_biz_id
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.sort_type is not None:
            result['SortType'] = self.sort_type
        if self.start_amount is not None:
            result['StartAmount'] = self.start_amount
        if self.start_biz_time is not None:
            result['StartBizTime'] = self.start_biz_time
        if self.start_search_time is not None:
            result['StartSearchTime'] = self.start_search_time
        if self.type is not None:
            result['Type'] = self.type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillCycle') is not None:
            self.bill_cycle = m.get('BillCycle')
        if m.get('BizTypeList') is not None:
            self.biz_type_list = m.get('BizTypeList')
        if m.get('EndAmount') is not None:
            self.end_amount = m.get('EndAmount')
        if m.get('EndBizTime') is not None:
            self.end_biz_time = m.get('EndBizTime')
        if m.get('EndSearchTime') is not None:
            self.end_search_time = m.get('EndSearchTime')
        if m.get('OutBizId') is not None:
            self.out_biz_id = m.get('OutBizId')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('SortType') is not None:
            self.sort_type = m.get('SortType')
        if m.get('StartAmount') is not None:
            self.start_amount = m.get('StartAmount')
        if m.get('StartBizTime') is not None:
            self.start_biz_time = m.get('StartBizTime')
        if m.get('StartSearchTime') is not None:
            self.start_search_time = m.get('StartSearchTime')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        return self


class QueryEvaluateListResponseBodyDataEvaluateListEvaluate(TeaModel):
    def __init__(self, bill_cycle=None, bill_id=None, biz_time=None, biz_type=None, can_invoice_amount=None,
                 gmt_create=None, gmt_modified=None, id=None, invoiced_amount=None, item_id=None, name=None,
                 offset_accept_amount=None, offset_cost_amount=None, op_id=None, original_amount=None, out_biz_id=None,
                 present_amount=None, status=None, type=None, user_id=None, user_nick=None):
        # The billing cycle.
        self.bill_cycle = bill_cycle  # type: str
        # The ID of the bill.
        self.bill_id = bill_id  # type: long
        # The time.
        self.biz_time = biz_time  # type: str
        # The market type in the invoice. Valid values:
        # 
        # *   ALIYUN: Alibaba Cloud
        # *   MARKETPLACE: Alibaba Cloud Marketplace
        self.biz_type = biz_type  # type: str
        # The invoiceable amount.
        self.can_invoice_amount = can_invoice_amount  # type: long
        # The creation time.
        self.gmt_create = gmt_create  # type: str
        # The modification time.
        self.gmt_modified = gmt_modified  # type: str
        # The ID of the invoice.
        self.id = id  # type: long
        # The invoiced amount.
        self.invoiced_amount = invoiced_amount  # type: long
        # The ID of the item.
        self.item_id = item_id  # type: long
        # The name of the object to be invoiced.
        self.name = name  # type: str
        # If a refund is issued due to an order such as an unsubscription order or a configuration downgrade order, the refund amount is used to offset the amount of the invoice. The value is consistent with the value of the **OffsetCostAmount** parameter.
        self.offset_accept_amount = offset_accept_amount  # type: long
        # The refund amount used to offset the amount of the invoice. If a refund is issued due to an order such as an unsubscription order or a configuration downgrade order, the refund amount is used to offset the amount of the invoice. The value is consistent with the value of the **OffsetAcceptAmount** parameter.
        self.offset_cost_amount = offset_cost_amount  # type: long
        # The ID of the external object.
        self.op_id = op_id  # type: str
        # The original amount.
        self.original_amount = original_amount  # type: long
        # The ID of the external order.
        self.out_biz_id = out_biz_id  # type: str
        # The balance.
        self.present_amount = present_amount  # type: long
        # The status of the invoiceable amount.
        self.status = status  # type: int
        # The type of orders that are queried. Valid values:
        # 
        # *   1: the orders in which the invoiceable amount is negative.
        # *   2: the orders in which the invoiceable amount is positive.
        # *   3: the orders in which the invoiceable amount is not 0.
        # *   4: the orders in which the amount that has been invoiced is greater than 0.
        # 
        # >  By default, this parameter is left empty. If this parameter is left empty, all orders are queried.
        self.type = type  # type: int
        # The ID of the user.
        self.user_id = user_id  # type: long
        # The nickname of the user.
        self.user_nick = user_nick  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryEvaluateListResponseBodyDataEvaluateListEvaluate, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_cycle is not None:
            result['BillCycle'] = self.bill_cycle
        if self.bill_id is not None:
            result['BillId'] = self.bill_id
        if self.biz_time is not None:
            result['BizTime'] = self.biz_time
        if self.biz_type is not None:
            result['BizType'] = self.biz_type
        if self.can_invoice_amount is not None:
            result['CanInvoiceAmount'] = self.can_invoice_amount
        if self.gmt_create is not None:
            result['GmtCreate'] = self.gmt_create
        if self.gmt_modified is not None:
            result['GmtModified'] = self.gmt_modified
        if self.id is not None:
            result['Id'] = self.id
        if self.invoiced_amount is not None:
            result['InvoicedAmount'] = self.invoiced_amount
        if self.item_id is not None:
            result['ItemId'] = self.item_id
        if self.name is not None:
            result['Name'] = self.name
        if self.offset_accept_amount is not None:
            result['OffsetAcceptAmount'] = self.offset_accept_amount
        if self.offset_cost_amount is not None:
            result['OffsetCostAmount'] = self.offset_cost_amount
        if self.op_id is not None:
            result['OpId'] = self.op_id
        if self.original_amount is not None:
            result['OriginalAmount'] = self.original_amount
        if self.out_biz_id is not None:
            result['OutBizId'] = self.out_biz_id
        if self.present_amount is not None:
            result['PresentAmount'] = self.present_amount
        if self.status is not None:
            result['Status'] = self.status
        if self.type is not None:
            result['Type'] = self.type
        if self.user_id is not None:
            result['UserId'] = self.user_id
        if self.user_nick is not None:
            result['UserNick'] = self.user_nick
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillCycle') is not None:
            self.bill_cycle = m.get('BillCycle')
        if m.get('BillId') is not None:
            self.bill_id = m.get('BillId')
        if m.get('BizTime') is not None:
            self.biz_time = m.get('BizTime')
        if m.get('BizType') is not None:
            self.biz_type = m.get('BizType')
        if m.get('CanInvoiceAmount') is not None:
            self.can_invoice_amount = m.get('CanInvoiceAmount')
        if m.get('GmtCreate') is not None:
            self.gmt_create = m.get('GmtCreate')
        if m.get('GmtModified') is not None:
            self.gmt_modified = m.get('GmtModified')
        if m.get('Id') is not None:
            self.id = m.get('Id')
        if m.get('InvoicedAmount') is not None:
            self.invoiced_amount = m.get('InvoicedAmount')
        if m.get('ItemId') is not None:
            self.item_id = m.get('ItemId')
        if m.get('Name') is not None:
            self.name = m.get('Name')
        if m.get('OffsetAcceptAmount') is not None:
            self.offset_accept_amount = m.get('OffsetAcceptAmount')
        if m.get('OffsetCostAmount') is not None:
            self.offset_cost_amount = m.get('OffsetCostAmount')
        if m.get('OpId') is not None:
            self.op_id = m.get('OpId')
        if m.get('OriginalAmount') is not None:
            self.original_amount = m.get('OriginalAmount')
        if m.get('OutBizId') is not None:
            self.out_biz_id = m.get('OutBizId')
        if m.get('PresentAmount') is not None:
            self.present_amount = m.get('PresentAmount')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        if m.get('UserId') is not None:
            self.user_id = m.get('UserId')
        if m.get('UserNick') is not None:
            self.user_nick = m.get('UserNick')
        return self


class QueryEvaluateListResponseBodyDataEvaluateList(TeaModel):
    def __init__(self, evaluate=None):
        self.evaluate = evaluate  # type: list[QueryEvaluateListResponseBodyDataEvaluateListEvaluate]

    def validate(self):
        if self.evaluate:
            for k in self.evaluate:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryEvaluateListResponseBodyDataEvaluateList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Evaluate'] = []
        if self.evaluate is not None:
            for k in self.evaluate:
                result['Evaluate'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.evaluate = []
        if m.get('Evaluate') is not None:
            for k in m.get('Evaluate'):
                temp_model = QueryEvaluateListResponseBodyDataEvaluateListEvaluate()
                self.evaluate.append(temp_model.from_map(k))
        return self


class QueryEvaluateListResponseBodyData(TeaModel):
    def __init__(self, evaluate_list=None, host_id=None, page_num=None, page_size=None, total_count=None,
                 total_invoice_amount=None, total_un_applied_invoice_amount=None):
        # The data returned.
        self.evaluate_list = evaluate_list  # type: QueryEvaluateListResponseBodyDataEvaluateList
        # The ID of the host.
        self.host_id = host_id  # type: str
        # The number of the page returned.
        self.page_num = page_num  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The total number of returned entries.
        self.total_count = total_count  # type: int
        # The invoiced amount that meets the query conditions. Unit: Cent.
        self.total_invoice_amount = total_invoice_amount  # type: long
        # The invoiceable amount that meets the query conditions. Unit: Cent.
        self.total_un_applied_invoice_amount = total_un_applied_invoice_amount  # type: long

    def validate(self):
        if self.evaluate_list:
            self.evaluate_list.validate()

    def to_map(self):
        _map = super(QueryEvaluateListResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.evaluate_list is not None:
            result['EvaluateList'] = self.evaluate_list.to_map()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        if self.total_invoice_amount is not None:
            result['TotalInvoiceAmount'] = self.total_invoice_amount
        if self.total_un_applied_invoice_amount is not None:
            result['TotalUnAppliedInvoiceAmount'] = self.total_un_applied_invoice_amount
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EvaluateList') is not None:
            temp_model = QueryEvaluateListResponseBodyDataEvaluateList()
            self.evaluate_list = temp_model.from_map(m['EvaluateList'])
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        if m.get('TotalInvoiceAmount') is not None:
            self.total_invoice_amount = m.get('TotalInvoiceAmount')
        if m.get('TotalUnAppliedInvoiceAmount') is not None:
            self.total_un_applied_invoice_amount = m.get('TotalUnAppliedInvoiceAmount')
        return self


class QueryEvaluateListResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryEvaluateListResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryEvaluateListResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryEvaluateListResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryEvaluateListResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryEvaluateListResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryEvaluateListResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryEvaluateListResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryFinancialAccountInfoRequest(TeaModel):
    def __init__(self, user_id=None):
        # The ID of the Alibaba Cloud account.
        self.user_id = user_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryFinancialAccountInfoRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.user_id is not None:
            result['UserId'] = self.user_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('UserId') is not None:
            self.user_id = m.get('UserId')
        return self


class QueryFinancialAccountInfoResponseBodyData(TeaModel):
    def __init__(self, account_type=None, is_financial_account=None, member_group_id=None, member_group_name=None,
                 member_nick_name=None, user_name=None):
        # The type of the financial account. A value of MASTER indicates that the account is a management account. A value of MEMBER indicates that the account is a member.
        self.account_type = account_type  # type: str
        # Indicates whether the account is a financial account. A value of true indicates that the account is a financial account. A value of false indicates that the account is not a financial account.
        self.is_financial_account = is_financial_account  # type: bool
        # The ID of the group to which the member belongs.
        self.member_group_id = member_group_id  # type: long
        # The name of the group to which the member belongs.
        self.member_group_name = member_group_name  # type: str
        # The display name of the member.
        self.member_nick_name = member_nick_name  # type: str
        # The username of the account.
        self.user_name = user_name  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryFinancialAccountInfoResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_type is not None:
            result['AccountType'] = self.account_type
        if self.is_financial_account is not None:
            result['IsFinancialAccount'] = self.is_financial_account
        if self.member_group_id is not None:
            result['MemberGroupId'] = self.member_group_id
        if self.member_group_name is not None:
            result['MemberGroupName'] = self.member_group_name
        if self.member_nick_name is not None:
            result['MemberNickName'] = self.member_nick_name
        if self.user_name is not None:
            result['UserName'] = self.user_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountType') is not None:
            self.account_type = m.get('AccountType')
        if m.get('IsFinancialAccount') is not None:
            self.is_financial_account = m.get('IsFinancialAccount')
        if m.get('MemberGroupId') is not None:
            self.member_group_id = m.get('MemberGroupId')
        if m.get('MemberGroupName') is not None:
            self.member_group_name = m.get('MemberGroupName')
        if m.get('MemberNickName') is not None:
            self.member_nick_name = m.get('MemberNickName')
        if m.get('UserName') is not None:
            self.user_name = m.get('UserName')
        return self


class QueryFinancialAccountInfoResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryFinancialAccountInfoResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryFinancialAccountInfoResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryFinancialAccountInfoResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryFinancialAccountInfoResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryFinancialAccountInfoResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryFinancialAccountInfoResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryFinancialAccountInfoResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryInstanceBillRequest(TeaModel):
    def __init__(self, bill_owner_id=None, billing_cycle=None, billing_date=None, granularity=None,
                 is_billing_item=None, is_hide_zero_charge=None, owner_id=None, page_num=None, page_size=None, product_code=None,
                 product_type=None, subscription_type=None):
        # The ID of the member. If you specify a value for this parameter, you can query the bills of the specified member. If you leave this parameter empty, the bills of the current account are queried by default.
        self.bill_owner_id = bill_owner_id  # type: long
        # The billing cycle. Format: YYYY-MM.
        self.billing_cycle = billing_cycle  # type: str
        # The billing date. This parameter is required only if the **Granularity** parameter is set to DAILY. Format: YYYY-MM-DD.
        self.billing_date = billing_date  # type: str
        # The granularity at which bills are queried. Valid values:
        # 
        # *   MONTHLY: queries bills by month. The data queried is consistent with the data that is displayed for the specified billing cycle on the Billing Details tab of the Bill Details page in User Center.
        # *   DAILY: queries bills by day. The data queried is consistent with the data that is displayed for the specified day on the Billing Details tab of the Bill Details page in User Center.
        # 
        # You must set the **BillingDate** parameter before you can set the Granularity parameter to DAILY.
        self.granularity = granularity  # type: str
        # Specifies whether to query data by billable item. Valid values:
        # 
        # *   false: does not query data by billable item. The data queried is consistent with the data that is displayed for the specified instance on the Billing Details tab of the Bill Details page in User Center.
        # *   true: queries data by billable item. The data queried is consistent with the data that is displayed for the specified billable item on the Billing Details tab of the Bill Details page in User Center.
        # 
        # Default value: false.
        self.is_billing_item = is_billing_item  # type: bool
        # Specifies whether to filter out a bill whose pretax gross amount and pretax amount are 0. Default value: false.******** Valid values:
        # 
        # *   false: does not filter the bill.
        # *   true: filters the bill.
        self.is_hide_zero_charge = is_hide_zero_charge  # type: bool
        self.owner_id = owner_id  # type: long
        # The number of the page to return. Default value: 1.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page. Default value: 20. Maximum value: 300.
        self.page_size = page_size  # type: int
        # The code of the service.
        self.product_code = product_code  # type: str
        # The type of the service. This parameter is required if the ProductCode parameter is set to the service code of Alibaba Cloud Marketplace.
        self.product_type = product_type  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: the subscription billing method
        # *   PayAsYouGo: the pay-as-you-go billing method
        # 
        # **\
        # 
        # ****This parameter must be used together with the **ProductCode** parameter.
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryInstanceBillRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.billing_date is not None:
            result['BillingDate'] = self.billing_date
        if self.granularity is not None:
            result['Granularity'] = self.granularity
        if self.is_billing_item is not None:
            result['IsBillingItem'] = self.is_billing_item
        if self.is_hide_zero_charge is not None:
            result['IsHideZeroCharge'] = self.is_hide_zero_charge
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('BillingDate') is not None:
            self.billing_date = m.get('BillingDate')
        if m.get('Granularity') is not None:
            self.granularity = m.get('Granularity')
        if m.get('IsBillingItem') is not None:
            self.is_billing_item = m.get('IsBillingItem')
        if m.get('IsHideZeroCharge') is not None:
            self.is_hide_zero_charge = m.get('IsHideZeroCharge')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class QueryInstanceBillResponseBodyDataItemsItem(TeaModel):
    def __init__(self, adjust_amount=None, billing_date=None, billing_item=None, billing_type=None,
                 cash_amount=None, commodity_code=None, cost_unit=None, currency=None, deducted_by_cash_coupons=None,
                 deducted_by_coupons=None, deducted_by_prepaid_card=None, deducted_by_resource_package=None, instance_config=None,
                 instance_id=None, instance_spec=None, internet_ip=None, intranet_ip=None, invoice_discount=None, item=None,
                 list_price=None, list_price_unit=None, nick_name=None, outstanding_amount=None, owner_id=None,
                 payment_amount=None, pip_code=None, pretax_amount=None, pretax_gross_amount=None, product_code=None,
                 product_detail=None, product_name=None, product_type=None, region=None, resource_group=None, service_period=None,
                 service_period_unit=None, subscription_type=None, tag=None, usage=None, usage_unit=None, zone=None):
        # The amount deducted by using credit refunds.
        self.adjust_amount = adjust_amount  # type: float
        # The billing date. This parameter is returned only if the Granularity parameter is set to DAILY. Format: YYYY-MM-DD.
        self.billing_date = billing_date  # type: str
        # The billable item. This parameter is returned only if the IsBillingItem parameter is set to true.
        self.billing_item = billing_item  # type: str
        # The billing type.
        self.billing_type = billing_type  # type: str
        # The amount paid in cash. The amount that was deducted by using credit refunds is not included.
        self.cash_amount = cash_amount  # type: float
        # The code of the commodity. The commodity code is the same as that displayed in User Center.
        self.commodity_code = commodity_code  # type: str
        # The cost center.
        self.cost_unit = cost_unit  # type: str
        # The type of the currency. Valid values:
        # 
        # *   CNY
        # *   USD
        # *   JPY
        self.currency = currency  # type: str
        # The amount deducted by using vouchers.
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: float
        # The amount deducted by using coupons.
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        # The amount deducted by using prepaid cards.
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: float
        # The amount deducted by using resource plans.
        self.deducted_by_resource_package = deducted_by_resource_package  # type: str
        # The configurations of the instance.
        self.instance_config = instance_config  # type: str
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        # The instance type of the instance.
        self.instance_spec = instance_spec  # type: str
        # The public IP address.
        self.internet_ip = internet_ip  # type: str
        # The private IP address.
        self.intranet_ip = intranet_ip  # type: str
        # The discount amount.
        self.invoice_discount = invoice_discount  # type: float
        # The type of the bill.
        # 
        # *   SubscriptionOrder: subscription order
        # *   PayAsYouGoBill: pay-as-you-go bill
        # *   Refund: refund
        # *   Adjustment: reconciliation
        self.item = item  # type: str
        # The unit price. This parameter is returned only if the isBillingItem parameter is set to true.
        self.list_price = list_price  # type: str
        # The unit of the unit price. This parameter is returned only if the isBillingItem parameter is set to true.
        self.list_price_unit = list_price_unit  # type: str
        # The name of the instance.
        self.nick_name = nick_name  # type: str
        # The unsettled amount.
        self.outstanding_amount = outstanding_amount  # type: float
        # The ID of the member account. This parameter is returned in a multi-account payment scenario.
        self.owner_id = owner_id  # type: str
        # The amount paid in cash.
        self.payment_amount = payment_amount  # type: float
        # The code of the service. The service code is the same as that displayed in User Center.
        self.pip_code = pip_code  # type: str
        # The pretax amount.
        self.pretax_amount = pretax_amount  # type: float
        # The pretax gross amount.
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        # The code of the service.
        self.product_code = product_code  # type: str
        # The details of the service.
        self.product_detail = product_detail  # type: str
        # The name of the service.
        self.product_name = product_name  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The region.
        self.region = region  # type: str
        # The resource group.
        self.resource_group = resource_group  # type: str
        # The validity period.
        self.service_period = service_period  # type: str
        # The unit of the validity period.
        self.service_period_unit = service_period_unit  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: the subscription billing method
        # *   PayAsYouGo: the pay-as-you-go billing method
        # 
        # **\
        # 
        # ****This parameter is returned together with the ProductCode parameter.
        self.subscription_type = subscription_type  # type: str
        # The tag.
        self.tag = tag  # type: str
        # The usage of the billable item. This parameter is returned only if the isBillingItem parameter is set to true.
        self.usage = usage  # type: str
        # The unit of usage. This parameter is returned only if the isBillingItem parameter is set to true.
        self.usage_unit = usage_unit  # type: str
        # The ID of the zone.
        self.zone = zone  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryInstanceBillResponseBodyDataItemsItem, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.adjust_amount is not None:
            result['AdjustAmount'] = self.adjust_amount
        if self.billing_date is not None:
            result['BillingDate'] = self.billing_date
        if self.billing_item is not None:
            result['BillingItem'] = self.billing_item
        if self.billing_type is not None:
            result['BillingType'] = self.billing_type
        if self.cash_amount is not None:
            result['CashAmount'] = self.cash_amount
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.cost_unit is not None:
            result['CostUnit'] = self.cost_unit
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.deducted_by_resource_package is not None:
            result['DeductedByResourcePackage'] = self.deducted_by_resource_package
        if self.instance_config is not None:
            result['InstanceConfig'] = self.instance_config
        if self.instance_id is not None:
            result['InstanceID'] = self.instance_id
        if self.instance_spec is not None:
            result['InstanceSpec'] = self.instance_spec
        if self.internet_ip is not None:
            result['InternetIP'] = self.internet_ip
        if self.intranet_ip is not None:
            result['IntranetIP'] = self.intranet_ip
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.item is not None:
            result['Item'] = self.item
        if self.list_price is not None:
            result['ListPrice'] = self.list_price
        if self.list_price_unit is not None:
            result['ListPriceUnit'] = self.list_price_unit
        if self.nick_name is not None:
            result['NickName'] = self.nick_name
        if self.outstanding_amount is not None:
            result['OutstandingAmount'] = self.outstanding_amount
        if self.owner_id is not None:
            result['OwnerID'] = self.owner_id
        if self.payment_amount is not None:
            result['PaymentAmount'] = self.payment_amount
        if self.pip_code is not None:
            result['PipCode'] = self.pip_code
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_group is not None:
            result['ResourceGroup'] = self.resource_group
        if self.service_period is not None:
            result['ServicePeriod'] = self.service_period
        if self.service_period_unit is not None:
            result['ServicePeriodUnit'] = self.service_period_unit
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tag is not None:
            result['Tag'] = self.tag
        if self.usage is not None:
            result['Usage'] = self.usage
        if self.usage_unit is not None:
            result['UsageUnit'] = self.usage_unit
        if self.zone is not None:
            result['Zone'] = self.zone
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AdjustAmount') is not None:
            self.adjust_amount = m.get('AdjustAmount')
        if m.get('BillingDate') is not None:
            self.billing_date = m.get('BillingDate')
        if m.get('BillingItem') is not None:
            self.billing_item = m.get('BillingItem')
        if m.get('BillingType') is not None:
            self.billing_type = m.get('BillingType')
        if m.get('CashAmount') is not None:
            self.cash_amount = m.get('CashAmount')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('CostUnit') is not None:
            self.cost_unit = m.get('CostUnit')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('DeductedByResourcePackage') is not None:
            self.deducted_by_resource_package = m.get('DeductedByResourcePackage')
        if m.get('InstanceConfig') is not None:
            self.instance_config = m.get('InstanceConfig')
        if m.get('InstanceID') is not None:
            self.instance_id = m.get('InstanceID')
        if m.get('InstanceSpec') is not None:
            self.instance_spec = m.get('InstanceSpec')
        if m.get('InternetIP') is not None:
            self.internet_ip = m.get('InternetIP')
        if m.get('IntranetIP') is not None:
            self.intranet_ip = m.get('IntranetIP')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('Item') is not None:
            self.item = m.get('Item')
        if m.get('ListPrice') is not None:
            self.list_price = m.get('ListPrice')
        if m.get('ListPriceUnit') is not None:
            self.list_price_unit = m.get('ListPriceUnit')
        if m.get('NickName') is not None:
            self.nick_name = m.get('NickName')
        if m.get('OutstandingAmount') is not None:
            self.outstanding_amount = m.get('OutstandingAmount')
        if m.get('OwnerID') is not None:
            self.owner_id = m.get('OwnerID')
        if m.get('PaymentAmount') is not None:
            self.payment_amount = m.get('PaymentAmount')
        if m.get('PipCode') is not None:
            self.pip_code = m.get('PipCode')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceGroup') is not None:
            self.resource_group = m.get('ResourceGroup')
        if m.get('ServicePeriod') is not None:
            self.service_period = m.get('ServicePeriod')
        if m.get('ServicePeriodUnit') is not None:
            self.service_period_unit = m.get('ServicePeriodUnit')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tag') is not None:
            self.tag = m.get('Tag')
        if m.get('Usage') is not None:
            self.usage = m.get('Usage')
        if m.get('UsageUnit') is not None:
            self.usage_unit = m.get('UsageUnit')
        if m.get('Zone') is not None:
            self.zone = m.get('Zone')
        return self


class QueryInstanceBillResponseBodyDataItems(TeaModel):
    def __init__(self, item=None):
        self.item = item  # type: list[QueryInstanceBillResponseBodyDataItemsItem]

    def validate(self):
        if self.item:
            for k in self.item:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryInstanceBillResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Item'] = []
        if self.item is not None:
            for k in self.item:
                result['Item'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.item = []
        if m.get('Item') is not None:
            for k in m.get('Item'):
                temp_model = QueryInstanceBillResponseBodyDataItemsItem()
                self.item.append(temp_model.from_map(k))
        return self


class QueryInstanceBillResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, billing_cycle=None, items=None, page_num=None,
                 page_size=None, total_count=None):
        # The ID of the account.
        self.account_id = account_id  # type: str
        # The name of the account.
        self.account_name = account_name  # type: str
        # The billing cycle in the YYYY-MM format.
        self.billing_cycle = billing_cycle  # type: str
        # The details of the bill.
        self.items = items  # type: QueryInstanceBillResponseBodyDataItems
        # The page number of the returned page.
        self.page_num = page_num  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The total number of returned entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            self.items.validate()

    def to_map(self):
        _map = super(QueryInstanceBillResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.items is not None:
            result['Items'] = self.items.to_map()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('Items') is not None:
            temp_model = QueryInstanceBillResponseBodyDataItems()
            self.items = temp_model.from_map(m['Items'])
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryInstanceBillResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryInstanceBillResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryInstanceBillResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryInstanceBillResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryInstanceBillResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryInstanceBillResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryInstanceBillResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryInstanceBillResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryInstanceByTagRequestTag(TeaModel):
    def __init__(self, key=None, value=None):
        # The tag key.
        self.key = key  # type: str
        # The tag value.
        self.value = value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryInstanceByTagRequestTag, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.key is not None:
            result['Key'] = self.key
        if self.value is not None:
            result['Value'] = self.value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Key') is not None:
            self.key = m.get('Key')
        if m.get('Value') is not None:
            self.value = m.get('Value')
        return self


class QueryInstanceByTagRequest(TeaModel):
    def __init__(self, resource_id=None, resource_type=None, tag=None):
        # The IDs of resources.
        self.resource_id = resource_id  # type: list[str]
        # The type of the resource. Specify the savings plan instance as the type of the resource.
        self.resource_type = resource_type  # type: str
        # The tags.
        self.tag = tag  # type: list[QueryInstanceByTagRequestTag]

    def validate(self):
        if self.tag:
            for k in self.tag:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryInstanceByTagRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        result['Tag'] = []
        if self.tag is not None:
            for k in self.tag:
                result['Tag'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        self.tag = []
        if m.get('Tag') is not None:
            for k in m.get('Tag'):
                temp_model = QueryInstanceByTagRequestTag()
                self.tag.append(temp_model.from_map(k))
        return self


class QueryInstanceByTagResponseBodyTagResourceTag(TeaModel):
    def __init__(self, key=None, value=None):
        # The tag key.
        self.key = key  # type: str
        # The tag value.
        self.value = value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryInstanceByTagResponseBodyTagResourceTag, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.key is not None:
            result['Key'] = self.key
        if self.value is not None:
            result['Value'] = self.value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Key') is not None:
            self.key = m.get('Key')
        if m.get('Value') is not None:
            self.value = m.get('Value')
        return self


class QueryInstanceByTagResponseBodyTagResource(TeaModel):
    def __init__(self, resource_id=None, resource_type=None, tag=None):
        # The ID of the resource.
        self.resource_id = resource_id  # type: str
        # The type of the resource. The returned resource type indicates a savings plan instance.
        self.resource_type = resource_type  # type: str
        # The tags.
        self.tag = tag  # type: list[QueryInstanceByTagResponseBodyTagResourceTag]

    def validate(self):
        if self.tag:
            for k in self.tag:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryInstanceByTagResponseBodyTagResource, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        result['Tag'] = []
        if self.tag is not None:
            for k in self.tag:
                result['Tag'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        self.tag = []
        if m.get('Tag') is not None:
            for k in m.get('Tag'):
                temp_model = QueryInstanceByTagResponseBodyTagResourceTag()
                self.tag.append(temp_model.from_map(k))
        return self


class QueryInstanceByTagResponseBody(TeaModel):
    def __init__(self, code=None, message=None, next_token=None, request_id=None, success=None, tag_resource=None):
        # The status code returned.
        self.code = code  # type: str
        # The error message returned.
        self.message = message  # type: str
        # The token that determines the start point of the query. The return value is the value of the NextToken response parameter that was returned last time the QueryInstanceByTag operation was called.
        self.next_token = next_token  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool
        # The instances returned.
        self.tag_resource = tag_resource  # type: list[QueryInstanceByTagResponseBodyTagResource]

    def validate(self):
        if self.tag_resource:
            for k in self.tag_resource:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryInstanceByTagResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.message is not None:
            result['Message'] = self.message
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        result['TagResource'] = []
        if self.tag_resource is not None:
            for k in self.tag_resource:
                result['TagResource'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        self.tag_resource = []
        if m.get('TagResource') is not None:
            for k in m.get('TagResource'):
                temp_model = QueryInstanceByTagResponseBodyTagResource()
                self.tag_resource.append(temp_model.from_map(k))
        return self


class QueryInstanceByTagResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryInstanceByTagResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryInstanceByTagResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryInstanceByTagResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryInstanceGaapCostRequest(TeaModel):
    def __init__(self, billing_cycle=None, page_num=None, page_size=None, product_code=None, product_type=None,
                 subscription_type=None):
        self.billing_cycle = billing_cycle  # type: str
        self.page_num = page_num  # type: int
        self.page_size = page_size  # type: int
        self.product_code = product_code  # type: str
        self.product_type = product_type  # type: str
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryInstanceGaapCostRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class QueryInstanceGaapCostResponseBodyDataModulesModule(TeaModel):
    def __init__(self, accounting_unit=None, bill_type=None, billing_cycle=None, currency=None,
                 deducted_by_cash_coupons=None, deducted_by_coupons=None, deducted_by_prepaid_card=None,
                 gaap_deducted_by_cash_coupons=None, gaap_deducted_by_coupons=None, gaap_deducted_by_prepaid_card=None,
                 gaap_payment_amount=None, gaap_pretax_amount=None, gaap_pretax_amount_local=None, gaap_pretax_gross_amount=None,
                 gaap_pricing_discount=None, instance_id=None, month_gaap_deducted_by_cash_coupons=None,
                 month_gaap_deducted_by_coupons=None, month_gaap_deducted_by_prepaid_card=None, month_gaap_payment_amount=None,
                 month_gaap_pretax_amount=None, month_gaap_pretax_amount_local=None, month_gaap_pretax_gross_amount=None,
                 month_gaap_pricing_discount=None, order_id=None, order_type=None, owner_id=None, pay_time=None, payer_account=None,
                 payment_amount=None, payment_currency=None, pretax_amount=None, pretax_amount_local=None,
                 pretax_gross_amount=None, pricing_discount=None, product_code=None, product_type=None, region=None,
                 resource_group=None, sub_order_id=None, subscription_type=None, tag=None,
                 unallocated_deducted_by_cash_coupons=None, unallocated_deducted_by_coupons=None, unallocated_deducted_by_prepaid_card=None,
                 unallocated_payment_amount=None, unallocated_pretax_amount=None, unallocated_pretax_amount_local=None,
                 unallocated_pretax_gross_amount=None, unallocated_pricing_discount=None, usage_end_date=None, usage_start_date=None):
        self.accounting_unit = accounting_unit  # type: str
        self.bill_type = bill_type  # type: str
        self.billing_cycle = billing_cycle  # type: str
        self.currency = currency  # type: str
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: str
        self.deducted_by_coupons = deducted_by_coupons  # type: str
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: str
        self.gaap_deducted_by_cash_coupons = gaap_deducted_by_cash_coupons  # type: str
        self.gaap_deducted_by_coupons = gaap_deducted_by_coupons  # type: str
        self.gaap_deducted_by_prepaid_card = gaap_deducted_by_prepaid_card  # type: str
        self.gaap_payment_amount = gaap_payment_amount  # type: str
        self.gaap_pretax_amount = gaap_pretax_amount  # type: str
        self.gaap_pretax_amount_local = gaap_pretax_amount_local  # type: str
        self.gaap_pretax_gross_amount = gaap_pretax_gross_amount  # type: str
        self.gaap_pricing_discount = gaap_pricing_discount  # type: str
        self.instance_id = instance_id  # type: str
        self.month_gaap_deducted_by_cash_coupons = month_gaap_deducted_by_cash_coupons  # type: str
        self.month_gaap_deducted_by_coupons = month_gaap_deducted_by_coupons  # type: str
        self.month_gaap_deducted_by_prepaid_card = month_gaap_deducted_by_prepaid_card  # type: str
        self.month_gaap_payment_amount = month_gaap_payment_amount  # type: str
        self.month_gaap_pretax_amount = month_gaap_pretax_amount  # type: str
        self.month_gaap_pretax_amount_local = month_gaap_pretax_amount_local  # type: str
        self.month_gaap_pretax_gross_amount = month_gaap_pretax_gross_amount  # type: str
        self.month_gaap_pricing_discount = month_gaap_pricing_discount  # type: str
        self.order_id = order_id  # type: str
        self.order_type = order_type  # type: str
        self.owner_id = owner_id  # type: str
        self.pay_time = pay_time  # type: str
        self.payer_account = payer_account  # type: str
        self.payment_amount = payment_amount  # type: str
        self.payment_currency = payment_currency  # type: str
        self.pretax_amount = pretax_amount  # type: str
        self.pretax_amount_local = pretax_amount_local  # type: str
        self.pretax_gross_amount = pretax_gross_amount  # type: str
        self.pricing_discount = pricing_discount  # type: str
        self.product_code = product_code  # type: str
        self.product_type = product_type  # type: str
        self.region = region  # type: str
        self.resource_group = resource_group  # type: str
        self.sub_order_id = sub_order_id  # type: str
        self.subscription_type = subscription_type  # type: str
        self.tag = tag  # type: str
        self.unallocated_deducted_by_cash_coupons = unallocated_deducted_by_cash_coupons  # type: str
        self.unallocated_deducted_by_coupons = unallocated_deducted_by_coupons  # type: str
        self.unallocated_deducted_by_prepaid_card = unallocated_deducted_by_prepaid_card  # type: str
        self.unallocated_payment_amount = unallocated_payment_amount  # type: str
        self.unallocated_pretax_amount = unallocated_pretax_amount  # type: str
        self.unallocated_pretax_amount_local = unallocated_pretax_amount_local  # type: str
        self.unallocated_pretax_gross_amount = unallocated_pretax_gross_amount  # type: str
        self.unallocated_pricing_discount = unallocated_pricing_discount  # type: str
        self.usage_end_date = usage_end_date  # type: str
        self.usage_start_date = usage_start_date  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryInstanceGaapCostResponseBodyDataModulesModule, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.accounting_unit is not None:
            result['AccountingUnit'] = self.accounting_unit
        if self.bill_type is not None:
            result['BillType'] = self.bill_type
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.gaap_deducted_by_cash_coupons is not None:
            result['GaapDeductedByCashCoupons'] = self.gaap_deducted_by_cash_coupons
        if self.gaap_deducted_by_coupons is not None:
            result['GaapDeductedByCoupons'] = self.gaap_deducted_by_coupons
        if self.gaap_deducted_by_prepaid_card is not None:
            result['GaapDeductedByPrepaidCard'] = self.gaap_deducted_by_prepaid_card
        if self.gaap_payment_amount is not None:
            result['GaapPaymentAmount'] = self.gaap_payment_amount
        if self.gaap_pretax_amount is not None:
            result['GaapPretaxAmount'] = self.gaap_pretax_amount
        if self.gaap_pretax_amount_local is not None:
            result['GaapPretaxAmountLocal'] = self.gaap_pretax_amount_local
        if self.gaap_pretax_gross_amount is not None:
            result['GaapPretaxGrossAmount'] = self.gaap_pretax_gross_amount
        if self.gaap_pricing_discount is not None:
            result['GaapPricingDiscount'] = self.gaap_pricing_discount
        if self.instance_id is not None:
            result['InstanceID'] = self.instance_id
        if self.month_gaap_deducted_by_cash_coupons is not None:
            result['MonthGaapDeductedByCashCoupons'] = self.month_gaap_deducted_by_cash_coupons
        if self.month_gaap_deducted_by_coupons is not None:
            result['MonthGaapDeductedByCoupons'] = self.month_gaap_deducted_by_coupons
        if self.month_gaap_deducted_by_prepaid_card is not None:
            result['MonthGaapDeductedByPrepaidCard'] = self.month_gaap_deducted_by_prepaid_card
        if self.month_gaap_payment_amount is not None:
            result['MonthGaapPaymentAmount'] = self.month_gaap_payment_amount
        if self.month_gaap_pretax_amount is not None:
            result['MonthGaapPretaxAmount'] = self.month_gaap_pretax_amount
        if self.month_gaap_pretax_amount_local is not None:
            result['MonthGaapPretaxAmountLocal'] = self.month_gaap_pretax_amount_local
        if self.month_gaap_pretax_gross_amount is not None:
            result['MonthGaapPretaxGrossAmount'] = self.month_gaap_pretax_gross_amount
        if self.month_gaap_pricing_discount is not None:
            result['MonthGaapPricingDiscount'] = self.month_gaap_pricing_discount
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        if self.order_type is not None:
            result['OrderType'] = self.order_type
        if self.owner_id is not None:
            result['OwnerID'] = self.owner_id
        if self.pay_time is not None:
            result['PayTime'] = self.pay_time
        if self.payer_account is not None:
            result['PayerAccount'] = self.payer_account
        if self.payment_amount is not None:
            result['PaymentAmount'] = self.payment_amount
        if self.payment_currency is not None:
            result['PaymentCurrency'] = self.payment_currency
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_amount_local is not None:
            result['PretaxAmountLocal'] = self.pretax_amount_local
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.pricing_discount is not None:
            result['PricingDiscount'] = self.pricing_discount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_group is not None:
            result['ResourceGroup'] = self.resource_group
        if self.sub_order_id is not None:
            result['SubOrderId'] = self.sub_order_id
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tag is not None:
            result['Tag'] = self.tag
        if self.unallocated_deducted_by_cash_coupons is not None:
            result['UnallocatedDeductedByCashCoupons'] = self.unallocated_deducted_by_cash_coupons
        if self.unallocated_deducted_by_coupons is not None:
            result['UnallocatedDeductedByCoupons'] = self.unallocated_deducted_by_coupons
        if self.unallocated_deducted_by_prepaid_card is not None:
            result['UnallocatedDeductedByPrepaidCard'] = self.unallocated_deducted_by_prepaid_card
        if self.unallocated_payment_amount is not None:
            result['UnallocatedPaymentAmount'] = self.unallocated_payment_amount
        if self.unallocated_pretax_amount is not None:
            result['UnallocatedPretaxAmount'] = self.unallocated_pretax_amount
        if self.unallocated_pretax_amount_local is not None:
            result['UnallocatedPretaxAmountLocal'] = self.unallocated_pretax_amount_local
        if self.unallocated_pretax_gross_amount is not None:
            result['UnallocatedPretaxGrossAmount'] = self.unallocated_pretax_gross_amount
        if self.unallocated_pricing_discount is not None:
            result['UnallocatedPricingDiscount'] = self.unallocated_pricing_discount
        if self.usage_end_date is not None:
            result['UsageEndDate'] = self.usage_end_date
        if self.usage_start_date is not None:
            result['UsageStartDate'] = self.usage_start_date
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountingUnit') is not None:
            self.accounting_unit = m.get('AccountingUnit')
        if m.get('BillType') is not None:
            self.bill_type = m.get('BillType')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('GaapDeductedByCashCoupons') is not None:
            self.gaap_deducted_by_cash_coupons = m.get('GaapDeductedByCashCoupons')
        if m.get('GaapDeductedByCoupons') is not None:
            self.gaap_deducted_by_coupons = m.get('GaapDeductedByCoupons')
        if m.get('GaapDeductedByPrepaidCard') is not None:
            self.gaap_deducted_by_prepaid_card = m.get('GaapDeductedByPrepaidCard')
        if m.get('GaapPaymentAmount') is not None:
            self.gaap_payment_amount = m.get('GaapPaymentAmount')
        if m.get('GaapPretaxAmount') is not None:
            self.gaap_pretax_amount = m.get('GaapPretaxAmount')
        if m.get('GaapPretaxAmountLocal') is not None:
            self.gaap_pretax_amount_local = m.get('GaapPretaxAmountLocal')
        if m.get('GaapPretaxGrossAmount') is not None:
            self.gaap_pretax_gross_amount = m.get('GaapPretaxGrossAmount')
        if m.get('GaapPricingDiscount') is not None:
            self.gaap_pricing_discount = m.get('GaapPricingDiscount')
        if m.get('InstanceID') is not None:
            self.instance_id = m.get('InstanceID')
        if m.get('MonthGaapDeductedByCashCoupons') is not None:
            self.month_gaap_deducted_by_cash_coupons = m.get('MonthGaapDeductedByCashCoupons')
        if m.get('MonthGaapDeductedByCoupons') is not None:
            self.month_gaap_deducted_by_coupons = m.get('MonthGaapDeductedByCoupons')
        if m.get('MonthGaapDeductedByPrepaidCard') is not None:
            self.month_gaap_deducted_by_prepaid_card = m.get('MonthGaapDeductedByPrepaidCard')
        if m.get('MonthGaapPaymentAmount') is not None:
            self.month_gaap_payment_amount = m.get('MonthGaapPaymentAmount')
        if m.get('MonthGaapPretaxAmount') is not None:
            self.month_gaap_pretax_amount = m.get('MonthGaapPretaxAmount')
        if m.get('MonthGaapPretaxAmountLocal') is not None:
            self.month_gaap_pretax_amount_local = m.get('MonthGaapPretaxAmountLocal')
        if m.get('MonthGaapPretaxGrossAmount') is not None:
            self.month_gaap_pretax_gross_amount = m.get('MonthGaapPretaxGrossAmount')
        if m.get('MonthGaapPricingDiscount') is not None:
            self.month_gaap_pricing_discount = m.get('MonthGaapPricingDiscount')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        if m.get('OrderType') is not None:
            self.order_type = m.get('OrderType')
        if m.get('OwnerID') is not None:
            self.owner_id = m.get('OwnerID')
        if m.get('PayTime') is not None:
            self.pay_time = m.get('PayTime')
        if m.get('PayerAccount') is not None:
            self.payer_account = m.get('PayerAccount')
        if m.get('PaymentAmount') is not None:
            self.payment_amount = m.get('PaymentAmount')
        if m.get('PaymentCurrency') is not None:
            self.payment_currency = m.get('PaymentCurrency')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxAmountLocal') is not None:
            self.pretax_amount_local = m.get('PretaxAmountLocal')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('PricingDiscount') is not None:
            self.pricing_discount = m.get('PricingDiscount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceGroup') is not None:
            self.resource_group = m.get('ResourceGroup')
        if m.get('SubOrderId') is not None:
            self.sub_order_id = m.get('SubOrderId')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tag') is not None:
            self.tag = m.get('Tag')
        if m.get('UnallocatedDeductedByCashCoupons') is not None:
            self.unallocated_deducted_by_cash_coupons = m.get('UnallocatedDeductedByCashCoupons')
        if m.get('UnallocatedDeductedByCoupons') is not None:
            self.unallocated_deducted_by_coupons = m.get('UnallocatedDeductedByCoupons')
        if m.get('UnallocatedDeductedByPrepaidCard') is not None:
            self.unallocated_deducted_by_prepaid_card = m.get('UnallocatedDeductedByPrepaidCard')
        if m.get('UnallocatedPaymentAmount') is not None:
            self.unallocated_payment_amount = m.get('UnallocatedPaymentAmount')
        if m.get('UnallocatedPretaxAmount') is not None:
            self.unallocated_pretax_amount = m.get('UnallocatedPretaxAmount')
        if m.get('UnallocatedPretaxAmountLocal') is not None:
            self.unallocated_pretax_amount_local = m.get('UnallocatedPretaxAmountLocal')
        if m.get('UnallocatedPretaxGrossAmount') is not None:
            self.unallocated_pretax_gross_amount = m.get('UnallocatedPretaxGrossAmount')
        if m.get('UnallocatedPricingDiscount') is not None:
            self.unallocated_pricing_discount = m.get('UnallocatedPricingDiscount')
        if m.get('UsageEndDate') is not None:
            self.usage_end_date = m.get('UsageEndDate')
        if m.get('UsageStartDate') is not None:
            self.usage_start_date = m.get('UsageStartDate')
        return self


class QueryInstanceGaapCostResponseBodyDataModules(TeaModel):
    def __init__(self, module=None):
        self.module = module  # type: list[QueryInstanceGaapCostResponseBodyDataModulesModule]

    def validate(self):
        if self.module:
            for k in self.module:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryInstanceGaapCostResponseBodyDataModules, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Module'] = []
        if self.module is not None:
            for k in self.module:
                result['Module'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.module = []
        if m.get('Module') is not None:
            for k in m.get('Module'):
                temp_model = QueryInstanceGaapCostResponseBodyDataModulesModule()
                self.module.append(temp_model.from_map(k))
        return self


class QueryInstanceGaapCostResponseBodyData(TeaModel):
    def __init__(self, host_id=None, modules=None, page_num=None, page_size=None, total_count=None):
        self.host_id = host_id  # type: str
        self.modules = modules  # type: QueryInstanceGaapCostResponseBodyDataModules
        self.page_num = page_num  # type: int
        self.page_size = page_size  # type: int
        self.total_count = total_count  # type: int

    def validate(self):
        if self.modules:
            self.modules.validate()

    def to_map(self):
        _map = super(QueryInstanceGaapCostResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        if self.modules is not None:
            result['Modules'] = self.modules.to_map()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        if m.get('Modules') is not None:
            temp_model = QueryInstanceGaapCostResponseBodyDataModules()
            self.modules = temp_model.from_map(m['Modules'])
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryInstanceGaapCostResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        self.code = code  # type: str
        self.data = data  # type: QueryInstanceGaapCostResponseBodyData
        self.message = message  # type: str
        self.request_id = request_id  # type: str
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryInstanceGaapCostResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryInstanceGaapCostResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryInstanceGaapCostResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryInstanceGaapCostResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryInstanceGaapCostResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryInstanceGaapCostResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryInvoicingCustomerListRequest(TeaModel):
    def __init__(self, owner_id=None):
        self.owner_id = owner_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryInvoicingCustomerListRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        return self


class QueryInvoicingCustomerListResponseBodyDataCustomerInvoiceListCustomerInvoice(TeaModel):
    def __init__(self, adjust_type=None, bank=None, bank_no=None, customer_type=None, default_remark=None,
                 end_cycle=None, gmt_create=None, id=None, invoice_title=None, issue_type=None,
                 operating_license_address=None, operating_license_phone=None, register_no=None, start_cycle=None, status=None,
                 taxation_license=None, taxpayer_type=None, title_change_instructions=None, type=None, user_id=None, user_nick=None):
        # The type of invoice that was changed to.
        self.adjust_type = adjust_type  # type: long
        # The bank that issues the invoice.
        self.bank = bank  # type: str
        # The bank account number.
        self.bank_no = bank_no  # type: str
        # The authentication type of Alipay. Valid values:
        # 
        # *   1: individual
        # *   2: company
        self.customer_type = customer_type  # type: long
        # The default note that is attached when the title is specified.
        self.default_remark = default_remark  # type: str
        # The time when the payment ended.
        self.end_cycle = end_cycle  # type: long
        # The time when the invoice was created. The time was in the yyyy-mm-dd hh:mm:ss format.
        self.gmt_create = gmt_create  # type: str
        # The ID of the invoice.
        self.id = id  # type: long
        # The company name in the invoice title.
        self.invoice_title = invoice_title  # type: str
        # The type of issue.
        self.issue_type = issue_type  # type: long
        # The address of the business license.
        self.operating_license_address = operating_license_address  # type: str
        # The phone number of the business license.
        self.operating_license_phone = operating_license_phone  # type: str
        # The tax registration number.
        self.register_no = register_no  # type: str
        # The time when the payment started.
        self.start_cycle = start_cycle  # type: long
        # The status of the invoice title.
        self.status = status  # type: long
        # The path and file name of the scanned copy of the tax registration certificate.
        self.taxation_license = taxation_license  # type: str
        # The type of the taxpayer. Valid values:
        # 
        # *   1: general taxpayer
        # *   2: special taxpayer
        self.taxpayer_type = taxpayer_type  # type: long
        # The instruction document of the invoice title change.
        self.title_change_instructions = title_change_instructions  # type: str
        # The type of the invoice. Valid values:
        # 
        # *   0: plain value-added tax (VAT) invoice
        # *   1: special VAT invoice
        self.type = type  # type: long
        # The ID of the user.
        self.user_id = user_id  # type: long
        # The nickname of the user.
        self.user_nick = user_nick  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryInvoicingCustomerListResponseBodyDataCustomerInvoiceListCustomerInvoice, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.adjust_type is not None:
            result['AdjustType'] = self.adjust_type
        if self.bank is not None:
            result['Bank'] = self.bank
        if self.bank_no is not None:
            result['BankNo'] = self.bank_no
        if self.customer_type is not None:
            result['CustomerType'] = self.customer_type
        if self.default_remark is not None:
            result['DefaultRemark'] = self.default_remark
        if self.end_cycle is not None:
            result['EndCycle'] = self.end_cycle
        if self.gmt_create is not None:
            result['GmtCreate'] = self.gmt_create
        if self.id is not None:
            result['Id'] = self.id
        if self.invoice_title is not None:
            result['InvoiceTitle'] = self.invoice_title
        if self.issue_type is not None:
            result['IssueType'] = self.issue_type
        if self.operating_license_address is not None:
            result['OperatingLicenseAddress'] = self.operating_license_address
        if self.operating_license_phone is not None:
            result['OperatingLicensePhone'] = self.operating_license_phone
        if self.register_no is not None:
            result['RegisterNo'] = self.register_no
        if self.start_cycle is not None:
            result['StartCycle'] = self.start_cycle
        if self.status is not None:
            result['Status'] = self.status
        if self.taxation_license is not None:
            result['TaxationLicense'] = self.taxation_license
        if self.taxpayer_type is not None:
            result['TaxpayerType'] = self.taxpayer_type
        if self.title_change_instructions is not None:
            result['TitleChangeInstructions'] = self.title_change_instructions
        if self.type is not None:
            result['Type'] = self.type
        if self.user_id is not None:
            result['UserId'] = self.user_id
        if self.user_nick is not None:
            result['UserNick'] = self.user_nick
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AdjustType') is not None:
            self.adjust_type = m.get('AdjustType')
        if m.get('Bank') is not None:
            self.bank = m.get('Bank')
        if m.get('BankNo') is not None:
            self.bank_no = m.get('BankNo')
        if m.get('CustomerType') is not None:
            self.customer_type = m.get('CustomerType')
        if m.get('DefaultRemark') is not None:
            self.default_remark = m.get('DefaultRemark')
        if m.get('EndCycle') is not None:
            self.end_cycle = m.get('EndCycle')
        if m.get('GmtCreate') is not None:
            self.gmt_create = m.get('GmtCreate')
        if m.get('Id') is not None:
            self.id = m.get('Id')
        if m.get('InvoiceTitle') is not None:
            self.invoice_title = m.get('InvoiceTitle')
        if m.get('IssueType') is not None:
            self.issue_type = m.get('IssueType')
        if m.get('OperatingLicenseAddress') is not None:
            self.operating_license_address = m.get('OperatingLicenseAddress')
        if m.get('OperatingLicensePhone') is not None:
            self.operating_license_phone = m.get('OperatingLicensePhone')
        if m.get('RegisterNo') is not None:
            self.register_no = m.get('RegisterNo')
        if m.get('StartCycle') is not None:
            self.start_cycle = m.get('StartCycle')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('TaxationLicense') is not None:
            self.taxation_license = m.get('TaxationLicense')
        if m.get('TaxpayerType') is not None:
            self.taxpayer_type = m.get('TaxpayerType')
        if m.get('TitleChangeInstructions') is not None:
            self.title_change_instructions = m.get('TitleChangeInstructions')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        if m.get('UserId') is not None:
            self.user_id = m.get('UserId')
        if m.get('UserNick') is not None:
            self.user_nick = m.get('UserNick')
        return self


class QueryInvoicingCustomerListResponseBodyDataCustomerInvoiceList(TeaModel):
    def __init__(self, customer_invoice=None):
        self.customer_invoice = customer_invoice  # type: list[QueryInvoicingCustomerListResponseBodyDataCustomerInvoiceListCustomerInvoice]

    def validate(self):
        if self.customer_invoice:
            for k in self.customer_invoice:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryInvoicingCustomerListResponseBodyDataCustomerInvoiceList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['CustomerInvoice'] = []
        if self.customer_invoice is not None:
            for k in self.customer_invoice:
                result['CustomerInvoice'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.customer_invoice = []
        if m.get('CustomerInvoice') is not None:
            for k in m.get('CustomerInvoice'):
                temp_model = QueryInvoicingCustomerListResponseBodyDataCustomerInvoiceListCustomerInvoice()
                self.customer_invoice.append(temp_model.from_map(k))
        return self


class QueryInvoicingCustomerListResponseBodyData(TeaModel):
    def __init__(self, customer_invoice_list=None):
        # The information about the invoice.
        self.customer_invoice_list = customer_invoice_list  # type: QueryInvoicingCustomerListResponseBodyDataCustomerInvoiceList

    def validate(self):
        if self.customer_invoice_list:
            self.customer_invoice_list.validate()

    def to_map(self):
        _map = super(QueryInvoicingCustomerListResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.customer_invoice_list is not None:
            result['CustomerInvoiceList'] = self.customer_invoice_list.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CustomerInvoiceList') is not None:
            temp_model = QueryInvoicingCustomerListResponseBodyDataCustomerInvoiceList()
            self.customer_invoice_list = temp_model.from_map(m['CustomerInvoiceList'])
        return self


class QueryInvoicingCustomerListResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryInvoicingCustomerListResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryInvoicingCustomerListResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryInvoicingCustomerListResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryInvoicingCustomerListResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryInvoicingCustomerListResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryInvoicingCustomerListResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryInvoicingCustomerListResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryOrdersRequest(TeaModel):
    def __init__(self, create_time_end=None, create_time_start=None, order_type=None, owner_id=None, page_num=None,
                 page_size=None, payment_status=None, product_code=None, product_type=None, subscription_type=None):
        # The end time of the period during which the orders were created. By default, orders within the last hour are queried. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        self.create_time_end = create_time_end  # type: str
        # The start time of the period during which the orders were created. By default, orders within the last hour are queried. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        self.create_time_start = create_time_start  # type: str
        # The type of the order. Valid values:
        # 
        # *   New: purchases an instance.
        # *   Renew: renews an instance.
        # *   Upgrade: upgrades the configurations of an instance.
        # *   Refund: applies for a refund.
        self.order_type = order_type  # type: str
        self.owner_id = owner_id  # type: long
        # The page number of the page to return.
        self.page_num = page_num  # type: int
        # The number of entries to return per page.
        self.page_size = page_size  # type: int
        # The status of payment. Valid values for a non-refund order:
        # 
        # *   Unpaid: The order is not paid.
        # *   Paid: The order is paid.
        # *   Cancelled: The order is canceled.
        # 
        # > : You can set this parameter to NULL for a refund order.
        self.payment_status = payment_status  # type: str
        # The code of the service.
        self.product_code = product_code  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: subscription
        # *   PayAsYouGo: pay-as-you-go
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryOrdersRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time_end is not None:
            result['CreateTimeEnd'] = self.create_time_end
        if self.create_time_start is not None:
            result['CreateTimeStart'] = self.create_time_start
        if self.order_type is not None:
            result['OrderType'] = self.order_type
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.payment_status is not None:
            result['PaymentStatus'] = self.payment_status
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CreateTimeEnd') is not None:
            self.create_time_end = m.get('CreateTimeEnd')
        if m.get('CreateTimeStart') is not None:
            self.create_time_start = m.get('CreateTimeStart')
        if m.get('OrderType') is not None:
            self.order_type = m.get('OrderType')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('PaymentStatus') is not None:
            self.payment_status = m.get('PaymentStatus')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class QueryOrdersResponseBodyDataOrderListOrder(TeaModel):
    def __init__(self, after_tax_amount=None, commodity_code=None, create_time=None, currency=None, order_id=None,
                 order_type=None, payment_currency=None, payment_status=None, payment_time=None, pretax_amount=None,
                 pretax_amount_local=None, pretax_gross_amount=None, product_code=None, product_type=None, related_order_id=None,
                 subscription_type=None, tax=None):
        # The aftertax amount of the order.
        self.after_tax_amount = after_tax_amount  # type: str
        # The service code.
        self.commodity_code = commodity_code  # type: str
        # The time when the order was created.
        self.create_time = create_time  # type: str
        # The currency.
        self.currency = currency  # type: str
        # The ID of the order.
        self.order_id = order_id  # type: str
        # The type of the order. Valid values:
        # 
        # *   New: purchases an instance.
        # *   Renew: renews an instance.
        # *   Upgrade: upgrades the configurations of an instance.
        # *   Refund: applies for a refund.
        self.order_type = order_type  # type: str
        # The currency of payment.
        self.payment_currency = payment_currency  # type: str
        # The status of payment. Valid values for a non-refund order:
        # 
        # *   Unpaid: The order is not paid.
        # *   Paid: The order is paid.
        # *   Cancelled: The order is canceled.
        # 
        # > : The value is NULL for a refund order.
        self.payment_status = payment_status  # type: str
        # The time of payment.
        self.payment_time = payment_time  # type: str
        # The pretax amount of the order.
        self.pretax_amount = pretax_amount  # type: str
        # The pretax amount of the order in local currency.
        self.pretax_amount_local = pretax_amount_local  # type: str
        # The pretax gross amount of the order.
        self.pretax_gross_amount = pretax_gross_amount  # type: str
        # The code of the main service.
        self.product_code = product_code  # type: str
        # The type of the main service.
        self.product_type = product_type  # type: str
        # The ID of the associated order.
        self.related_order_id = related_order_id  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: subscription
        # *   PayAsYouGo: pay-as-you-go
        self.subscription_type = subscription_type  # type: str
        # The tax of the order.
        self.tax = tax  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryOrdersResponseBodyDataOrderListOrder, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.after_tax_amount is not None:
            result['AfterTaxAmount'] = self.after_tax_amount
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.create_time is not None:
            result['CreateTime'] = self.create_time
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        if self.order_type is not None:
            result['OrderType'] = self.order_type
        if self.payment_currency is not None:
            result['PaymentCurrency'] = self.payment_currency
        if self.payment_status is not None:
            result['PaymentStatus'] = self.payment_status
        if self.payment_time is not None:
            result['PaymentTime'] = self.payment_time
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_amount_local is not None:
            result['PretaxAmountLocal'] = self.pretax_amount_local
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.related_order_id is not None:
            result['RelatedOrderId'] = self.related_order_id
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tax is not None:
            result['Tax'] = self.tax
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AfterTaxAmount') is not None:
            self.after_tax_amount = m.get('AfterTaxAmount')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('CreateTime') is not None:
            self.create_time = m.get('CreateTime')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        if m.get('OrderType') is not None:
            self.order_type = m.get('OrderType')
        if m.get('PaymentCurrency') is not None:
            self.payment_currency = m.get('PaymentCurrency')
        if m.get('PaymentStatus') is not None:
            self.payment_status = m.get('PaymentStatus')
        if m.get('PaymentTime') is not None:
            self.payment_time = m.get('PaymentTime')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxAmountLocal') is not None:
            self.pretax_amount_local = m.get('PretaxAmountLocal')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('RelatedOrderId') is not None:
            self.related_order_id = m.get('RelatedOrderId')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tax') is not None:
            self.tax = m.get('Tax')
        return self


class QueryOrdersResponseBodyDataOrderList(TeaModel):
    def __init__(self, order=None):
        self.order = order  # type: list[QueryOrdersResponseBodyDataOrderListOrder]

    def validate(self):
        if self.order:
            for k in self.order:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryOrdersResponseBodyDataOrderList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Order'] = []
        if self.order is not None:
            for k in self.order:
                result['Order'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.order = []
        if m.get('Order') is not None:
            for k in m.get('Order'):
                temp_model = QueryOrdersResponseBodyDataOrderListOrder()
                self.order.append(temp_model.from_map(k))
        return self


class QueryOrdersResponseBodyData(TeaModel):
    def __init__(self, host_name=None, order_list=None, page_num=None, page_size=None, total_count=None):
        # The hostname.
        self.host_name = host_name  # type: str
        # The orders returned.
        self.order_list = order_list  # type: QueryOrdersResponseBodyDataOrderList
        # The page number of the returned page.
        self.page_num = page_num  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The total number of returned entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.order_list:
            self.order_list.validate()

    def to_map(self):
        _map = super(QueryOrdersResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_name is not None:
            result['HostName'] = self.host_name
        if self.order_list is not None:
            result['OrderList'] = self.order_list.to_map()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostName') is not None:
            self.host_name = m.get('HostName')
        if m.get('OrderList') is not None:
            temp_model = QueryOrdersResponseBodyDataOrderList()
            self.order_list = temp_model.from_map(m['OrderList'])
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryOrdersResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The message returned.
        self.data = data  # type: QueryOrdersResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryOrdersResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryOrdersResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryOrdersResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryOrdersResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryOrdersResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryOrdersResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryPermissionListRequest(TeaModel):
    def __init__(self, relation_id=None):
        # The ID of the relationship. Set this parameter to the value of the RelationId response parameter returned by calling the QueryRelationList operation.
        self.relation_id = relation_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryPermissionListRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.relation_id is not None:
            result['RelationId'] = self.relation_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RelationId') is not None:
            self.relation_id = m.get('RelationId')
        return self


class QueryPermissionListResponseBodyDataPermissionList(TeaModel):
    def __init__(self, end_time=None, permission_code=None, permission_name=None, start_time=None):
        # The time when the permission expired. If no value is returned, the permission is still valid. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC. For example, 2016-05-23T12:00:00Z indicates that the permission expired at 20:00:00 on May 23, 2016 (UTC+8).
        self.end_time = end_time  # type: str
        # The code of the permission.
        self.permission_code = permission_code  # type: str
        # The name of the permission.
        self.permission_name = permission_name  # type: str
        # The time when the permission took effect. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC. For example, 2016-05-23T12:00:00Z indicates that the permission took effect at 20:00:00 on May 23, 2016 (UTC+8).
        self.start_time = start_time  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryPermissionListResponseBodyDataPermissionList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.permission_code is not None:
            result['PermissionCode'] = self.permission_code
        if self.permission_name is not None:
            result['PermissionName'] = self.permission_name
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('PermissionCode') is not None:
            self.permission_code = m.get('PermissionCode')
        if m.get('PermissionName') is not None:
            self.permission_name = m.get('PermissionName')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        return self


class QueryPermissionListResponseBodyData(TeaModel):
    def __init__(self, end_time=None, master_id=None, member_id=None, permission_list=None, relation_type=None,
                 setup_time=None, start_time=None, state=None):
        # The time when the relationship expired. If no value is returned, the relationship is still valid.
        self.end_time = end_time  # type: str
        # The ID of the management account.
        self.master_id = master_id  # type: long
        # The ID of the member.
        self.member_id = member_id  # type: long
        # The list of permissions.
        self.permission_list = permission_list  # type: list[QueryPermissionListResponseBodyDataPermissionList]
        # The type of the relationship. Valid values: FinancialManagement and FinancialTrusteeship.
        self.relation_type = relation_type  # type: str
        # The time when the relationship was established. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC. For example, 2016-05-23T12:00:00Z indicates that the relationship was established at 20:00:00 on May 23, 2016 (UTC+8).
        self.setup_time = setup_time  # type: str
        # The time when the relationship took effect. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC. For example, 2016-05-23T12:00:00Z indicates that the relationship took effect at 20:00:00 on May 23, 2016 (UTC+8).
        self.start_time = start_time  # type: str
        # The status of the relationship. For more information about valid values of this parameter, see the enumeration values of the RelationshipStatusEnum type in the following table.
        self.state = state  # type: str

    def validate(self):
        if self.permission_list:
            for k in self.permission_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryPermissionListResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.master_id is not None:
            result['MasterId'] = self.master_id
        if self.member_id is not None:
            result['MemberId'] = self.member_id
        result['PermissionList'] = []
        if self.permission_list is not None:
            for k in self.permission_list:
                result['PermissionList'].append(k.to_map() if k else None)
        if self.relation_type is not None:
            result['RelationType'] = self.relation_type
        if self.setup_time is not None:
            result['SetupTime'] = self.setup_time
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.state is not None:
            result['State'] = self.state
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('MasterId') is not None:
            self.master_id = m.get('MasterId')
        if m.get('MemberId') is not None:
            self.member_id = m.get('MemberId')
        self.permission_list = []
        if m.get('PermissionList') is not None:
            for k in m.get('PermissionList'):
                temp_model = QueryPermissionListResponseBodyDataPermissionList()
                self.permission_list.append(temp_model.from_map(k))
        if m.get('RelationType') is not None:
            self.relation_type = m.get('RelationType')
        if m.get('SetupTime') is not None:
            self.setup_time = m.get('SetupTime')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('State') is not None:
            self.state = m.get('State')
        return self


class QueryPermissionListResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryPermissionListResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryPermissionListResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryPermissionListResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryPermissionListResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryPermissionListResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryPermissionListResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryPermissionListResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryPrepaidCardsRequest(TeaModel):
    def __init__(self, effective_or_not=None, expiry_time_end=None, expiry_time_start=None):
        # Specifies whether the prepaid card takes effect. Valid values:
        # 
        # *   true
        # *   false
        self.effective_or_not = effective_or_not  # type: bool
        # The end of the expiration time of prepaid cards to query. The value must be in the yyyy-MM-ddTHH:mm:ssZ format.
        self.expiry_time_end = expiry_time_end  # type: str
        # The start of the expiration time of prepaid cards to query. The value must be in the yyyy-MM-ddTHH:mm:ssZ format.
        self.expiry_time_start = expiry_time_start  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryPrepaidCardsRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.effective_or_not is not None:
            result['EffectiveOrNot'] = self.effective_or_not
        if self.expiry_time_end is not None:
            result['ExpiryTimeEnd'] = self.expiry_time_end
        if self.expiry_time_start is not None:
            result['ExpiryTimeStart'] = self.expiry_time_start
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EffectiveOrNot') is not None:
            self.effective_or_not = m.get('EffectiveOrNot')
        if m.get('ExpiryTimeEnd') is not None:
            self.expiry_time_end = m.get('ExpiryTimeEnd')
        if m.get('ExpiryTimeStart') is not None:
            self.expiry_time_start = m.get('ExpiryTimeStart')
        return self


class QueryPrepaidCardsResponseBodyDataPrepaidCard(TeaModel):
    def __init__(self, applicable_products=None, applicable_scenarios=None, balance=None, effective_time=None,
                 expiry_time=None, granted_time=None, nominal_value=None, prepaid_card_id=None, prepaid_card_no=None,
                 status=None):
        # The services to which the prepaid card is applicable.
        self.applicable_products = applicable_products  # type: str
        # The scenario to which the prepaid card is applicable.
        self.applicable_scenarios = applicable_scenarios  # type: str
        # The balance of the prepaid card.
        self.balance = balance  # type: str
        # The time when the prepaid card took effect.
        self.effective_time = effective_time  # type: str
        # The time when the prepaid card expired.
        self.expiry_time = expiry_time  # type: str
        # The time when the prepaid card was issued.
        self.granted_time = granted_time  # type: str
        # The nominal value of the prepaid card.
        self.nominal_value = nominal_value  # type: str
        # The ID of the prepaid card.
        self.prepaid_card_id = prepaid_card_id  # type: long
        # The number of the prepaid card.
        self.prepaid_card_no = prepaid_card_no  # type: str
        # The status of the prepaid card. Valid values:
        # 
        # *   Available: The prepaid card is valid.
        # *   Expired: The prepaid card expired.
        # *   Cancelled: The prepaid card is invalid.
        self.status = status  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryPrepaidCardsResponseBodyDataPrepaidCard, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.applicable_products is not None:
            result['ApplicableProducts'] = self.applicable_products
        if self.applicable_scenarios is not None:
            result['ApplicableScenarios'] = self.applicable_scenarios
        if self.balance is not None:
            result['Balance'] = self.balance
        if self.effective_time is not None:
            result['EffectiveTime'] = self.effective_time
        if self.expiry_time is not None:
            result['ExpiryTime'] = self.expiry_time
        if self.granted_time is not None:
            result['GrantedTime'] = self.granted_time
        if self.nominal_value is not None:
            result['NominalValue'] = self.nominal_value
        if self.prepaid_card_id is not None:
            result['PrepaidCardId'] = self.prepaid_card_id
        if self.prepaid_card_no is not None:
            result['PrepaidCardNo'] = self.prepaid_card_no
        if self.status is not None:
            result['Status'] = self.status
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ApplicableProducts') is not None:
            self.applicable_products = m.get('ApplicableProducts')
        if m.get('ApplicableScenarios') is not None:
            self.applicable_scenarios = m.get('ApplicableScenarios')
        if m.get('Balance') is not None:
            self.balance = m.get('Balance')
        if m.get('EffectiveTime') is not None:
            self.effective_time = m.get('EffectiveTime')
        if m.get('ExpiryTime') is not None:
            self.expiry_time = m.get('ExpiryTime')
        if m.get('GrantedTime') is not None:
            self.granted_time = m.get('GrantedTime')
        if m.get('NominalValue') is not None:
            self.nominal_value = m.get('NominalValue')
        if m.get('PrepaidCardId') is not None:
            self.prepaid_card_id = m.get('PrepaidCardId')
        if m.get('PrepaidCardNo') is not None:
            self.prepaid_card_no = m.get('PrepaidCardNo')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class QueryPrepaidCardsResponseBodyData(TeaModel):
    def __init__(self, prepaid_card=None):
        self.prepaid_card = prepaid_card  # type: list[QueryPrepaidCardsResponseBodyDataPrepaidCard]

    def validate(self):
        if self.prepaid_card:
            for k in self.prepaid_card:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryPrepaidCardsResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['PrepaidCard'] = []
        if self.prepaid_card is not None:
            for k in self.prepaid_card:
                result['PrepaidCard'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.prepaid_card = []
        if m.get('PrepaidCard') is not None:
            for k in m.get('PrepaidCard'):
                temp_model = QueryPrepaidCardsResponseBodyDataPrepaidCard()
                self.prepaid_card.append(temp_model.from_map(k))
        return self


class QueryPrepaidCardsResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryPrepaidCardsResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryPrepaidCardsResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryPrepaidCardsResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryPrepaidCardsResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryPrepaidCardsResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryPrepaidCardsResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryPrepaidCardsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryPriceEntityListRequest(TeaModel):
    def __init__(self, commodity_code=None, lang=None):
        # The code of the service.
        self.commodity_code = commodity_code  # type: str
        self.lang = lang  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryPriceEntityListRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.lang is not None:
            result['Lang'] = self.lang
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('Lang') is not None:
            self.lang = m.get('Lang')
        return self


class QueryPriceEntityListResponseBodyDataPriceEntityInfoListPriceFactorList(TeaModel):
    def __init__(self, price_factor_code=None, price_factor_name=None, price_factor_value_list=None):
        # The code of the factor.
        self.price_factor_code = price_factor_code  # type: str
        # The name of the factor.
        self.price_factor_name = price_factor_name  # type: str
        # The values of the factor.
        self.price_factor_value_list = price_factor_value_list  # type: list[str]

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryPriceEntityListResponseBodyDataPriceEntityInfoListPriceFactorList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.price_factor_code is not None:
            result['PriceFactorCode'] = self.price_factor_code
        if self.price_factor_name is not None:
            result['PriceFactorName'] = self.price_factor_name
        if self.price_factor_value_list is not None:
            result['PriceFactorValueList'] = self.price_factor_value_list
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('PriceFactorCode') is not None:
            self.price_factor_code = m.get('PriceFactorCode')
        if m.get('PriceFactorName') is not None:
            self.price_factor_name = m.get('PriceFactorName')
        if m.get('PriceFactorValueList') is not None:
            self.price_factor_value_list = m.get('PriceFactorValueList')
        return self


class QueryPriceEntityListResponseBodyDataPriceEntityInfoList(TeaModel):
    def __init__(self, price_entity_code=None, price_entity_name=None, price_factor_list=None):
        # The code of the billable item.
        self.price_entity_code = price_entity_code  # type: str
        # The name of the billable item.
        self.price_entity_name = price_entity_name  # type: str
        # The factors of the billable item.
        self.price_factor_list = price_factor_list  # type: list[QueryPriceEntityListResponseBodyDataPriceEntityInfoListPriceFactorList]

    def validate(self):
        if self.price_factor_list:
            for k in self.price_factor_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryPriceEntityListResponseBodyDataPriceEntityInfoList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.price_entity_code is not None:
            result['PriceEntityCode'] = self.price_entity_code
        if self.price_entity_name is not None:
            result['PriceEntityName'] = self.price_entity_name
        result['PriceFactorList'] = []
        if self.price_factor_list is not None:
            for k in self.price_factor_list:
                result['PriceFactorList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('PriceEntityCode') is not None:
            self.price_entity_code = m.get('PriceEntityCode')
        if m.get('PriceEntityName') is not None:
            self.price_entity_name = m.get('PriceEntityName')
        self.price_factor_list = []
        if m.get('PriceFactorList') is not None:
            for k in m.get('PriceFactorList'):
                temp_model = QueryPriceEntityListResponseBodyDataPriceEntityInfoListPriceFactorList()
                self.price_factor_list.append(temp_model.from_map(k))
        return self


class QueryPriceEntityListResponseBodyData(TeaModel):
    def __init__(self, price_entity_info_list=None):
        # The information about the billable items.
        self.price_entity_info_list = price_entity_info_list  # type: list[QueryPriceEntityListResponseBodyDataPriceEntityInfoList]

    def validate(self):
        if self.price_entity_info_list:
            for k in self.price_entity_info_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryPriceEntityListResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['PriceEntityInfoList'] = []
        if self.price_entity_info_list is not None:
            for k in self.price_entity_info_list:
                result['PriceEntityInfoList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.price_entity_info_list = []
        if m.get('PriceEntityInfoList') is not None:
            for k in m.get('PriceEntityInfoList'):
                temp_model = QueryPriceEntityListResponseBodyDataPriceEntityInfoList()
                self.price_entity_info_list.append(temp_model.from_map(k))
        return self


class QueryPriceEntityListResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The HTTP status code.
        self.code = code  # type: str
        # The data that is returned.
        self.data = data  # type: QueryPriceEntityListResponseBodyData
        # The message that is returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryPriceEntityListResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryPriceEntityListResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryPriceEntityListResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryPriceEntityListResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryPriceEntityListResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryPriceEntityListResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryProductListRequest(TeaModel):
    def __init__(self, page_num=None, page_size=None, query_total_count=None):
        # The page number of the page to return.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page. Default value: 20.
        self.page_size = page_size  # type: int
        # Specifies whether to return the total number of services. Default value: false.
        self.query_total_count = query_total_count  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryProductListRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.query_total_count is not None:
            result['QueryTotalCount'] = self.query_total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('QueryTotalCount') is not None:
            self.query_total_count = m.get('QueryTotalCount')
        return self


class QueryProductListResponseBodyDataProductListProduct(TeaModel):
    def __init__(self, product_code=None, product_name=None, product_type=None, subscription_type=None):
        # The code of the service.
        self.product_code = product_code  # type: str
        # The name of the service.
        self.product_name = product_name  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: subscription
        # *   PayAsYouGo: pay-as-you-go
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryProductListResponseBodyDataProductListProduct, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class QueryProductListResponseBodyDataProductList(TeaModel):
    def __init__(self, product=None):
        self.product = product  # type: list[QueryProductListResponseBodyDataProductListProduct]

    def validate(self):
        if self.product:
            for k in self.product:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryProductListResponseBodyDataProductList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Product'] = []
        if self.product is not None:
            for k in self.product:
                result['Product'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.product = []
        if m.get('Product') is not None:
            for k in m.get('Product'):
                temp_model = QueryProductListResponseBodyDataProductListProduct()
                self.product.append(temp_model.from_map(k))
        return self


class QueryProductListResponseBodyData(TeaModel):
    def __init__(self, page_num=None, page_size=None, product_list=None, total_count=None):
        # The page number of the returned page.
        self.page_num = page_num  # type: int
        # The number of entries returned on each page.
        self.page_size = page_size  # type: int
        # The service definitions.
        self.product_list = product_list  # type: QueryProductListResponseBodyDataProductList
        # The total number of services.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.product_list:
            self.product_list.validate()

    def to_map(self):
        _map = super(QueryProductListResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.product_list is not None:
            result['ProductList'] = self.product_list.to_map()
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ProductList') is not None:
            temp_model = QueryProductListResponseBodyDataProductList()
            self.product_list = temp_model.from_map(m['ProductList'])
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryProductListResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The HTTP status code returned.
        self.code = code  # type: str
        # The information about all Alibaba Cloud services.
        self.data = data  # type: QueryProductListResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryProductListResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryProductListResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryProductListResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryProductListResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryProductListResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryProductListResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryRIUtilizationDetailRequest(TeaModel):
    def __init__(self, deducted_instance_id=None, end_time=None, instance_spec=None, page_num=None, page_size=None,
                 ricommodity_code=None, riinstance_id=None, start_time=None):
        # The ID of the instance whose fees are deducted by using the RI. If this parameter is left empty, the usage details of all instances are queried.
        self.deducted_instance_id = deducted_instance_id  # type: str
        # The time when the RI expires. Specify the time in the YYYY-MM-DD HH:mm:ss format.
        self.end_time = end_time  # type: str
        # The instance type of the RI.
        self.instance_spec = instance_spec  # type: str
        # The number of the page to return. Default value: 1.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page. Default value: 20. Maximum value: 300.
        self.page_size = page_size  # type: int
        # The code of the service to which the RI is applied. Default value: ecsRi. Valid values:
        # 
        # *   ecsRi: ECS RI.
        # *   scu_bag: storage capacity unit (SCU).
        self.ricommodity_code = ricommodity_code  # type: str
        # The ID of the RI. If this parameter is left empty, the usage details of all RIs are queried.
        self.riinstance_id = riinstance_id  # type: str
        # The time when the RI was created. Specify the time in the YYYY-MM-DD HH:mm:ss format.
        self.start_time = start_time  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryRIUtilizationDetailRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.deducted_instance_id is not None:
            result['DeductedInstanceId'] = self.deducted_instance_id
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.instance_spec is not None:
            result['InstanceSpec'] = self.instance_spec
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.ricommodity_code is not None:
            result['RICommodityCode'] = self.ricommodity_code
        if self.riinstance_id is not None:
            result['RIInstanceId'] = self.riinstance_id
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('DeductedInstanceId') is not None:
            self.deducted_instance_id = m.get('DeductedInstanceId')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('InstanceSpec') is not None:
            self.instance_spec = m.get('InstanceSpec')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('RICommodityCode') is not None:
            self.ricommodity_code = m.get('RICommodityCode')
        if m.get('RIInstanceId') is not None:
            self.riinstance_id = m.get('RIInstanceId')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        return self


class QueryRIUtilizationDetailResponseBodyDataDetailListDetailList(TeaModel):
    def __init__(self, deduct_date=None, deduct_factor_total=None, deduct_hours=None, deduct_quantity=None,
                 deducted_commodity_code=None, deducted_instance_id=None, deducted_product_detail=None, instance_spec=None,
                 riinstance_id=None):
        # The time when the fees are deducted by using the RI.
        self.deduct_date = deduct_date  # type: str
        # The total amount of computing power of the RI or capacity of SCU in the time period.
        self.deduct_factor_total = deduct_factor_total  # type: float
        # The deduct factor. This parameter is returned only if the RICommodityCode parameter is set to ecsRi.
        self.deduct_hours = deduct_hours  # type: str
        # The computing power or capacity of the pay-as-you-go instance whose fees are deducted by using the RI.
        self.deduct_quantity = deduct_quantity  # type: float
        # The code of the service whose fees are deducted by using the RI.
        self.deducted_commodity_code = deducted_commodity_code  # type: str
        # The ID of the instance whose fees are deducted by using the RI.
        self.deducted_instance_id = deducted_instance_id  # type: str
        # The name of the service whose fees are deducted by using the RI.
        self.deducted_product_detail = deducted_product_detail  # type: str
        # The instance type of the instance whose fees are deducted by using the RI.
        self.instance_spec = instance_spec  # type: str
        # The ID of the RI.
        self.riinstance_id = riinstance_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryRIUtilizationDetailResponseBodyDataDetailListDetailList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.deduct_date is not None:
            result['DeductDate'] = self.deduct_date
        if self.deduct_factor_total is not None:
            result['DeductFactorTotal'] = self.deduct_factor_total
        if self.deduct_hours is not None:
            result['DeductHours'] = self.deduct_hours
        if self.deduct_quantity is not None:
            result['DeductQuantity'] = self.deduct_quantity
        if self.deducted_commodity_code is not None:
            result['DeductedCommodityCode'] = self.deducted_commodity_code
        if self.deducted_instance_id is not None:
            result['DeductedInstanceId'] = self.deducted_instance_id
        if self.deducted_product_detail is not None:
            result['DeductedProductDetail'] = self.deducted_product_detail
        if self.instance_spec is not None:
            result['InstanceSpec'] = self.instance_spec
        if self.riinstance_id is not None:
            result['RIInstanceId'] = self.riinstance_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('DeductDate') is not None:
            self.deduct_date = m.get('DeductDate')
        if m.get('DeductFactorTotal') is not None:
            self.deduct_factor_total = m.get('DeductFactorTotal')
        if m.get('DeductHours') is not None:
            self.deduct_hours = m.get('DeductHours')
        if m.get('DeductQuantity') is not None:
            self.deduct_quantity = m.get('DeductQuantity')
        if m.get('DeductedCommodityCode') is not None:
            self.deducted_commodity_code = m.get('DeductedCommodityCode')
        if m.get('DeductedInstanceId') is not None:
            self.deducted_instance_id = m.get('DeductedInstanceId')
        if m.get('DeductedProductDetail') is not None:
            self.deducted_product_detail = m.get('DeductedProductDetail')
        if m.get('InstanceSpec') is not None:
            self.instance_spec = m.get('InstanceSpec')
        if m.get('RIInstanceId') is not None:
            self.riinstance_id = m.get('RIInstanceId')
        return self


class QueryRIUtilizationDetailResponseBodyDataDetailList(TeaModel):
    def __init__(self, detail_list=None):
        self.detail_list = detail_list  # type: list[QueryRIUtilizationDetailResponseBodyDataDetailListDetailList]

    def validate(self):
        if self.detail_list:
            for k in self.detail_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryRIUtilizationDetailResponseBodyDataDetailList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['DetailList'] = []
        if self.detail_list is not None:
            for k in self.detail_list:
                result['DetailList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.detail_list = []
        if m.get('DetailList') is not None:
            for k in m.get('DetailList'):
                temp_model = QueryRIUtilizationDetailResponseBodyDataDetailListDetailList()
                self.detail_list.append(temp_model.from_map(k))
        return self


class QueryRIUtilizationDetailResponseBodyData(TeaModel):
    def __init__(self, detail_list=None, page_num=None, page_size=None, total_count=None):
        # The usage details of the RI.
        self.detail_list = detail_list  # type: QueryRIUtilizationDetailResponseBodyDataDetailList
        # The number of the returned page.
        self.page_num = page_num  # type: long
        # The number of entries returned per page.
        self.page_size = page_size  # type: long
        # The total number of returned entries.
        self.total_count = total_count  # type: long

    def validate(self):
        if self.detail_list:
            self.detail_list.validate()

    def to_map(self):
        _map = super(QueryRIUtilizationDetailResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.detail_list is not None:
            result['DetailList'] = self.detail_list.to_map()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('DetailList') is not None:
            temp_model = QueryRIUtilizationDetailResponseBodyDataDetailList()
            self.detail_list = temp_model.from_map(m['DetailList'])
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryRIUtilizationDetailResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryRIUtilizationDetailResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryRIUtilizationDetailResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryRIUtilizationDetailResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryRIUtilizationDetailResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryRIUtilizationDetailResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryRIUtilizationDetailResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryRIUtilizationDetailResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryRedeemRequest(TeaModel):
    def __init__(self, effective_or_not=None, expiry_time_end=None, expiry_time_start=None, page_num=None,
                 page_size=None):
        # Specifies whether the redemption coupon takes effect. Valid values:
        # 
        # *   true
        # *   false
        # 
        # Default value: false.
        self.effective_or_not = effective_or_not  # type: bool
        # The end time when the redemption coupon expires. The value must be in the yyyy-MM-ddTHH:mm:ssZ format.
        self.expiry_time_end = expiry_time_end  # type: str
        # The start time when the redemption coupon expires. The value must be in the yyyy-MM-ddTHH:mm:ssZ format.
        self.expiry_time_start = expiry_time_start  # type: str
        # The number of the page to return.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page.
        self.page_size = page_size  # type: int

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryRedeemRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.effective_or_not is not None:
            result['EffectiveOrNot'] = self.effective_or_not
        if self.expiry_time_end is not None:
            result['ExpiryTimeEnd'] = self.expiry_time_end
        if self.expiry_time_start is not None:
            result['ExpiryTimeStart'] = self.expiry_time_start
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EffectiveOrNot') is not None:
            self.effective_or_not = m.get('EffectiveOrNot')
        if m.get('ExpiryTimeEnd') is not None:
            self.expiry_time_end = m.get('ExpiryTimeEnd')
        if m.get('ExpiryTimeStart') is not None:
            self.expiry_time_start = m.get('ExpiryTimeStart')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        return self


class QueryRedeemResponseBodyDataRedeemRedeem(TeaModel):
    def __init__(self, applicable_products=None, balance=None, effective_time=None, expiry_time=None,
                 granted_time=None, nominal_value=None, redeem_id=None, redeem_no=None, specification=None, status=None):
        # The services to which the redemption coupon is applicable.
        self.applicable_products = applicable_products  # type: str
        # The balance of the redemption coupon.
        self.balance = balance  # type: str
        # The time when the redemption coupon took effect.
        self.effective_time = effective_time  # type: str
        # The time when the redemption coupon expired.
        self.expiry_time = expiry_time  # type: str
        # The time when the redemption coupon was issued.
        self.granted_time = granted_time  # type: str
        # The nominal value of the redemption coupon.
        self.nominal_value = nominal_value  # type: str
        # The ID of the redemption coupon.
        self.redeem_id = redeem_id  # type: str
        # The number of the redemption coupon.
        self.redeem_no = redeem_no  # type: str
        # The specifications of the redemption coupon.
        self.specification = specification  # type: str
        # The status of the redemption coupon. Valid values:
        # 
        # *   Generated
        # *   CallBack
        # *   RefundPending
        # *   Canceled
        # *   Order_Canceled
        # *   ActivePending
        # *   ActiveSuccess
        # *   ExchangePending
        # *   ExchangeSuccess
        # *   Expired
        self.status = status  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryRedeemResponseBodyDataRedeemRedeem, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.applicable_products is not None:
            result['ApplicableProducts'] = self.applicable_products
        if self.balance is not None:
            result['Balance'] = self.balance
        if self.effective_time is not None:
            result['EffectiveTime'] = self.effective_time
        if self.expiry_time is not None:
            result['ExpiryTime'] = self.expiry_time
        if self.granted_time is not None:
            result['GrantedTime'] = self.granted_time
        if self.nominal_value is not None:
            result['NominalValue'] = self.nominal_value
        if self.redeem_id is not None:
            result['RedeemId'] = self.redeem_id
        if self.redeem_no is not None:
            result['RedeemNo'] = self.redeem_no
        if self.specification is not None:
            result['Specification'] = self.specification
        if self.status is not None:
            result['Status'] = self.status
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ApplicableProducts') is not None:
            self.applicable_products = m.get('ApplicableProducts')
        if m.get('Balance') is not None:
            self.balance = m.get('Balance')
        if m.get('EffectiveTime') is not None:
            self.effective_time = m.get('EffectiveTime')
        if m.get('ExpiryTime') is not None:
            self.expiry_time = m.get('ExpiryTime')
        if m.get('GrantedTime') is not None:
            self.granted_time = m.get('GrantedTime')
        if m.get('NominalValue') is not None:
            self.nominal_value = m.get('NominalValue')
        if m.get('RedeemId') is not None:
            self.redeem_id = m.get('RedeemId')
        if m.get('RedeemNo') is not None:
            self.redeem_no = m.get('RedeemNo')
        if m.get('Specification') is not None:
            self.specification = m.get('Specification')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class QueryRedeemResponseBodyDataRedeem(TeaModel):
    def __init__(self, redeem=None):
        self.redeem = redeem  # type: list[QueryRedeemResponseBodyDataRedeemRedeem]

    def validate(self):
        if self.redeem:
            for k in self.redeem:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryRedeemResponseBodyDataRedeem, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Redeem'] = []
        if self.redeem is not None:
            for k in self.redeem:
                result['Redeem'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.redeem = []
        if m.get('Redeem') is not None:
            for k in m.get('Redeem'):
                temp_model = QueryRedeemResponseBodyDataRedeemRedeem()
                self.redeem.append(temp_model.from_map(k))
        return self


class QueryRedeemResponseBodyData(TeaModel):
    def __init__(self, page_num=None, page_size=None, redeem=None, total_count=None):
        # The page number of the returned page.
        self.page_num = page_num  # type: long
        # The number of entries returned per page.
        self.page_size = page_size  # type: long
        # The details of the redemption coupon.
        self.redeem = redeem  # type: QueryRedeemResponseBodyDataRedeem
        # The total number of returned entries.
        self.total_count = total_count  # type: long

    def validate(self):
        if self.redeem:
            self.redeem.validate()

    def to_map(self):
        _map = super(QueryRedeemResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.redeem is not None:
            result['Redeem'] = self.redeem.to_map()
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('Redeem') is not None:
            temp_model = QueryRedeemResponseBodyDataRedeem()
            self.redeem = temp_model.from_map(m['Redeem'])
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryRedeemResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryRedeemResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryRedeemResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryRedeemResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryRedeemResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryRedeemResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryRedeemResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryRedeemResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryRelationListRequest(TeaModel):
    def __init__(self, page_num=None, page_size=None, status_list=None, user_id=None):
        # The number of the page to return. Default value: 1.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page. Default value: 20.
        self.page_size = page_size  # type: int
        # The states of the relationships between the management account and its members. The valid values of this parameter are the enumeration members of the RelationshipStatusEnum data type. If you do not specify this parameter, valid relationship states are queried by default.
        self.status_list = status_list  # type: list[str]
        # The ID of the Alibaba Cloud account.
        self.user_id = user_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryRelationListRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.status_list is not None:
            result['StatusList'] = self.status_list
        if self.user_id is not None:
            result['UserId'] = self.user_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('StatusList') is not None:
            self.status_list = m.get('StatusList')
        if m.get('UserId') is not None:
            self.user_id = m.get('UserId')
        return self


class QueryRelationListResponseBodyDataFinancialRelationInfoList(TeaModel):
    def __init__(self, account_id=None, account_name=None, account_nick_name=None, account_type=None, end_time=None,
                 relation_id=None, relation_type=None, setup_time=None, start_time=None, state=None):
        # The ID of the Alibaba Cloud account.
        self.account_id = account_id  # type: long
        # The name of the account.
        self.account_name = account_name  # type: str
        # The display name of the account.
        self.account_nick_name = account_nick_name  # type: str
        # The type of the account. Valid values: MASTER and MEMBER.
        self.account_type = account_type  # type: str
        # The time when the relationship became invalid. If no value is returned, the relationship is still valid.
        self.end_time = end_time  # type: str
        # The ID of the relationship.
        self.relation_id = relation_id  # type: long
        # The type of the relationship. Valid values: FinancialManagement and FinancialTrusteeship.
        self.relation_type = relation_type  # type: str
        # The time when the relationship was established. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC. Example: 2016-05-23T12:00:00Z.
        self.setup_time = setup_time  # type: str
        # The time when the relationship became valid. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC. Example: 2016-05-23T12:00:00Z.
        self.start_time = start_time  # type: str
        # The state of the relationship. One of the enumeration members of the RelationshipStatusEnum data type is returned.
        self.state = state  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryRelationListResponseBodyDataFinancialRelationInfoList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountId'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        if self.account_nick_name is not None:
            result['AccountNickName'] = self.account_nick_name
        if self.account_type is not None:
            result['AccountType'] = self.account_type
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.relation_id is not None:
            result['RelationId'] = self.relation_id
        if self.relation_type is not None:
            result['RelationType'] = self.relation_type
        if self.setup_time is not None:
            result['SetupTime'] = self.setup_time
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.state is not None:
            result['State'] = self.state
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountId') is not None:
            self.account_id = m.get('AccountId')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        if m.get('AccountNickName') is not None:
            self.account_nick_name = m.get('AccountNickName')
        if m.get('AccountType') is not None:
            self.account_type = m.get('AccountType')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('RelationId') is not None:
            self.relation_id = m.get('RelationId')
        if m.get('RelationType') is not None:
            self.relation_type = m.get('RelationType')
        if m.get('SetupTime') is not None:
            self.setup_time = m.get('SetupTime')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('State') is not None:
            self.state = m.get('State')
        return self


class QueryRelationListResponseBodyData(TeaModel):
    def __init__(self, financial_relation_info_list=None, page_num=None, page_size=None, total_count=None):
        # The relationships.
        self.financial_relation_info_list = financial_relation_info_list  # type: list[QueryRelationListResponseBodyDataFinancialRelationInfoList]
        # The page number of the returned page.
        self.page_num = page_num  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The total number of entries returned.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.financial_relation_info_list:
            for k in self.financial_relation_info_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryRelationListResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['FinancialRelationInfoList'] = []
        if self.financial_relation_info_list is not None:
            for k in self.financial_relation_info_list:
                result['FinancialRelationInfoList'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.financial_relation_info_list = []
        if m.get('FinancialRelationInfoList') is not None:
            for k in m.get('FinancialRelationInfoList'):
                temp_model = QueryRelationListResponseBodyDataFinancialRelationInfoList()
                self.financial_relation_info_list.append(temp_model.from_map(k))
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryRelationListResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryRelationListResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryRelationListResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryRelationListResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryRelationListResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryRelationListResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryRelationListResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryRelationListResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryResellerAvailableQuotaRequest(TeaModel):
    def __init__(self, item_codes=None, owner_id=None):
        self.item_codes = item_codes  # type: str
        self.owner_id = owner_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryResellerAvailableQuotaRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.item_codes is not None:
            result['ItemCodes'] = self.item_codes
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ItemCodes') is not None:
            self.item_codes = m.get('ItemCodes')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        return self


class QueryResellerAvailableQuotaResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        self.code = code  # type: str
        self.data = data  # type: str
        self.message = message  # type: str
        self.request_id = request_id  # type: str
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryResellerAvailableQuotaResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            self.data = m.get('Data')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryResellerAvailableQuotaResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryResellerAvailableQuotaResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryResellerAvailableQuotaResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryResellerAvailableQuotaResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryResellerUserAlarmThresholdRequest(TeaModel):
    def __init__(self, alarm_type=None, owner_id=None):
        self.alarm_type = alarm_type  # type: str
        self.owner_id = owner_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryResellerUserAlarmThresholdRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alarm_type is not None:
            result['AlarmType'] = self.alarm_type
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AlarmType') is not None:
            self.alarm_type = m.get('AlarmType')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        return self


class QueryResellerUserAlarmThresholdResponseBodyData(TeaModel):
    def __init__(self, denominator=None, numerator=None, threshold_amount=None, threshold_type=None):
        self.denominator = denominator  # type: int
        self.numerator = numerator  # type: int
        self.threshold_amount = threshold_amount  # type: str
        self.threshold_type = threshold_type  # type: int

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryResellerUserAlarmThresholdResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.denominator is not None:
            result['Denominator'] = self.denominator
        if self.numerator is not None:
            result['Numerator'] = self.numerator
        if self.threshold_amount is not None:
            result['ThresholdAmount'] = self.threshold_amount
        if self.threshold_type is not None:
            result['ThresholdType'] = self.threshold_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Denominator') is not None:
            self.denominator = m.get('Denominator')
        if m.get('Numerator') is not None:
            self.numerator = m.get('Numerator')
        if m.get('ThresholdAmount') is not None:
            self.threshold_amount = m.get('ThresholdAmount')
        if m.get('ThresholdType') is not None:
            self.threshold_type = m.get('ThresholdType')
        return self


class QueryResellerUserAlarmThresholdResponseBody(TeaModel):
    def __init__(self, code=None, count=None, data=None, message=None, request_id=None, success=None):
        self.code = code  # type: str
        self.count = count  # type: int
        self.data = data  # type: list[QueryResellerUserAlarmThresholdResponseBodyData]
        self.message = message  # type: str
        self.request_id = request_id  # type: str
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            for k in self.data:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryResellerUserAlarmThresholdResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.count is not None:
            result['Count'] = self.count
        result['Data'] = []
        if self.data is not None:
            for k in self.data:
                result['Data'].append(k.to_map() if k else None)
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Count') is not None:
            self.count = m.get('Count')
        self.data = []
        if m.get('Data') is not None:
            for k in m.get('Data'):
                temp_model = QueryResellerUserAlarmThresholdResponseBodyData()
                self.data.append(temp_model.from_map(k))
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryResellerUserAlarmThresholdResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryResellerUserAlarmThresholdResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryResellerUserAlarmThresholdResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryResellerUserAlarmThresholdResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryResourcePackageInstancesRequest(TeaModel):
    def __init__(self, expiry_time_end=None, expiry_time_start=None, include_partner=None, owner_id=None,
                 page_num=None, page_size=None, product_code=None):
        # The end of the expiration time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        self.expiry_time_end = expiry_time_end  # type: str
        # The beginning of the expiration time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        self.expiry_time_start = expiry_time_start  # type: str
        # Specifies whether partners are involved.
        self.include_partner = include_partner  # type: bool
        self.owner_id = owner_id  # type: long
        # The number of the page to return. Default value: 1.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page. Default value: 20. Maximum value: 300.
        self.page_size = page_size  # type: int
        # The code of the service.
        self.product_code = product_code  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryResourcePackageInstancesRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.expiry_time_end is not None:
            result['ExpiryTimeEnd'] = self.expiry_time_end
        if self.expiry_time_start is not None:
            result['ExpiryTimeStart'] = self.expiry_time_start
        if self.include_partner is not None:
            result['IncludePartner'] = self.include_partner
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ExpiryTimeEnd') is not None:
            self.expiry_time_end = m.get('ExpiryTimeEnd')
        if m.get('ExpiryTimeStart') is not None:
            self.expiry_time_start = m.get('ExpiryTimeStart')
        if m.get('IncludePartner') is not None:
            self.include_partner = m.get('IncludePartner')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        return self


class QueryResourcePackageInstancesResponseBodyDataInstancesInstanceApplicableProducts(TeaModel):
    def __init__(self, product=None):
        self.product = product  # type: list[str]

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryResourcePackageInstancesResponseBodyDataInstancesInstanceApplicableProducts, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.product is not None:
            result['Product'] = self.product
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Product') is not None:
            self.product = m.get('Product')
        return self


class QueryResourcePackageInstancesResponseBodyDataInstancesInstance(TeaModel):
    def __init__(self, applicable_products=None, commodity_code=None, deduct_type=None, effective_time=None,
                 expiry_time=None, instance_id=None, package_type=None, region=None, remaining_amount=None,
                 remaining_amount_unit=None, remark=None, status=None, total_amount=None, total_amount_unit=None):
        # The services to which the resource plan is applicable.
        self.applicable_products = applicable_products  # type: QueryResourcePackageInstancesResponseBodyDataInstancesInstanceApplicableProducts
        # The commodity code.
        self.commodity_code = commodity_code  # type: str
        # The deduction type. Example: Absolute.
        self.deduct_type = deduct_type  # type: str
        # The time when the resource plan took effect.
        self.effective_time = effective_time  # type: str
        # The time when the resource plan expired.
        self.expiry_time = expiry_time  # type: str
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        # The type of the resource plan.
        self.package_type = package_type  # type: str
        # The ID of the region.
        self.region = region  # type: str
        # The remaining quota.
        self.remaining_amount = remaining_amount  # type: str
        # The unit of the remaining quota.
        self.remaining_amount_unit = remaining_amount_unit  # type: str
        # The remarks on the resource plan. The remarks must be made in Chinese.
        self.remark = remark  # type: str
        # The status of the resource plan. Valid values:
        # 
        # *   Available
        # *   Expired
        self.status = status  # type: str
        # The total quota of the resource plan.
        self.total_amount = total_amount  # type: str
        # The unit of the total quota.
        self.total_amount_unit = total_amount_unit  # type: str

    def validate(self):
        if self.applicable_products:
            self.applicable_products.validate()

    def to_map(self):
        _map = super(QueryResourcePackageInstancesResponseBodyDataInstancesInstance, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.applicable_products is not None:
            result['ApplicableProducts'] = self.applicable_products.to_map()
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.deduct_type is not None:
            result['DeductType'] = self.deduct_type
        if self.effective_time is not None:
            result['EffectiveTime'] = self.effective_time
        if self.expiry_time is not None:
            result['ExpiryTime'] = self.expiry_time
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.package_type is not None:
            result['PackageType'] = self.package_type
        if self.region is not None:
            result['Region'] = self.region
        if self.remaining_amount is not None:
            result['RemainingAmount'] = self.remaining_amount
        if self.remaining_amount_unit is not None:
            result['RemainingAmountUnit'] = self.remaining_amount_unit
        if self.remark is not None:
            result['Remark'] = self.remark
        if self.status is not None:
            result['Status'] = self.status
        if self.total_amount is not None:
            result['TotalAmount'] = self.total_amount
        if self.total_amount_unit is not None:
            result['TotalAmountUnit'] = self.total_amount_unit
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ApplicableProducts') is not None:
            temp_model = QueryResourcePackageInstancesResponseBodyDataInstancesInstanceApplicableProducts()
            self.applicable_products = temp_model.from_map(m['ApplicableProducts'])
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('DeductType') is not None:
            self.deduct_type = m.get('DeductType')
        if m.get('EffectiveTime') is not None:
            self.effective_time = m.get('EffectiveTime')
        if m.get('ExpiryTime') is not None:
            self.expiry_time = m.get('ExpiryTime')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('PackageType') is not None:
            self.package_type = m.get('PackageType')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('RemainingAmount') is not None:
            self.remaining_amount = m.get('RemainingAmount')
        if m.get('RemainingAmountUnit') is not None:
            self.remaining_amount_unit = m.get('RemainingAmountUnit')
        if m.get('Remark') is not None:
            self.remark = m.get('Remark')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('TotalAmount') is not None:
            self.total_amount = m.get('TotalAmount')
        if m.get('TotalAmountUnit') is not None:
            self.total_amount_unit = m.get('TotalAmountUnit')
        return self


class QueryResourcePackageInstancesResponseBodyDataInstances(TeaModel):
    def __init__(self, instance=None):
        self.instance = instance  # type: list[QueryResourcePackageInstancesResponseBodyDataInstancesInstance]

    def validate(self):
        if self.instance:
            for k in self.instance:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QueryResourcePackageInstancesResponseBodyDataInstances, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Instance'] = []
        if self.instance is not None:
            for k in self.instance:
                result['Instance'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.instance = []
        if m.get('Instance') is not None:
            for k in m.get('Instance'):
                temp_model = QueryResourcePackageInstancesResponseBodyDataInstancesInstance()
                self.instance.append(temp_model.from_map(k))
        return self


class QueryResourcePackageInstancesResponseBodyData(TeaModel):
    def __init__(self, host_id=None, instances=None, page_num=None, page_size=None, total_count=None):
        # The ID of the host.
        self.host_id = host_id  # type: str
        # The details of the instances.
        self.instances = instances  # type: QueryResourcePackageInstancesResponseBodyDataInstances
        # The page number of the returned page.
        self.page_num = page_num  # type: str
        # The number of entries returned per page.
        self.page_size = page_size  # type: str
        # The total number of returned entries.
        self.total_count = total_count  # type: str

    def validate(self):
        if self.instances:
            self.instances.validate()

    def to_map(self):
        _map = super(QueryResourcePackageInstancesResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        if self.instances is not None:
            result['Instances'] = self.instances.to_map()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        if m.get('Instances') is not None:
            temp_model = QueryResourcePackageInstancesResponseBodyDataInstances()
            self.instances = temp_model.from_map(m['Instances'])
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QueryResourcePackageInstancesResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, page=None, page_size=None, request_id=None, success=None,
                 total=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryResourcePackageInstancesResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The page number of the returned page.
        self.page = page  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool
        # The total number of returned entries.
        self.total = total  # type: int

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryResourcePackageInstancesResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.page is not None:
            result['Page'] = self.page
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        if self.total is not None:
            result['Total'] = self.total
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryResourcePackageInstancesResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('Page') is not None:
            self.page = m.get('Page')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        if m.get('Total') is not None:
            self.total = m.get('Total')
        return self


class QueryResourcePackageInstancesResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryResourcePackageInstancesResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryResourcePackageInstancesResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryResourcePackageInstancesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QuerySavingsPlansDeductLogRequest(TeaModel):
    def __init__(self, end_time=None, instance_id=None, instance_type=None, locale=None, page_num=None,
                 page_size=None, start_time=None):
        # The end of the time range to query. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.end_time = end_time  # type: str
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        # The type of the instance ID based on which the data is queried. Valid values:
        # 
        # *   spn: queries data based on the ID of the savings plan instance.
        # *   product: queries data based on the ID of the cloud service instance.
        self.instance_type = instance_type  # type: str
        # The language of the return data. Valid values:
        # 
        # *   ZH: Chinese
        # *   EN: English
        self.locale = locale  # type: str
        # The number of the page to return.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page.
        self.page_size = page_size  # type: int
        # The beginning of the time range to query. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.start_time = start_time  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QuerySavingsPlansDeductLogRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.instance_type is not None:
            result['InstanceType'] = self.instance_type
        if self.locale is not None:
            result['Locale'] = self.locale
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('InstanceType') is not None:
            self.instance_type = m.get('InstanceType')
        if m.get('Locale') is not None:
            self.locale = m.get('Locale')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        return self


class QuerySavingsPlansDeductLogResponseBodyDataItems(TeaModel):
    def __init__(self, bill_module=None, deduct_commodity=None, deduct_fee=None, deduct_instance_id=None,
                 deduct_rate=None, discount_rate=None, end_time=None, instance_id=None, owner_id=None, savings_type=None,
                 start_time=None, user_id=None):
        # The billable item for which the fee is deducted.
        self.bill_module = bill_module  # type: str
        # The service for which the fee is deducted.
        self.deduct_commodity = deduct_commodity  # type: str
        # The deducted amount.
        self.deduct_fee = deduct_fee  # type: str
        # The ID of the instance for which the fee is deducted.
        self.deduct_instance_id = deduct_instance_id  # type: str
        # The deduction rate.
        self.deduct_rate = deduct_rate  # type: str
        # The discount used for the current deduction.
        self.discount_rate = discount_rate  # type: str
        # The end of the billing cycle for which the fee is deducted.
        self.end_time = end_time  # type: str
        # The ID of the savings plan instance.
        self.instance_id = instance_id  # type: str
        self.owner_id = owner_id  # type: long
        # The type of the savings plan. Valid values:
        # 
        # *   universal: general-purpose
        # *   ecs: ECS compute
        self.savings_type = savings_type  # type: str
        # The beginning of the billing cycle for which the fee is deducted. The time is in the format of yyyy-MM-dd HH:mm:ss.
        self.start_time = start_time  # type: str
        # The ID of the user.
        self.user_id = user_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(QuerySavingsPlansDeductLogResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_module is not None:
            result['BillModule'] = self.bill_module
        if self.deduct_commodity is not None:
            result['DeductCommodity'] = self.deduct_commodity
        if self.deduct_fee is not None:
            result['DeductFee'] = self.deduct_fee
        if self.deduct_instance_id is not None:
            result['DeductInstanceId'] = self.deduct_instance_id
        if self.deduct_rate is not None:
            result['DeductRate'] = self.deduct_rate
        if self.discount_rate is not None:
            result['DiscountRate'] = self.discount_rate
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.savings_type is not None:
            result['SavingsType'] = self.savings_type
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.user_id is not None:
            result['UserId'] = self.user_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillModule') is not None:
            self.bill_module = m.get('BillModule')
        if m.get('DeductCommodity') is not None:
            self.deduct_commodity = m.get('DeductCommodity')
        if m.get('DeductFee') is not None:
            self.deduct_fee = m.get('DeductFee')
        if m.get('DeductInstanceId') is not None:
            self.deduct_instance_id = m.get('DeductInstanceId')
        if m.get('DeductRate') is not None:
            self.deduct_rate = m.get('DeductRate')
        if m.get('DiscountRate') is not None:
            self.discount_rate = m.get('DiscountRate')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('SavingsType') is not None:
            self.savings_type = m.get('SavingsType')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('UserId') is not None:
            self.user_id = m.get('UserId')
        return self


class QuerySavingsPlansDeductLogResponseBodyData(TeaModel):
    def __init__(self, items=None, page_num=None, page_size=None, total_count=None):
        # The deduction details.
        self.items = items  # type: list[QuerySavingsPlansDeductLogResponseBodyDataItems]
        # The page number of the returned page.
        self.page_num = page_num  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The total number of entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QuerySavingsPlansDeductLogResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = QuerySavingsPlansDeductLogResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QuerySavingsPlansDeductLogResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The error code.
        self.code = code  # type: str
        # The return data.
        self.data = data  # type: QuerySavingsPlansDeductLogResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the operation was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QuerySavingsPlansDeductLogResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QuerySavingsPlansDeductLogResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QuerySavingsPlansDeductLogResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QuerySavingsPlansDeductLogResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QuerySavingsPlansDeductLogResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QuerySavingsPlansDeductLogResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QuerySavingsPlansDiscountRequest(TeaModel):
    def __init__(self, commodity_code=None, cycle=None, locale=None, module_code=None, page_num=None, page_size=None,
                 pay_mode=None, region=None, spec=None, spn_type=None):
        # The code of the service.
        self.commodity_code = commodity_code  # type: str
        # The cycle based on which queries are performed.
        self.cycle = cycle  # type: str
        # The identifier of the language.
        self.locale = locale  # type: str
        # The code of the pricing module.
        self.module_code = module_code  # type: str
        # The number of the page to return.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page.
        self.page_size = page_size  # type: int
        # The payment mode.
        self.pay_mode = pay_mode  # type: str
        # The ID of the region.
        self.region = region  # type: str
        # The type of the resource.
        self.spec = spec  # type: str
        # The type of the savings plan.
        self.spn_type = spn_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QuerySavingsPlansDiscountRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.cycle is not None:
            result['Cycle'] = self.cycle
        if self.locale is not None:
            result['Locale'] = self.locale
        if self.module_code is not None:
            result['ModuleCode'] = self.module_code
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.pay_mode is not None:
            result['PayMode'] = self.pay_mode
        if self.region is not None:
            result['Region'] = self.region
        if self.spec is not None:
            result['Spec'] = self.spec
        if self.spn_type is not None:
            result['SpnType'] = self.spn_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('Cycle') is not None:
            self.cycle = m.get('Cycle')
        if m.get('Locale') is not None:
            self.locale = m.get('Locale')
        if m.get('ModuleCode') is not None:
            self.module_code = m.get('ModuleCode')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('PayMode') is not None:
            self.pay_mode = m.get('PayMode')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('Spec') is not None:
            self.spec = m.get('Spec')
        if m.get('SpnType') is not None:
            self.spn_type = m.get('SpnType')
        return self


class QuerySavingsPlansDiscountResponseBodyDataItems(TeaModel):
    def __init__(self, commodity_name=None, contract_discount_rate=None, cycle=None, discount_rate=None,
                 module_name=None, pay_mode=None, region=None, region_code=None, spec=None, spn_type=None):
        # The details of the service.
        self.commodity_name = commodity_name  # type: str
        # The contracted discount.
        self.contract_discount_rate = contract_discount_rate  # type: str
        # The cycle based on which queries were performed.
        self.cycle = cycle  # type: str
        # The discount provided by the official website.
        self.discount_rate = discount_rate  # type: str
        # The name of the pricing module.
        self.module_name = module_name  # type: str
        # The payment mode. Valid values:
        # 
        # *   total: all upfront
        # *   half: half upfront
        # *   zero: no upfront
        self.pay_mode = pay_mode  # type: str
        # The ID of the region.
        self.region = region  # type: str
        self.region_code = region_code  # type: str
        # The type of the resource.
        self.spec = spec  # type: str
        # The type of the savings plan.
        self.spn_type = spn_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QuerySavingsPlansDiscountResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.commodity_name is not None:
            result['CommodityName'] = self.commodity_name
        if self.contract_discount_rate is not None:
            result['ContractDiscountRate'] = self.contract_discount_rate
        if self.cycle is not None:
            result['Cycle'] = self.cycle
        if self.discount_rate is not None:
            result['DiscountRate'] = self.discount_rate
        if self.module_name is not None:
            result['ModuleName'] = self.module_name
        if self.pay_mode is not None:
            result['PayMode'] = self.pay_mode
        if self.region is not None:
            result['Region'] = self.region
        if self.region_code is not None:
            result['RegionCode'] = self.region_code
        if self.spec is not None:
            result['Spec'] = self.spec
        if self.spn_type is not None:
            result['SpnType'] = self.spn_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CommodityName') is not None:
            self.commodity_name = m.get('CommodityName')
        if m.get('ContractDiscountRate') is not None:
            self.contract_discount_rate = m.get('ContractDiscountRate')
        if m.get('Cycle') is not None:
            self.cycle = m.get('Cycle')
        if m.get('DiscountRate') is not None:
            self.discount_rate = m.get('DiscountRate')
        if m.get('ModuleName') is not None:
            self.module_name = m.get('ModuleName')
        if m.get('PayMode') is not None:
            self.pay_mode = m.get('PayMode')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('RegionCode') is not None:
            self.region_code = m.get('RegionCode')
        if m.get('Spec') is not None:
            self.spec = m.get('Spec')
        if m.get('SpnType') is not None:
            self.spn_type = m.get('SpnType')
        return self


class QuerySavingsPlansDiscountResponseBodyData(TeaModel):
    def __init__(self, host_id=None, items=None):
        # The IP address of the request.
        self.host_id = host_id  # type: str
        # The information about the discounts on saving plans.
        self.items = items  # type: list[QuerySavingsPlansDiscountResponseBodyDataItems]

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QuerySavingsPlansDiscountResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = QuerySavingsPlansDiscountResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        return self


class QuerySavingsPlansDiscountResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The error code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QuerySavingsPlansDiscountResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QuerySavingsPlansDiscountResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QuerySavingsPlansDiscountResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QuerySavingsPlansDiscountResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QuerySavingsPlansDiscountResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QuerySavingsPlansDiscountResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QuerySavingsPlansDiscountResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QuerySavingsPlansInstanceRequestTag(TeaModel):
    def __init__(self, key=None, value=None):
        # The key of the tag to query.
        self.key = key  # type: str
        # The value of the tag to query.
        self.value = value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QuerySavingsPlansInstanceRequestTag, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.key is not None:
            result['Key'] = self.key
        if self.value is not None:
            result['Value'] = self.value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Key') is not None:
            self.key = m.get('Key')
        if m.get('Value') is not None:
            self.value = m.get('Value')
        return self


class QuerySavingsPlansInstanceRequest(TeaModel):
    def __init__(self, end_time=None, instance_id=None, locale=None, page_num=None, page_size=None, start_time=None,
                 status=None, tag=None):
        # The end of the time range to query. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.end_time = end_time  # type: str
        # The ID of the savings plan instance.
        self.instance_id = instance_id  # type: str
        # The language of the return data. Valid values:
        # 
        # *   ZH: Chinese
        # *   EN: English
        self.locale = locale  # type: str
        # The number of the page to return.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page.
        self.page_size = page_size  # type: int
        # The beginning of the time range to query. Specify the time in the format of yyyy-MM-dd HH:mm:ss.
        self.start_time = start_time  # type: str
        # The status of the Instance. 
        # 
        # *  NORMAL
        # * RELEASE
        self.status = status  # type: str
        # The tags.
        self.tag = tag  # type: list[QuerySavingsPlansInstanceRequestTag]

    def validate(self):
        if self.tag:
            for k in self.tag:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QuerySavingsPlansInstanceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.locale is not None:
            result['Locale'] = self.locale
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.status is not None:
            result['Status'] = self.status
        result['Tag'] = []
        if self.tag is not None:
            for k in self.tag:
                result['Tag'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('Locale') is not None:
            self.locale = m.get('Locale')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        self.tag = []
        if m.get('Tag') is not None:
            for k in m.get('Tag'):
                temp_model = QuerySavingsPlansInstanceRequestTag()
                self.tag.append(temp_model.from_map(k))
        return self


class QuerySavingsPlansInstanceResponseBodyDataItemsTags(TeaModel):
    def __init__(self, key=None, value=None):
        # The key of the tag.
        self.key = key  # type: str
        # The value of the tag.
        self.value = value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QuerySavingsPlansInstanceResponseBodyDataItemsTags, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.key is not None:
            result['Key'] = self.key
        if self.value is not None:
            result['Value'] = self.value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Key') is not None:
            self.key = m.get('Key')
        if m.get('Value') is not None:
            self.value = m.get('Value')
        return self


class QuerySavingsPlansInstanceResponseBodyDataItems(TeaModel):
    def __init__(self, allocation_status=None, commodity_code=None, currency=None, current_pool_value=None,
                 cycle=None, deduct_cycle_type=None, end_time=None, end_timestamp=None, instance_family=None,
                 instance_id=None, last_bill_total_usage=None, last_bill_utilization=None, pay_mode=None, pool_value=None,
                 prepay_fee=None, region=None, rest_pool_value=None, savings_type=None, start_time=None, start_timestamp=None,
                 status=None, tags=None, total_save=None, utilization=None):
        # The allocation status. Valid values:
        # 
        # *   unallocated
        # *   allocated
        # *   beAllocated
        self.allocation_status = allocation_status  # type: str
        self.commodity_code = commodity_code  # type: str
        # The currency. Valid values: CNY and USD.
        self.currency = currency  # type: str
        self.current_pool_value = current_pool_value  # type: str
        self.cycle = cycle  # type: str
        self.deduct_cycle_type = deduct_cycle_type  # type: str
        # The time when the instance expires. The time is in the format of yyyy-MM-dd HH:mm:ss.
        self.end_time = end_time  # type: str
        self.end_timestamp = end_timestamp  # type: long
        # The instance family information. For an instance of the Elastic Compute Service (ECS) compute type, the value indicates the ECS instance family or the ECS instance family package.
        self.instance_family = instance_family  # type: str
        # The ID of the savings plan instance.
        self.instance_id = instance_id  # type: str
        self.last_bill_total_usage = last_bill_total_usage  # type: str
        self.last_bill_utilization = last_bill_utilization  # type: str
        # The payment type. Valid values:
        # 
        # *   total: All Upfront
        # *   half: Partial Upfront
        # *   zero: No Upfront
        self.pay_mode = pay_mode  # type: str
        # The commitment.
        self.pool_value = pool_value  # type: str
        # The prepaid amount.
        self.prepay_fee = prepay_fee  # type: str
        # The region.
        self.region = region  # type: str
        self.rest_pool_value = rest_pool_value  # type: str
        # The type of the savings plan. Valid values:
        # 
        # *   universal: general-purpose
        # *   ecs: ECS compute
        self.savings_type = savings_type  # type: str
        # The time when the instance takes effect. The time is in the format of yyyy-MM-dd HH:mm:ss.
        self.start_time = start_time  # type: str
        self.start_timestamp = start_timestamp  # type: long
        # The status of the instance. Valid values:
        # 
        # *   NORMAL: normal
        # *   LIMIT: stopped due to overdue payment
        # *   RELEASE: released
        self.status = status  # type: str
        # The details about the tags.
        self.tags = tags  # type: list[QuerySavingsPlansInstanceResponseBodyDataItemsTags]
        # The total amount that is saved.
        self.total_save = total_save  # type: str
        # The total usage.
        self.utilization = utilization  # type: str

    def validate(self):
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QuerySavingsPlansInstanceResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.allocation_status is not None:
            result['AllocationStatus'] = self.allocation_status
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.current_pool_value is not None:
            result['CurrentPoolValue'] = self.current_pool_value
        if self.cycle is not None:
            result['Cycle'] = self.cycle
        if self.deduct_cycle_type is not None:
            result['DeductCycleType'] = self.deduct_cycle_type
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.end_timestamp is not None:
            result['EndTimestamp'] = self.end_timestamp
        if self.instance_family is not None:
            result['InstanceFamily'] = self.instance_family
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.last_bill_total_usage is not None:
            result['LastBillTotalUsage'] = self.last_bill_total_usage
        if self.last_bill_utilization is not None:
            result['LastBillUtilization'] = self.last_bill_utilization
        if self.pay_mode is not None:
            result['PayMode'] = self.pay_mode
        if self.pool_value is not None:
            result['PoolValue'] = self.pool_value
        if self.prepay_fee is not None:
            result['PrepayFee'] = self.prepay_fee
        if self.region is not None:
            result['Region'] = self.region
        if self.rest_pool_value is not None:
            result['RestPoolValue'] = self.rest_pool_value
        if self.savings_type is not None:
            result['SavingsType'] = self.savings_type
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.start_timestamp is not None:
            result['StartTimestamp'] = self.start_timestamp
        if self.status is not None:
            result['Status'] = self.status
        result['Tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['Tags'].append(k.to_map() if k else None)
        if self.total_save is not None:
            result['TotalSave'] = self.total_save
        if self.utilization is not None:
            result['Utilization'] = self.utilization
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AllocationStatus') is not None:
            self.allocation_status = m.get('AllocationStatus')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('CurrentPoolValue') is not None:
            self.current_pool_value = m.get('CurrentPoolValue')
        if m.get('Cycle') is not None:
            self.cycle = m.get('Cycle')
        if m.get('DeductCycleType') is not None:
            self.deduct_cycle_type = m.get('DeductCycleType')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('EndTimestamp') is not None:
            self.end_timestamp = m.get('EndTimestamp')
        if m.get('InstanceFamily') is not None:
            self.instance_family = m.get('InstanceFamily')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('LastBillTotalUsage') is not None:
            self.last_bill_total_usage = m.get('LastBillTotalUsage')
        if m.get('LastBillUtilization') is not None:
            self.last_bill_utilization = m.get('LastBillUtilization')
        if m.get('PayMode') is not None:
            self.pay_mode = m.get('PayMode')
        if m.get('PoolValue') is not None:
            self.pool_value = m.get('PoolValue')
        if m.get('PrepayFee') is not None:
            self.prepay_fee = m.get('PrepayFee')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('RestPoolValue') is not None:
            self.rest_pool_value = m.get('RestPoolValue')
        if m.get('SavingsType') is not None:
            self.savings_type = m.get('SavingsType')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('StartTimestamp') is not None:
            self.start_timestamp = m.get('StartTimestamp')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        self.tags = []
        if m.get('Tags') is not None:
            for k in m.get('Tags'):
                temp_model = QuerySavingsPlansInstanceResponseBodyDataItemsTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('TotalSave') is not None:
            self.total_save = m.get('TotalSave')
        if m.get('Utilization') is not None:
            self.utilization = m.get('Utilization')
        return self


class QuerySavingsPlansInstanceResponseBodyData(TeaModel):
    def __init__(self, items=None, page_num=None, page_size=None, total_count=None):
        # The details about the instances.
        self.items = items  # type: list[QuerySavingsPlansInstanceResponseBodyDataItems]
        # The page number of the returned page.
        self.page_num = page_num  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The total number of entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QuerySavingsPlansInstanceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Items'] = []
        if self.items is not None:
            for k in self.items:
                result['Items'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.items = []
        if m.get('Items') is not None:
            for k in m.get('Items'):
                temp_model = QuerySavingsPlansInstanceResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QuerySavingsPlansInstanceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The error code.
        self.code = code  # type: str
        # The return data.
        self.data = data  # type: QuerySavingsPlansInstanceResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the operation was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QuerySavingsPlansInstanceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QuerySavingsPlansInstanceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QuerySavingsPlansInstanceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QuerySavingsPlansInstanceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QuerySavingsPlansInstanceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QuerySavingsPlansInstanceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QuerySettleBillRequest(TeaModel):
    def __init__(self, bill_owner_id=None, billing_cycle=None, is_display_local_currency=None,
                 is_hide_zero_charge=None, max_results=None, next_token=None, owner_id=None, product_code=None, product_type=None,
                 record_id=None, subscription_type=None, type=None):
        self.bill_owner_id = bill_owner_id  # type: long
        self.billing_cycle = billing_cycle  # type: str
        self.is_display_local_currency = is_display_local_currency  # type: bool
        self.is_hide_zero_charge = is_hide_zero_charge  # type: bool
        self.max_results = max_results  # type: int
        self.next_token = next_token  # type: str
        self.owner_id = owner_id  # type: long
        self.product_code = product_code  # type: str
        self.product_type = product_type  # type: str
        self.record_id = record_id  # type: str
        self.subscription_type = subscription_type  # type: str
        self.type = type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QuerySettleBillRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.is_display_local_currency is not None:
            result['IsDisplayLocalCurrency'] = self.is_display_local_currency
        if self.is_hide_zero_charge is not None:
            result['IsHideZeroCharge'] = self.is_hide_zero_charge
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.record_id is not None:
            result['RecordID'] = self.record_id
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.type is not None:
            result['Type'] = self.type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('IsDisplayLocalCurrency') is not None:
            self.is_display_local_currency = m.get('IsDisplayLocalCurrency')
        if m.get('IsHideZeroCharge') is not None:
            self.is_hide_zero_charge = m.get('IsHideZeroCharge')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('RecordID') is not None:
            self.record_id = m.get('RecordID')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        return self


class QuerySettleBillResponseBodyDataItemsItem(TeaModel):
    def __init__(self, adjust_amount=None, after_tax_amount=None, bill_account_id=None, bill_account_name=None,
                 biz_type=None, cash_amount=None, commodity_code=None, currency=None, deducted_by_cash_coupons=None,
                 deducted_by_coupons=None, deducted_by_prepaid_card=None, invoice_discount=None, item=None, outstanding_amount=None,
                 owner_id=None, payment_amount=None, payment_currency=None, payment_time=None, payment_transaction_id=None,
                 pip_code=None, pretax_amount=None, pretax_amount_local=None, pretax_gross_amount=None, product_code=None,
                 product_detail=None, product_name=None, product_type=None, record_id=None, round_down_discount=None, status=None,
                 sub_order_id=None, subscription_type=None, tax=None, usage_end_time=None, usage_start_time=None):
        self.adjust_amount = adjust_amount  # type: float
        self.after_tax_amount = after_tax_amount  # type: float
        self.bill_account_id = bill_account_id  # type: str
        self.bill_account_name = bill_account_name  # type: str
        self.biz_type = biz_type  # type: str
        self.cash_amount = cash_amount  # type: float
        self.commodity_code = commodity_code  # type: str
        self.currency = currency  # type: str
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: float
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: float
        self.invoice_discount = invoice_discount  # type: float
        self.item = item  # type: str
        self.outstanding_amount = outstanding_amount  # type: float
        self.owner_id = owner_id  # type: str
        self.payment_amount = payment_amount  # type: float
        self.payment_currency = payment_currency  # type: str
        self.payment_time = payment_time  # type: str
        self.payment_transaction_id = payment_transaction_id  # type: str
        self.pip_code = pip_code  # type: str
        self.pretax_amount = pretax_amount  # type: float
        self.pretax_amount_local = pretax_amount_local  # type: float
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        self.product_code = product_code  # type: str
        self.product_detail = product_detail  # type: str
        self.product_name = product_name  # type: str
        self.product_type = product_type  # type: str
        self.record_id = record_id  # type: str
        self.round_down_discount = round_down_discount  # type: str
        self.status = status  # type: str
        self.sub_order_id = sub_order_id  # type: str
        self.subscription_type = subscription_type  # type: str
        self.tax = tax  # type: float
        self.usage_end_time = usage_end_time  # type: str
        self.usage_start_time = usage_start_time  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QuerySettleBillResponseBodyDataItemsItem, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.adjust_amount is not None:
            result['AdjustAmount'] = self.adjust_amount
        if self.after_tax_amount is not None:
            result['AfterTaxAmount'] = self.after_tax_amount
        if self.bill_account_id is not None:
            result['BillAccountID'] = self.bill_account_id
        if self.bill_account_name is not None:
            result['BillAccountName'] = self.bill_account_name
        if self.biz_type is not None:
            result['BizType'] = self.biz_type
        if self.cash_amount is not None:
            result['CashAmount'] = self.cash_amount
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.item is not None:
            result['Item'] = self.item
        if self.outstanding_amount is not None:
            result['OutstandingAmount'] = self.outstanding_amount
        if self.owner_id is not None:
            result['OwnerID'] = self.owner_id
        if self.payment_amount is not None:
            result['PaymentAmount'] = self.payment_amount
        if self.payment_currency is not None:
            result['PaymentCurrency'] = self.payment_currency
        if self.payment_time is not None:
            result['PaymentTime'] = self.payment_time
        if self.payment_transaction_id is not None:
            result['PaymentTransactionID'] = self.payment_transaction_id
        if self.pip_code is not None:
            result['PipCode'] = self.pip_code
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_amount_local is not None:
            result['PretaxAmountLocal'] = self.pretax_amount_local
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.record_id is not None:
            result['RecordID'] = self.record_id
        if self.round_down_discount is not None:
            result['RoundDownDiscount'] = self.round_down_discount
        if self.status is not None:
            result['Status'] = self.status
        if self.sub_order_id is not None:
            result['SubOrderId'] = self.sub_order_id
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tax is not None:
            result['Tax'] = self.tax
        if self.usage_end_time is not None:
            result['UsageEndTime'] = self.usage_end_time
        if self.usage_start_time is not None:
            result['UsageStartTime'] = self.usage_start_time
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AdjustAmount') is not None:
            self.adjust_amount = m.get('AdjustAmount')
        if m.get('AfterTaxAmount') is not None:
            self.after_tax_amount = m.get('AfterTaxAmount')
        if m.get('BillAccountID') is not None:
            self.bill_account_id = m.get('BillAccountID')
        if m.get('BillAccountName') is not None:
            self.bill_account_name = m.get('BillAccountName')
        if m.get('BizType') is not None:
            self.biz_type = m.get('BizType')
        if m.get('CashAmount') is not None:
            self.cash_amount = m.get('CashAmount')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('Item') is not None:
            self.item = m.get('Item')
        if m.get('OutstandingAmount') is not None:
            self.outstanding_amount = m.get('OutstandingAmount')
        if m.get('OwnerID') is not None:
            self.owner_id = m.get('OwnerID')
        if m.get('PaymentAmount') is not None:
            self.payment_amount = m.get('PaymentAmount')
        if m.get('PaymentCurrency') is not None:
            self.payment_currency = m.get('PaymentCurrency')
        if m.get('PaymentTime') is not None:
            self.payment_time = m.get('PaymentTime')
        if m.get('PaymentTransactionID') is not None:
            self.payment_transaction_id = m.get('PaymentTransactionID')
        if m.get('PipCode') is not None:
            self.pip_code = m.get('PipCode')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxAmountLocal') is not None:
            self.pretax_amount_local = m.get('PretaxAmountLocal')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('RecordID') is not None:
            self.record_id = m.get('RecordID')
        if m.get('RoundDownDiscount') is not None:
            self.round_down_discount = m.get('RoundDownDiscount')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('SubOrderId') is not None:
            self.sub_order_id = m.get('SubOrderId')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tax') is not None:
            self.tax = m.get('Tax')
        if m.get('UsageEndTime') is not None:
            self.usage_end_time = m.get('UsageEndTime')
        if m.get('UsageStartTime') is not None:
            self.usage_start_time = m.get('UsageStartTime')
        return self


class QuerySettleBillResponseBodyDataItems(TeaModel):
    def __init__(self, item=None):
        self.item = item  # type: list[QuerySettleBillResponseBodyDataItemsItem]

    def validate(self):
        if self.item:
            for k in self.item:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QuerySettleBillResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Item'] = []
        if self.item is not None:
            for k in self.item:
                result['Item'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.item = []
        if m.get('Item') is not None:
            for k in m.get('Item'):
                temp_model = QuerySettleBillResponseBodyDataItemsItem()
                self.item.append(temp_model.from_map(k))
        return self


class QuerySettleBillResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, billing_cycle=None, items=None, max_results=None,
                 next_token=None, total_count=None):
        self.account_id = account_id  # type: str
        self.account_name = account_name  # type: str
        self.billing_cycle = billing_cycle  # type: str
        self.items = items  # type: QuerySettleBillResponseBodyDataItems
        self.max_results = max_results  # type: int
        self.next_token = next_token  # type: str
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            self.items.validate()

    def to_map(self):
        _map = super(QuerySettleBillResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.items is not None:
            result['Items'] = self.items.to_map()
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('Items') is not None:
            temp_model = QuerySettleBillResponseBodyDataItems()
            self.items = temp_model.from_map(m['Items'])
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QuerySettleBillResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        self.code = code  # type: str
        self.data = data  # type: QuerySettleBillResponseBodyData
        self.message = message  # type: str
        self.request_id = request_id  # type: str
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QuerySettleBillResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QuerySettleBillResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QuerySettleBillResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QuerySettleBillResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QuerySettleBillResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QuerySettleBillResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QuerySkuPriceListRequest(TeaModel):
    def __init__(self, commodity_code=None, lang=None, next_page_token=None, page_size=None, price_entity_code=None,
                 price_factor_condition_map=None):
        # The code of the service.
        self.commodity_code = commodity_code  # type: str
        self.lang = lang  # type: str
        # The token that is used to retrieve the next page. You do not need to set this parameter if you query coverage details for the first time. The response returns a token that you can use to query coverage details of the next page. If a null value is returned for the NextPageToken parameter, no more coverage details can be queried.
        self.next_page_token = next_page_token  # type: str
        # The number of entries to be returned on each page. Maximum value: 50.
        self.page_size = page_size  # type: int
        # The code of the pricing object.
        self.price_entity_code = price_entity_code  # type: str
        # The conditions of the pricing factors.
        self.price_factor_condition_map = price_factor_condition_map  # type: dict[str, list[str]]

    def validate(self):
        pass

    def to_map(self):
        _map = super(QuerySkuPriceListRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.lang is not None:
            result['Lang'] = self.lang
        if self.next_page_token is not None:
            result['NextPageToken'] = self.next_page_token
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.price_entity_code is not None:
            result['PriceEntityCode'] = self.price_entity_code
        if self.price_factor_condition_map is not None:
            result['PriceFactorConditionMap'] = self.price_factor_condition_map
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('Lang') is not None:
            self.lang = m.get('Lang')
        if m.get('NextPageToken') is not None:
            self.next_page_token = m.get('NextPageToken')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('PriceEntityCode') is not None:
            self.price_entity_code = m.get('PriceEntityCode')
        if m.get('PriceFactorConditionMap') is not None:
            self.price_factor_condition_map = m.get('PriceFactorConditionMap')
        return self


class QuerySkuPriceListShrinkRequest(TeaModel):
    def __init__(self, commodity_code=None, lang=None, next_page_token=None, page_size=None, price_entity_code=None,
                 price_factor_condition_map_shrink=None):
        # The code of the service.
        self.commodity_code = commodity_code  # type: str
        self.lang = lang  # type: str
        # The token that is used to retrieve the next page. You do not need to set this parameter if you query coverage details for the first time. The response returns a token that you can use to query coverage details of the next page. If a null value is returned for the NextPageToken parameter, no more coverage details can be queried.
        self.next_page_token = next_page_token  # type: str
        # The number of entries to be returned on each page. Maximum value: 50.
        self.page_size = page_size  # type: int
        # The code of the pricing object.
        self.price_entity_code = price_entity_code  # type: str
        # The conditions of the pricing factors.
        self.price_factor_condition_map_shrink = price_factor_condition_map_shrink  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QuerySkuPriceListShrinkRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.lang is not None:
            result['Lang'] = self.lang
        if self.next_page_token is not None:
            result['NextPageToken'] = self.next_page_token
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.price_entity_code is not None:
            result['PriceEntityCode'] = self.price_entity_code
        if self.price_factor_condition_map_shrink is not None:
            result['PriceFactorConditionMap'] = self.price_factor_condition_map_shrink
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('Lang') is not None:
            self.lang = m.get('Lang')
        if m.get('NextPageToken') is not None:
            self.next_page_token = m.get('NextPageToken')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('PriceEntityCode') is not None:
            self.price_entity_code = m.get('PriceEntityCode')
        if m.get('PriceFactorConditionMap') is not None:
            self.price_factor_condition_map_shrink = m.get('PriceFactorConditionMap')
        return self


class QuerySkuPriceListResponseBodyDataSkuPricePageSkuPriceListCskuPriceListRangeList(TeaModel):
    def __init__(self, factor_code=None, max=None, min=None, type=None):
        # The code of the pricing factor.
        self.factor_code = factor_code  # type: str
        # The maximum value.
        self.max = max  # type: str
        # The minimum value.
        self.min = min  # type: str
        # The closure type of the interval.
        self.type = type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QuerySkuPriceListResponseBodyDataSkuPricePageSkuPriceListCskuPriceListRangeList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.factor_code is not None:
            result['FactorCode'] = self.factor_code
        if self.max is not None:
            result['Max'] = self.max
        if self.min is not None:
            result['Min'] = self.min
        if self.type is not None:
            result['Type'] = self.type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('FactorCode') is not None:
            self.factor_code = m.get('FactorCode')
        if m.get('Max') is not None:
            self.max = m.get('Max')
        if m.get('Min') is not None:
            self.min = m.get('Min')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        return self


class QuerySkuPriceListResponseBodyDataSkuPricePageSkuPriceListCskuPriceList(TeaModel):
    def __init__(self, csku_code=None, currency=None, price=None, price_mode=None, price_type=None, price_unit=None,
                 range_list=None, usage_unit=None):
        # The unique code of the SKU price.
        self.csku_code = csku_code  # type: str
        # The currency.
        self.currency = currency  # type: str
        # The price.
        self.price = price  # type: str
        # The pricing mode.
        self.price_mode = price_mode  # type: str
        # The pricing type.
        self.price_type = price_type  # type: str
        # The unit of the price.
        self.price_unit = price_unit  # type: str
        # If the PriceMode parameter is set to STEP_ACCUMULATION or STEP_ARRIVE, the value of this field exists and specifies the range. If the PriceMode parameter is set to NORMAL_PRICE, the value of this field is null.
        self.range_list = range_list  # type: list[QuerySkuPriceListResponseBodyDataSkuPricePageSkuPriceListCskuPriceListRangeList]
        # The usage unit.
        self.usage_unit = usage_unit  # type: str

    def validate(self):
        if self.range_list:
            for k in self.range_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QuerySkuPriceListResponseBodyDataSkuPricePageSkuPriceListCskuPriceList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.csku_code is not None:
            result['CskuCode'] = self.csku_code
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.price is not None:
            result['Price'] = self.price
        if self.price_mode is not None:
            result['PriceMode'] = self.price_mode
        if self.price_type is not None:
            result['PriceType'] = self.price_type
        if self.price_unit is not None:
            result['PriceUnit'] = self.price_unit
        result['RangeList'] = []
        if self.range_list is not None:
            for k in self.range_list:
                result['RangeList'].append(k.to_map() if k else None)
        if self.usage_unit is not None:
            result['UsageUnit'] = self.usage_unit
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CskuCode') is not None:
            self.csku_code = m.get('CskuCode')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('Price') is not None:
            self.price = m.get('Price')
        if m.get('PriceMode') is not None:
            self.price_mode = m.get('PriceMode')
        if m.get('PriceType') is not None:
            self.price_type = m.get('PriceType')
        if m.get('PriceUnit') is not None:
            self.price_unit = m.get('PriceUnit')
        self.range_list = []
        if m.get('RangeList') is not None:
            for k in m.get('RangeList'):
                temp_model = QuerySkuPriceListResponseBodyDataSkuPricePageSkuPriceListCskuPriceListRangeList()
                self.range_list.append(temp_model.from_map(k))
        if m.get('UsageUnit') is not None:
            self.usage_unit = m.get('UsageUnit')
        return self


class QuerySkuPriceListResponseBodyDataSkuPricePageSkuPriceList(TeaModel):
    def __init__(self, csku_price_list=None, sku_code=None, sku_factor_map=None):
        # The prices of the SKUs.
        self.csku_price_list = csku_price_list  # type: list[QuerySkuPriceListResponseBodyDataSkuPricePageSkuPriceListCskuPriceList]
        # The code of the SKU.
        self.sku_code = sku_code  # type: str
        # The values of the pricing factors.
        self.sku_factor_map = sku_factor_map  # type: dict[str, str]

    def validate(self):
        if self.csku_price_list:
            for k in self.csku_price_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QuerySkuPriceListResponseBodyDataSkuPricePageSkuPriceList, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['CskuPriceList'] = []
        if self.csku_price_list is not None:
            for k in self.csku_price_list:
                result['CskuPriceList'].append(k.to_map() if k else None)
        if self.sku_code is not None:
            result['SkuCode'] = self.sku_code
        if self.sku_factor_map is not None:
            result['SkuFactorMap'] = self.sku_factor_map
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.csku_price_list = []
        if m.get('CskuPriceList') is not None:
            for k in m.get('CskuPriceList'):
                temp_model = QuerySkuPriceListResponseBodyDataSkuPricePageSkuPriceListCskuPriceList()
                self.csku_price_list.append(temp_model.from_map(k))
        if m.get('SkuCode') is not None:
            self.sku_code = m.get('SkuCode')
        if m.get('SkuFactorMap') is not None:
            self.sku_factor_map = m.get('SkuFactorMap')
        return self


class QuerySkuPriceListResponseBodyDataSkuPricePage(TeaModel):
    def __init__(self, next_page_token=None, sku_price_list=None, total_count=None):
        # The token that is used to query the next page.
        self.next_page_token = next_page_token  # type: str
        # The SKUs.
        self.sku_price_list = sku_price_list  # type: list[QuerySkuPriceListResponseBodyDataSkuPricePageSkuPriceList]
        # The total number of SKUs.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.sku_price_list:
            for k in self.sku_price_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QuerySkuPriceListResponseBodyDataSkuPricePage, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.next_page_token is not None:
            result['NextPageToken'] = self.next_page_token
        result['SkuPriceList'] = []
        if self.sku_price_list is not None:
            for k in self.sku_price_list:
                result['SkuPriceList'].append(k.to_map() if k else None)
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('NextPageToken') is not None:
            self.next_page_token = m.get('NextPageToken')
        self.sku_price_list = []
        if m.get('SkuPriceList') is not None:
            for k in m.get('SkuPriceList'):
                temp_model = QuerySkuPriceListResponseBodyDataSkuPricePageSkuPriceList()
                self.sku_price_list.append(temp_model.from_map(k))
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QuerySkuPriceListResponseBodyData(TeaModel):
    def __init__(self, sku_price_page=None):
        # The SKUs of the pricing object.
        self.sku_price_page = sku_price_page  # type: QuerySkuPriceListResponseBodyDataSkuPricePage

    def validate(self):
        if self.sku_price_page:
            self.sku_price_page.validate()

    def to_map(self):
        _map = super(QuerySkuPriceListResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.sku_price_page is not None:
            result['SkuPricePage'] = self.sku_price_page.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('SkuPricePage') is not None:
            temp_model = QuerySkuPriceListResponseBodyDataSkuPricePage()
            self.sku_price_page = temp_model.from_map(m['SkuPricePage'])
        return self


class QuerySkuPriceListResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The HTTP status code.
        self.code = code  # type: str
        # The data that is returned.
        self.data = data  # type: QuerySkuPriceListResponseBodyData
        # The message that is returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QuerySkuPriceListResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QuerySkuPriceListResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QuerySkuPriceListResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QuerySkuPriceListResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QuerySkuPriceListResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QuerySkuPriceListResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QuerySplitItemBillRequest(TeaModel):
    def __init__(self, bill_owner_id=None, billing_cycle=None, owner_id=None, page_num=None, page_size=None,
                 product_code=None, product_type=None, subscription_type=None):
        # The ID of the member. If you specify a value for this parameter, you can query the split bills of the specified member. If you leave this parameter empty, the split bills of the current account are queried by default.
        self.bill_owner_id = bill_owner_id  # type: long
        # The billing cycle, in the YYYY-MM format.
        self.billing_cycle = billing_cycle  # type: str
        self.owner_id = owner_id  # type: long
        # The number of the page to return. Default value: 1.
        self.page_num = page_num  # type: int
        # The number of entries to return on each page. Default value: 20. Maximum value: 300.
        self.page_size = page_size  # type: int
        # The code of the service.
        self.product_code = product_code  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The billing method. Valid values: Subscription: subscription PayAsYouGo: pay-as-you-go This parameter must be used together with the ProductCode parameter.
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QuerySplitItemBillRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bill_owner_id is not None:
            result['BillOwnerId'] = self.bill_owner_id
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BillOwnerId') is not None:
            self.bill_owner_id = m.get('BillOwnerId')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class QuerySplitItemBillResponseBodyDataItemsItem(TeaModel):
    def __init__(self, adjust_amount=None, billing_date=None, billing_item=None, billing_type=None,
                 cash_amount=None, commodity_code=None, cost_unit=None, currency=None, deducted_by_cash_coupons=None,
                 deducted_by_coupons=None, deducted_by_prepaid_card=None, deducted_by_resource_package=None, instance_config=None,
                 instance_id=None, instance_spec=None, internet_ip=None, intranet_ip=None, invoice_discount=None, item=None,
                 list_price=None, list_price_unit=None, nick_name=None, outstanding_amount=None, owner_id=None,
                 payment_amount=None, pip_code=None, pretax_amount=None, pretax_gross_amount=None, product_code=None,
                 product_detail=None, product_name=None, product_type=None, region=None, resource_group=None, service_period=None,
                 service_period_unit=None, split_account_id=None, split_account_name=None, split_billing_cycle=None,
                 split_commodity_code=None, split_item_id=None, split_item_name=None, split_product_detail=None, subscription_type=None,
                 tag=None, usage=None, usage_unit=None, zone=None):
        # The amount deducted by using credit refunds.
        self.adjust_amount = adjust_amount  # type: float
        # The billing date, in the YYYY-MM-DD format.
        self.billing_date = billing_date  # type: str
        # The billable item.
        self.billing_item = billing_item  # type: str
        # The billing type.
        self.billing_type = billing_type  # type: str
        # The amount paid in cash. The amount that was deducted by using credit refunds is not included.
        self.cash_amount = cash_amount  # type: float
        # The code of the commodity. The commodity code is the same as that displayed in User Center.
        self.commodity_code = commodity_code  # type: str
        # The cost center.
        self.cost_unit = cost_unit  # type: str
        # The type of the currency. Valid values: CNY, USD, and JPY.
        self.currency = currency  # type: str
        # The amount deducted by using vouchers.
        self.deducted_by_cash_coupons = deducted_by_cash_coupons  # type: float
        # The amount deducted by using coupons.
        self.deducted_by_coupons = deducted_by_coupons  # type: float
        # The amount deducted by using prepaid cards.
        self.deducted_by_prepaid_card = deducted_by_prepaid_card  # type: float
        # The amount deducted by using resource plans.
        self.deducted_by_resource_package = deducted_by_resource_package  # type: str
        # The configurations of the instance.
        self.instance_config = instance_config  # type: str
        # The ID of the instance.
        self.instance_id = instance_id  # type: str
        # The instance type of the instance.
        self.instance_spec = instance_spec  # type: str
        # The public IP address.
        self.internet_ip = internet_ip  # type: str
        # The private IP address.
        self.intranet_ip = intranet_ip  # type: str
        # The discount amount.
        self.invoice_discount = invoice_discount  # type: float
        # The type of the bill. Valid values: SubscriptionOrder: subscription order PayAsYouGoBill: pay-as-you-go bill Refund: refund Adjustment: reconciliation
        self.item = item  # type: str
        # The unit price. This parameter is returned only if the isBillingItem parameter is set to true.
        self.list_price = list_price  # type: str
        # The unit of the unit price. This parameter is returned only if the isBillingItem parameter is set to true.
        self.list_price_unit = list_price_unit  # type: str
        # The name of the instance.
        self.nick_name = nick_name  # type: str
        # The unsettled amount of the bill.
        self.outstanding_amount = outstanding_amount  # type: float
        # The ID of the member. This parameter is returned in a multi-account payment scenario.
        self.owner_id = owner_id  # type: str
        # The amount paid in cash.
        self.payment_amount = payment_amount  # type: float
        # The code of the service. The service code is the same as that displayed in User Center.
        self.pip_code = pip_code  # type: str
        # The pretax amount.
        self.pretax_amount = pretax_amount  # type: float
        # The pretax gross amount.
        self.pretax_gross_amount = pretax_gross_amount  # type: float
        # The code of the service.
        self.product_code = product_code  # type: str
        # The details of the service.
        self.product_detail = product_detail  # type: str
        # The name of the service.
        self.product_name = product_name  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The ID of the region.
        self.region = region  # type: str
        # The resource group.
        self.resource_group = resource_group  # type: str
        # The validity period.
        self.service_period = service_period  # type: str
        # The unit of the validity period.
        self.service_period_unit = service_period_unit  # type: str
        # The ID of the account to which the split bill belongs.
        self.split_account_id = split_account_id  # type: str
        # The name of the account to which the split item belongs.
        self.split_account_name = split_account_name  # type: str
        # The month in which the split item is used.
        self.split_billing_cycle = split_billing_cycle  # type: str
        # The commodity code of the split item.
        self.split_commodity_code = split_commodity_code  # type: str
        # The ID of the split item.
        self.split_item_id = split_item_id  # type: str
        # The name of the split item.
        self.split_item_name = split_item_name  # type: str
        # The name of the service to which the split item belongs.
        self.split_product_detail = split_product_detail  # type: str
        # The billing method. Valid values: Subscription: subscription PayAsYouGo: pay-as-you-go This parameter is returned together with the ProductCode parameter.
        self.subscription_type = subscription_type  # type: str
        # The tag.
        self.tag = tag  # type: str
        # The usage of the split item. This parameter is returned only if the isBillingItem parameter is set to true.
        self.usage = usage  # type: str
        # The unit of usage. This parameter is returned only if the isBillingItem parameter is set to true.
        self.usage_unit = usage_unit  # type: str
        # The ID of the zone.
        self.zone = zone  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QuerySplitItemBillResponseBodyDataItemsItem, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.adjust_amount is not None:
            result['AdjustAmount'] = self.adjust_amount
        if self.billing_date is not None:
            result['BillingDate'] = self.billing_date
        if self.billing_item is not None:
            result['BillingItem'] = self.billing_item
        if self.billing_type is not None:
            result['BillingType'] = self.billing_type
        if self.cash_amount is not None:
            result['CashAmount'] = self.cash_amount
        if self.commodity_code is not None:
            result['CommodityCode'] = self.commodity_code
        if self.cost_unit is not None:
            result['CostUnit'] = self.cost_unit
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.deducted_by_cash_coupons is not None:
            result['DeductedByCashCoupons'] = self.deducted_by_cash_coupons
        if self.deducted_by_coupons is not None:
            result['DeductedByCoupons'] = self.deducted_by_coupons
        if self.deducted_by_prepaid_card is not None:
            result['DeductedByPrepaidCard'] = self.deducted_by_prepaid_card
        if self.deducted_by_resource_package is not None:
            result['DeductedByResourcePackage'] = self.deducted_by_resource_package
        if self.instance_config is not None:
            result['InstanceConfig'] = self.instance_config
        if self.instance_id is not None:
            result['InstanceID'] = self.instance_id
        if self.instance_spec is not None:
            result['InstanceSpec'] = self.instance_spec
        if self.internet_ip is not None:
            result['InternetIP'] = self.internet_ip
        if self.intranet_ip is not None:
            result['IntranetIP'] = self.intranet_ip
        if self.invoice_discount is not None:
            result['InvoiceDiscount'] = self.invoice_discount
        if self.item is not None:
            result['Item'] = self.item
        if self.list_price is not None:
            result['ListPrice'] = self.list_price
        if self.list_price_unit is not None:
            result['ListPriceUnit'] = self.list_price_unit
        if self.nick_name is not None:
            result['NickName'] = self.nick_name
        if self.outstanding_amount is not None:
            result['OutstandingAmount'] = self.outstanding_amount
        if self.owner_id is not None:
            result['OwnerID'] = self.owner_id
        if self.payment_amount is not None:
            result['PaymentAmount'] = self.payment_amount
        if self.pip_code is not None:
            result['PipCode'] = self.pip_code
        if self.pretax_amount is not None:
            result['PretaxAmount'] = self.pretax_amount
        if self.pretax_gross_amount is not None:
            result['PretaxGrossAmount'] = self.pretax_gross_amount
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_detail is not None:
            result['ProductDetail'] = self.product_detail
        if self.product_name is not None:
            result['ProductName'] = self.product_name
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_group is not None:
            result['ResourceGroup'] = self.resource_group
        if self.service_period is not None:
            result['ServicePeriod'] = self.service_period
        if self.service_period_unit is not None:
            result['ServicePeriodUnit'] = self.service_period_unit
        if self.split_account_id is not None:
            result['SplitAccountID'] = self.split_account_id
        if self.split_account_name is not None:
            result['SplitAccountName'] = self.split_account_name
        if self.split_billing_cycle is not None:
            result['SplitBillingCycle'] = self.split_billing_cycle
        if self.split_commodity_code is not None:
            result['SplitCommodityCode'] = self.split_commodity_code
        if self.split_item_id is not None:
            result['SplitItemID'] = self.split_item_id
        if self.split_item_name is not None:
            result['SplitItemName'] = self.split_item_name
        if self.split_product_detail is not None:
            result['SplitProductDetail'] = self.split_product_detail
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        if self.tag is not None:
            result['Tag'] = self.tag
        if self.usage is not None:
            result['Usage'] = self.usage
        if self.usage_unit is not None:
            result['UsageUnit'] = self.usage_unit
        if self.zone is not None:
            result['Zone'] = self.zone
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AdjustAmount') is not None:
            self.adjust_amount = m.get('AdjustAmount')
        if m.get('BillingDate') is not None:
            self.billing_date = m.get('BillingDate')
        if m.get('BillingItem') is not None:
            self.billing_item = m.get('BillingItem')
        if m.get('BillingType') is not None:
            self.billing_type = m.get('BillingType')
        if m.get('CashAmount') is not None:
            self.cash_amount = m.get('CashAmount')
        if m.get('CommodityCode') is not None:
            self.commodity_code = m.get('CommodityCode')
        if m.get('CostUnit') is not None:
            self.cost_unit = m.get('CostUnit')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('DeductedByCashCoupons') is not None:
            self.deducted_by_cash_coupons = m.get('DeductedByCashCoupons')
        if m.get('DeductedByCoupons') is not None:
            self.deducted_by_coupons = m.get('DeductedByCoupons')
        if m.get('DeductedByPrepaidCard') is not None:
            self.deducted_by_prepaid_card = m.get('DeductedByPrepaidCard')
        if m.get('DeductedByResourcePackage') is not None:
            self.deducted_by_resource_package = m.get('DeductedByResourcePackage')
        if m.get('InstanceConfig') is not None:
            self.instance_config = m.get('InstanceConfig')
        if m.get('InstanceID') is not None:
            self.instance_id = m.get('InstanceID')
        if m.get('InstanceSpec') is not None:
            self.instance_spec = m.get('InstanceSpec')
        if m.get('InternetIP') is not None:
            self.internet_ip = m.get('InternetIP')
        if m.get('IntranetIP') is not None:
            self.intranet_ip = m.get('IntranetIP')
        if m.get('InvoiceDiscount') is not None:
            self.invoice_discount = m.get('InvoiceDiscount')
        if m.get('Item') is not None:
            self.item = m.get('Item')
        if m.get('ListPrice') is not None:
            self.list_price = m.get('ListPrice')
        if m.get('ListPriceUnit') is not None:
            self.list_price_unit = m.get('ListPriceUnit')
        if m.get('NickName') is not None:
            self.nick_name = m.get('NickName')
        if m.get('OutstandingAmount') is not None:
            self.outstanding_amount = m.get('OutstandingAmount')
        if m.get('OwnerID') is not None:
            self.owner_id = m.get('OwnerID')
        if m.get('PaymentAmount') is not None:
            self.payment_amount = m.get('PaymentAmount')
        if m.get('PipCode') is not None:
            self.pip_code = m.get('PipCode')
        if m.get('PretaxAmount') is not None:
            self.pretax_amount = m.get('PretaxAmount')
        if m.get('PretaxGrossAmount') is not None:
            self.pretax_gross_amount = m.get('PretaxGrossAmount')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductDetail') is not None:
            self.product_detail = m.get('ProductDetail')
        if m.get('ProductName') is not None:
            self.product_name = m.get('ProductName')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceGroup') is not None:
            self.resource_group = m.get('ResourceGroup')
        if m.get('ServicePeriod') is not None:
            self.service_period = m.get('ServicePeriod')
        if m.get('ServicePeriodUnit') is not None:
            self.service_period_unit = m.get('ServicePeriodUnit')
        if m.get('SplitAccountID') is not None:
            self.split_account_id = m.get('SplitAccountID')
        if m.get('SplitAccountName') is not None:
            self.split_account_name = m.get('SplitAccountName')
        if m.get('SplitBillingCycle') is not None:
            self.split_billing_cycle = m.get('SplitBillingCycle')
        if m.get('SplitCommodityCode') is not None:
            self.split_commodity_code = m.get('SplitCommodityCode')
        if m.get('SplitItemID') is not None:
            self.split_item_id = m.get('SplitItemID')
        if m.get('SplitItemName') is not None:
            self.split_item_name = m.get('SplitItemName')
        if m.get('SplitProductDetail') is not None:
            self.split_product_detail = m.get('SplitProductDetail')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        if m.get('Tag') is not None:
            self.tag = m.get('Tag')
        if m.get('Usage') is not None:
            self.usage = m.get('Usage')
        if m.get('UsageUnit') is not None:
            self.usage_unit = m.get('UsageUnit')
        if m.get('Zone') is not None:
            self.zone = m.get('Zone')
        return self


class QuerySplitItemBillResponseBodyDataItems(TeaModel):
    def __init__(self, item=None):
        self.item = item  # type: list[QuerySplitItemBillResponseBodyDataItemsItem]

    def validate(self):
        if self.item:
            for k in self.item:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(QuerySplitItemBillResponseBodyDataItems, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['Item'] = []
        if self.item is not None:
            for k in self.item:
                result['Item'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.item = []
        if m.get('Item') is not None:
            for k in m.get('Item'):
                temp_model = QuerySplitItemBillResponseBodyDataItemsItem()
                self.item.append(temp_model.from_map(k))
        return self


class QuerySplitItemBillResponseBodyData(TeaModel):
    def __init__(self, account_id=None, account_name=None, billing_cycle=None, items=None, page_num=None,
                 page_size=None, total_count=None):
        # The ID of the account.
        self.account_id = account_id  # type: str
        # The name of the account.
        self.account_name = account_name  # type: str
        # The billing cycle, in the YYYY-MM format.
        self.billing_cycle = billing_cycle  # type: str
        # The details of the bills.
        self.items = items  # type: QuerySplitItemBillResponseBodyDataItems
        # The page number of the returned page. Default value: 1.
        self.page_num = page_num  # type: int
        # The number of entries returned on each page. Default value: 20. Maximum value: 300.
        self.page_size = page_size  # type: int
        # The total number of returned entries.
        self.total_count = total_count  # type: int

    def validate(self):
        if self.items:
            self.items.validate()

    def to_map(self):
        _map = super(QuerySplitItemBillResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.account_id is not None:
            result['AccountID'] = self.account_id
        if self.account_name is not None:
            result['AccountName'] = self.account_name
        if self.billing_cycle is not None:
            result['BillingCycle'] = self.billing_cycle
        if self.items is not None:
            result['Items'] = self.items.to_map()
        if self.page_num is not None:
            result['PageNum'] = self.page_num
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountID') is not None:
            self.account_id = m.get('AccountID')
        if m.get('AccountName') is not None:
            self.account_name = m.get('AccountName')
        if m.get('BillingCycle') is not None:
            self.billing_cycle = m.get('BillingCycle')
        if m.get('Items') is not None:
            temp_model = QuerySplitItemBillResponseBodyDataItems()
            self.items = temp_model.from_map(m['Items'])
        if m.get('PageNum') is not None:
            self.page_num = m.get('PageNum')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class QuerySplitItemBillResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QuerySplitItemBillResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QuerySplitItemBillResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QuerySplitItemBillResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QuerySplitItemBillResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QuerySplitItemBillResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QuerySplitItemBillResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QuerySplitItemBillResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class QueryUserOmsDataRequest(TeaModel):
    def __init__(self, data_type=None, end_time=None, marker=None, owner_id=None, page_size=None, start_time=None,
                 table=None):
        # The time type of the usage data. Set the parameter based on the description in the documentation of the specified service. Valid values:
        # 
        # *   Raw
        # *   Hour
        # *   Day
        # *   Month
        self.data_type = data_type  # type: str
        # The end of the time range to query.
        # 
        # Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        self.end_time = end_time  # type: str
        # The name of the record from which the usage data starts to return. The usage data records whose names are alphabetically after the value of the Marker parameter are returned. By default, the usage data starts to return from the earliest record.
        self.marker = marker  # type: str
        self.owner_id = owner_id  # type: long
        # The number of entries to return on each page. Valid values: 1 to 200. Default value: 100.
        self.page_size = page_size  # type: int
        # The beginning of the time range to query.
        # 
        # Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        self.start_time = start_time  # type: str
        # The service whose usage data you want to query and the details of the usage data. The parameter value is usually set to the code of a service. Various usage models are provided for different services.
        self.table = table  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryUserOmsDataRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.data_type is not None:
            result['DataType'] = self.data_type
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.marker is not None:
            result['Marker'] = self.marker
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.table is not None:
            result['Table'] = self.table
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('DataType') is not None:
            self.data_type = m.get('DataType')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('Marker') is not None:
            self.marker = m.get('Marker')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('Table') is not None:
            self.table = m.get('Table')
        return self


class QueryUserOmsDataResponseBodyData(TeaModel):
    def __init__(self, host_id=None, marker=None, oms_data=None):
        # The ID of the host.
        self.host_id = host_id  # type: str
        # Indicates that the returned usage data starts from the next page. If no value is returned for this parameter or this parameter is not returned, no data can be queried.
        self.marker = marker  # type: str
        self.oms_data = oms_data  # type: list[dict[str, any]]

    def validate(self):
        pass

    def to_map(self):
        _map = super(QueryUserOmsDataResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        if self.marker is not None:
            result['Marker'] = self.marker
        if self.oms_data is not None:
            result['OmsData'] = self.oms_data
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        if m.get('Marker') is not None:
            self.marker = m.get('Marker')
        if m.get('OmsData') is not None:
            self.oms_data = m.get('OmsData')
        return self


class QueryUserOmsDataResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: QueryUserOmsDataResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(QueryUserOmsDataResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = QueryUserOmsDataResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class QueryUserOmsDataResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: QueryUserOmsDataResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(QueryUserOmsDataResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = QueryUserOmsDataResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class RefundInstanceRequest(TeaModel):
    def __init__(self, client_token=None, immediately_release=None, instance_id=None, product_code=None,
                 product_type=None):
        # This parameter is required for scenarios that need idempotence. The UUID that is used to ensure the idempotence of the request.
        self.client_token = client_token  # type: str
        # This parameter is required for unsubscription scenarios. Valid values: 1 and 0. A value of 1 specifies that the instance is immediately released. A value of 0 specifies that the instance is shut down based on the shutdown policy. This parameter is supported only for specified services. Default value: 1.
        self.immediately_release = immediately_release  # type: str
        # The ID of the instance. This parameter is required for unsubscription scenarios. Do not specify a custom name for this parameter.
        self.instance_id = instance_id  # type: str
        # The code of the service. This parameter is required for unsubscription scenarios.
        self.product_code = product_code  # type: str
        # The type of the service. This parameter is required for unsubscription scenarios. Unless otherwise specified, set this parameter to an empty string.
        self.product_type = product_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(RefundInstanceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.immediately_release is not None:
            result['ImmediatelyRelease'] = self.immediately_release
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('ImmediatelyRelease') is not None:
            self.immediately_release = m.get('ImmediatelyRelease')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        return self


class RefundInstanceResponseBodyData(TeaModel):
    def __init__(self, host_id=None, order_id=None):
        # The site of the execution host.
        self.host_id = host_id  # type: str
        # The ID of the refund order that is returned only if the instance is unsubscribed from.
        self.order_id = order_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(RefundInstanceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        return self


class RefundInstanceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The HTTP status code.
        self.code = code  # type: str
        # The returned data.
        self.data = data  # type: RefundInstanceResponseBodyData
        # The description of the execution result.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful. Valid values: true and false.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(RefundInstanceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = RefundInstanceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class RefundInstanceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: RefundInstanceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(RefundInstanceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = RefundInstanceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ReleaseInstanceRequest(TeaModel):
    def __init__(self, instance_ids=None, owner_id=None, product_code=None, product_type=None, region=None,
                 renew_status=None, subscription_type=None):
        self.instance_ids = instance_ids  # type: str
        self.owner_id = owner_id  # type: long
        self.product_code = product_code  # type: str
        self.product_type = product_type  # type: str
        self.region = region  # type: str
        self.renew_status = renew_status  # type: str
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ReleaseInstanceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.instance_ids is not None:
            result['InstanceIds'] = self.instance_ids
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.region is not None:
            result['Region'] = self.region
        if self.renew_status is not None:
            result['RenewStatus'] = self.renew_status
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('InstanceIds') is not None:
            self.instance_ids = m.get('InstanceIds')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('RenewStatus') is not None:
            self.renew_status = m.get('RenewStatus')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class ReleaseInstanceResponseBodyData(TeaModel):
    def __init__(self, host_id=None, release_result=None):
        self.host_id = host_id  # type: str
        self.release_result = release_result  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(ReleaseInstanceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        if self.release_result is not None:
            result['ReleaseResult'] = self.release_result
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        if m.get('ReleaseResult') is not None:
            self.release_result = m.get('ReleaseResult')
        return self


class ReleaseInstanceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        self.code = code  # type: str
        self.data = data  # type: ReleaseInstanceResponseBodyData
        self.message = message  # type: str
        self.request_id = request_id  # type: str
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(ReleaseInstanceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = ReleaseInstanceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class ReleaseInstanceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: ReleaseInstanceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(ReleaseInstanceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = ReleaseInstanceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class RelieveAccountRelationRequest(TeaModel):
    def __init__(self, child_user_id=None, parent_user_id=None, relation_id=None, relation_type=None,
                 request_id=None):
        # The ID of the Alibaba Cloud account that is used as the member. You must set the RelationId parameter or all of the ParentUserId, ChildUserId, and RelationType parameters.
        self.child_user_id = child_user_id  # type: long
        # The ID of the Alibaba Cloud account that is used as the management account. You must set the RelationId parameter or all of the ParentUserId, ChildUserId, and RelationType parameters.
        self.parent_user_id = parent_user_id  # type: long
        # The ID of the financial relationship between the management account and the member. You must set the RelationId parameter or all of the ParentUserId, ChildUserId, and RelationType parameters.
        self.relation_id = relation_id  # type: long
        # The type of the financial relationship. Set the value to enterprise_group.
        self.relation_type = relation_type  # type: str
        # The unique ID of the request. The ID is used to mark a request and troubleshoot a problem.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(RelieveAccountRelationRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.child_user_id is not None:
            result['ChildUserId'] = self.child_user_id
        if self.parent_user_id is not None:
            result['ParentUserId'] = self.parent_user_id
        if self.relation_id is not None:
            result['RelationId'] = self.relation_id
        if self.relation_type is not None:
            result['RelationType'] = self.relation_type
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ChildUserId') is not None:
            self.child_user_id = m.get('ChildUserId')
        if m.get('ParentUserId') is not None:
            self.parent_user_id = m.get('ParentUserId')
        if m.get('RelationId') is not None:
            self.relation_id = m.get('RelationId')
        if m.get('RelationType') is not None:
            self.relation_type = m.get('RelationType')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class RelieveAccountRelationResponseBodyData(TeaModel):
    def __init__(self, host_id=None):
        # hostid
        self.host_id = host_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(RelieveAccountRelationResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        return self


class RelieveAccountRelationResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: RelieveAccountRelationResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The unique ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(RelieveAccountRelationResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = RelieveAccountRelationResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class RelieveAccountRelationResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: RelieveAccountRelationResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(RelieveAccountRelationResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = RelieveAccountRelationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class RenewChangeInstanceRequestParameter(TeaModel):
    def __init__(self, code=None, value=None):
        self.code = code  # type: str
        self.value = value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(RenewChangeInstanceRequestParameter, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.value is not None:
            result['Value'] = self.value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Value') is not None:
            self.value = m.get('Value')
        return self


class RenewChangeInstanceRequest(TeaModel):
    def __init__(self, client_token=None, instance_id=None, owner_id=None, parameter=None, product_code=None,
                 product_type=None, renew_period=None):
        self.client_token = client_token  # type: str
        self.instance_id = instance_id  # type: str
        self.owner_id = owner_id  # type: long
        self.parameter = parameter  # type: list[RenewChangeInstanceRequestParameter]
        self.product_code = product_code  # type: str
        self.product_type = product_type  # type: str
        self.renew_period = renew_period  # type: long

    def validate(self):
        if self.parameter:
            for k in self.parameter:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(RenewChangeInstanceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        result['Parameter'] = []
        if self.parameter is not None:
            for k in self.parameter:
                result['Parameter'].append(k.to_map() if k else None)
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.renew_period is not None:
            result['RenewPeriod'] = self.renew_period
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        self.parameter = []
        if m.get('Parameter') is not None:
            for k in m.get('Parameter'):
                temp_model = RenewChangeInstanceRequestParameter()
                self.parameter.append(temp_model.from_map(k))
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('RenewPeriod') is not None:
            self.renew_period = m.get('RenewPeriod')
        return self


class RenewChangeInstanceResponseBodyData(TeaModel):
    def __init__(self, host_id=None, order_id=None):
        self.host_id = host_id  # type: str
        self.order_id = order_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(RenewChangeInstanceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_id is not None:
            result['HostId'] = self.host_id
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('HostId') is not None:
            self.host_id = m.get('HostId')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        return self


class RenewChangeInstanceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        self.code = code  # type: str
        self.data = data  # type: RenewChangeInstanceResponseBodyData
        self.message = message  # type: str
        # Id of the request
        self.request_id = request_id  # type: str
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(RenewChangeInstanceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = RenewChangeInstanceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class RenewChangeInstanceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: RenewChangeInstanceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(RenewChangeInstanceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = RenewChangeInstanceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class RenewInstanceRequest(TeaModel):
    def __init__(self, client_token=None, instance_id=None, owner_id=None, product_code=None, product_type=None,
                 renew_period=None):
        # The client token that is used to ensure the idempotence of the request.
        self.client_token = client_token  # type: str
        # The ID of the instance
        self.instance_id = instance_id  # type: str
        self.owner_id = owner_id  # type: long
        # The code of the service to which the instance belongs.
        self.product_code = product_code  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The duration of the subscription renewal. Unit: months. Valid values:
        # 
        # *   1 to 9
        # *   12
        # *   24
        # *   36
        self.renew_period = renew_period  # type: int

    def validate(self):
        pass

    def to_map(self):
        _map = super(RenewInstanceRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.renew_period is not None:
            result['RenewPeriod'] = self.renew_period
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('RenewPeriod') is not None:
            self.renew_period = m.get('RenewPeriod')
        return self


class RenewInstanceResponseBodyData(TeaModel):
    def __init__(self, order_id=None):
        # The ID of the order.
        self.order_id = order_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(RenewInstanceResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        return self


class RenewInstanceResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: RenewInstanceResponseBodyData
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(RenewInstanceResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = RenewInstanceResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class RenewInstanceResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: RenewInstanceResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(RenewInstanceResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = RenewInstanceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class RenewResourcePackageRequest(TeaModel):
    def __init__(self, duration=None, effective_date=None, instance_id=None, owner_id=None, pricing_cycle=None):
        # The renewal period of the resource plan.
        self.duration = duration  # type: int
        # The time when the resource plan takes effect. If you leave this parameter empty, the resource plan immediately takes effect by default.
        # 
        # Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        self.effective_date = effective_date  # type: str
        # The ID of the resource plan.
        self.instance_id = instance_id  # type: str
        self.owner_id = owner_id  # type: long
        # The unit of the validity period for the resource plan. Valid values:
        # 
        # *   Month
        # *   Year
        # 
        # Default value: Month.
        self.pricing_cycle = pricing_cycle  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(RenewResourcePackageRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.duration is not None:
            result['Duration'] = self.duration
        if self.effective_date is not None:
            result['EffectiveDate'] = self.effective_date
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.pricing_cycle is not None:
            result['PricingCycle'] = self.pricing_cycle
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Duration') is not None:
            self.duration = m.get('Duration')
        if m.get('EffectiveDate') is not None:
            self.effective_date = m.get('EffectiveDate')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('PricingCycle') is not None:
            self.pricing_cycle = m.get('PricingCycle')
        return self


class RenewResourcePackageResponseBodyData(TeaModel):
    def __init__(self, instance_id=None, order_id=None):
        # The ID of the resource plan.
        self.instance_id = instance_id  # type: str
        # The ID of the order.
        self.order_id = order_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(RenewResourcePackageResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        return self


class RenewResourcePackageResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, order_id=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: RenewResourcePackageResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the order.
        self.order_id = order_id  # type: long
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(RenewResourcePackageResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = RenewResourcePackageResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class RenewResourcePackageResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: RenewResourcePackageResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(RenewResourcePackageResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = RenewResourcePackageResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class SaveUserCreditRequest(TeaModel):
    def __init__(self, avoid_expiration=None, avoid_notification=None, avoid_prepaid_expiration=None,
                 avoid_prepaid_notification=None, credit_type=None, credit_value=None, description=None, operator=None):
        # Specifies whether to enable service suspension protection for pay-as-you-go services.
        self.avoid_expiration = avoid_expiration  # type: bool
        # Specifies whether to allow the use of pay-as-you-go services without the need to send notifications.
        self.avoid_notification = avoid_notification  # type: bool
        # Specifies whether to enable service suspension protection for subscription services.
        self.avoid_prepaid_expiration = avoid_prepaid_expiration  # type: bool
        # Specifies whether to allow the use of subscription services without the need to send notifications.
        self.avoid_prepaid_notification = avoid_prepaid_notification  # type: bool
        # The type of the credit.
        self.credit_type = credit_type  # type: str
        # The value of the credit.
        self.credit_value = credit_value  # type: str
        # Description
        self.description = description  # type: str
        # The operator who performs the action.
        self.operator = operator  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(SaveUserCreditRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.avoid_expiration is not None:
            result['AvoidExpiration'] = self.avoid_expiration
        if self.avoid_notification is not None:
            result['AvoidNotification'] = self.avoid_notification
        if self.avoid_prepaid_expiration is not None:
            result['AvoidPrepaidExpiration'] = self.avoid_prepaid_expiration
        if self.avoid_prepaid_notification is not None:
            result['AvoidPrepaidNotification'] = self.avoid_prepaid_notification
        if self.credit_type is not None:
            result['CreditType'] = self.credit_type
        if self.credit_value is not None:
            result['CreditValue'] = self.credit_value
        if self.description is not None:
            result['Description'] = self.description
        if self.operator is not None:
            result['Operator'] = self.operator
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AvoidExpiration') is not None:
            self.avoid_expiration = m.get('AvoidExpiration')
        if m.get('AvoidNotification') is not None:
            self.avoid_notification = m.get('AvoidNotification')
        if m.get('AvoidPrepaidExpiration') is not None:
            self.avoid_prepaid_expiration = m.get('AvoidPrepaidExpiration')
        if m.get('AvoidPrepaidNotification') is not None:
            self.avoid_prepaid_notification = m.get('AvoidPrepaidNotification')
        if m.get('CreditType') is not None:
            self.credit_type = m.get('CreditType')
        if m.get('CreditValue') is not None:
            self.credit_value = m.get('CreditValue')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('Operator') is not None:
            self.operator = m.get('Operator')
        return self


class SaveUserCreditResponseBody(TeaModel):
    def __init__(self, code=None, message=None, request_id=None, success=None):
        # The error code returned if the call failed. For more information, see the "Error codes" section of the topic.
        self.code = code  # type: str
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that call failed.
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(SaveUserCreditResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class SaveUserCreditResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: SaveUserCreditResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(SaveUserCreditResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = SaveUserCreditResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class SetAllExpirationDayRequest(TeaModel):
    def __init__(self, owner_id=None, unify_expire_day=None):
        self.owner_id = owner_id  # type: long
        # The expiration date. You can set an expiration date only for ECS instances that have not expired. The expiration date that you specify do not take effect on expired ECS instances. After the expiration date is set, the expiration date is used when you renew ECS instances.
        # 
        # You can set the expiration date to a day from the 1st to the 28th of each month.
        self.unify_expire_day = unify_expire_day  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(SetAllExpirationDayRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.unify_expire_day is not None:
            result['UnifyExpireDay'] = self.unify_expire_day
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('UnifyExpireDay') is not None:
            self.unify_expire_day = m.get('UnifyExpireDay')
        return self


class SetAllExpirationDayResponseBody(TeaModel):
    def __init__(self, code=None, message=None, request_id=None, success=None):
        # The HTTP status code.
        self.code = code  # type: str
        # The message that is returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(SetAllExpirationDayResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class SetAllExpirationDayResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: SetAllExpirationDayResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(SetAllExpirationDayResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = SetAllExpirationDayResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class SetCreditLabelActionRequest(TeaModel):
    def __init__(self, action_type=None, clear_cycle=None, credit_amount=None, currency_code=None, daily_cycle=None,
                 description=None, is_need_add_settle_label=None, is_need_adjust_credit_account=None,
                 is_need_save_notify_rule=None, is_need_set_credit_amount=None, need_notice=None, new_create_mode=None, operator=None,
                 request_id=None, site_code=None, source=None, uid=None):
        # The type of the action. Valid values: SET: adds the pay-as-you-go tag. CANCEL: removes the pay-as-you-go tag.
        self.action_type = action_type  # type: str
        # The cycle in which the account is notified of payment. **You do not need to specify this parameter.
        self.clear_cycle = clear_cycle  # type: str
        # The credit line of the account.
        self.credit_amount = credit_amount  # type: str
        # The code of currency that is used. Valid values: USD and CNY.
        self.currency_code = currency_code  # type: str
        # The cycle in which payment can be deferred. **You do not need to specify this parameter.
        self.daily_cycle = daily_cycle  # type: str
        # The description of the action.
        self.description = description  # type: str
        # Specifies whether to add the post-settlement tag. **You do not need to specify this parameter.
        self.is_need_add_settle_label = is_need_add_settle_label  # type: str
        # Specifies whether to synchronize the monthly settlement tag. **You do not need to specify this parameter.
        self.is_need_adjust_credit_account = is_need_adjust_credit_account  # type: str
        # Specifies whether to save the notification rule. **You do not need to specify this parameter.
        self.is_need_save_notify_rule = is_need_save_notify_rule  # type: str
        # Specifies whether to set a credit line. **You do not need to specify this parameter.
        self.is_need_set_credit_amount = is_need_set_credit_amount  # type: str
        # Specifies whether to notify the account of an identity change. **You do not need to specify this parameter.
        self.need_notice = need_notice  # type: bool
        # Specifies whether to call another operation to create a credit ledger. **You do not need to specify this parameter.
        self.new_create_mode = new_create_mode  # type: bool
        # The operator who performs the action.
        self.operator = operator  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # The code of the site. **You do not need to specify this parameter.
        self.site_code = site_code  # type: str
        # The source of the action.
        self.source = source  # type: str
        # The ID of the Alibaba Cloud account.
        self.uid = uid  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(SetCreditLabelActionRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.action_type is not None:
            result['ActionType'] = self.action_type
        if self.clear_cycle is not None:
            result['ClearCycle'] = self.clear_cycle
        if self.credit_amount is not None:
            result['CreditAmount'] = self.credit_amount
        if self.currency_code is not None:
            result['CurrencyCode'] = self.currency_code
        if self.daily_cycle is not None:
            result['DailyCycle'] = self.daily_cycle
        if self.description is not None:
            result['Description'] = self.description
        if self.is_need_add_settle_label is not None:
            result['IsNeedAddSettleLabel'] = self.is_need_add_settle_label
        if self.is_need_adjust_credit_account is not None:
            result['IsNeedAdjustCreditAccount'] = self.is_need_adjust_credit_account
        if self.is_need_save_notify_rule is not None:
            result['IsNeedSaveNotifyRule'] = self.is_need_save_notify_rule
        if self.is_need_set_credit_amount is not None:
            result['IsNeedSetCreditAmount'] = self.is_need_set_credit_amount
        if self.need_notice is not None:
            result['NeedNotice'] = self.need_notice
        if self.new_create_mode is not None:
            result['NewCreateMode'] = self.new_create_mode
        if self.operator is not None:
            result['Operator'] = self.operator
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.site_code is not None:
            result['SiteCode'] = self.site_code
        if self.source is not None:
            result['Source'] = self.source
        if self.uid is not None:
            result['Uid'] = self.uid
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ActionType') is not None:
            self.action_type = m.get('ActionType')
        if m.get('ClearCycle') is not None:
            self.clear_cycle = m.get('ClearCycle')
        if m.get('CreditAmount') is not None:
            self.credit_amount = m.get('CreditAmount')
        if m.get('CurrencyCode') is not None:
            self.currency_code = m.get('CurrencyCode')
        if m.get('DailyCycle') is not None:
            self.daily_cycle = m.get('DailyCycle')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('IsNeedAddSettleLabel') is not None:
            self.is_need_add_settle_label = m.get('IsNeedAddSettleLabel')
        if m.get('IsNeedAdjustCreditAccount') is not None:
            self.is_need_adjust_credit_account = m.get('IsNeedAdjustCreditAccount')
        if m.get('IsNeedSaveNotifyRule') is not None:
            self.is_need_save_notify_rule = m.get('IsNeedSaveNotifyRule')
        if m.get('IsNeedSetCreditAmount') is not None:
            self.is_need_set_credit_amount = m.get('IsNeedSetCreditAmount')
        if m.get('NeedNotice') is not None:
            self.need_notice = m.get('NeedNotice')
        if m.get('NewCreateMode') is not None:
            self.new_create_mode = m.get('NewCreateMode')
        if m.get('Operator') is not None:
            self.operator = m.get('Operator')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('SiteCode') is not None:
            self.site_code = m.get('SiteCode')
        if m.get('Source') is not None:
            self.source = m.get('Source')
        if m.get('Uid') is not None:
            self.uid = m.get('Uid')
        return self


class SetCreditLabelActionResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The error code returned if the call failed. For more information, see the "Error codes" section of this topic.
        self.code = code  # type: str
        # Indicates whether the action is successful. Valid values: true: The action was successful. false: The action failed.
        self.data = data  # type: bool
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call failed.
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(SetCreditLabelActionResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            self.data = m.get('Data')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class SetCreditLabelActionResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: SetCreditLabelActionResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(SetCreditLabelActionResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = SetCreditLabelActionResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class SetRenewalRequest(TeaModel):
    def __init__(self, instance_ids=None, owner_id=None, product_code=None, product_type=None, renewal_period=None,
                 renewal_period_unit=None, renewal_status=None, subscription_type=None):
        # The ID of the instance. You can enable auto-renewal for up to 100 subscription instances at a time. Separate multiple instance IDs with commas (,).
        self.instance_ids = instance_ids  # type: str
        self.owner_id = owner_id  # type: long
        # The code of the service.
        self.product_code = product_code  # type: str
        # The type of the service.
        self.product_type = product_type  # type: str
        # The auto-renewal period. Valid values:
        # 
        # *   1
        # *   2
        # *   3
        # *   6
        # *   12
        # 
        # >  This parameter is required if the RenewalStatus parameter is set to AutoRenewal.
        self.renewal_period = renewal_period  # type: int
        # The unit of the auto-renewal period. Valid values:
        # 
        # *   M: months
        # *   Y: years
        # 
        # >  This parameter is required if the RenewalStatus parameter is set to AutoRenewal.
        self.renewal_period_unit = renewal_period_unit  # type: str
        # The status of renewal. Valid values:
        # 
        # *   AutoRenewal: The instance is automatically renewed.
        # *   ManualRenewal: The instance is manually renewed.
        # *   NotRenewal: The instance is not renewed.
        self.renewal_status = renewal_status  # type: str
        # The billing method. Valid values:
        # 
        # *   Subscription: subscription
        # *   PayAsYouGo: pay-as-you-go
        self.subscription_type = subscription_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(SetRenewalRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.instance_ids is not None:
            result['InstanceIDs'] = self.instance_ids
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.product_code is not None:
            result['ProductCode'] = self.product_code
        if self.product_type is not None:
            result['ProductType'] = self.product_type
        if self.renewal_period is not None:
            result['RenewalPeriod'] = self.renewal_period
        if self.renewal_period_unit is not None:
            result['RenewalPeriodUnit'] = self.renewal_period_unit
        if self.renewal_status is not None:
            result['RenewalStatus'] = self.renewal_status
        if self.subscription_type is not None:
            result['SubscriptionType'] = self.subscription_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('InstanceIDs') is not None:
            self.instance_ids = m.get('InstanceIDs')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('ProductCode') is not None:
            self.product_code = m.get('ProductCode')
        if m.get('ProductType') is not None:
            self.product_type = m.get('ProductType')
        if m.get('RenewalPeriod') is not None:
            self.renewal_period = m.get('RenewalPeriod')
        if m.get('RenewalPeriodUnit') is not None:
            self.renewal_period_unit = m.get('RenewalPeriodUnit')
        if m.get('RenewalStatus') is not None:
            self.renewal_status = m.get('RenewalStatus')
        if m.get('SubscriptionType') is not None:
            self.subscription_type = m.get('SubscriptionType')
        return self


class SetRenewalResponseBody(TeaModel):
    def __init__(self, code=None, message=None, request_id=None, success=None):
        # The status code.
        self.code = code  # type: str
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful.
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(SetRenewalResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class SetRenewalResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: SetRenewalResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(SetRenewalResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = SetRenewalResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class SetResellerUserAlarmThresholdRequest(TeaModel):
    def __init__(self, alarm_thresholds=None, alarm_type=None, owner_id=None):
        self.alarm_thresholds = alarm_thresholds  # type: str
        self.alarm_type = alarm_type  # type: str
        self.owner_id = owner_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(SetResellerUserAlarmThresholdRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alarm_thresholds is not None:
            result['AlarmThresholds'] = self.alarm_thresholds
        if self.alarm_type is not None:
            result['AlarmType'] = self.alarm_type
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AlarmThresholds') is not None:
            self.alarm_thresholds = m.get('AlarmThresholds')
        if m.get('AlarmType') is not None:
            self.alarm_type = m.get('AlarmType')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        return self


class SetResellerUserAlarmThresholdResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        self.code = code  # type: str
        self.data = data  # type: bool
        self.message = message  # type: str
        self.request_id = request_id  # type: str
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(SetResellerUserAlarmThresholdResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            self.data = m.get('Data')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class SetResellerUserAlarmThresholdResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: SetResellerUserAlarmThresholdResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(SetResellerUserAlarmThresholdResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = SetResellerUserAlarmThresholdResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class SetResellerUserQuotaRequest(TeaModel):
    def __init__(self, amount=None, currency=None, out_biz_id=None, owner_id=None):
        # The quota of a quota ledger. Unit: CNY.
        self.amount = amount  # type: str
        # You do not need to set the parameter.
        self.currency = currency  # type: str
        # The ID of the business.
        self.out_biz_id = out_biz_id  # type: str
        self.owner_id = owner_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(SetResellerUserQuotaRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.amount is not None:
            result['Amount'] = self.amount
        if self.currency is not None:
            result['Currency'] = self.currency
        if self.out_biz_id is not None:
            result['OutBizId'] = self.out_biz_id
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Amount') is not None:
            self.amount = m.get('Amount')
        if m.get('Currency') is not None:
            self.currency = m.get('Currency')
        if m.get('OutBizId') is not None:
            self.out_biz_id = m.get('OutBizId')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        return self


class SetResellerUserQuotaResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The error code returned if the call failed. For more information, see the "Error codes" section of this topic.
        self.code = code  # type: str
        # Indicates whether the request is successful.
        self.data = data  # type: bool
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call failed.
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(SetResellerUserQuotaResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            self.data = m.get('Data')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class SetResellerUserQuotaResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: SetResellerUserQuotaResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(SetResellerUserQuotaResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = SetResellerUserQuotaResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class SetResellerUserStatusRequest(TeaModel):
    def __init__(self, business_type=None, owner_id=None, status=None, stop_mode=None):
        # The type of the business. Valid values: FREEZE: the frozen business of the account. TRUSTEESHIP: the hosted business of the account.
        self.business_type = business_type  # type: str
        self.owner_id = owner_id  # type: str
        # The account status that you want to set. Valid values: Freeze: The account is frozen. Thaw: The account is unfrozen. Trusteeship: The account is hosted. TrusteeshipCancel: The account is not hosted.
        self.status = status  # type: str
        # 停机模式
        # 取值：
        #     0：普通停机
        #     1：立即停机
        self.stop_mode = stop_mode  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(SetResellerUserStatusRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.business_type is not None:
            result['BusinessType'] = self.business_type
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.status is not None:
            result['Status'] = self.status
        if self.stop_mode is not None:
            result['StopMode'] = self.stop_mode
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BusinessType') is not None:
            self.business_type = m.get('BusinessType')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('StopMode') is not None:
            self.stop_mode = m.get('StopMode')
        return self


class SetResellerUserStatusResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The error code returned if the call failed. For more information, see the "Error codes" section of this topic.
        self.code = code  # type: str
        # Indicates whether the request is successful.
        self.data = data  # type: bool
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call failed.
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(SetResellerUserStatusResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            self.data = m.get('Data')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class SetResellerUserStatusResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: SetResellerUserStatusResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(SetResellerUserStatusResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = SetResellerUserStatusResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class SubscribeBillToOSSRequest(TeaModel):
    def __init__(self, begin_billing_cycle=None, bucket_owner_id=None, bucket_path=None,
                 mult_account_rel_subscribe=None, row_limit_per_file=None, subscribe_bucket=None, subscribe_type=None):
        # The initial billing cycle from which bills start to be pushed. After you subscribe to the bills, the system automatically pushes the data that is generated from the initial billing cycle to the current time. If the SubscribeType parameter is set to MonthBill, this parameter is invalid. Historical data is not pushed again. The data generated within the last year can be pushed.
        self.begin_billing_cycle = begin_billing_cycle  # type: str
        # The owner ID of the OSS bucket that stores the bills. This parameter is required if you are a bidder or reseller and want to push data to an OSS bucket of a member account. In this case, you must specify this account as the account used to call this operation and grant the AliyunConsumeDump2OSSRole permission to this account. If you are a regular user, you do not need to set this parameter. By default, your account is used to call this operation.
        self.bucket_owner_id = bucket_owner_id  # type: long
        # The path of the OSS bucket.
        self.bucket_path = bucket_path  # type: str
        # The type of the account whose bills are to be pushed if multi-tier accounts are involved. Valid values:
        # 
        # *   MA: the master account and a non-managed member account in Finance Cloud
        # *   ACP1: a member account of a virtual network operator (VNO)
        # 
        # Default value: MA.
        self.mult_account_rel_subscribe = mult_account_rel_subscribe  # type: str
        self.row_limit_per_file = row_limit_per_file  # type: int
        # The OSS bucket that stores the bills to which you want to subscribe.
        self.subscribe_bucket = subscribe_bucket  # type: str
        # The type of the bill to which you want to subscribe. Valid values:
        # 
        # *   BillingItemDetailForBillingPeriod: detailed bills of billable items
        # *   InstanceDetailForBillingPeriod: detailed bills of instances
        # *   BillingItemDetailMonthly: billable item-based bills summarized by billing cycle
        # *   InstanceDetailMonthly: instance-based bills summarized by billing cycle
        # *   SplitItemDetailDaily: split bills summarized by day
        # *   MonthBill: monthly bills in the PDF format. You can subscribe to the monthly PDF bills only of the master account.
        self.subscribe_type = subscribe_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(SubscribeBillToOSSRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.begin_billing_cycle is not None:
            result['BeginBillingCycle'] = self.begin_billing_cycle
        if self.bucket_owner_id is not None:
            result['BucketOwnerId'] = self.bucket_owner_id
        if self.bucket_path is not None:
            result['BucketPath'] = self.bucket_path
        if self.mult_account_rel_subscribe is not None:
            result['MultAccountRelSubscribe'] = self.mult_account_rel_subscribe
        if self.row_limit_per_file is not None:
            result['RowLimitPerFile'] = self.row_limit_per_file
        if self.subscribe_bucket is not None:
            result['SubscribeBucket'] = self.subscribe_bucket
        if self.subscribe_type is not None:
            result['SubscribeType'] = self.subscribe_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('BeginBillingCycle') is not None:
            self.begin_billing_cycle = m.get('BeginBillingCycle')
        if m.get('BucketOwnerId') is not None:
            self.bucket_owner_id = m.get('BucketOwnerId')
        if m.get('BucketPath') is not None:
            self.bucket_path = m.get('BucketPath')
        if m.get('MultAccountRelSubscribe') is not None:
            self.mult_account_rel_subscribe = m.get('MultAccountRelSubscribe')
        if m.get('RowLimitPerFile') is not None:
            self.row_limit_per_file = m.get('RowLimitPerFile')
        if m.get('SubscribeBucket') is not None:
            self.subscribe_bucket = m.get('SubscribeBucket')
        if m.get('SubscribeType') is not None:
            self.subscribe_type = m.get('SubscribeType')
        return self


class SubscribeBillToOSSResponseBody(TeaModel):
    def __init__(self, code=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(SubscribeBillToOSSResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class SubscribeBillToOSSResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: SubscribeBillToOSSResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(SubscribeBillToOSSResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = SubscribeBillToOSSResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class TagResourcesRequestTag(TeaModel):
    def __init__(self, key=None, value=None):
        # The key of the tag. You can create N tag keys at a time. Valid values of N: 1 to 20. The value of this parameter can be an empty string.
        self.key = key  # type: str
        # The value of the tag N. Valid values of N: 1 to 20.
        self.value = value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(TagResourcesRequestTag, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.key is not None:
            result['Key'] = self.key
        if self.value is not None:
            result['Value'] = self.value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Key') is not None:
            self.key = m.get('Key')
        if m.get('Value') is not None:
            self.value = m.get('Value')
        return self


class TagResourcesRequest(TeaModel):
    def __init__(self, resource_id=None, resource_type=None, tag=None):
        # The IDs of resources.
        self.resource_id = resource_id  # type: list[str]
        # The type of the resource. Specify savings plan instance as the type of the resource.
        self.resource_type = resource_type  # type: str
        # The tags.
        self.tag = tag  # type: list[TagResourcesRequestTag]

    def validate(self):
        if self.tag:
            for k in self.tag:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(TagResourcesRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        result['Tag'] = []
        if self.tag is not None:
            for k in self.tag:
                result['Tag'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        self.tag = []
        if m.get('Tag') is not None:
            for k in m.get('Tag'):
                temp_model = TagResourcesRequestTag()
                self.tag.append(temp_model.from_map(k))
        return self


class TagResourcesResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: bool
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(TagResourcesResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            self.data = m.get('Data')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class TagResourcesResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: TagResourcesResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(TagResourcesResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = TagResourcesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UnsubscribeBillToOSSRequest(TeaModel):
    def __init__(self, mult_account_rel_subscribe=None, subscribe_type=None):
        # The type of accounts whose bills are to be pushed if multi-tier accounts are involved. Valid values:
        # 
        # *   MA: management account.
        # *   ACP1: member account of a virtual network operator (VNO).
        # 
        # Default value: MA.
        self.mult_account_rel_subscribe = mult_account_rel_subscribe  # type: str
        # The type of the bill to which you want to subscribe. Valid values:
        # 
        # *   BillingItemDetailForBillingPeriod: bills of billable items
        # *   InstanceDetailForBillingPeriod: bills of instances
        # *   BillingItemDetailMonthly: billable item-based bills summarized by billing cycle
        # *   InstanceDetailMonthly: instance-based bills summarized by billing cycle
        # *   SplitItemDetailDaily: split bills summarized by day
        # *   MonthBill: monthly bills in the PDF format You can subscribe to the monthly PDF bills only of the master account.
        self.subscribe_type = subscribe_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UnsubscribeBillToOSSRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.mult_account_rel_subscribe is not None:
            result['MultAccountRelSubscribe'] = self.mult_account_rel_subscribe
        if self.subscribe_type is not None:
            result['SubscribeType'] = self.subscribe_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('MultAccountRelSubscribe') is not None:
            self.mult_account_rel_subscribe = m.get('MultAccountRelSubscribe')
        if m.get('SubscribeType') is not None:
            self.subscribe_type = m.get('SubscribeType')
        return self


class UnsubscribeBillToOSSResponseBody(TeaModel):
    def __init__(self, code=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(UnsubscribeBillToOSSResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class UnsubscribeBillToOSSResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: UnsubscribeBillToOSSResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UnsubscribeBillToOSSResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = UnsubscribeBillToOSSResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UntagResourcesRequest(TeaModel):
    def __init__(self, all=None, resource_id=None, resource_type=None, tag_key=None):
        # Specifies whether to remove all tags. This parameter is valid only if the TagKey.n parameter is not set. Valid values: true and false.
        self.all = all  # type: bool
        # The IDs of resources.
        self.resource_id = resource_id  # type: list[str]
        # The type of the resource. Specify the savings plan instance as the type of the resource.
        self.resource_type = resource_type  # type: str
        # The tag keys.
        self.tag_key = tag_key  # type: list[str]

    def validate(self):
        pass

    def to_map(self):
        _map = super(UntagResourcesRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.all is not None:
            result['All'] = self.all
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.tag_key is not None:
            result['TagKey'] = self.tag_key
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('All') is not None:
            self.all = m.get('All')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('TagKey') is not None:
            self.tag_key = m.get('TagKey')
        return self


class UntagResourcesResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: bool
        # The error message returned.
        self.message = message  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(UntagResourcesResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data
        if self.message is not None:
            result['Message'] = self.message
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            self.data = m.get('Data')
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class UntagResourcesResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: UntagResourcesResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UntagResourcesResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = UntagResourcesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpgradeResourcePackageRequest(TeaModel):
    def __init__(self, effective_date=None, instance_id=None, owner_id=None, specification=None):
        # The time when the resource plan takes effect. If you leave this parameter empty, the resource plan immediately takes effect by default.
        # 
        # Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        self.effective_date = effective_date  # type: str
        # The ID of the resource plan.
        self.instance_id = instance_id  # type: str
        self.owner_id = owner_id  # type: long
        # The specifications to which you want to upgrade the resource plan.
        self.specification = specification  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpgradeResourcePackageRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.effective_date is not None:
            result['EffectiveDate'] = self.effective_date
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.owner_id is not None:
            result['OwnerId'] = self.owner_id
        if self.specification is not None:
            result['Specification'] = self.specification
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EffectiveDate') is not None:
            self.effective_date = m.get('EffectiveDate')
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('OwnerId') is not None:
            self.owner_id = m.get('OwnerId')
        if m.get('Specification') is not None:
            self.specification = m.get('Specification')
        return self


class UpgradeResourcePackageResponseBodyData(TeaModel):
    def __init__(self, instance_id=None, order_id=None):
        # The ID of the resource plan.
        self.instance_id = instance_id  # type: str
        # The ID of the order.
        self.order_id = order_id  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpgradeResourcePackageResponseBodyData, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.instance_id is not None:
            result['InstanceId'] = self.instance_id
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('InstanceId') is not None:
            self.instance_id = m.get('InstanceId')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        return self


class UpgradeResourcePackageResponseBody(TeaModel):
    def __init__(self, code=None, data=None, message=None, order_id=None, request_id=None, success=None):
        # The status code returned.
        self.code = code  # type: str
        # The data returned.
        self.data = data  # type: UpgradeResourcePackageResponseBodyData
        # The message returned.
        self.message = message  # type: str
        # The ID of the order.
        self.order_id = order_id  # type: long
        # The ID of the request.
        self.request_id = request_id  # type: str
        # Indicates whether the request is successful.
        self.success = success  # type: bool

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super(UpgradeResourcePackageResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['Code'] = self.code
        if self.data is not None:
            result['Data'] = self.data.to_map()
        if self.message is not None:
            result['Message'] = self.message
        if self.order_id is not None:
            result['OrderId'] = self.order_id
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Code') is not None:
            self.code = m.get('Code')
        if m.get('Data') is not None:
            temp_model = UpgradeResourcePackageResponseBodyData()
            self.data = temp_model.from_map(m['Data'])
        if m.get('Message') is not None:
            self.message = m.get('Message')
        if m.get('OrderId') is not None:
            self.order_id = m.get('OrderId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class UpgradeResourcePackageResponse(TeaModel):
    def __init__(self, headers=None, status_code=None, body=None):
        self.headers = headers  # type: dict[str, str]
        self.status_code = status_code  # type: int
        self.body = body  # type: UpgradeResourcePackageResponseBody

    def validate(self):
        self.validate_required(self.headers, 'headers')
        self.validate_required(self.status_code, 'status_code')
        self.validate_required(self.body, 'body')
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UpgradeResourcePackageResponse, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.headers is not None:
            result['headers'] = self.headers
        if self.status_code is not None:
            result['statusCode'] = self.status_code
        if self.body is not None:
            result['body'] = self.body.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('statusCode') is not None:
            self.status_code = m.get('statusCode')
        if m.get('body') is not None:
            temp_model = UpgradeResourcePackageResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


