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


class ResourceDirectoryFolderNode(TeaModel):
    def __init__(self, account_id=None, children=None, display_name=None, folder_id=None, folder_name=None,
                 parent_folder_id=None):
        self.account_id = account_id  # type: str
        self.children = children  # type: list[ResourceDirectoryFolderNode]
        self.display_name = display_name  # type: str
        self.folder_id = folder_id  # type: str
        self.folder_name = folder_name  # type: str
        self.parent_folder_id = parent_folder_id  # type: str

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

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

        result = dict()
        if self.account_id is not None:
            result['AccountId'] = self.account_id
        result['Children'] = []
        if self.children is not None:
            for k in self.children:
                result['Children'].append(k.to_map() if k else None)
        if self.display_name is not None:
            result['DisplayName'] = self.display_name
        if self.folder_id is not None:
            result['FolderId'] = self.folder_id
        if self.folder_name is not None:
            result['FolderName'] = self.folder_name
        if self.parent_folder_id is not None:
            result['ParentFolderId'] = self.parent_folder_id
        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')
        self.children = []
        if m.get('Children') is not None:
            for k in m.get('Children'):
                temp_model = ResourceDirectoryFolderNode()
                self.children.append(temp_model.from_map(k))
        if m.get('DisplayName') is not None:
            self.display_name = m.get('DisplayName')
        if m.get('FolderId') is not None:
            self.folder_id = m.get('FolderId')
        if m.get('FolderName') is not None:
            self.folder_name = m.get('FolderName')
        if m.get('ParentFolderId') is not None:
            self.parent_folder_id = m.get('ParentFolderId')
        return self


class ActiveAggregateConfigRulesRequest(TeaModel):
    def __init__(self, aggregator_id=None, config_rule_ids=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The rule ID. Separate multiple rule IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_ids is not None:
            result['ConfigRuleIds'] = self.config_rule_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleIds') is not None:
            self.config_rule_ids = m.get('ConfigRuleIds')
        return self


class ActiveAggregateConfigRulesResponseBodyOperateRuleResultOperateRuleItemList(TeaModel):
    def __init__(self, config_rule_id=None, error_code=None, success=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The error code returned.
        # 
        # *   If the rule is enabled, no error code is returned.
        # *   If the rule fails to be enabled, an error code is returned. For more information about error codes, see [Error codes](https://error-center.alibabacloud.com/status/product/Config).
        self.error_code = error_code  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true: The request was successful.
        # *   false: The request failed.
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.error_code is not None:
            result['ErrorCode'] = self.error_code
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ErrorCode') is not None:
            self.error_code = m.get('ErrorCode')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class ActiveAggregateConfigRulesResponseBodyOperateRuleResult(TeaModel):
    def __init__(self, operate_rule_item_list=None):
        # The returned result.
        self.operate_rule_item_list = operate_rule_item_list  # type: list[ActiveAggregateConfigRulesResponseBodyOperateRuleResultOperateRuleItemList]

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

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

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

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


class ActiveAggregateConfigRulesResponseBody(TeaModel):
    def __init__(self, operate_rule_result=None, request_id=None):
        # The returned result.
        self.operate_rule_result = operate_rule_result  # type: ActiveAggregateConfigRulesResponseBodyOperateRuleResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.operate_rule_result is not None:
            result['OperateRuleResult'] = self.operate_rule_result.to_map()
        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('OperateRuleResult') is not None:
            temp_model = ActiveAggregateConfigRulesResponseBodyOperateRuleResult()
            self.operate_rule_result = temp_model.from_map(m['OperateRuleResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ActiveAggregateConfigRulesResponse(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: ActiveAggregateConfigRulesResponseBody

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

    def to_map(self):
        _map = super(ActiveAggregateConfigRulesResponse, 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 = ActiveAggregateConfigRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ActiveConfigRulesRequest(TeaModel):
    def __init__(self, config_rule_ids=None):
        # The rule IDs. Separate multiple rule IDs with commas (,). You can specify a maximum of 20 rule IDs at a time.
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

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

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


class ActiveConfigRulesResponseBodyOperateRuleResultOperateRuleItemList(TeaModel):
    def __init__(self, config_rule_id=None, error_code=None, success=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The error code returned if the request failed.
        # 
        # *   If the rule is enabled, no error code is returned.
        # *   If the rule fails to be enabled, an error code is returned. For more information about error codes, see [Error codes](https://next.api.aliyun.com/document/Config/2020-09-07/errorCode).
        self.error_code = error_code  # type: str
        # Indicates whether the rule is enabled. Valid values:
        # 
        # *   true
        # *   false
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.error_code is not None:
            result['ErrorCode'] = self.error_code
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ErrorCode') is not None:
            self.error_code = m.get('ErrorCode')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class ActiveConfigRulesResponseBodyOperateRuleResult(TeaModel):
    def __init__(self, operate_rule_item_list=None):
        # The result information about the operation.
        self.operate_rule_item_list = operate_rule_item_list  # type: list[ActiveConfigRulesResponseBodyOperateRuleResultOperateRuleItemList]

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

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

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

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


class ActiveConfigRulesResponseBody(TeaModel):
    def __init__(self, operate_rule_result=None, request_id=None):
        # The result information about the operation.
        self.operate_rule_result = operate_rule_result  # type: ActiveConfigRulesResponseBodyOperateRuleResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.operate_rule_result is not None:
            result['OperateRuleResult'] = self.operate_rule_result.to_map()
        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('OperateRuleResult') is not None:
            temp_model = ActiveConfigRulesResponseBodyOperateRuleResult()
            self.operate_rule_result = temp_model.from_map(m['OperateRuleResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ActiveConfigRulesResponse(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: ActiveConfigRulesResponseBody

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

    def to_map(self):
        _map = super(ActiveConfigRulesResponse, 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 = ActiveConfigRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class AttachAggregateConfigRuleToCompliancePackRequest(TeaModel):
    def __init__(self, aggregator_id=None, compliance_pack_id=None, config_rule_ids=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The rule IDs. Separate multiple rule IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.config_rule_ids is not None:
            result['ConfigRuleIds'] = self.config_rule_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ConfigRuleIds') is not None:
            self.config_rule_ids = m.get('ConfigRuleIds')
        return self


class AttachAggregateConfigRuleToCompliancePackResponseBodyOperateRuleResultOperateRuleItemList(TeaModel):
    def __init__(self, config_rule_id=None, error_code=None, success=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The error code.
        # 
        # *   This parameter is empty if the rule is added to the compliance package.
        # *   An error code is returned if the rule fails to be added to the compliance package. For more information about error codes, see [Error codes](https://error-center.alibabacloud.com/status/product/Config).
        self.error_code = error_code  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true
        # *   false
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.error_code is not None:
            result['ErrorCode'] = self.error_code
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ErrorCode') is not None:
            self.error_code = m.get('ErrorCode')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class AttachAggregateConfigRuleToCompliancePackResponseBodyOperateRuleResult(TeaModel):
    def __init__(self, operate_rule_item_list=None):
        # The result of the operation to add the rule.
        self.operate_rule_item_list = operate_rule_item_list  # type: list[AttachAggregateConfigRuleToCompliancePackResponseBodyOperateRuleResultOperateRuleItemList]

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

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

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

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


class AttachAggregateConfigRuleToCompliancePackResponseBody(TeaModel):
    def __init__(self, operate_rule_result=None, request_id=None):
        # The results of the operations to add one or more rules.
        self.operate_rule_result = operate_rule_result  # type: AttachAggregateConfigRuleToCompliancePackResponseBodyOperateRuleResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.operate_rule_result is not None:
            result['OperateRuleResult'] = self.operate_rule_result.to_map()
        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('OperateRuleResult') is not None:
            temp_model = AttachAggregateConfigRuleToCompliancePackResponseBodyOperateRuleResult()
            self.operate_rule_result = temp_model.from_map(m['OperateRuleResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class AttachAggregateConfigRuleToCompliancePackResponse(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: AttachAggregateConfigRuleToCompliancePackResponseBody

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

    def to_map(self):
        _map = super(AttachAggregateConfigRuleToCompliancePackResponse, 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 = AttachAggregateConfigRuleToCompliancePackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class AttachConfigRuleToCompliancePackRequest(TeaModel):
    def __init__(self, compliance_pack_id=None, config_rule_ids=None):
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The rule ID. Separate multiple rule IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.config_rule_ids is not None:
            result['ConfigRuleIds'] = self.config_rule_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ConfigRuleIds') is not None:
            self.config_rule_ids = m.get('ConfigRuleIds')
        return self


class AttachConfigRuleToCompliancePackResponseBodyOperateRuleResultOperateRuleItemList(TeaModel):
    def __init__(self, config_rule_id=None, error_code=None, success=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The error code returned.
        # 
        # *   This parameter is empty if the rule is added to the compliance package.
        # *   An error code is returned if the rule fails to be added to the compliance package. For more information about error codes, see [Error codes](https://error-center.alibabacloud.com/status/product/Config).
        self.error_code = error_code  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true: The request was successful.
        # *   false: The request failed.
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.error_code is not None:
            result['ErrorCode'] = self.error_code
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ErrorCode') is not None:
            self.error_code = m.get('ErrorCode')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class AttachConfigRuleToCompliancePackResponseBodyOperateRuleResult(TeaModel):
    def __init__(self, operate_rule_item_list=None):
        # The result of the operation to add the rule.
        self.operate_rule_item_list = operate_rule_item_list  # type: list[AttachConfigRuleToCompliancePackResponseBodyOperateRuleResultOperateRuleItemList]

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

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

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

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


class AttachConfigRuleToCompliancePackResponseBody(TeaModel):
    def __init__(self, operate_rule_result=None, request_id=None):
        # The results of the operations to add one or more rules.
        self.operate_rule_result = operate_rule_result  # type: AttachConfigRuleToCompliancePackResponseBodyOperateRuleResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.operate_rule_result is not None:
            result['OperateRuleResult'] = self.operate_rule_result.to_map()
        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('OperateRuleResult') is not None:
            temp_model = AttachConfigRuleToCompliancePackResponseBodyOperateRuleResult()
            self.operate_rule_result = temp_model.from_map(m['OperateRuleResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class AttachConfigRuleToCompliancePackResponse(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: AttachConfigRuleToCompliancePackResponseBody

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

    def to_map(self):
        _map = super(AttachConfigRuleToCompliancePackResponse, 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 = AttachConfigRuleToCompliancePackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CopyCompliancePacksRequest(TeaModel):
    def __init__(self, des_aggregator_ids=None, src_aggregator_id=None, src_compliance_pack_ids=None):
        # The IDs of the destination account groups into which the compliance packages are replicated. Separate multiple account group IDs with commas (,).
        # 
        # > If this parameter is left empty, the compliance packages are replicated to the current account group.
        self.des_aggregator_ids = des_aggregator_ids  # type: str
        # The ID of the account group to which the compliance packages belong.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.src_aggregator_id = src_aggregator_id  # type: str
        # The IDs of the compliance packages. Separate multiple compliance package IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.src_compliance_pack_ids = src_compliance_pack_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.des_aggregator_ids is not None:
            result['DesAggregatorIds'] = self.des_aggregator_ids
        if self.src_aggregator_id is not None:
            result['SrcAggregatorId'] = self.src_aggregator_id
        if self.src_compliance_pack_ids is not None:
            result['SrcCompliancePackIds'] = self.src_compliance_pack_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('DesAggregatorIds') is not None:
            self.des_aggregator_ids = m.get('DesAggregatorIds')
        if m.get('SrcAggregatorId') is not None:
            self.src_aggregator_id = m.get('SrcAggregatorId')
        if m.get('SrcCompliancePackIds') is not None:
            self.src_compliance_pack_ids = m.get('SrcCompliancePackIds')
        return self


class CopyCompliancePacksResponseBody(TeaModel):
    def __init__(self, copy_rules_result=None, request_id=None):
        # Indicates whether the compliance packages are replicated. Valid values:
        # 
        # *   true
        # *   false
        self.copy_rules_result = copy_rules_result  # type: bool
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.copy_rules_result is not None:
            result['CopyRulesResult'] = self.copy_rules_result
        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('CopyRulesResult') is not None:
            self.copy_rules_result = m.get('CopyRulesResult')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CopyCompliancePacksResponse(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: CopyCompliancePacksResponseBody

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

    def to_map(self):
        _map = super(CopyCompliancePacksResponse, 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 = CopyCompliancePacksResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CopyConfigRulesRequest(TeaModel):
    def __init__(self, des_aggregator_ids=None, src_aggregator_id=None, src_config_rule_ids=None):
        # The IDs of the destination account groups into which the rules are replicated. Separate multiple account group IDs with commas (,).
        # 
        # > If you leave this parameter empty, the compliance packages are replicated into the same account group.
        self.des_aggregator_ids = des_aggregator_ids  # type: str
        # The ID of the account group to which the rules belong.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.src_aggregator_id = src_aggregator_id  # type: str
        # The rule IDs. Separate multiple rule IDs with commas (,).
        self.src_config_rule_ids = src_config_rule_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.des_aggregator_ids is not None:
            result['DesAggregatorIds'] = self.des_aggregator_ids
        if self.src_aggregator_id is not None:
            result['SrcAggregatorId'] = self.src_aggregator_id
        if self.src_config_rule_ids is not None:
            result['SrcConfigRuleIds'] = self.src_config_rule_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('DesAggregatorIds') is not None:
            self.des_aggregator_ids = m.get('DesAggregatorIds')
        if m.get('SrcAggregatorId') is not None:
            self.src_aggregator_id = m.get('SrcAggregatorId')
        if m.get('SrcConfigRuleIds') is not None:
            self.src_config_rule_ids = m.get('SrcConfigRuleIds')
        return self


class CopyConfigRulesResponseBody(TeaModel):
    def __init__(self, copy_rules_result=None, request_id=None):
        # Indicates whether the rules are replicated. Valid values:
        # 
        # *   true
        # *   false
        self.copy_rules_result = copy_rules_result  # type: bool
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.copy_rules_result is not None:
            result['CopyRulesResult'] = self.copy_rules_result
        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('CopyRulesResult') is not None:
            self.copy_rules_result = m.get('CopyRulesResult')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CopyConfigRulesResponse(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: CopyConfigRulesResponseBody

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

    def to_map(self):
        _map = super(CopyConfigRulesResponse, 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 = CopyConfigRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateAdvancedSearchFileRequest(TeaModel):
    def __init__(self, sql=None):
        # The SQL statement used to query resources.
        self.sql = sql  # type: str

    def validate(self):
        pass

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

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

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


class CreateAdvancedSearchFileResponseBody(TeaModel):
    def __init__(self, request_id=None):
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        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('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CreateAdvancedSearchFileResponse(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: CreateAdvancedSearchFileResponseBody

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

    def to_map(self):
        _map = super(CreateAdvancedSearchFileResponse, 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 = CreateAdvancedSearchFileResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateAggregateAdvancedSearchFileRequest(TeaModel):
    def __init__(self, aggregator_id=None, sql=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The SQL statement used to query resources.
        self.sql = sql  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.sql is not None:
            result['Sql'] = self.sql
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('Sql') is not None:
            self.sql = m.get('Sql')
        return self


class CreateAggregateAdvancedSearchFileResponseBody(TeaModel):
    def __init__(self, request_id=None):
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        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('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CreateAggregateAdvancedSearchFileResponse(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: CreateAggregateAdvancedSearchFileResponseBody

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

    def to_map(self):
        _map = super(CreateAggregateAdvancedSearchFileResponse, 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 = CreateAggregateAdvancedSearchFileResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateAggregateCompliancePackRequestConfigRulesConfigRuleParameters(TeaModel):
    def __init__(self, parameter_name=None, parameter_value=None):
        # The name of the input parameter.
        # 
        # You must configure the `ParameterName` and `ParameterValue` parameters or neither of them. If the managed rule has an input parameter but no default value exists, you must configure this parameter. For more information about how to obtain the name of an input parameter for a managed rule, see [ListCompliancePackTemplates](~~261176~~).
        self.parameter_name = parameter_name  # type: str
        # The value of the input parameter.
        # 
        # You must configure the `ParameterName` and `ParameterValue` parameters or neither of them. If the managed rule has an input parameter but no default value exists, you must configure this parameter. For more information about how to obtain the value of an input parameter for a managed rule, see [ListCompliancePackTemplates](~~261176~~).
        self.parameter_value = parameter_value  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.parameter_name is not None:
            result['ParameterName'] = self.parameter_name
        if self.parameter_value is not None:
            result['ParameterValue'] = self.parameter_value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ParameterName') is not None:
            self.parameter_name = m.get('ParameterName')
        if m.get('ParameterValue') is not None:
            self.parameter_value = m.get('ParameterValue')
        return self


class CreateAggregateCompliancePackRequestConfigRules(TeaModel):
    def __init__(self, config_rule_id=None, config_rule_name=None, config_rule_parameters=None, description=None,
                 managed_rule_identifier=None, risk_level=None):
        # The ID of the rule. If you configure this parameter, Cloud Config adds the rule of the specified ID to the compliance package.
        # 
        # You only need to configure the `ManagedRuleIdentifier` or `ConfigRuleId` parameter. If you configure both parameters, the value of the `ConfigRuleId` parameter takes precedence. For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_id = config_rule_id  # type: str
        # The name of the rule.
        self.config_rule_name = config_rule_name  # type: str
        # The details of the input parameter of the rule.
        self.config_rule_parameters = config_rule_parameters  # type: list[CreateAggregateCompliancePackRequestConfigRulesConfigRuleParameters]
        # The description of the rule.
        self.description = description  # type: str
        # The ID of the managed rule. Cloud Config automatically create a managed rule of the specified ID and adds the rule to the compliance package.
        # 
        # You only need to configure the `ManagedRuleIdentifier` or `ConfigRuleId` parameter. If you configure both parameters, the value of the `ConfigRuleId` parameter take precedence. For more information about how to obtain the identifier of a managed rule, see [ListCompliancePackTemplates](~~261176~~).
        self.managed_rule_identifier = managed_rule_identifier  # type: str
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int

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

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        result['ConfigRuleParameters'] = []
        if self.config_rule_parameters is not None:
            for k in self.config_rule_parameters:
                result['ConfigRuleParameters'].append(k.to_map() if k else None)
        if self.description is not None:
            result['Description'] = self.description
        if self.managed_rule_identifier is not None:
            result['ManagedRuleIdentifier'] = self.managed_rule_identifier
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        self.config_rule_parameters = []
        if m.get('ConfigRuleParameters') is not None:
            for k in m.get('ConfigRuleParameters'):
                temp_model = CreateAggregateCompliancePackRequestConfigRulesConfigRuleParameters()
                self.config_rule_parameters.append(temp_model.from_map(k))
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ManagedRuleIdentifier') is not None:
            self.managed_rule_identifier = m.get('ManagedRuleIdentifier')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class CreateAggregateCompliancePackRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, compliance_pack_name=None,
                 compliance_pack_template_id=None, config_rules=None, default_enable=None, description=None, exclude_resource_ids_scope=None,
                 region_ids_scope=None, resource_group_ids_scope=None, risk_level=None, tag_key_scope=None, tag_value_scope=None,
                 template_content=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The client token that you want to use to ensure the idempotency of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.``
        self.client_token = client_token  # type: str
        # The name of the compliance package.
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The ID of the compliance package template.
        # 
        # For more information about how to obtain the ID of a compliance package template, see [ListCompliancePackTemplates](~~261176~~).
        self.compliance_pack_template_id = compliance_pack_template_id  # type: str
        # The rules in the compliance package.
        self.config_rules = config_rules  # type: list[CreateAggregateCompliancePackRequestConfigRules]
        # Specifies whether to enable the rule together with the compliance package. Valid values:
        # 
        # *   true: The system enables the rule together with the compliance package.
        # *   false: The system does not enable the rule together with the compliance package.
        self.default_enable = default_enable  # type: bool
        # The description of the compliance package.
        self.description = description  # type: str
        # The ID of the resource that you do not want to evaluate by using the compliance package. Separate multiple resource IDs with commas (,).
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the region whose resources you want to evaluate by using the compliance package. Separate multiple region IDs with commas (,).
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group whose resources you want to evaluate by using the compliance package. Separate multiple resource group IDs with commas (,).
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The risk level of the resources that are not compliant with the rules in the compliance package. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int
        # The tag key of the resource that you want to evaluate by using the compliance package.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value of the resource that you want to evaluate by using the compliance package.
        # 
        # >  You must configure the TagValueScope parameter together with the TagKeyScope parameter.
        self.tag_value_scope = tag_value_scope  # type: str
        self.template_content = template_content  # type: str

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

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        if self.compliance_pack_template_id is not None:
            result['CompliancePackTemplateId'] = self.compliance_pack_template_id
        result['ConfigRules'] = []
        if self.config_rules is not None:
            for k in self.config_rules:
                result['ConfigRules'].append(k.to_map() if k else None)
        if self.default_enable is not None:
            result['DefaultEnable'] = self.default_enable
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        if self.template_content is not None:
            result['TemplateContent'] = self.template_content
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        if m.get('CompliancePackTemplateId') is not None:
            self.compliance_pack_template_id = m.get('CompliancePackTemplateId')
        self.config_rules = []
        if m.get('ConfigRules') is not None:
            for k in m.get('ConfigRules'):
                temp_model = CreateAggregateCompliancePackRequestConfigRules()
                self.config_rules.append(temp_model.from_map(k))
        if m.get('DefaultEnable') is not None:
            self.default_enable = m.get('DefaultEnable')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        if m.get('TemplateContent') is not None:
            self.template_content = m.get('TemplateContent')
        return self


class CreateAggregateCompliancePackShrinkRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, compliance_pack_name=None,
                 compliance_pack_template_id=None, config_rules_shrink=None, default_enable=None, description=None,
                 exclude_resource_ids_scope=None, region_ids_scope=None, resource_group_ids_scope=None, risk_level=None, tag_key_scope=None,
                 tag_value_scope=None, template_content=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The client token that you want to use to ensure the idempotency of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.``
        self.client_token = client_token  # type: str
        # The name of the compliance package.
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The ID of the compliance package template.
        # 
        # For more information about how to obtain the ID of a compliance package template, see [ListCompliancePackTemplates](~~261176~~).
        self.compliance_pack_template_id = compliance_pack_template_id  # type: str
        # The rules in the compliance package.
        self.config_rules_shrink = config_rules_shrink  # type: str
        # Specifies whether to enable the rule together with the compliance package. Valid values:
        # 
        # *   true: The system enables the rule together with the compliance package.
        # *   false: The system does not enable the rule together with the compliance package.
        self.default_enable = default_enable  # type: bool
        # The description of the compliance package.
        self.description = description  # type: str
        # The ID of the resource that you do not want to evaluate by using the compliance package. Separate multiple resource IDs with commas (,).
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the region whose resources you want to evaluate by using the compliance package. Separate multiple region IDs with commas (,).
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group whose resources you want to evaluate by using the compliance package. Separate multiple resource group IDs with commas (,).
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The risk level of the resources that are not compliant with the rules in the compliance package. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int
        # The tag key of the resource that you want to evaluate by using the compliance package.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value of the resource that you want to evaluate by using the compliance package.
        # 
        # >  You must configure the TagValueScope parameter together with the TagKeyScope parameter.
        self.tag_value_scope = tag_value_scope  # type: str
        self.template_content = template_content  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        if self.compliance_pack_template_id is not None:
            result['CompliancePackTemplateId'] = self.compliance_pack_template_id
        if self.config_rules_shrink is not None:
            result['ConfigRules'] = self.config_rules_shrink
        if self.default_enable is not None:
            result['DefaultEnable'] = self.default_enable
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        if self.template_content is not None:
            result['TemplateContent'] = self.template_content
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        if m.get('CompliancePackTemplateId') is not None:
            self.compliance_pack_template_id = m.get('CompliancePackTemplateId')
        if m.get('ConfigRules') is not None:
            self.config_rules_shrink = m.get('ConfigRules')
        if m.get('DefaultEnable') is not None:
            self.default_enable = m.get('DefaultEnable')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        if m.get('TemplateContent') is not None:
            self.template_content = m.get('TemplateContent')
        return self


class CreateAggregateCompliancePackResponseBody(TeaModel):
    def __init__(self, compliance_pack_id=None, request_id=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CreateAggregateCompliancePackResponse(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: CreateAggregateCompliancePackResponseBody

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

    def to_map(self):
        _map = super(CreateAggregateCompliancePackResponse, 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 = CreateAggregateCompliancePackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateAggregateConfigDeliveryChannelRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, configuration_item_change_notification=None,
                 configuration_snapshot=None, delivery_channel_condition=None, delivery_channel_name=None,
                 delivery_channel_target_arn=None, delivery_channel_type=None, delivery_snapshot_time=None, description=None,
                 non_compliant_notification=None, oversized_data_osstarget_arn=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests.
        # 
        # The `token` can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [Ensure idempotence](~~25693~~)
        self.client_token = client_token  # type: str
        # Specifies whether to deliver resource change logs. If you set this parameter to true, Cloud Config delivers resource change logs to OSS, Log Service, or MNS when the configurations of the resources change. Valid values:
        # 
        # *   true: Cloud Config delivers resource change logs.
        # *   false: Cloud Config does not deliver resource change logs. This is the default value.
        # 
        # > This parameter is available for delivery channels of the OSS, SLS, and MNS types.
        self.configuration_item_change_notification = configuration_item_change_notification  # type: bool
        # Specifies whether to deliver scheduled resource snapshots. Cloud Config delivers scheduled resource snapshots to OSS, MNS, or Log Service at `04:00Z` and `16:00Z` every day. The time is displayed in UTC. Valid values:
        # 
        # *   true: Cloud Config delivers scheduled resource snapshots.
        # *   false: Cloud Config does not deliver scheduled resource snapshots. This is the default value.
        self.configuration_snapshot = configuration_snapshot  # type: bool
        # The rule that you want to attach to the delivery channel. This parameter is available when you deliver data of all types to MNS or deliver snapshots to Log Service.
        # 
        # *   If you set the DeliveryChannelType parameter to MNS, take note of the following settings of the lowest risk level and the resource types of the events to which you want to subscribe:
        # 
        #     *   The lowest risk level of the events to which you want to subscribe is in the following format: `{"filterType":"RuleRiskLevel","value":"1","multiple":false}`.
        # 
        #         The `value` field indicates the risk level of the events to which you want to subscribe. Valid values: 1, 2, and 3. The value 1 indicates the high risk level, the value 2 indicates the medium risk level, and the value 3 indicates the low risk level.
        # 
        #     *   The setting of the resource types of the events to which you want to subscribe is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #         The `values` field indicates the resource types of the events to which you want to subscribe. The value of the field is a JSON array. Example:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        # 
        # *   If you set the DeliveryChannelType parameter to SLS, the setting of the resource types of the snapshots to which you want to deliver is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #     The `values` field specifies the resource types of the snapshots to which you want to deliver. The value of the field is a JSON array. Example:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        self.delivery_channel_condition = delivery_channel_condition  # type: str
        # The name of the delivery channel.
        # 
        # > If you do not configure this parameter, this parameter is left empty.
        self.delivery_channel_name = delivery_channel_name  # type: str
        # The ARN of the delivery destination. Valid values:
        # 
        # *   `acs:oss:{RegionId}:{accountId}:{bucketName}` if your delivery destination is an OSS bucket. Example: `acs:oss:cn-shanghai:100931896542****:new-bucket`.
        # *   `acs:mns:{RegionId}:{accountId}:/topics/{topicName}` if your delivery destination is an MNS topic. Example: `acs:mns:cn-shanghai:100931896542****:/topics/topic1`.
        # *   `acs:log:{RegionId}:{accountId}:project/{projectName}/logstore/{logstoreName}` if your delivery destination is a Log Service Logstore. Example: `acs:log:cn-shanghai:100931896542****:project/project1/logstore/logstore1`.
        self.delivery_channel_target_arn = delivery_channel_target_arn  # type: str
        # The type of the delivery channel. Valid values:
        # 
        # *   OSS: Object Storage Service (OSS)
        # *   MNS: Message Service (MNS)
        # *   SLS: Log Service
        self.delivery_channel_type = delivery_channel_type  # type: str
        # The time when you want Cloud Config to deliver scheduled resource snapshots every day.
        # 
        # Format: `HH:mmZ`. This time is displayed in UTC.
        # 
        # > When you enable the scheduled resource delivery feature, you can configure this parameter to specify a custom delivery time. If you do not configure this parameter, Cloud Config automatically delivers scheduled resource snapshots at `04:00Z` and `16:00Z` every day.
        self.delivery_snapshot_time = delivery_snapshot_time  # type: str
        # The description of the delivery channel.
        self.description = description  # type: str
        # Specifies whether to deliver resource non-compliance events. If you set this parameter to true, Cloud Config delivers resource non-compliance events to Log Service or MNS when resources are considered non-compliant. Valid values:
        # 
        # *   true: Cloud Config delivers resource non-compliance events.
        # *   false: Cloud Config does not deliver resource non-compliance events. This is the default value.
        # 
        # > This parameter is available only for delivery channels of the SLS or MNS type.
        self.non_compliant_notification = non_compliant_notification  # type: bool
        # The ARN of the OSS bucket to which you want to transfer the delivery data when the size of the data exceeds the specified upper limit of the delivery channel. Format: `acs:oss:{RegionId}:{accountId}:{bucketName}`.
        # 
        # If you do not configure this parameter, Cloud Config delivers only summary data.
        # 
        # > This parameter is available only for delivery channels of the SLS or MNS type. The upper limit on the storage size of delivery channels of the SLS type is 1 MB, and the maximum storage size of delivery channels of the MNS type is 64 KB.
        self.oversized_data_osstarget_arn = oversized_data_osstarget_arn  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.configuration_item_change_notification is not None:
            result['ConfigurationItemChangeNotification'] = self.configuration_item_change_notification
        if self.configuration_snapshot is not None:
            result['ConfigurationSnapshot'] = self.configuration_snapshot
        if self.delivery_channel_condition is not None:
            result['DeliveryChannelCondition'] = self.delivery_channel_condition
        if self.delivery_channel_name is not None:
            result['DeliveryChannelName'] = self.delivery_channel_name
        if self.delivery_channel_target_arn is not None:
            result['DeliveryChannelTargetArn'] = self.delivery_channel_target_arn
        if self.delivery_channel_type is not None:
            result['DeliveryChannelType'] = self.delivery_channel_type
        if self.delivery_snapshot_time is not None:
            result['DeliverySnapshotTime'] = self.delivery_snapshot_time
        if self.description is not None:
            result['Description'] = self.description
        if self.non_compliant_notification is not None:
            result['NonCompliantNotification'] = self.non_compliant_notification
        if self.oversized_data_osstarget_arn is not None:
            result['OversizedDataOSSTargetArn'] = self.oversized_data_osstarget_arn
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('ConfigurationItemChangeNotification') is not None:
            self.configuration_item_change_notification = m.get('ConfigurationItemChangeNotification')
        if m.get('ConfigurationSnapshot') is not None:
            self.configuration_snapshot = m.get('ConfigurationSnapshot')
        if m.get('DeliveryChannelCondition') is not None:
            self.delivery_channel_condition = m.get('DeliveryChannelCondition')
        if m.get('DeliveryChannelName') is not None:
            self.delivery_channel_name = m.get('DeliveryChannelName')
        if m.get('DeliveryChannelTargetArn') is not None:
            self.delivery_channel_target_arn = m.get('DeliveryChannelTargetArn')
        if m.get('DeliveryChannelType') is not None:
            self.delivery_channel_type = m.get('DeliveryChannelType')
        if m.get('DeliverySnapshotTime') is not None:
            self.delivery_snapshot_time = m.get('DeliverySnapshotTime')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('NonCompliantNotification') is not None:
            self.non_compliant_notification = m.get('NonCompliantNotification')
        if m.get('OversizedDataOSSTargetArn') is not None:
            self.oversized_data_osstarget_arn = m.get('OversizedDataOSSTargetArn')
        return self


class CreateAggregateConfigDeliveryChannelResponseBody(TeaModel):
    def __init__(self, delivery_channel_id=None, request_id=None):
        # The ID of the delivery channel.
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_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('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CreateAggregateConfigDeliveryChannelResponse(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: CreateAggregateConfigDeliveryChannelResponseBody

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

    def to_map(self):
        _map = super(CreateAggregateConfigDeliveryChannelResponse, 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 = CreateAggregateConfigDeliveryChannelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateAggregateConfigRuleRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, config_rule_name=None,
                 config_rule_trigger_types=None, description=None, exclude_account_ids_scope=None, exclude_folder_ids_scope=None,
                 exclude_resource_ids_scope=None, folder_ids_scope=None, input_parameters=None, maximum_execution_frequency=None,
                 region_ids_scope=None, resource_group_ids_scope=None, resource_types_scope=None, risk_level=None,
                 source_identifier=None, source_owner=None, tag_key_logic_scope=None, tag_key_scope=None, tag_value_scope=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The `token` can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The rule name.
        self.config_rule_name = config_rule_name  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
        # *   ScheduledNotification: The rule is periodically triggered.
        self.config_rule_trigger_types = config_rule_trigger_types  # type: str
        # The description of the rule.
        self.description = description  # type: str
        # The ID of the member account to which the rule does not apply, which means that the resources within the member account are not evaluated based on the rule. Separate multiple member account IDs with commas (,).
        # 
        # > This parameter applies only to a managed rule.
        self.exclude_account_ids_scope = exclude_account_ids_scope  # type: str
        # The ID of the resource directory to which the rule does not apply, which means that the resources within member accounts in the resource directory are not evaluated based on the rule. Separate multiple resource directory IDs with commas (,).
        # 
        # > 
        # 
        # *   This parameter applies only to a rule of a global account group.
        # 
        # *   This parameter applies only to a managed rule.
        self.exclude_folder_ids_scope = exclude_folder_ids_scope  # type: str
        # The ID of the resource to be excluded from the compliance evaluations performed by the rule. Separate multiple resource IDs with commas (,).
        # 
        # > This parameter applies only to a managed rule.
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the resource directory to which the rule applies, which means that the resources within member accounts in the resource directory are evaluated based on the rule.
        # 
        # > 
        # 
        # *   This parameter applies only to a rule of a global account group.
        # 
        # *   This parameter applies only to a managed rule.
        self.folder_ids_scope = folder_ids_scope  # type: str
        # The input parameter of the rule.
        self.input_parameters = input_parameters  # type: dict[str, any]
        # The interval at which the rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour.
        # *   Three_Hours: 3 hours.
        # *   Six_Hours: 6 hours.
        # *   Twelve_Hours: 12 hours.
        # *   TwentyFour_Hours (default): 24 hours.
        # 
        # > This parameter is required if the `ConfigRuleTriggerTypes` parameter is set to `ScheduledNotification`.
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The ID of the region to which the rule applies. Separate multiple region IDs with commas (,).
        # 
        # > This parameter applies only to a managed rule.
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group to which the rule applies. Separate multiple resource group IDs with commas (,).
        # 
        # > This parameter applies only to a managed rule.
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The type of the resource evaluated by the rule. Separate multiple resource types with commas (,).
        self.resource_types_scope = resource_types_scope  # type: list[str]
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int
        # The identifier of the rule.
        # 
        # *   If you set the SourceOwner parameter to ALIYUN, set this parameter to the name of the managed rule.
        # *   If you set the SourceOwner parameter to CUSTOM_FC, set this parameter to the Alibaba Cloud Resource Name (ARN) of the relevant function in Function Compute.
        # 
        # For more information about how to query the name of a managed rule, see [Managed rules](~~127404~~).
        self.source_identifier = source_identifier  # type: str
        # The type of the rule. Valid values:
        # 
        # *   ALIYUN: managed rule
        # *   CUSTOM_FC: custom rule
        self.source_owner = source_owner  # type: str
        # The logical relationship among the tag keys if you specify multiple tag keys for the `TagKeyScope` parameter. For example, if you set the `TagKeyScope` parameter to `ECS,OSS` and the TagKeyLogicScope parameter to `AND`, the rule applies to resources with both the `ECS` and `OSS` tag keys. Valid values:
        # 
        # *   AND
        # *   OR
        self.tag_key_logic_scope = tag_key_logic_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with the specified tag key. Separate multiple parameter values with commas (,).
        # 
        # > This parameter applies only to a managed rule. You must configure the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value used to filter resources. The rule applies only to the resources with the specified tag value.
        # 
        # > This parameter applies only to a managed rule. You must configure the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_trigger_types is not None:
            result['ConfigRuleTriggerTypes'] = self.config_rule_trigger_types
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_account_ids_scope is not None:
            result['ExcludeAccountIdsScope'] = self.exclude_account_ids_scope
        if self.exclude_folder_ids_scope is not None:
            result['ExcludeFolderIdsScope'] = self.exclude_folder_ids_scope
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.folder_ids_scope is not None:
            result['FolderIdsScope'] = self.folder_ids_scope
        if self.input_parameters is not None:
            result['InputParameters'] = self.input_parameters
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.resource_types_scope is not None:
            result['ResourceTypesScope'] = self.resource_types_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.source_identifier is not None:
            result['SourceIdentifier'] = self.source_identifier
        if self.source_owner is not None:
            result['SourceOwner'] = self.source_owner
        if self.tag_key_logic_scope is not None:
            result['TagKeyLogicScope'] = self.tag_key_logic_scope
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleTriggerTypes') is not None:
            self.config_rule_trigger_types = m.get('ConfigRuleTriggerTypes')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeAccountIdsScope') is not None:
            self.exclude_account_ids_scope = m.get('ExcludeAccountIdsScope')
        if m.get('ExcludeFolderIdsScope') is not None:
            self.exclude_folder_ids_scope = m.get('ExcludeFolderIdsScope')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('FolderIdsScope') is not None:
            self.folder_ids_scope = m.get('FolderIdsScope')
        if m.get('InputParameters') is not None:
            self.input_parameters = m.get('InputParameters')
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('SourceIdentifier') is not None:
            self.source_identifier = m.get('SourceIdentifier')
        if m.get('SourceOwner') is not None:
            self.source_owner = m.get('SourceOwner')
        if m.get('TagKeyLogicScope') is not None:
            self.tag_key_logic_scope = m.get('TagKeyLogicScope')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class CreateAggregateConfigRuleShrinkRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, config_rule_name=None,
                 config_rule_trigger_types=None, description=None, exclude_account_ids_scope=None, exclude_folder_ids_scope=None,
                 exclude_resource_ids_scope=None, folder_ids_scope=None, input_parameters_shrink=None, maximum_execution_frequency=None,
                 region_ids_scope=None, resource_group_ids_scope=None, resource_types_scope_shrink=None, risk_level=None,
                 source_identifier=None, source_owner=None, tag_key_logic_scope=None, tag_key_scope=None, tag_value_scope=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The `token` can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The rule name.
        self.config_rule_name = config_rule_name  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
        # *   ScheduledNotification: The rule is periodically triggered.
        self.config_rule_trigger_types = config_rule_trigger_types  # type: str
        # The description of the rule.
        self.description = description  # type: str
        # The ID of the member account to which the rule does not apply, which means that the resources within the member account are not evaluated based on the rule. Separate multiple member account IDs with commas (,).
        # 
        # > This parameter applies only to a managed rule.
        self.exclude_account_ids_scope = exclude_account_ids_scope  # type: str
        # The ID of the resource directory to which the rule does not apply, which means that the resources within member accounts in the resource directory are not evaluated based on the rule. Separate multiple resource directory IDs with commas (,).
        # 
        # > 
        # 
        # *   This parameter applies only to a rule of a global account group.
        # 
        # *   This parameter applies only to a managed rule.
        self.exclude_folder_ids_scope = exclude_folder_ids_scope  # type: str
        # The ID of the resource to be excluded from the compliance evaluations performed by the rule. Separate multiple resource IDs with commas (,).
        # 
        # > This parameter applies only to a managed rule.
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the resource directory to which the rule applies, which means that the resources within member accounts in the resource directory are evaluated based on the rule.
        # 
        # > 
        # 
        # *   This parameter applies only to a rule of a global account group.
        # 
        # *   This parameter applies only to a managed rule.
        self.folder_ids_scope = folder_ids_scope  # type: str
        # The input parameter of the rule.
        self.input_parameters_shrink = input_parameters_shrink  # type: str
        # The interval at which the rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour.
        # *   Three_Hours: 3 hours.
        # *   Six_Hours: 6 hours.
        # *   Twelve_Hours: 12 hours.
        # *   TwentyFour_Hours (default): 24 hours.
        # 
        # > This parameter is required if the `ConfigRuleTriggerTypes` parameter is set to `ScheduledNotification`.
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The ID of the region to which the rule applies. Separate multiple region IDs with commas (,).
        # 
        # > This parameter applies only to a managed rule.
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group to which the rule applies. Separate multiple resource group IDs with commas (,).
        # 
        # > This parameter applies only to a managed rule.
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The type of the resource evaluated by the rule. Separate multiple resource types with commas (,).
        self.resource_types_scope_shrink = resource_types_scope_shrink  # type: str
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int
        # The identifier of the rule.
        # 
        # *   If you set the SourceOwner parameter to ALIYUN, set this parameter to the name of the managed rule.
        # *   If you set the SourceOwner parameter to CUSTOM_FC, set this parameter to the Alibaba Cloud Resource Name (ARN) of the relevant function in Function Compute.
        # 
        # For more information about how to query the name of a managed rule, see [Managed rules](~~127404~~).
        self.source_identifier = source_identifier  # type: str
        # The type of the rule. Valid values:
        # 
        # *   ALIYUN: managed rule
        # *   CUSTOM_FC: custom rule
        self.source_owner = source_owner  # type: str
        # The logical relationship among the tag keys if you specify multiple tag keys for the `TagKeyScope` parameter. For example, if you set the `TagKeyScope` parameter to `ECS,OSS` and the TagKeyLogicScope parameter to `AND`, the rule applies to resources with both the `ECS` and `OSS` tag keys. Valid values:
        # 
        # *   AND
        # *   OR
        self.tag_key_logic_scope = tag_key_logic_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with the specified tag key. Separate multiple parameter values with commas (,).
        # 
        # > This parameter applies only to a managed rule. You must configure the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value used to filter resources. The rule applies only to the resources with the specified tag value.
        # 
        # > This parameter applies only to a managed rule. You must configure the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_trigger_types is not None:
            result['ConfigRuleTriggerTypes'] = self.config_rule_trigger_types
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_account_ids_scope is not None:
            result['ExcludeAccountIdsScope'] = self.exclude_account_ids_scope
        if self.exclude_folder_ids_scope is not None:
            result['ExcludeFolderIdsScope'] = self.exclude_folder_ids_scope
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.folder_ids_scope is not None:
            result['FolderIdsScope'] = self.folder_ids_scope
        if self.input_parameters_shrink is not None:
            result['InputParameters'] = self.input_parameters_shrink
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.resource_types_scope_shrink is not None:
            result['ResourceTypesScope'] = self.resource_types_scope_shrink
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.source_identifier is not None:
            result['SourceIdentifier'] = self.source_identifier
        if self.source_owner is not None:
            result['SourceOwner'] = self.source_owner
        if self.tag_key_logic_scope is not None:
            result['TagKeyLogicScope'] = self.tag_key_logic_scope
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleTriggerTypes') is not None:
            self.config_rule_trigger_types = m.get('ConfigRuleTriggerTypes')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeAccountIdsScope') is not None:
            self.exclude_account_ids_scope = m.get('ExcludeAccountIdsScope')
        if m.get('ExcludeFolderIdsScope') is not None:
            self.exclude_folder_ids_scope = m.get('ExcludeFolderIdsScope')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('FolderIdsScope') is not None:
            self.folder_ids_scope = m.get('FolderIdsScope')
        if m.get('InputParameters') is not None:
            self.input_parameters_shrink = m.get('InputParameters')
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope_shrink = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('SourceIdentifier') is not None:
            self.source_identifier = m.get('SourceIdentifier')
        if m.get('SourceOwner') is not None:
            self.source_owner = m.get('SourceOwner')
        if m.get('TagKeyLogicScope') is not None:
            self.tag_key_logic_scope = m.get('TagKeyLogicScope')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class CreateAggregateConfigRuleResponseBody(TeaModel):
    def __init__(self, config_rule_id=None, request_id=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CreateAggregateConfigRuleResponse(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: CreateAggregateConfigRuleResponseBody

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

    def to_map(self):
        _map = super(CreateAggregateConfigRuleResponse, 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 = CreateAggregateConfigRuleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateAggregateRemediationRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, config_rule_id=None, invoke_type=None, params=None,
                 remediation_template_id=None, remediation_type=None, source_type=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The `token` can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The rule ID.
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_id = config_rule_id  # type: str
        # The execution mode of the remediation template. Valid values:
        # 
        # *   NON_EXECUTION: The remediation template is not executed.
        # *   AUTO_EXECUTION: The remediation template is automatically executed.
        # *   MANUAL_EXECUTION: The remediation template is manually executed.
        # *   NOT_CONFIG: The execution mode is not specified.
        self.invoke_type = invoke_type  # type: str
        # The configuration of the remediation template.
        # 
        # For more information about how to obtain the configuration of the remediation template, see [ListRemediationTemplates](~~416781~~). You can view the `TemplateDefinition` response parameter to obtain the configuration of the remediation template.
        self.params = params  # type: str
        # The ID of the remediation template.
        # 
        # *   If you set the `RemediationType` parameter to `OOS`, set this parameter to the identifier of the relevant official remediation template, such as `ACS-OSS-PutBucketAcl`. For more information about how to obtain the remediation template identifier, see [ListRemediationTemplates](~~416781~~).
        # *   If you set the `RemediationType` parameter to `FC`, set this parameter to the Alibaba Cloud Resource Name (ARN) of the relevant Function Compute resource, such as `acs:fc:cn-hangzhou:100931896542****:services/ConfigService.LATEST/functions/test-php`.
        self.remediation_template_id = remediation_template_id  # type: str
        # The type of the remediation template. Valid values:
        # 
        # *   OOS: stands for Operation Orchestration Service and indicates official remediation.
        # *   FC: stands for Function Compute and indicates custom remediation.
        self.remediation_type = remediation_type  # type: str
        # The source of remediation template. Valid values:
        # 
        # *   ALIYUN (default): official template.
        # *   CUSTOM: custom template.
        # *   NONE: none.
        self.source_type = source_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.invoke_type is not None:
            result['InvokeType'] = self.invoke_type
        if self.params is not None:
            result['Params'] = self.params
        if self.remediation_template_id is not None:
            result['RemediationTemplateId'] = self.remediation_template_id
        if self.remediation_type is not None:
            result['RemediationType'] = self.remediation_type
        if self.source_type is not None:
            result['SourceType'] = self.source_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('InvokeType') is not None:
            self.invoke_type = m.get('InvokeType')
        if m.get('Params') is not None:
            self.params = m.get('Params')
        if m.get('RemediationTemplateId') is not None:
            self.remediation_template_id = m.get('RemediationTemplateId')
        if m.get('RemediationType') is not None:
            self.remediation_type = m.get('RemediationType')
        if m.get('SourceType') is not None:
            self.source_type = m.get('SourceType')
        return self


class CreateAggregateRemediationResponseBody(TeaModel):
    def __init__(self, remediation_id=None, request_id=None):
        # The ID of the remediation template.
        self.remediation_id = remediation_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.remediation_id is not None:
            result['RemediationId'] = self.remediation_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('RemediationId') is not None:
            self.remediation_id = m.get('RemediationId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CreateAggregateRemediationResponse(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: CreateAggregateRemediationResponseBody

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

    def to_map(self):
        _map = super(CreateAggregateRemediationResponse, 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 = CreateAggregateRemediationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateAggregatorRequestAggregatorAccounts(TeaModel):
    def __init__(self, account_id=None, account_name=None, account_type=None):
        # The Alibaba Cloud account ID of the member. For more information about how to obtain the ID of a member account, see [ListAccounts](~~160016~~).
        self.account_id = account_id  # type: long
        # The name of the member account. For more information about how to obtain the name of a member account, see [ListAccounts](~~160016~~).
        self.account_name = account_name  # type: str
        # The type of the member account. The value is fixed to ResourceDirectory.
        self.account_type = account_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateAggregatorRequestAggregatorAccounts, 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_type is not None:
            result['AccountType'] = self.account_type
        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('AccountType') is not None:
            self.account_type = m.get('AccountType')
        return self


class CreateAggregatorRequest(TeaModel):
    def __init__(self, aggregator_accounts=None, aggregator_name=None, aggregator_type=None, client_token=None,
                 description=None, folder_id=None):
        # The type of the member account. Valid value: ResourceDirectory.
        self.aggregator_accounts = aggregator_accounts  # type: list[CreateAggregatorRequestAggregatorAccounts]
        # The name of the account group.
        self.aggregator_name = aggregator_name  # type: str
        # The type of the account group. Valid values:
        # 
        # *   RD: global account group
        # *   CUSTOM (default): custom account group
        self.aggregator_type = aggregator_type  # type: str
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The `token` can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The description of the account group.
        self.description = description  # type: str
        self.folder_id = folder_id  # type: str

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

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

        result = dict()
        result['AggregatorAccounts'] = []
        if self.aggregator_accounts is not None:
            for k in self.aggregator_accounts:
                result['AggregatorAccounts'].append(k.to_map() if k else None)
        if self.aggregator_name is not None:
            result['AggregatorName'] = self.aggregator_name
        if self.aggregator_type is not None:
            result['AggregatorType'] = self.aggregator_type
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.description is not None:
            result['Description'] = self.description
        if self.folder_id is not None:
            result['FolderId'] = self.folder_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.aggregator_accounts = []
        if m.get('AggregatorAccounts') is not None:
            for k in m.get('AggregatorAccounts'):
                temp_model = CreateAggregatorRequestAggregatorAccounts()
                self.aggregator_accounts.append(temp_model.from_map(k))
        if m.get('AggregatorName') is not None:
            self.aggregator_name = m.get('AggregatorName')
        if m.get('AggregatorType') is not None:
            self.aggregator_type = m.get('AggregatorType')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('FolderId') is not None:
            self.folder_id = m.get('FolderId')
        return self


class CreateAggregatorShrinkRequest(TeaModel):
    def __init__(self, aggregator_accounts_shrink=None, aggregator_name=None, aggregator_type=None,
                 client_token=None, description=None, folder_id=None):
        # The type of the member account. Valid value: ResourceDirectory.
        self.aggregator_accounts_shrink = aggregator_accounts_shrink  # type: str
        # The name of the account group.
        self.aggregator_name = aggregator_name  # type: str
        # The type of the account group. Valid values:
        # 
        # *   RD: global account group
        # *   CUSTOM (default): custom account group
        self.aggregator_type = aggregator_type  # type: str
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The `token` can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The description of the account group.
        self.description = description  # type: str
        self.folder_id = folder_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_accounts_shrink is not None:
            result['AggregatorAccounts'] = self.aggregator_accounts_shrink
        if self.aggregator_name is not None:
            result['AggregatorName'] = self.aggregator_name
        if self.aggregator_type is not None:
            result['AggregatorType'] = self.aggregator_type
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.description is not None:
            result['Description'] = self.description
        if self.folder_id is not None:
            result['FolderId'] = self.folder_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorAccounts') is not None:
            self.aggregator_accounts_shrink = m.get('AggregatorAccounts')
        if m.get('AggregatorName') is not None:
            self.aggregator_name = m.get('AggregatorName')
        if m.get('AggregatorType') is not None:
            self.aggregator_type = m.get('AggregatorType')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('FolderId') is not None:
            self.folder_id = m.get('FolderId')
        return self


class CreateAggregatorResponseBody(TeaModel):
    def __init__(self, aggregator_id=None, request_id=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_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('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CreateAggregatorResponse(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: CreateAggregatorResponseBody

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

    def to_map(self):
        _map = super(CreateAggregatorResponse, 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 = CreateAggregatorResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateCompliancePackRequestConfigRulesConfigRuleParameters(TeaModel):
    def __init__(self, parameter_name=None, parameter_value=None):
        # The name of the input parameter.
        # 
        # You must configure the `ParameterName` and `ParameterValue` parameters or neither of them. If the managed rule has an input parameter but no default value exists, you must configure this parameter. For more information about how to obtain the name of an input parameter for a managed rule, see [ListCompliancePackTemplates](~~261176~~).
        self.parameter_name = parameter_name  # type: str
        # The value of the input parameter.
        # 
        # You must configure the `ParameterName` and `ParameterValue` parameters or neither of them. If the managed rule has an input parameter but no default value exists you must configure this parameter. For more information about how to obtain the expected value of an input parameter for a managed rule, see [ListCompliancePackTemplates](~~261176~~).
        self.parameter_value = parameter_value  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.parameter_name is not None:
            result['ParameterName'] = self.parameter_name
        if self.parameter_value is not None:
            result['ParameterValue'] = self.parameter_value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ParameterName') is not None:
            self.parameter_name = m.get('ParameterName')
        if m.get('ParameterValue') is not None:
            self.parameter_value = m.get('ParameterValue')
        return self


class CreateCompliancePackRequestConfigRules(TeaModel):
    def __init__(self, config_rule_id=None, config_rule_name=None, config_rule_parameters=None, description=None,
                 managed_rule_identifier=None, risk_level=None):
        # The ID of the rule. If you configure this parameter, Cloud Config adds the rule of the specified ID to the compliance package.
        # 
        # You only need to configure the `ManagedRuleIdentifier` or `ConfigRuleId` parameter. If you configure both parameters, the value of the `ConfigRuleId` parameter takes precedence. For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_id = config_rule_id  # type: str
        # The name of the rule.
        self.config_rule_name = config_rule_name  # type: str
        # The details of the input parameters of the rule.
        self.config_rule_parameters = config_rule_parameters  # type: list[CreateCompliancePackRequestConfigRulesConfigRuleParameters]
        # The description of the rule.
        self.description = description  # type: str
        # The ID of the managed rule. Cloud Config automatically creates a managed rule based on the specified ID and adds the rule to the compliance package.
        # 
        # You only need to configure the `ManagedRuleIdentifier` or `ConfigRuleId` parameter. If you configure both parameters, the value of the `ConfigRuleId` parameter take precedence. For more information about how to obtain the identifier of a managed rule, see [ListCompliancePackTemplates](~~261176~~).
        self.managed_rule_identifier = managed_rule_identifier  # type: str
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int

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

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        result['ConfigRuleParameters'] = []
        if self.config_rule_parameters is not None:
            for k in self.config_rule_parameters:
                result['ConfigRuleParameters'].append(k.to_map() if k else None)
        if self.description is not None:
            result['Description'] = self.description
        if self.managed_rule_identifier is not None:
            result['ManagedRuleIdentifier'] = self.managed_rule_identifier
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        self.config_rule_parameters = []
        if m.get('ConfigRuleParameters') is not None:
            for k in m.get('ConfigRuleParameters'):
                temp_model = CreateCompliancePackRequestConfigRulesConfigRuleParameters()
                self.config_rule_parameters.append(temp_model.from_map(k))
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ManagedRuleIdentifier') is not None:
            self.managed_rule_identifier = m.get('ManagedRuleIdentifier')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class CreateCompliancePackRequest(TeaModel):
    def __init__(self, client_token=None, compliance_pack_name=None, compliance_pack_template_id=None,
                 config_rules=None, default_enable=None, description=None, exclude_resource_ids_scope=None,
                 region_ids_scope=None, resource_group_ids_scope=None, risk_level=None, tag_key_scope=None, tag_value_scope=None,
                 template_content=None):
        # The client token that you want to use to ensure the idempotency of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.``
        self.client_token = client_token  # type: str
        # The name of the compliance package.
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The ID of the compliance package template.
        # 
        # For more information about how to obtain the ID of a compliance package template, see [ListCompliancePackTemplates](~~261176~~).
        self.compliance_pack_template_id = compliance_pack_template_id  # type: str
        # The rules in the compliance package.
        self.config_rules = config_rules  # type: list[CreateCompliancePackRequestConfigRules]
        # Specifies whether to enable the rule together with the compliance package. Valid values:
        # 
        # *   true: The system enables the rule together with the compliance package.
        # *   false: The system does not enable the rule together with the compliance package.
        self.default_enable = default_enable  # type: bool
        # The description of the compliance package.
        self.description = description  # type: str
        # The ID of the resource that you do not want to evaluate by using the compliance package. Separate multiple resource IDs with commas (,).
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the region whose resources you want to evaluate by using the compliance package. Separate multiple region IDs with commas (,).
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group whose resources you want to evaluate by using the compliance package. Separate multiple resource group IDs with commas (,).
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The risk level of the resources that are not compliant with the rules in the compliance package. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int
        # The tag key of the resource that you want to evaluate by using the compliance package.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value of the resource that you want to evaluate by using the compliance package.
        # 
        # >  You must configure the TagValueScope parameter together with the TagKeyScope parameter.
        self.tag_value_scope = tag_value_scope  # type: str
        self.template_content = template_content  # type: str

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

    def to_map(self):
        _map = super(CreateCompliancePackRequest, 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.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        if self.compliance_pack_template_id is not None:
            result['CompliancePackTemplateId'] = self.compliance_pack_template_id
        result['ConfigRules'] = []
        if self.config_rules is not None:
            for k in self.config_rules:
                result['ConfigRules'].append(k.to_map() if k else None)
        if self.default_enable is not None:
            result['DefaultEnable'] = self.default_enable
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        if self.template_content is not None:
            result['TemplateContent'] = self.template_content
        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('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        if m.get('CompliancePackTemplateId') is not None:
            self.compliance_pack_template_id = m.get('CompliancePackTemplateId')
        self.config_rules = []
        if m.get('ConfigRules') is not None:
            for k in m.get('ConfigRules'):
                temp_model = CreateCompliancePackRequestConfigRules()
                self.config_rules.append(temp_model.from_map(k))
        if m.get('DefaultEnable') is not None:
            self.default_enable = m.get('DefaultEnable')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        if m.get('TemplateContent') is not None:
            self.template_content = m.get('TemplateContent')
        return self


class CreateCompliancePackShrinkRequest(TeaModel):
    def __init__(self, client_token=None, compliance_pack_name=None, compliance_pack_template_id=None,
                 config_rules_shrink=None, default_enable=None, description=None, exclude_resource_ids_scope=None,
                 region_ids_scope=None, resource_group_ids_scope=None, risk_level=None, tag_key_scope=None, tag_value_scope=None,
                 template_content=None):
        # The client token that you want to use to ensure the idempotency of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.``
        self.client_token = client_token  # type: str
        # The name of the compliance package.
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The ID of the compliance package template.
        # 
        # For more information about how to obtain the ID of a compliance package template, see [ListCompliancePackTemplates](~~261176~~).
        self.compliance_pack_template_id = compliance_pack_template_id  # type: str
        # The rules in the compliance package.
        self.config_rules_shrink = config_rules_shrink  # type: str
        # Specifies whether to enable the rule together with the compliance package. Valid values:
        # 
        # *   true: The system enables the rule together with the compliance package.
        # *   false: The system does not enable the rule together with the compliance package.
        self.default_enable = default_enable  # type: bool
        # The description of the compliance package.
        self.description = description  # type: str
        # The ID of the resource that you do not want to evaluate by using the compliance package. Separate multiple resource IDs with commas (,).
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the region whose resources you want to evaluate by using the compliance package. Separate multiple region IDs with commas (,).
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group whose resources you want to evaluate by using the compliance package. Separate multiple resource group IDs with commas (,).
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The risk level of the resources that are not compliant with the rules in the compliance package. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int
        # The tag key of the resource that you want to evaluate by using the compliance package.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value of the resource that you want to evaluate by using the compliance package.
        # 
        # >  You must configure the TagValueScope parameter together with the TagKeyScope parameter.
        self.tag_value_scope = tag_value_scope  # type: str
        self.template_content = template_content  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateCompliancePackShrinkRequest, 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.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        if self.compliance_pack_template_id is not None:
            result['CompliancePackTemplateId'] = self.compliance_pack_template_id
        if self.config_rules_shrink is not None:
            result['ConfigRules'] = self.config_rules_shrink
        if self.default_enable is not None:
            result['DefaultEnable'] = self.default_enable
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        if self.template_content is not None:
            result['TemplateContent'] = self.template_content
        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('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        if m.get('CompliancePackTemplateId') is not None:
            self.compliance_pack_template_id = m.get('CompliancePackTemplateId')
        if m.get('ConfigRules') is not None:
            self.config_rules_shrink = m.get('ConfigRules')
        if m.get('DefaultEnable') is not None:
            self.default_enable = m.get('DefaultEnable')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        if m.get('TemplateContent') is not None:
            self.template_content = m.get('TemplateContent')
        return self


class CreateCompliancePackResponseBody(TeaModel):
    def __init__(self, compliance_pack_id=None, request_id=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CreateCompliancePackResponse(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: CreateCompliancePackResponseBody

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

    def to_map(self):
        _map = super(CreateCompliancePackResponse, 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 = CreateCompliancePackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateConfigDeliveryChannelRequest(TeaModel):
    def __init__(self, client_token=None, configuration_item_change_notification=None,
                 configuration_snapshot=None, delivery_channel_condition=None, delivery_channel_name=None,
                 delivery_channel_target_arn=None, delivery_channel_type=None, delivery_snapshot_time=None, description=None,
                 non_compliant_notification=None, oversized_data_osstarget_arn=None):
        # The client token that is used to ensure the idempotency of the request. You can use the client to generate the token, but you must ensure that the token is unique among different requests.
        # 
        # The `token` can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](~~25693~~).
        self.client_token = client_token  # type: str
        # Specifies whether to deliver resource change logs. If you set this parameter to true, Cloud Config delivers resource change logs to OSS, Log Service, or MNS when the configurations of the resources change. Valid values:
        # 
        # *   true: Cloud Config delivers resource change logs.
        # *   false (default): Cloud Config does not deliver resource change logs.
        # 
        # > This parameter is available for delivery channels of the OSS, SLS, and MNS types.
        self.configuration_item_change_notification = configuration_item_change_notification  # type: bool
        # Specifies whether to deliver scheduled resource snapshots. Cloud Config delivers scheduled resource snapshots at `04:00Z` and `16:00Z` to OSS, MNS, or Log Service every day. The time is displayed in UTC. Valid values:
        # 
        # *   true: Cloud Config delivers scheduled resource snapshots.
        # *   false (default): Cloud Config does not deliver scheduled resource snapshots.
        self.configuration_snapshot = configuration_snapshot  # type: bool
        # The rule that you want to attach to the delivery channel. This parameter is available when you deliver data of all types to MNS or deliver snapshots to Log Service.
        # 
        # *   If the value of the DeliveryChannelType parameter is MNS, take note of the following settings of the lowest risk level and resource types of the events to which you subscribed:
        # 
        #     *   The setting of the lowest risk level for the events to which you want to subscribe is in the following format: `{"filterType":"RuleRiskLevel","value":"1","multiple":false}`.
        # 
        #         The `value` field indicates the lowest risk level of the events to which you want to subscribe. Valid values: 1, 2, and 3. The value 1 indicates the high risk level, the value 2 indicates the medium risk level, and the value 3 indicates the low risk level.
        # 
        #     *   The setting of the resource types of the events to which you want to subscribe is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #         The `values` field indicates the resource types of the events to which you want to subscribe. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        # 
        # *   If you set the DeliveryChannelType parameter to SLS, the setting of the resource types of the snapshots to which you want to deliver is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #     The `values` field specifies the resource types of the snapshots to which you want to deliver. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        self.delivery_channel_condition = delivery_channel_condition  # type: str
        # The name of the delivery channel.
        # 
        # > If you do not configure this parameter, this parameter is left empty.
        self.delivery_channel_name = delivery_channel_name  # type: str
        # The Alibaba Cloud Resource Name (ARN) of the delivery destination. Valid values:
        # 
        # *   `acs:oss:{RegionId}:{accountId}:{bucketName}` if your delivery destination is an OSS bucket. Example: `acs:oss:cn-shanghai:100931896542****:new-bucket`.
        # *   `acs:mns:{RegionId}:{accountId}:/topics/{topicName}` if your delivery destination is an MNS topic. Example: `acs:mns:cn-shanghai:100931896542****:/topics/topic1`.
        # *   `acs:log:{RegionId}:{accountId}:project/{projectName}/logstore/{logstoreName}` if your delivery destination is a Log Service Logstore. Example: `acs:log:cn-shanghai:100931896542****:project/project1/logstore/logstore1`.
        self.delivery_channel_target_arn = delivery_channel_target_arn  # type: str
        # The type of the delivery channel. Valid values:
        # 
        # *   OSS: Object Storage Service (OSS)
        # *   MNS: Message Service (MNS)
        # *   SLS: Log Service
        self.delivery_channel_type = delivery_channel_type  # type: str
        # The time when you want Cloud Config to deliver scheduled resource snapshots every day.
        # 
        # Format: `HH:mmZ`. This time is displayed in UTC.
        # 
        # > When you enable the scheduled resource delivery feature, you can configure this parameter to specify a custom delivery time. If you do not configure this parameter, Cloud Config automatically delivers scheduled resource snapshots at `04:00Z` and `16:00Z` every day.
        self.delivery_snapshot_time = delivery_snapshot_time  # type: str
        # The description of the delivery channel.
        self.description = description  # type: str
        # Specifies whether to deliver resource non-compliance events. If you set this parameter to true, Cloud Config delivers resource non-compliance events to Log Service or MNS when resources are considered non-compliant. Valid values:
        # 
        # *   true: Cloud Config delivers resource non-compliance events.
        # *   false (default): Cloud Config does not deliver resource non-compliance events.
        # 
        # > This parameter is available only for delivery channels of the SLS or MNS type.
        self.non_compliant_notification = non_compliant_notification  # type: bool
        # The ARN of the OSS bucket to which you want to transfer the delivery data when the size of the data exceeds the specified upper limit of the delivery channel. Format: `acs:oss:{RegionId}:{accountId}:{bucketName}`.
        # 
        # If you do not configure this parameter, Cloud Config delivers only summary data.
        # 
        # > This parameter is available only for delivery channels of the SLS or MNS type. The maximum storage size of delivery channels of the SLS type is 1 MB, and the maximum storage size of delivery channels of the MNS type is 64 KB.
        self.oversized_data_osstarget_arn = oversized_data_osstarget_arn  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateConfigDeliveryChannelRequest, 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.configuration_item_change_notification is not None:
            result['ConfigurationItemChangeNotification'] = self.configuration_item_change_notification
        if self.configuration_snapshot is not None:
            result['ConfigurationSnapshot'] = self.configuration_snapshot
        if self.delivery_channel_condition is not None:
            result['DeliveryChannelCondition'] = self.delivery_channel_condition
        if self.delivery_channel_name is not None:
            result['DeliveryChannelName'] = self.delivery_channel_name
        if self.delivery_channel_target_arn is not None:
            result['DeliveryChannelTargetArn'] = self.delivery_channel_target_arn
        if self.delivery_channel_type is not None:
            result['DeliveryChannelType'] = self.delivery_channel_type
        if self.delivery_snapshot_time is not None:
            result['DeliverySnapshotTime'] = self.delivery_snapshot_time
        if self.description is not None:
            result['Description'] = self.description
        if self.non_compliant_notification is not None:
            result['NonCompliantNotification'] = self.non_compliant_notification
        if self.oversized_data_osstarget_arn is not None:
            result['OversizedDataOSSTargetArn'] = self.oversized_data_osstarget_arn
        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('ConfigurationItemChangeNotification') is not None:
            self.configuration_item_change_notification = m.get('ConfigurationItemChangeNotification')
        if m.get('ConfigurationSnapshot') is not None:
            self.configuration_snapshot = m.get('ConfigurationSnapshot')
        if m.get('DeliveryChannelCondition') is not None:
            self.delivery_channel_condition = m.get('DeliveryChannelCondition')
        if m.get('DeliveryChannelName') is not None:
            self.delivery_channel_name = m.get('DeliveryChannelName')
        if m.get('DeliveryChannelTargetArn') is not None:
            self.delivery_channel_target_arn = m.get('DeliveryChannelTargetArn')
        if m.get('DeliveryChannelType') is not None:
            self.delivery_channel_type = m.get('DeliveryChannelType')
        if m.get('DeliverySnapshotTime') is not None:
            self.delivery_snapshot_time = m.get('DeliverySnapshotTime')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('NonCompliantNotification') is not None:
            self.non_compliant_notification = m.get('NonCompliantNotification')
        if m.get('OversizedDataOSSTargetArn') is not None:
            self.oversized_data_osstarget_arn = m.get('OversizedDataOSSTargetArn')
        return self


class CreateConfigDeliveryChannelResponseBody(TeaModel):
    def __init__(self, delivery_channel_id=None, request_id=None):
        # The ID of the delivery channel.
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_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('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CreateConfigDeliveryChannelResponse(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: CreateConfigDeliveryChannelResponseBody

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

    def to_map(self):
        _map = super(CreateConfigDeliveryChannelResponse, 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 = CreateConfigDeliveryChannelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateConfigRuleRequest(TeaModel):
    def __init__(self, client_token=None, config_rule_name=None, config_rule_trigger_types=None, description=None,
                 exclude_resource_ids_scope=None, input_parameters=None, maximum_execution_frequency=None, region_ids_scope=None,
                 resource_group_ids_scope=None, resource_types_scope=None, risk_level=None, source_identifier=None, source_owner=None,
                 tag_key_logic_scope=None, tag_key_scope=None, tag_value_scope=None):
        # The client token that you want to use to ensure the idempotency of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.``
        self.client_token = client_token  # type: str
        # The name of the rule.
        self.config_rule_name = config_rule_name  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
        # *   ScheduledNotification: The rule is periodically triggered.
        # 
        # >  If a rule supports the preceding trigger types, separate the types with a comma (,).
        self.config_rule_trigger_types = config_rule_trigger_types  # type: str
        # The description of the rule.
        self.description = description  # type: str
        # The ID of the resource to be excluded from the compliance evaluations performed by the rule. Separate multiple resource IDs with commas (,).
        # 
        # >  This parameter applies only to managed rules.
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The input parameter of the rule.
        self.input_parameters = input_parameters  # type: dict[str, any]
        # The intervals at which the rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour.
        # *   Three_Hours: 3 hours.
        # *   Six_Hours: 6 hours.
        # *   Twelve_Hours: 12 hours.
        # *   TwentyFour_Hours (default): 24 hours.
        # 
        # >  This parameter is required if the ConfigRuleTriggerTypes parameter is set to ScheduledNotification.
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The ID of the region to which the rule applies. Separate multiple region IDs with commas (,).
        # 
        # >  This parameter applies only to managed rules.
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group to which the rule applies. Separate multiple resource group IDs with commas (,).
        # 
        # >  This parameter applies only to managed rules.
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The type of the resource to be evaluated by the rule. Separate multiple resource types with commas (,).
        self.resource_types_scope = resource_types_scope  # type: list[str]
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int
        # The ID of the rule.
        # 
        # *   If you set the SourceOwner parameter to ALIYUN, set this parameter to the name of the managed rule.
        # *   If you set the SourceOwner parameter to CUSTOM_FC, set this parameter to the Alibaba Cloud Resource Name (ARN) of the relevant function in Function Compute.
        # 
        # For more information about how to query the name of a managed rule, see [Managed rules](~~127404~~).
        self.source_identifier = source_identifier  # type: str
        # The type of the rule Valid values:
        # 
        # *   ALIYUN: managed rule.
        # *   CUSTOM_FC: custom rule.
        self.source_owner = source_owner  # type: str
        # The logical relationship among the tag keys if you specify multiple tag keys for the `TagKeyScope` parameter. For example, if you set the `TagKeyScope` parameter to `ECS,OSS` and the TagKeyLogicScope parameter to `AND`, the rule applies to resources with both the `ECS` and `OSS` tag keys. Valid values:
        # 
        # *   AND: logical AND
        # *   OR: logical OR
        self.tag_key_logic_scope = tag_key_logic_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with a specified tag key.
        # 
        # >  This parameter applies only to managed rules. You must configure the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with the specified tag key.
        # 
        # >  This parameter applies only to managed rules. You must configure the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateConfigRuleRequest, 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.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_trigger_types is not None:
            result['ConfigRuleTriggerTypes'] = self.config_rule_trigger_types
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.input_parameters is not None:
            result['InputParameters'] = self.input_parameters
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.resource_types_scope is not None:
            result['ResourceTypesScope'] = self.resource_types_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.source_identifier is not None:
            result['SourceIdentifier'] = self.source_identifier
        if self.source_owner is not None:
            result['SourceOwner'] = self.source_owner
        if self.tag_key_logic_scope is not None:
            result['TagKeyLogicScope'] = self.tag_key_logic_scope
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        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('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleTriggerTypes') is not None:
            self.config_rule_trigger_types = m.get('ConfigRuleTriggerTypes')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('InputParameters') is not None:
            self.input_parameters = m.get('InputParameters')
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('SourceIdentifier') is not None:
            self.source_identifier = m.get('SourceIdentifier')
        if m.get('SourceOwner') is not None:
            self.source_owner = m.get('SourceOwner')
        if m.get('TagKeyLogicScope') is not None:
            self.tag_key_logic_scope = m.get('TagKeyLogicScope')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class CreateConfigRuleShrinkRequest(TeaModel):
    def __init__(self, client_token=None, config_rule_name=None, config_rule_trigger_types=None, description=None,
                 exclude_resource_ids_scope=None, input_parameters_shrink=None, maximum_execution_frequency=None, region_ids_scope=None,
                 resource_group_ids_scope=None, resource_types_scope_shrink=None, risk_level=None, source_identifier=None,
                 source_owner=None, tag_key_logic_scope=None, tag_key_scope=None, tag_value_scope=None):
        # The client token that you want to use to ensure the idempotency of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.``
        self.client_token = client_token  # type: str
        # The name of the rule.
        self.config_rule_name = config_rule_name  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
        # *   ScheduledNotification: The rule is periodically triggered.
        # 
        # >  If a rule supports the preceding trigger types, separate the types with a comma (,).
        self.config_rule_trigger_types = config_rule_trigger_types  # type: str
        # The description of the rule.
        self.description = description  # type: str
        # The ID of the resource to be excluded from the compliance evaluations performed by the rule. Separate multiple resource IDs with commas (,).
        # 
        # >  This parameter applies only to managed rules.
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The input parameter of the rule.
        self.input_parameters_shrink = input_parameters_shrink  # type: str
        # The intervals at which the rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour.
        # *   Three_Hours: 3 hours.
        # *   Six_Hours: 6 hours.
        # *   Twelve_Hours: 12 hours.
        # *   TwentyFour_Hours (default): 24 hours.
        # 
        # >  This parameter is required if the ConfigRuleTriggerTypes parameter is set to ScheduledNotification.
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The ID of the region to which the rule applies. Separate multiple region IDs with commas (,).
        # 
        # >  This parameter applies only to managed rules.
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group to which the rule applies. Separate multiple resource group IDs with commas (,).
        # 
        # >  This parameter applies only to managed rules.
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The type of the resource to be evaluated by the rule. Separate multiple resource types with commas (,).
        self.resource_types_scope_shrink = resource_types_scope_shrink  # type: str
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int
        # The ID of the rule.
        # 
        # *   If you set the SourceOwner parameter to ALIYUN, set this parameter to the name of the managed rule.
        # *   If you set the SourceOwner parameter to CUSTOM_FC, set this parameter to the Alibaba Cloud Resource Name (ARN) of the relevant function in Function Compute.
        # 
        # For more information about how to query the name of a managed rule, see [Managed rules](~~127404~~).
        self.source_identifier = source_identifier  # type: str
        # The type of the rule Valid values:
        # 
        # *   ALIYUN: managed rule.
        # *   CUSTOM_FC: custom rule.
        self.source_owner = source_owner  # type: str
        # The logical relationship among the tag keys if you specify multiple tag keys for the `TagKeyScope` parameter. For example, if you set the `TagKeyScope` parameter to `ECS,OSS` and the TagKeyLogicScope parameter to `AND`, the rule applies to resources with both the `ECS` and `OSS` tag keys. Valid values:
        # 
        # *   AND: logical AND
        # *   OR: logical OR
        self.tag_key_logic_scope = tag_key_logic_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with a specified tag key.
        # 
        # >  This parameter applies only to managed rules. You must configure the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with the specified tag key.
        # 
        # >  This parameter applies only to managed rules. You must configure the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateConfigRuleShrinkRequest, 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.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_trigger_types is not None:
            result['ConfigRuleTriggerTypes'] = self.config_rule_trigger_types
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.input_parameters_shrink is not None:
            result['InputParameters'] = self.input_parameters_shrink
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.resource_types_scope_shrink is not None:
            result['ResourceTypesScope'] = self.resource_types_scope_shrink
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.source_identifier is not None:
            result['SourceIdentifier'] = self.source_identifier
        if self.source_owner is not None:
            result['SourceOwner'] = self.source_owner
        if self.tag_key_logic_scope is not None:
            result['TagKeyLogicScope'] = self.tag_key_logic_scope
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        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('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleTriggerTypes') is not None:
            self.config_rule_trigger_types = m.get('ConfigRuleTriggerTypes')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('InputParameters') is not None:
            self.input_parameters_shrink = m.get('InputParameters')
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope_shrink = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('SourceIdentifier') is not None:
            self.source_identifier = m.get('SourceIdentifier')
        if m.get('SourceOwner') is not None:
            self.source_owner = m.get('SourceOwner')
        if m.get('TagKeyLogicScope') is not None:
            self.tag_key_logic_scope = m.get('TagKeyLogicScope')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class CreateConfigRuleResponseBody(TeaModel):
    def __init__(self, config_rule_id=None, request_id=None):
        # The ID of the rule.
        self.config_rule_id = config_rule_id  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CreateConfigRuleResponse(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: CreateConfigRuleResponseBody

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

    def to_map(self):
        _map = super(CreateConfigRuleResponse, 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 = CreateConfigRuleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateDeliveryChannelRequest(TeaModel):
    def __init__(self, client_token=None, configuration_item_change_notification=None,
                 configuration_snapshot=None, delivery_channel_assume_role_arn=None, delivery_channel_condition=None,
                 delivery_channel_name=None, delivery_channel_target_arn=None, delivery_channel_type=None, description=None,
                 non_compliant_notification=None, oversized_data_osstarget_arn=None):
        # The client token that is used to ensure the idempotency of the request. You can use the client to generate the token, but you must ensure that the token is unique among different requests.
        # 
        # The `token` can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](~~25693~~).
        self.client_token = client_token  # type: str
        # Specifies whether to deliver resource change logs to the specified destination. If you set this parameter to true, Cloud Config delivers resource change logs to OSS, Log Service, or MNS when the configurations of the resources change. Valid values:
        # 
        # *   true
        # *   false (default)
        # 
        # > This parameter is available for delivery channels of the OSS, SLS, and MNS types.
        self.configuration_item_change_notification = configuration_item_change_notification  # type: bool
        # Specifies whether to deliver scheduled resource snapshots to the OSS bucket. If the value of this parameter is true, the scheduled resource snapshots are delivered to the specified OSS bucket at 00:00:00 and 12:00:00 on a daily basis. Valid values:
        # 
        # *   true
        # *   false (default)
        # 
        # > This parameter is applicable only to delivery channels of the OSS type.
        self.configuration_snapshot = configuration_snapshot  # type: bool
        # The ARN of the role that you want to assign to the delivery channel. Specify the ARN in the following format: `acs:ram::{accountId}:role/aliyunserviceroleforconfig`.
        self.delivery_channel_assume_role_arn = delivery_channel_assume_role_arn  # type: str
        # The rule that you want to attach to the delivery channel. This parameter is available only for delivery channels of the MNS type.
        # 
        # This parameter specifies the lowest risk level and the resource types for the events to which you want to subscribe.
        # 
        # *   The setting of the lowest risk level for the events to which you want to subscribe is in the following format: `{"filterType":"RuleRiskLevel","value":"1","multiple":false}`.
        # 
        #     The `value` field indicates the lowest risk level of the events to which you want to subscribe. Valid values: 1, 2, and 3. The value 1 indicates the high risk level, the value 2 indicates the medium risk level, and the value 3 indicates the low risk level.
        # 
        # *   The setting of the resource types of the events to which you want to subscribe is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #     The `values` field indicates the resource types of the events to which you want to subscribe. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        self.delivery_channel_condition = delivery_channel_condition  # type: str
        # The name of the delivery channel.
        # 
        # > If you do not configure this parameter, this parameter is left empty.
        self.delivery_channel_name = delivery_channel_name  # type: str
        # The Alibaba Cloud Resource Name (ARN) of the delivery destination. Valid values:
        # 
        # *   `acs:oss:{RegionId}:{accountId}:{bucketName}` if your delivery destination is an OSS bucket. Example: `acs:oss:cn-shanghai:100931896542****:new-bucket`.
        # *   `acs:mns:{RegionId}:{accountId}:/topics/{topicName}` if your delivery destination is an MNS topic. Example: `acs:mns:cn-shanghai:100931896542****:/topics/topic1`.
        # *   `acs:log:{RegionId}:{accountId}:project/{projectName}/logstore/{logstoreName}` if your delivery destination is a Log Service Logstore. Example: `acs:log:cn-shanghai:100931896542****:project/project1/logstore/logstore1`.
        self.delivery_channel_target_arn = delivery_channel_target_arn  # type: str
        # The type of the delivery channel. Valid values:
        # 
        # *   OSS: Object Storage Service (OSS)
        # *   MNS: Message Service (MNS)
        # *   SLS: Log Service
        self.delivery_channel_type = delivery_channel_type  # type: str
        # The description of the delivery channel.
        self.description = description  # type: str
        # Specifies whether to deliver resource non-compliance events. If you set this parameter to true, Cloud Config delivers resource non-compliance events to Log Service or MNS when resources are considered non-compliant. Valid values:
        # 
        # *   true
        # *   false (default)
        # 
        # > This parameter is available only for delivery channels of the SLS or MNS type.
        self.non_compliant_notification = non_compliant_notification  # type: bool
        # The ARN of the OSS bucket to which you want to transfer the delivery data when the size of the data exceeds the specified upper limit of the delivery channel. Format: `acs:oss:{RegionId}:{accountId}:{bucketName}`.
        # 
        # If you do not configure this parameter, Cloud Config delivers only summary data.
        # 
        # > This parameter is available only for delivery channels of the SLS or MNS type. The maximum storage size of delivery channels of the SLS type is 1 MB, and the maximum storage size of delivery channels of the MNS type is 64 KB.
        self.oversized_data_osstarget_arn = oversized_data_osstarget_arn  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateDeliveryChannelRequest, 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.configuration_item_change_notification is not None:
            result['ConfigurationItemChangeNotification'] = self.configuration_item_change_notification
        if self.configuration_snapshot is not None:
            result['ConfigurationSnapshot'] = self.configuration_snapshot
        if self.delivery_channel_assume_role_arn is not None:
            result['DeliveryChannelAssumeRoleArn'] = self.delivery_channel_assume_role_arn
        if self.delivery_channel_condition is not None:
            result['DeliveryChannelCondition'] = self.delivery_channel_condition
        if self.delivery_channel_name is not None:
            result['DeliveryChannelName'] = self.delivery_channel_name
        if self.delivery_channel_target_arn is not None:
            result['DeliveryChannelTargetArn'] = self.delivery_channel_target_arn
        if self.delivery_channel_type is not None:
            result['DeliveryChannelType'] = self.delivery_channel_type
        if self.description is not None:
            result['Description'] = self.description
        if self.non_compliant_notification is not None:
            result['NonCompliantNotification'] = self.non_compliant_notification
        if self.oversized_data_osstarget_arn is not None:
            result['OversizedDataOSSTargetArn'] = self.oversized_data_osstarget_arn
        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('ConfigurationItemChangeNotification') is not None:
            self.configuration_item_change_notification = m.get('ConfigurationItemChangeNotification')
        if m.get('ConfigurationSnapshot') is not None:
            self.configuration_snapshot = m.get('ConfigurationSnapshot')
        if m.get('DeliveryChannelAssumeRoleArn') is not None:
            self.delivery_channel_assume_role_arn = m.get('DeliveryChannelAssumeRoleArn')
        if m.get('DeliveryChannelCondition') is not None:
            self.delivery_channel_condition = m.get('DeliveryChannelCondition')
        if m.get('DeliveryChannelName') is not None:
            self.delivery_channel_name = m.get('DeliveryChannelName')
        if m.get('DeliveryChannelTargetArn') is not None:
            self.delivery_channel_target_arn = m.get('DeliveryChannelTargetArn')
        if m.get('DeliveryChannelType') is not None:
            self.delivery_channel_type = m.get('DeliveryChannelType')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('NonCompliantNotification') is not None:
            self.non_compliant_notification = m.get('NonCompliantNotification')
        if m.get('OversizedDataOSSTargetArn') is not None:
            self.oversized_data_osstarget_arn = m.get('OversizedDataOSSTargetArn')
        return self


class CreateDeliveryChannelResponseBody(TeaModel):
    def __init__(self, delivery_channel_id=None, request_id=None):
        # The ID of the delivery channel.
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_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('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CreateDeliveryChannelResponse(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: CreateDeliveryChannelResponseBody

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

    def to_map(self):
        _map = super(CreateDeliveryChannelResponse, 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 = CreateDeliveryChannelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class CreateRemediationRequest(TeaModel):
    def __init__(self, client_token=None, config_rule_id=None, invoke_type=None, params=None,
                 remediation_template_id=None, remediation_type=None, source_type=None):
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The `token` can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The rule ID.
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_id = config_rule_id  # type: str
        # The execution mode of the remediation template. Valid values:
        # 
        # *   NON_EXECUTION: The remediation template is not executed.
        # *   AUTO_EXECUTION: The remediation template is automatically executed.
        # *   MANUAL_EXECUTION: The remediation template is manually executed.
        # *   NOT_CONFIG: The execution mode is not specified.
        self.invoke_type = invoke_type  # type: str
        # The configuration of the remediation template.
        # 
        # For more information about how to obtain the remediation template configuration, see the `TemplateDefinition` response parameter provided in [ListRemediationTemplates](~~416781~~).
        self.params = params  # type: str
        # The ID of the remediation template.
        # 
        # *   If you set the `RemediationType` parameter to `OOS`, set this parameter to the identifier of the relevant official remediation template, such as `ACS-OSS-PutBucketAcl`. For more information about how to obtain the remediation template identifier, see [ListRemediationTemplates](~~416781~~).
        # *   If you set the `RemediationType` parameter to `FC`, set this parameter to the Alibaba Cloud Resource Name (ARN) of the relevant Function Compute resource, such as `acs:fc:cn-hangzhou:100931896542****:services/ConfigService.LATEST/functions/test-php`.
        self.remediation_template_id = remediation_template_id  # type: str
        # The type of the remediation template. Valid values:
        # 
        # *   OOS: Operation Orchestration Service (official remediation)
        # *   FC: Function Compute (custom remediation)
        self.remediation_type = remediation_type  # type: str
        # The source of remediation. Valid values:
        # 
        # *   ALIYUN (default): official template.
        # *   CUSTOM: custom template.
        # *   NONE: none.
        self.source_type = source_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(CreateRemediationRequest, 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.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.invoke_type is not None:
            result['InvokeType'] = self.invoke_type
        if self.params is not None:
            result['Params'] = self.params
        if self.remediation_template_id is not None:
            result['RemediationTemplateId'] = self.remediation_template_id
        if self.remediation_type is not None:
            result['RemediationType'] = self.remediation_type
        if self.source_type is not None:
            result['SourceType'] = self.source_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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('InvokeType') is not None:
            self.invoke_type = m.get('InvokeType')
        if m.get('Params') is not None:
            self.params = m.get('Params')
        if m.get('RemediationTemplateId') is not None:
            self.remediation_template_id = m.get('RemediationTemplateId')
        if m.get('RemediationType') is not None:
            self.remediation_type = m.get('RemediationType')
        if m.get('SourceType') is not None:
            self.source_type = m.get('SourceType')
        return self


class CreateRemediationResponseBody(TeaModel):
    def __init__(self, remediation_id=None, request_id=None):
        # The ID of the remediation template.
        self.remediation_id = remediation_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.remediation_id is not None:
            result['RemediationId'] = self.remediation_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('RemediationId') is not None:
            self.remediation_id = m.get('RemediationId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class CreateRemediationResponse(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: CreateRemediationResponseBody

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

    def to_map(self):
        _map = super(CreateRemediationResponse, 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 = CreateRemediationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DeactiveAggregateConfigRulesRequest(TeaModel):
    def __init__(self, aggregator_id=None, config_rule_ids=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The rule ID. Separate multiple rule IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_ids is not None:
            result['ConfigRuleIds'] = self.config_rule_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleIds') is not None:
            self.config_rule_ids = m.get('ConfigRuleIds')
        return self


class DeactiveAggregateConfigRulesResponseBodyOperateRuleResultOperateRuleItemList(TeaModel):
    def __init__(self, config_rule_id=None, error_code=None, success=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The error code returned.
        # 
        # *   If the rule is disabled, no error code is returned.
        # *   If the rule fails to be disabled, an error code is returned. For more information about error codes, see [Error codes](https://error-center.alibabacloud.com/status/product/Config).
        self.error_code = error_code  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true: The request was successful.
        # *   false: The request failed.
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.error_code is not None:
            result['ErrorCode'] = self.error_code
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ErrorCode') is not None:
            self.error_code = m.get('ErrorCode')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DeactiveAggregateConfigRulesResponseBodyOperateRuleResult(TeaModel):
    def __init__(self, operate_rule_item_list=None):
        # The returned result.
        self.operate_rule_item_list = operate_rule_item_list  # type: list[DeactiveAggregateConfigRulesResponseBodyOperateRuleResultOperateRuleItemList]

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

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

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

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


class DeactiveAggregateConfigRulesResponseBody(TeaModel):
    def __init__(self, operate_rule_result=None, request_id=None):
        # The returned result.
        self.operate_rule_result = operate_rule_result  # type: DeactiveAggregateConfigRulesResponseBodyOperateRuleResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.operate_rule_result is not None:
            result['OperateRuleResult'] = self.operate_rule_result.to_map()
        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('OperateRuleResult') is not None:
            temp_model = DeactiveAggregateConfigRulesResponseBodyOperateRuleResult()
            self.operate_rule_result = temp_model.from_map(m['OperateRuleResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DeactiveAggregateConfigRulesResponse(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: DeactiveAggregateConfigRulesResponseBody

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

    def to_map(self):
        _map = super(DeactiveAggregateConfigRulesResponse, 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 = DeactiveAggregateConfigRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DeactiveConfigRulesRequest(TeaModel):
    def __init__(self, config_rule_ids=None):
        # The ID of the rule. Separate multiple rule IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

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

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


class DeactiveConfigRulesResponseBodyOperateRuleResultOperateRuleItemList(TeaModel):
    def __init__(self, config_rule_id=None, error_code=None, success=None):
        # The ID of the rule.
        self.config_rule_id = config_rule_id  # type: str
        # The error code.
        # 
        # *   If the rule is disabled, no error code is returned.
        # 
        # <!---->
        # 
        # *   If the rule fails to be disabled, an error code is returned. For more information about error codes, visit the [API Error Center](https://error-center.alibabacloud.com/status/product/Config).
        self.error_code = error_code  # type: str
        # Indicates whether the operation is successful. Valid values:
        # 
        # *   true: The operation is successful.
        # *   false: The operation fails.
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.error_code is not None:
            result['ErrorCode'] = self.error_code
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ErrorCode') is not None:
            self.error_code = m.get('ErrorCode')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DeactiveConfigRulesResponseBodyOperateRuleResult(TeaModel):
    def __init__(self, operate_rule_item_list=None):
        # The result of the operation to disable the rule.
        self.operate_rule_item_list = operate_rule_item_list  # type: list[DeactiveConfigRulesResponseBodyOperateRuleResultOperateRuleItemList]

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

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

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

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


class DeactiveConfigRulesResponseBody(TeaModel):
    def __init__(self, operate_rule_result=None, request_id=None):
        # The results of the operations to disable the specified rules.
        self.operate_rule_result = operate_rule_result  # type: DeactiveConfigRulesResponseBodyOperateRuleResult
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.operate_rule_result is not None:
            result['OperateRuleResult'] = self.operate_rule_result.to_map()
        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('OperateRuleResult') is not None:
            temp_model = DeactiveConfigRulesResponseBodyOperateRuleResult()
            self.operate_rule_result = temp_model.from_map(m['OperateRuleResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DeactiveConfigRulesResponse(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: DeactiveConfigRulesResponseBody

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

    def to_map(self):
        _map = super(DeactiveConfigRulesResponse, 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 = DeactiveConfigRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DeleteAggregateCompliancePacksRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, compliance_pack_ids=None, delete_rule=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The `token` can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The ID of the compliance package. Separate multiple compliance package IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_ids = compliance_pack_ids  # type: str
        # Specifies whether to delete the rules in the compliance package. Valid values:
        # 
        # *   true: The rules are deleted.
        # *   false (default): The rules are not deleted.
        self.delete_rule = delete_rule  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.compliance_pack_ids is not None:
            result['CompliancePackIds'] = self.compliance_pack_ids
        if self.delete_rule is not None:
            result['DeleteRule'] = self.delete_rule
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('CompliancePackIds') is not None:
            self.compliance_pack_ids = m.get('CompliancePackIds')
        if m.get('DeleteRule') is not None:
            self.delete_rule = m.get('DeleteRule')
        return self


class DeleteAggregateCompliancePacksResponseBodyOperateCompliancePacksResultOperateCompliancePacks(TeaModel):
    def __init__(self, compliance_pack_id=None, error_code=None, success=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The error code returned.
        # 
        # *   If the compliance package is deleted, no error code is returned.
        # *   If the compliance package fails to be deleted, an error code is returned. For more information about error codes, see [Error codes](https://error-center.alibabacloud.com/status/product/Config).
        self.error_code = error_code  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true: The request was successful.
        # *   false: The request failed.
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.error_code is not None:
            result['ErrorCode'] = self.error_code
        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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ErrorCode') is not None:
            self.error_code = m.get('ErrorCode')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DeleteAggregateCompliancePacksResponseBodyOperateCompliancePacksResult(TeaModel):
    def __init__(self, operate_compliance_packs=None):
        # An array that contains the deleted compliance packages.
        self.operate_compliance_packs = operate_compliance_packs  # type: list[DeleteAggregateCompliancePacksResponseBodyOperateCompliancePacksResultOperateCompliancePacks]

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

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

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

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


class DeleteAggregateCompliancePacksResponseBody(TeaModel):
    def __init__(self, operate_compliance_packs_result=None, request_id=None):
        # The results of the delete operations.
        self.operate_compliance_packs_result = operate_compliance_packs_result  # type: DeleteAggregateCompliancePacksResponseBodyOperateCompliancePacksResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.operate_compliance_packs_result is not None:
            result['OperateCompliancePacksResult'] = self.operate_compliance_packs_result.to_map()
        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('OperateCompliancePacksResult') is not None:
            temp_model = DeleteAggregateCompliancePacksResponseBodyOperateCompliancePacksResult()
            self.operate_compliance_packs_result = temp_model.from_map(m['OperateCompliancePacksResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DeleteAggregateCompliancePacksResponse(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: DeleteAggregateCompliancePacksResponseBody

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

    def to_map(self):
        _map = super(DeleteAggregateCompliancePacksResponse, 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 = DeleteAggregateCompliancePacksResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DeleteAggregateConfigDeliveryChannelRequest(TeaModel):
    def __init__(self, aggregator_id=None, delivery_channel_id=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the delivery channel.
        # 
        # For more information about how to obtain the ID of a delivery channel, see [ListAggregateConfigDeliveryChannels](~~429842~~).
        self.delivery_channel_id = delivery_channel_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        return self


class DeleteAggregateConfigDeliveryChannelResponseBody(TeaModel):
    def __init__(self, delivery_channel_id=None, request_id=None):
        # The ID of the delivery channel.
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_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('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DeleteAggregateConfigDeliveryChannelResponse(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: DeleteAggregateConfigDeliveryChannelResponseBody

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

    def to_map(self):
        _map = super(DeleteAggregateConfigDeliveryChannelResponse, 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 = DeleteAggregateConfigDeliveryChannelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DeleteAggregateConfigRulesRequest(TeaModel):
    def __init__(self, aggregator_id=None, config_rule_ids=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The rule ID. Separate multiple rule IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_ids is not None:
            result['ConfigRuleIds'] = self.config_rule_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleIds') is not None:
            self.config_rule_ids = m.get('ConfigRuleIds')
        return self


class DeleteAggregateConfigRulesResponseBodyOperateRuleResultOperateRuleItemList(TeaModel):
    def __init__(self, config_rule_id=None, error_code=None, success=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The error code returned.
        # 
        # *   If the rule is deleted, no error code is returned.
        # *   If the rule fails to be deleted, an error code is returned. For more information about error codes, see [Error codes](https://error-center.alibabacloud.com/status/product/Config).
        self.error_code = error_code  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true: The request was successful.
        # *   false: The request failed.
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.error_code is not None:
            result['ErrorCode'] = self.error_code
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ErrorCode') is not None:
            self.error_code = m.get('ErrorCode')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DeleteAggregateConfigRulesResponseBodyOperateRuleResult(TeaModel):
    def __init__(self, operate_rule_item_list=None):
        # The details of the result.
        self.operate_rule_item_list = operate_rule_item_list  # type: list[DeleteAggregateConfigRulesResponseBodyOperateRuleResultOperateRuleItemList]

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

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

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

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


class DeleteAggregateConfigRulesResponseBody(TeaModel):
    def __init__(self, operate_rule_result=None, request_id=None):
        # The results of the delete operations.
        self.operate_rule_result = operate_rule_result  # type: DeleteAggregateConfigRulesResponseBodyOperateRuleResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.operate_rule_result is not None:
            result['OperateRuleResult'] = self.operate_rule_result.to_map()
        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('OperateRuleResult') is not None:
            temp_model = DeleteAggregateConfigRulesResponseBodyOperateRuleResult()
            self.operate_rule_result = temp_model.from_map(m['OperateRuleResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DeleteAggregateConfigRulesResponse(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: DeleteAggregateConfigRulesResponseBody

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

    def to_map(self):
        _map = super(DeleteAggregateConfigRulesResponse, 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 = DeleteAggregateConfigRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DeleteAggregateRemediationsRequest(TeaModel):
    def __init__(self, aggregator_id=None, remediation_ids=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the remediation template. Separate multiple remediation template IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a remediation template, see [ListAggregateRemediations](~~270036~~).
        self.remediation_ids = remediation_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.remediation_ids is not None:
            result['RemediationIds'] = self.remediation_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('RemediationIds') is not None:
            self.remediation_ids = m.get('RemediationIds')
        return self


class DeleteAggregateRemediationsResponseBodyRemediationDeleteResults(TeaModel):
    def __init__(self, error_message=None, remediation_id=None, success=None):
        # The error code returned.
        # 
        # *   If the remediation template is deleted, no error code is returned.
        # *   If the remediation template fails to be deleted, an error code is returned. For more information about error codes, see [Error codes](https://error-center.alibabacloud.com/status/product/Config).
        self.error_message = error_message  # type: str
        # The ID of the remediation template.
        self.remediation_id = remediation_id  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true: The request was successful.
        # *   false: The request failed.
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.error_message is not None:
            result['ErrorMessage'] = self.error_message
        if self.remediation_id is not None:
            result['RemediationId'] = self.remediation_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('ErrorMessage') is not None:
            self.error_message = m.get('ErrorMessage')
        if m.get('RemediationId') is not None:
            self.remediation_id = m.get('RemediationId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DeleteAggregateRemediationsResponseBody(TeaModel):
    def __init__(self, remediation_delete_results=None, request_id=None):
        # The results of the delete operation.
        self.remediation_delete_results = remediation_delete_results  # type: list[DeleteAggregateRemediationsResponseBodyRemediationDeleteResults]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['RemediationDeleteResults'] = []
        if self.remediation_delete_results is not None:
            for k in self.remediation_delete_results:
                result['RemediationDeleteResults'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.remediation_delete_results = []
        if m.get('RemediationDeleteResults') is not None:
            for k in m.get('RemediationDeleteResults'):
                temp_model = DeleteAggregateRemediationsResponseBodyRemediationDeleteResults()
                self.remediation_delete_results.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DeleteAggregateRemediationsResponse(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: DeleteAggregateRemediationsResponseBody

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

    def to_map(self):
        _map = super(DeleteAggregateRemediationsResponse, 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 = DeleteAggregateRemediationsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DeleteAggregatorsRequest(TeaModel):
    def __init__(self, aggregator_ids=None, client_token=None):
        # The ID of the account group. Separate multiple IDs with commas (,).
        self.aggregator_ids = aggregator_ids  # type: str
        # The client token that you want to use to ensure the idempotency of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_ids is not None:
            result['AggregatorIds'] = self.aggregator_ids
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorIds') is not None:
            self.aggregator_ids = m.get('AggregatorIds')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        return self


class DeleteAggregatorsResponseBodyOperateAggregatorsResultOperateAggregators(TeaModel):
    def __init__(self, aggregator_id=None, error_code=None, success=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The error code returned.
        # 
        # > No error code is returned for the account group if the account group is deleted.
        self.error_code = error_code  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true: The request was successful.
        # *   false: The request failed.
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.error_code is not None:
            result['ErrorCode'] = self.error_code
        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('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ErrorCode') is not None:
            self.error_code = m.get('ErrorCode')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DeleteAggregatorsResponseBodyOperateAggregatorsResult(TeaModel):
    def __init__(self, operate_aggregators=None):
        # The details of the account group.
        self.operate_aggregators = operate_aggregators  # type: list[DeleteAggregatorsResponseBodyOperateAggregatorsResultOperateAggregators]

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

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

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

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


class DeleteAggregatorsResponseBody(TeaModel):
    def __init__(self, operate_aggregators_result=None, request_id=None):
        # The returned result.
        self.operate_aggregators_result = operate_aggregators_result  # type: DeleteAggregatorsResponseBodyOperateAggregatorsResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.operate_aggregators_result is not None:
            result['OperateAggregatorsResult'] = self.operate_aggregators_result.to_map()
        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('OperateAggregatorsResult') is not None:
            temp_model = DeleteAggregatorsResponseBodyOperateAggregatorsResult()
            self.operate_aggregators_result = temp_model.from_map(m['OperateAggregatorsResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DeleteAggregatorsResponse(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: DeleteAggregatorsResponseBody

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

    def to_map(self):
        _map = super(DeleteAggregatorsResponse, 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 = DeleteAggregatorsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DeleteCompliancePacksRequest(TeaModel):
    def __init__(self, client_token=None, compliance_pack_ids=None, delete_rule=None):
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The `token` can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The ID of the compliance package. Separate multiple compliance package IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.compliance_pack_ids = compliance_pack_ids  # type: str
        # Specifies whether to delete the rules in the compliance package. Valid values:
        # 
        # *   true: The rules are deleted.
        # *   false (default): The rules are not deleted.
        self.delete_rule = delete_rule  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(DeleteCompliancePacksRequest, 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.compliance_pack_ids is not None:
            result['CompliancePackIds'] = self.compliance_pack_ids
        if self.delete_rule is not None:
            result['DeleteRule'] = self.delete_rule
        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('CompliancePackIds') is not None:
            self.compliance_pack_ids = m.get('CompliancePackIds')
        if m.get('DeleteRule') is not None:
            self.delete_rule = m.get('DeleteRule')
        return self


class DeleteCompliancePacksResponseBodyOperateCompliancePacksResultOperateCompliancePacks(TeaModel):
    def __init__(self, compliance_pack_id=None, error_code=None, success=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The error code returned.
        # 
        # *   If the compliance package is deleted, no error code is returned.
        # *   If the compliance package fails to be deleted, an error code is returned. For more information about error codes, see [Error codes](https://error-center.alibabacloud.com/status/product/Config).
        self.error_code = error_code  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true: The request was successful.
        # *   false: The request failed.
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.error_code is not None:
            result['ErrorCode'] = self.error_code
        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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ErrorCode') is not None:
            self.error_code = m.get('ErrorCode')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DeleteCompliancePacksResponseBodyOperateCompliancePacksResult(TeaModel):
    def __init__(self, operate_compliance_packs=None):
        # An array that contains compliance packages that are deleted.
        self.operate_compliance_packs = operate_compliance_packs  # type: list[DeleteCompliancePacksResponseBodyOperateCompliancePacksResultOperateCompliancePacks]

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

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

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

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


class DeleteCompliancePacksResponseBody(TeaModel):
    def __init__(self, operate_compliance_packs_result=None, request_id=None):
        # The returned result.
        self.operate_compliance_packs_result = operate_compliance_packs_result  # type: DeleteCompliancePacksResponseBodyOperateCompliancePacksResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.operate_compliance_packs_result is not None:
            result['OperateCompliancePacksResult'] = self.operate_compliance_packs_result.to_map()
        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('OperateCompliancePacksResult') is not None:
            temp_model = DeleteCompliancePacksResponseBodyOperateCompliancePacksResult()
            self.operate_compliance_packs_result = temp_model.from_map(m['OperateCompliancePacksResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DeleteCompliancePacksResponse(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: DeleteCompliancePacksResponseBody

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

    def to_map(self):
        _map = super(DeleteCompliancePacksResponse, 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 = DeleteCompliancePacksResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DeleteConfigDeliveryChannelRequest(TeaModel):
    def __init__(self, delivery_channel_id=None):
        # The ID of the delivery channel.
        # 
        # For more information about how to obtain the ID of a delivery channel, see [DescribeDeliveryChannels](~~429841~~).
        self.delivery_channel_id = delivery_channel_id  # type: str

    def validate(self):
        pass

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

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

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


class DeleteConfigDeliveryChannelResponseBody(TeaModel):
    def __init__(self, delivery_channel_id=None, request_id=None):
        # The ID of the delivery channel.
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_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('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DeleteConfigDeliveryChannelResponse(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: DeleteConfigDeliveryChannelResponseBody

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

    def to_map(self):
        _map = super(DeleteConfigDeliveryChannelResponse, 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 = DeleteConfigDeliveryChannelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DeleteConfigRulesRequest(TeaModel):
    def __init__(self, config_rule_ids=None):
        # The rule IDs. Separate multiple rule IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~609222~~).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

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

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


class DeleteConfigRulesResponseBodyOperateRuleResultOperateRuleItemList(TeaModel):
    def __init__(self, config_rule_id=None, error_code=None, success=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The error code.
        # 
        # *   If the rule is disabled, no error code is returned.
        # *   If the rule fails to be disabled, an error code is returned. For more information about error codes, see [Error codes](https://api.alibabacloud.com/document/Config/2020-09-07/errorCode).
        self.error_code = error_code  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true
        # *   false
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.error_code is not None:
            result['ErrorCode'] = self.error_code
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ErrorCode') is not None:
            self.error_code = m.get('ErrorCode')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DeleteConfigRulesResponseBodyOperateRuleResult(TeaModel):
    def __init__(self, operate_rule_item_list=None):
        # The result of the delete operation.
        self.operate_rule_item_list = operate_rule_item_list  # type: list[DeleteConfigRulesResponseBodyOperateRuleResultOperateRuleItemList]

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

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

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

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


class DeleteConfigRulesResponseBody(TeaModel):
    def __init__(self, operate_rule_result=None, request_id=None):
        # The results of the delete operations.
        self.operate_rule_result = operate_rule_result  # type: DeleteConfigRulesResponseBodyOperateRuleResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.operate_rule_result is not None:
            result['OperateRuleResult'] = self.operate_rule_result.to_map()
        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('OperateRuleResult') is not None:
            temp_model = DeleteConfigRulesResponseBodyOperateRuleResult()
            self.operate_rule_result = temp_model.from_map(m['OperateRuleResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DeleteConfigRulesResponse(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: DeleteConfigRulesResponseBody

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

    def to_map(self):
        _map = super(DeleteConfigRulesResponse, 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 = DeleteConfigRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DeleteRemediationsRequest(TeaModel):
    def __init__(self, remediation_ids=None):
        # The ID of the remediation template. Separate multiple remediation template IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a remediation template, see [ListRemediations](~~270772~~).
        self.remediation_ids = remediation_ids  # type: str

    def validate(self):
        pass

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

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

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


class DeleteRemediationsResponseBodyRemediationDeleteResults(TeaModel):
    def __init__(self, error_message=None, remediation_id=None, success=None):
        # The error code returned.
        # 
        # *   If the remediation template is deleted, no error code is returned.
        # *   If the remediation template fails to be deleted, an error code is returned. For more information about error codes, see [Error codes](https://error-center.alibabacloud.com/status/product/Config).
        self.error_message = error_message  # type: str
        # The ID of the remediation template.
        self.remediation_id = remediation_id  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true: The request was successful.
        # *   false: The request failed.
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.error_message is not None:
            result['ErrorMessage'] = self.error_message
        if self.remediation_id is not None:
            result['RemediationId'] = self.remediation_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('ErrorMessage') is not None:
            self.error_message = m.get('ErrorMessage')
        if m.get('RemediationId') is not None:
            self.remediation_id = m.get('RemediationId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DeleteRemediationsResponseBody(TeaModel):
    def __init__(self, remediation_delete_results=None, request_id=None):
        # The returned result.
        self.remediation_delete_results = remediation_delete_results  # type: list[DeleteRemediationsResponseBodyRemediationDeleteResults]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['RemediationDeleteResults'] = []
        if self.remediation_delete_results is not None:
            for k in self.remediation_delete_results:
                result['RemediationDeleteResults'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.remediation_delete_results = []
        if m.get('RemediationDeleteResults') is not None:
            for k in m.get('RemediationDeleteResults'):
                temp_model = DeleteRemediationsResponseBodyRemediationDeleteResults()
                self.remediation_delete_results.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DeleteRemediationsResponse(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: DeleteRemediationsResponseBody

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

    def to_map(self):
        _map = super(DeleteRemediationsResponse, 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 = DeleteRemediationsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DescribeRemediationRequest(TeaModel):
    def __init__(self, config_rule_id=None, remediation_id=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The ID of the remediation configuration.
        self.remediation_id = remediation_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.remediation_id is not None:
            result['RemediationId'] = self.remediation_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('RemediationId') is not None:
            self.remediation_id = m.get('RemediationId')
        return self


class DescribeRemediationResponseBodyRemediation(TeaModel):
    def __init__(self, account_id=None, config_rule_id=None, invoke_type=None, last_successful_invocation_id=None,
                 last_successful_invocation_time=None, last_successful_invocation_type=None, remediation_id=None, remediation_origin_params=None,
                 remediation_source_type=None, remediation_template_id=None, remediation_type=None):
        # The ID of the Alibaba Cloud account.
        self.account_id = account_id  # type: long
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The execution mode of the remediation template. Valid values:
        # 
        # *   NON_EXECUTION: The remediation template was not executed.
        # *   AUTO_EXECUTION: The remediation template was automatically executed.
        # *   MANUAL_EXECUTION: The remediation template was manually executed.
        # *   NOT_CONFIG: The execution mode was not specified.
        self.invoke_type = invoke_type  # type: str
        # The record ID of the last successful execution of the remediation template.
        self.last_successful_invocation_id = last_successful_invocation_id  # type: str
        # The timestamp of the last successful execution of the remediation template. Unit: milliseconds.
        self.last_successful_invocation_time = last_successful_invocation_time  # type: long
        # The mode of the last successful execution of the remediation template. Valid values:
        # 
        # *   NON_EXECUTION: The remediation template was not executed.
        # *   AUTO_EXECUTION: The remediation template was automatically executed.
        # *   MANUAL_EXECUTION: The remediation template was manually executed.
        # *   NOT_CONFIG: The execution mode was not specified.
        self.last_successful_invocation_type = last_successful_invocation_type  # type: str
        # The ID of the remediation configuration.
        self.remediation_id = remediation_id  # type: str
        # The converted configuration of the remediation template. This parameter is returned only for an OOS remediation template.
        self.remediation_origin_params = remediation_origin_params  # type: str
        # The source of the remediation template. Valid values:
        # 
        # *   ALIYUN: official template
        # *   CUSTOM: custom template
        # *   NONE: none
        self.remediation_source_type = remediation_source_type  # type: str
        # The ID of the remediation template.
        self.remediation_template_id = remediation_template_id  # type: str
        # The type of the remediation template. Valid values:
        # 
        # *   OOS: Operation Orchestration Service (official remediation)
        # *   FC: Function Compute (custom remediation)
        self.remediation_type = remediation_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(DescribeRemediationResponseBodyRemediation, 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.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.invoke_type is not None:
            result['InvokeType'] = self.invoke_type
        if self.last_successful_invocation_id is not None:
            result['LastSuccessfulInvocationId'] = self.last_successful_invocation_id
        if self.last_successful_invocation_time is not None:
            result['LastSuccessfulInvocationTime'] = self.last_successful_invocation_time
        if self.last_successful_invocation_type is not None:
            result['LastSuccessfulInvocationType'] = self.last_successful_invocation_type
        if self.remediation_id is not None:
            result['RemediationId'] = self.remediation_id
        if self.remediation_origin_params is not None:
            result['RemediationOriginParams'] = self.remediation_origin_params
        if self.remediation_source_type is not None:
            result['RemediationSourceType'] = self.remediation_source_type
        if self.remediation_template_id is not None:
            result['RemediationTemplateId'] = self.remediation_template_id
        if self.remediation_type is not None:
            result['RemediationType'] = self.remediation_type
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('InvokeType') is not None:
            self.invoke_type = m.get('InvokeType')
        if m.get('LastSuccessfulInvocationId') is not None:
            self.last_successful_invocation_id = m.get('LastSuccessfulInvocationId')
        if m.get('LastSuccessfulInvocationTime') is not None:
            self.last_successful_invocation_time = m.get('LastSuccessfulInvocationTime')
        if m.get('LastSuccessfulInvocationType') is not None:
            self.last_successful_invocation_type = m.get('LastSuccessfulInvocationType')
        if m.get('RemediationId') is not None:
            self.remediation_id = m.get('RemediationId')
        if m.get('RemediationOriginParams') is not None:
            self.remediation_origin_params = m.get('RemediationOriginParams')
        if m.get('RemediationSourceType') is not None:
            self.remediation_source_type = m.get('RemediationSourceType')
        if m.get('RemediationTemplateId') is not None:
            self.remediation_template_id = m.get('RemediationTemplateId')
        if m.get('RemediationType') is not None:
            self.remediation_type = m.get('RemediationType')
        return self


class DescribeRemediationResponseBody(TeaModel):
    def __init__(self, remediation=None, request_id=None):
        # The details of the remediation configuration.
        self.remediation = remediation  # type: DescribeRemediationResponseBodyRemediation
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.remediation is not None:
            result['Remediation'] = self.remediation.to_map()
        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('Remediation') is not None:
            temp_model = DescribeRemediationResponseBodyRemediation()
            self.remediation = temp_model.from_map(m['Remediation'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DescribeRemediationResponse(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: DescribeRemediationResponseBody

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

    def to_map(self):
        _map = super(DescribeRemediationResponse, 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 = DescribeRemediationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DetachAggregateConfigRuleToCompliancePackRequest(TeaModel):
    def __init__(self, aggregator_id=None, compliance_pack_id=None, config_rule_ids=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The rule IDs. Separate multiple rule IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.config_rule_ids is not None:
            result['ConfigRuleIds'] = self.config_rule_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ConfigRuleIds') is not None:
            self.config_rule_ids = m.get('ConfigRuleIds')
        return self


class DetachAggregateConfigRuleToCompliancePackResponseBodyOperateRuleResultOperateRuleItemList(TeaModel):
    def __init__(self, config_rule_id=None, error_code=None, success=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The error code.
        # 
        # *   This parameter is empty if the rule is removed from the compliance package.
        # *   An error code is returned if the rule fails to be removed from the compliance package. For more information about error codes, see [Error codes](https://error-center.alibabacloud.com/status/product/Config).
        self.error_code = error_code  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true
        # *   false
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.error_code is not None:
            result['ErrorCode'] = self.error_code
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ErrorCode') is not None:
            self.error_code = m.get('ErrorCode')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DetachAggregateConfigRuleToCompliancePackResponseBodyOperateRuleResult(TeaModel):
    def __init__(self, operate_rule_item_list=None):
        # The result of the operation to remove the rule.
        self.operate_rule_item_list = operate_rule_item_list  # type: list[DetachAggregateConfigRuleToCompliancePackResponseBodyOperateRuleResultOperateRuleItemList]

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

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

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

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


class DetachAggregateConfigRuleToCompliancePackResponseBody(TeaModel):
    def __init__(self, operate_rule_result=None, request_id=None):
        # The results of the operations to remove one or more rules.
        self.operate_rule_result = operate_rule_result  # type: DetachAggregateConfigRuleToCompliancePackResponseBodyOperateRuleResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.operate_rule_result is not None:
            result['OperateRuleResult'] = self.operate_rule_result.to_map()
        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('OperateRuleResult') is not None:
            temp_model = DetachAggregateConfigRuleToCompliancePackResponseBodyOperateRuleResult()
            self.operate_rule_result = temp_model.from_map(m['OperateRuleResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DetachAggregateConfigRuleToCompliancePackResponse(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: DetachAggregateConfigRuleToCompliancePackResponseBody

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

    def to_map(self):
        _map = super(DetachAggregateConfigRuleToCompliancePackResponse, 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 = DetachAggregateConfigRuleToCompliancePackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class DetachConfigRuleToCompliancePackRequest(TeaModel):
    def __init__(self, compliance_pack_id=None, config_rule_ids=None):
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The rule ID. Separate multiple rule IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.config_rule_ids is not None:
            result['ConfigRuleIds'] = self.config_rule_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ConfigRuleIds') is not None:
            self.config_rule_ids = m.get('ConfigRuleIds')
        return self


class DetachConfigRuleToCompliancePackResponseBodyOperateRuleResultOperateRuleItemList(TeaModel):
    def __init__(self, config_rule_id=None, error_code=None, success=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The error code returned.
        # 
        # *   This parameter is empty if the rule is removed from the compliance package.
        # *   An error code is returned if the rule fails to be removed from the compliance package. For more information about error codes, see [Error codes](https://error-center.alibabacloud.com/status/product/Config).
        self.error_code = error_code  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true: The request was successful.
        # *   false: The request failed.
        self.success = success  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.error_code is not None:
            result['ErrorCode'] = self.error_code
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ErrorCode') is not None:
            self.error_code = m.get('ErrorCode')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


class DetachConfigRuleToCompliancePackResponseBodyOperateRuleResult(TeaModel):
    def __init__(self, operate_rule_item_list=None):
        # The result of the operation to remove the rule.
        self.operate_rule_item_list = operate_rule_item_list  # type: list[DetachConfigRuleToCompliancePackResponseBodyOperateRuleResultOperateRuleItemList]

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

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

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

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


class DetachConfigRuleToCompliancePackResponseBody(TeaModel):
    def __init__(self, operate_rule_result=None, request_id=None):
        # The results of the operations to remove one or more rules.
        self.operate_rule_result = operate_rule_result  # type: DetachConfigRuleToCompliancePackResponseBodyOperateRuleResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.operate_rule_result is not None:
            result['OperateRuleResult'] = self.operate_rule_result.to_map()
        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('OperateRuleResult') is not None:
            temp_model = DetachConfigRuleToCompliancePackResponseBodyOperateRuleResult()
            self.operate_rule_result = temp_model.from_map(m['OperateRuleResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class DetachConfigRuleToCompliancePackResponse(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: DetachConfigRuleToCompliancePackResponseBody

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

    def to_map(self):
        _map = super(DetachConfigRuleToCompliancePackResponse, 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 = DetachConfigRuleToCompliancePackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class EvaluatePreConfigRulesRequestResourceEvaluateItemsRules(TeaModel):
    def __init__(self, identifier=None, input_parameters=None):
        # The identifier of the evaluation rule.
        # 
        # For more information about how to obtain the identifier of an evaluation rule, see [ListManagedRules](~~467810~~).
        self.identifier = identifier  # type: str
        # The input parameters of the evaluation rule.
        self.input_parameters = input_parameters  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.identifier is not None:
            result['Identifier'] = self.identifier
        if self.input_parameters is not None:
            result['InputParameters'] = self.input_parameters
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Identifier') is not None:
            self.identifier = m.get('Identifier')
        if m.get('InputParameters') is not None:
            self.input_parameters = m.get('InputParameters')
        return self


class EvaluatePreConfigRulesRequestResourceEvaluateItems(TeaModel):
    def __init__(self, resource_logical_id=None, resource_properties=None, resource_type=None, rules=None):
        # The logical ID of the resource.
        self.resource_logical_id = resource_logical_id  # type: str
        # The properties of the resource.
        self.resource_properties = resource_properties  # type: str
        # The type of the resource.
        self.resource_type = resource_type  # type: str
        # The evaluation rules.
        self.rules = rules  # type: list[EvaluatePreConfigRulesRequestResourceEvaluateItemsRules]

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

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

        result = dict()
        if self.resource_logical_id is not None:
            result['ResourceLogicalId'] = self.resource_logical_id
        if self.resource_properties is not None:
            result['ResourceProperties'] = self.resource_properties
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        result['Rules'] = []
        if self.rules is not None:
            for k in self.rules:
                result['Rules'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ResourceLogicalId') is not None:
            self.resource_logical_id = m.get('ResourceLogicalId')
        if m.get('ResourceProperties') is not None:
            self.resource_properties = m.get('ResourceProperties')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        self.rules = []
        if m.get('Rules') is not None:
            for k in m.get('Rules'):
                temp_model = EvaluatePreConfigRulesRequestResourceEvaluateItemsRules()
                self.rules.append(temp_model.from_map(k))
        return self


class EvaluatePreConfigRulesRequest(TeaModel):
    def __init__(self, enable_managed_rules=None, resource_evaluate_items=None):
        # Specifies whether to enable the managed rule. Valid values:
        # 
        # *   true: enables the managed rule.
        # *   false: does not enable the managed rule. This is the default value.
        # 
        # >  After you create an evaluation rule, a managed rule that has the same settings as the evaluation rule is created. After you create a resource, the managed rule can be used to continuously check the compliance of the resource.
        self.enable_managed_rules = enable_managed_rules  # type: bool
        # The resources that you want to evaluate.
        self.resource_evaluate_items = resource_evaluate_items  # type: list[EvaluatePreConfigRulesRequestResourceEvaluateItems]

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

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

        result = dict()
        if self.enable_managed_rules is not None:
            result['EnableManagedRules'] = self.enable_managed_rules
        result['ResourceEvaluateItems'] = []
        if self.resource_evaluate_items is not None:
            for k in self.resource_evaluate_items:
                result['ResourceEvaluateItems'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EnableManagedRules') is not None:
            self.enable_managed_rules = m.get('EnableManagedRules')
        self.resource_evaluate_items = []
        if m.get('ResourceEvaluateItems') is not None:
            for k in m.get('ResourceEvaluateItems'):
                temp_model = EvaluatePreConfigRulesRequestResourceEvaluateItems()
                self.resource_evaluate_items.append(temp_model.from_map(k))
        return self


class EvaluatePreConfigRulesShrinkRequest(TeaModel):
    def __init__(self, enable_managed_rules=None, resource_evaluate_items_shrink=None):
        # Specifies whether to enable the managed rule. Valid values:
        # 
        # *   true: enables the managed rule.
        # *   false: does not enable the managed rule. This is the default value.
        # 
        # >  After you create an evaluation rule, a managed rule that has the same settings as the evaluation rule is created. After you create a resource, the managed rule can be used to continuously check the compliance of the resource.
        self.enable_managed_rules = enable_managed_rules  # type: bool
        # The resources that you want to evaluate.
        self.resource_evaluate_items_shrink = resource_evaluate_items_shrink  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.enable_managed_rules is not None:
            result['EnableManagedRules'] = self.enable_managed_rules
        if self.resource_evaluate_items_shrink is not None:
            result['ResourceEvaluateItems'] = self.resource_evaluate_items_shrink
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EnableManagedRules') is not None:
            self.enable_managed_rules = m.get('EnableManagedRules')
        if m.get('ResourceEvaluateItems') is not None:
            self.resource_evaluate_items_shrink = m.get('ResourceEvaluateItems')
        return self


class EvaluatePreConfigRulesResponseBodyResourceEvaluationsRules(TeaModel):
    def __init__(self, annotation=None, compliance_type=None, help_url=None, identifier=None):
        # The reason why the resource was evaluated as incompliant.
        self.annotation = annotation  # type: str
        # The compliance type of the resource that was evaluated by using the evaluation rule. Valid values:
        # 
        # *   COMPLIANT: The resource was evaluated as compliant.
        # *   NON_COMPLIANT: The resource was evaluated as incompliant.
        # *   NOT_APPLICABLE: The evaluation rule does not apply to the resource.
        self.compliance_type = compliance_type  # type: str
        # The URL of the topic that describes how the managed rule remediates the incompliant configurations.
        self.help_url = help_url  # type: str
        # The identifier of the evaluation rule.
        self.identifier = identifier  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.annotation is not None:
            result['Annotation'] = self.annotation
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.help_url is not None:
            result['HelpUrl'] = self.help_url
        if self.identifier is not None:
            result['Identifier'] = self.identifier
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Annotation') is not None:
            self.annotation = m.get('Annotation')
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('HelpUrl') is not None:
            self.help_url = m.get('HelpUrl')
        if m.get('Identifier') is not None:
            self.identifier = m.get('Identifier')
        return self


class EvaluatePreConfigRulesResponseBodyResourceEvaluations(TeaModel):
    def __init__(self, resource_logical_id=None, resource_type=None, rules=None):
        # The logical ID of the resource.
        # 
        # >  If the ResourceLogicalId request parameter is left empty, the value of the ResourceLogicalId response parameter is generated based on the value of the `ResourceProperties` parameter.
        self.resource_logical_id = resource_logical_id  # type: str
        # The type of the resource.
        self.resource_type = resource_type  # type: str
        # The evaluation rules.
        self.rules = rules  # type: list[EvaluatePreConfigRulesResponseBodyResourceEvaluationsRules]

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

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

        result = dict()
        if self.resource_logical_id is not None:
            result['ResourceLogicalId'] = self.resource_logical_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        result['Rules'] = []
        if self.rules is not None:
            for k in self.rules:
                result['Rules'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ResourceLogicalId') is not None:
            self.resource_logical_id = m.get('ResourceLogicalId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        self.rules = []
        if m.get('Rules') is not None:
            for k in m.get('Rules'):
                temp_model = EvaluatePreConfigRulesResponseBodyResourceEvaluationsRules()
                self.rules.append(temp_model.from_map(k))
        return self


class EvaluatePreConfigRulesResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_evaluations=None):
        # The ID of the request.
        self.request_id = request_id  # type: str
        # The details of the compliance evaluation result.
        self.resource_evaluations = resource_evaluations  # type: list[EvaluatePreConfigRulesResponseBodyResourceEvaluations]

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        result['ResourceEvaluations'] = []
        if self.resource_evaluations is not None:
            for k in self.resource_evaluations:
                result['ResourceEvaluations'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        self.resource_evaluations = []
        if m.get('ResourceEvaluations') is not None:
            for k in m.get('ResourceEvaluations'):
                temp_model = EvaluatePreConfigRulesResponseBodyResourceEvaluations()
                self.resource_evaluations.append(temp_model.from_map(k))
        return self


class EvaluatePreConfigRulesResponse(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: EvaluatePreConfigRulesResponseBody

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

    def to_map(self):
        _map = super(EvaluatePreConfigRulesResponse, 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 = EvaluatePreConfigRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GenerateAggregateCompliancePackReportRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, compliance_pack_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The `token` can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_id = compliance_pack_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        return self


class GenerateAggregateCompliancePackReportResponseBody(TeaModel):
    def __init__(self, compliance_pack_id=None, request_id=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GenerateAggregateCompliancePackReportResponse(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: GenerateAggregateCompliancePackReportResponseBody

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

    def to_map(self):
        _map = super(GenerateAggregateCompliancePackReportResponse, 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 = GenerateAggregateCompliancePackReportResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GenerateAggregateConfigRulesReportRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, config_rule_ids=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The `token` can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The rule ID. Separate multiple rule IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.config_rule_ids is not None:
            result['ConfigRuleIds'] = self.config_rule_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('ConfigRuleIds') is not None:
            self.config_rule_ids = m.get('ConfigRuleIds')
        return self


class GenerateAggregateConfigRulesReportResponseBody(TeaModel):
    def __init__(self, aggregator_id=None, report_id=None, request_id=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the compliance evaluation report.
        self.report_id = report_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.report_id is not None:
            result['ReportId'] = self.report_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('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ReportId') is not None:
            self.report_id = m.get('ReportId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GenerateAggregateConfigRulesReportResponse(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: GenerateAggregateConfigRulesReportResponseBody

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

    def to_map(self):
        _map = super(GenerateAggregateConfigRulesReportResponse, 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 = GenerateAggregateConfigRulesReportResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GenerateAggregateResourceInventoryRequest(TeaModel):
    def __init__(self, account_ids=None, aggregator_id=None, regions=None, resource_types=None):
        # The IDs of member accounts in the account group. Separate multiple member account IDs with commas (,).
        self.account_ids = account_ids  # type: str
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The IDs of the regions to which the resources belong. Separate multiple region IDs with commas (,).
        self.regions = regions  # type: str
        # The resource types. Separate multiple resource types with commas (,).
        self.resource_types = resource_types  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.account_ids is not None:
            result['AccountIds'] = self.account_ids
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.regions is not None:
            result['Regions'] = self.regions
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AccountIds') is not None:
            self.account_ids = m.get('AccountIds')
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('Regions') is not None:
            self.regions = m.get('Regions')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        return self


class GenerateAggregateResourceInventoryResponseBody(TeaModel):
    def __init__(self, request_id=None):
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        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('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GenerateAggregateResourceInventoryResponse(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: GenerateAggregateResourceInventoryResponseBody

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

    def to_map(self):
        _map = super(GenerateAggregateResourceInventoryResponse, 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 = GenerateAggregateResourceInventoryResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GenerateCompliancePackReportRequest(TeaModel):
    def __init__(self, client_token=None, compliance_pack_id=None):
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The `token` can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.compliance_pack_id = compliance_pack_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GenerateCompliancePackReportRequest, 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.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        return self


class GenerateCompliancePackReportResponseBody(TeaModel):
    def __init__(self, compliance_pack_id=None, request_id=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GenerateCompliancePackReportResponse(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: GenerateCompliancePackReportResponseBody

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

    def to_map(self):
        _map = super(GenerateCompliancePackReportResponse, 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 = GenerateCompliancePackReportResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GenerateConfigRulesReportRequest(TeaModel):
    def __init__(self, client_token=None, config_rule_ids=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 make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The ID of the rule. Separate multiple rule IDs with commas (,).
        # 
        # For more information about how to query the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GenerateConfigRulesReportRequest, 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.config_rule_ids is not None:
            result['ConfigRuleIds'] = self.config_rule_ids
        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('ConfigRuleIds') is not None:
            self.config_rule_ids = m.get('ConfigRuleIds')
        return self


class GenerateConfigRulesReportResponseBody(TeaModel):
    def __init__(self, report_id=None, request_id=None):
        # The ID of the compliance evaluation report.
        self.report_id = report_id  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.report_id is not None:
            result['ReportId'] = self.report_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('ReportId') is not None:
            self.report_id = m.get('ReportId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GenerateConfigRulesReportResponse(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: GenerateConfigRulesReportResponseBody

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

    def to_map(self):
        _map = super(GenerateConfigRulesReportResponse, 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 = GenerateConfigRulesReportResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GenerateResourceInventoryRequest(TeaModel):
    def __init__(self, regions=None, resource_types=None):
        # The region IDs of the resources. Separate multiple region IDs with commas (,).
        self.regions = regions  # type: str
        # The resource types. Separate multiple resource types with commas (,).
        self.resource_types = resource_types  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.regions is not None:
            result['Regions'] = self.regions
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Regions') is not None:
            self.regions = m.get('Regions')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        return self


class GenerateResourceInventoryResponseBody(TeaModel):
    def __init__(self, request_id=None):
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        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('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GenerateResourceInventoryResponse(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: GenerateResourceInventoryResponseBody

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

    def to_map(self):
        _map = super(GenerateResourceInventoryResponse, 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 = GenerateResourceInventoryResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAdvancedSearchFileResponseBodyResourceSearch(TeaModel):
    def __init__(self, download_url=None, resource_inventory_generate_time=None, status=None):
        # The download URL of the resource file.
        self.download_url = download_url  # type: str
        # The time when the resource file was generated. The value is a timestamp. Unit: milliseconds.
        self.resource_inventory_generate_time = resource_inventory_generate_time  # type: long
        # The generation status of the resource file. Valid values:
        # 
        # *   CREATING: The resource file is being generated.
        # *   COMPLETE: The resource file is generated.
        self.status = status  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.download_url is not None:
            result['DownloadUrl'] = self.download_url
        if self.resource_inventory_generate_time is not None:
            result['ResourceInventoryGenerateTime'] = self.resource_inventory_generate_time
        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('DownloadUrl') is not None:
            self.download_url = m.get('DownloadUrl')
        if m.get('ResourceInventoryGenerateTime') is not None:
            self.resource_inventory_generate_time = m.get('ResourceInventoryGenerateTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class GetAdvancedSearchFileResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_search=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # The information about the resource file.
        self.resource_search = resource_search  # type: GetAdvancedSearchFileResponseBodyResourceSearch

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.resource_search is not None:
            result['ResourceSearch'] = self.resource_search.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('ResourceSearch') is not None:
            temp_model = GetAdvancedSearchFileResponseBodyResourceSearch()
            self.resource_search = temp_model.from_map(m['ResourceSearch'])
        return self


class GetAdvancedSearchFileResponse(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: GetAdvancedSearchFileResponseBody

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

    def to_map(self):
        _map = super(GetAdvancedSearchFileResponse, 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 = GetAdvancedSearchFileResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateAccountComplianceByPackRequest(TeaModel):
    def __init__(self, aggregator_id=None, compliance_pack_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_id = compliance_pack_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        return self


class GetAggregateAccountComplianceByPackResponseBodyAccountComplianceResultAccountCompliances(TeaModel):
    def __init__(self, account_id=None, account_name=None, compliance_type=None):
        # The ID of the member account in the account group.
        self.account_id = account_id  # type: long
        # The name of the member account in the account group.
        self.account_name = account_name  # type: str
        # The compliance evaluation result. Valid values:
        # 
        # *   COMPLIANT: The resource was evaluated as compliant.
        # *   NON_COMPLIANT: The resource was evaluated as incompliant.
        # *   NOT_APPLICABLE: The rule did not apply to your resource.
        # *   INSUFFICIENT_DATA: No resource data was available.
        self.compliance_type = compliance_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetAggregateAccountComplianceByPackResponseBodyAccountComplianceResultAccountCompliances, 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.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        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('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        return self


class GetAggregateAccountComplianceByPackResponseBodyAccountComplianceResult(TeaModel):
    def __init__(self, account_compliances=None, compliance_pack_id=None, non_compliant_count=None,
                 total_count=None):
        # The compliance evaluation result of member accounts.
        self.account_compliances = account_compliances  # type: list[GetAggregateAccountComplianceByPackResponseBodyAccountComplianceResultAccountCompliances]
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The number of non-compliant member accounts.
        self.non_compliant_count = non_compliant_count  # type: int
        # The total number of member accounts.
        self.total_count = total_count  # type: int

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

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

        result = dict()
        result['AccountCompliances'] = []
        if self.account_compliances is not None:
            for k in self.account_compliances:
                result['AccountCompliances'].append(k.to_map() if k else None)
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.non_compliant_count is not None:
            result['NonCompliantCount'] = self.non_compliant_count
        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.account_compliances = []
        if m.get('AccountCompliances') is not None:
            for k in m.get('AccountCompliances'):
                temp_model = GetAggregateAccountComplianceByPackResponseBodyAccountComplianceResultAccountCompliances()
                self.account_compliances.append(temp_model.from_map(k))
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('NonCompliantCount') is not None:
            self.non_compliant_count = m.get('NonCompliantCount')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class GetAggregateAccountComplianceByPackResponseBody(TeaModel):
    def __init__(self, account_compliance_result=None, request_id=None):
        # The compliance evaluation results of member accounts for which the compliance package takes effect in an account group.
        self.account_compliance_result = account_compliance_result  # type: GetAggregateAccountComplianceByPackResponseBodyAccountComplianceResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.account_compliance_result is not None:
            result['AccountComplianceResult'] = self.account_compliance_result.to_map()
        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('AccountComplianceResult') is not None:
            temp_model = GetAggregateAccountComplianceByPackResponseBodyAccountComplianceResult()
            self.account_compliance_result = temp_model.from_map(m['AccountComplianceResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateAccountComplianceByPackResponse(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: GetAggregateAccountComplianceByPackResponseBody

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

    def to_map(self):
        _map = super(GetAggregateAccountComplianceByPackResponse, 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 = GetAggregateAccountComplianceByPackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateAdvancedSearchFileRequest(TeaModel):
    def __init__(self, aggregator_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str

    def validate(self):
        pass

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

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

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


class GetAggregateAdvancedSearchFileResponseBodyResourceSearch(TeaModel):
    def __init__(self, download_url=None, resource_inventory_generate_time=None, status=None):
        # The download URL of the resource file.
        self.download_url = download_url  # type: str
        # The time when the resource file was generated. The value is a timestamp.
        # 
        # Unit: milliseconds.
        self.resource_inventory_generate_time = resource_inventory_generate_time  # type: long
        # The generation status of the resource file. Valid values:
        # 
        # *   CREATING: The resource file is being generated.
        # *   COMPLETE: The resource file is generated.
        self.status = status  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.download_url is not None:
            result['DownloadUrl'] = self.download_url
        if self.resource_inventory_generate_time is not None:
            result['ResourceInventoryGenerateTime'] = self.resource_inventory_generate_time
        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('DownloadUrl') is not None:
            self.download_url = m.get('DownloadUrl')
        if m.get('ResourceInventoryGenerateTime') is not None:
            self.resource_inventory_generate_time = m.get('ResourceInventoryGenerateTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class GetAggregateAdvancedSearchFileResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_search=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # The information about the resource file.
        self.resource_search = resource_search  # type: GetAggregateAdvancedSearchFileResponseBodyResourceSearch

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.resource_search is not None:
            result['ResourceSearch'] = self.resource_search.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('ResourceSearch') is not None:
            temp_model = GetAggregateAdvancedSearchFileResponseBodyResourceSearch()
            self.resource_search = temp_model.from_map(m['ResourceSearch'])
        return self


class GetAggregateAdvancedSearchFileResponse(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: GetAggregateAdvancedSearchFileResponseBody

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

    def to_map(self):
        _map = super(GetAggregateAdvancedSearchFileResponse, 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 = GetAggregateAdvancedSearchFileResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateCompliancePackRequest(TeaModel):
    def __init__(self, aggregator_id=None, compliance_pack_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_id = compliance_pack_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        return self


class GetAggregateCompliancePackResponseBodyCompliancePackConfigRulesConfigRuleParameters(TeaModel):
    def __init__(self, parameter_name=None, parameter_value=None, required=None):
        # The name of the input parameter.
        self.parameter_name = parameter_name  # type: str
        # The value of the input parameter.
        self.parameter_value = parameter_value  # type: str
        # Indicates whether the input parameter is required. Valid values:
        # 
        # *   true
        # *   false
        self.required = required  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.parameter_name is not None:
            result['ParameterName'] = self.parameter_name
        if self.parameter_value is not None:
            result['ParameterValue'] = self.parameter_value
        if self.required is not None:
            result['Required'] = self.required
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ParameterName') is not None:
            self.parameter_name = m.get('ParameterName')
        if m.get('ParameterValue') is not None:
            self.parameter_value = m.get('ParameterValue')
        if m.get('Required') is not None:
            self.required = m.get('Required')
        return self


class GetAggregateCompliancePackResponseBodyCompliancePackConfigRules(TeaModel):
    def __init__(self, config_rule_id=None, config_rule_name=None, config_rule_parameters=None, description=None,
                 managed_rule_identifier=None, resource_types_scope=None, risk_level=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The rule name.
        self.config_rule_name = config_rule_name  # type: str
        # The input parameters of the rule.
        self.config_rule_parameters = config_rule_parameters  # type: list[GetAggregateCompliancePackResponseBodyCompliancePackConfigRulesConfigRuleParameters]
        # The rule description.
        self.description = description  # type: str
        # The identifier of the managed rule.
        self.managed_rule_identifier = managed_rule_identifier  # type: str
        # The types of the resources evaluated based on the rule. Multiple resource types are separated with commas (,).
        self.resource_types_scope = resource_types_scope  # type: str
        # The risk level of the resources that do not comply with the rule. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int

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

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        result['ConfigRuleParameters'] = []
        if self.config_rule_parameters is not None:
            for k in self.config_rule_parameters:
                result['ConfigRuleParameters'].append(k.to_map() if k else None)
        if self.description is not None:
            result['Description'] = self.description
        if self.managed_rule_identifier is not None:
            result['ManagedRuleIdentifier'] = self.managed_rule_identifier
        if self.resource_types_scope is not None:
            result['ResourceTypesScope'] = self.resource_types_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        self.config_rule_parameters = []
        if m.get('ConfigRuleParameters') is not None:
            for k in m.get('ConfigRuleParameters'):
                temp_model = GetAggregateCompliancePackResponseBodyCompliancePackConfigRulesConfigRuleParameters()
                self.config_rule_parameters.append(temp_model.from_map(k))
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ManagedRuleIdentifier') is not None:
            self.managed_rule_identifier = m.get('ManagedRuleIdentifier')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class GetAggregateCompliancePackResponseBodyCompliancePackScope(TeaModel):
    def __init__(self, exclude_resource_ids_scope=None, region_ids_scope=None, resource_group_ids_scope=None,
                 tag_key_scope=None, tag_value_scope=None):
        # The ID of the resource that is not evaluated by using the compliance package.
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the region whose resources were evaluated by using the compliance package.
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group whose resources are evaluated by using the compliance package.
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The tag key of the resource that is evaluated by using the compliance package.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value of the resource that is evaluated by using the compliance package.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class GetAggregateCompliancePackResponseBodyCompliancePack(TeaModel):
    def __init__(self, account_id=None, aggregator_id=None, compliance_pack_id=None, compliance_pack_name=None,
                 compliance_pack_template_id=None, config_rules=None, create_timestamp=None, description=None, risk_level=None, scope=None,
                 status=None, template_content=None):
        # The ID of the management account to which the compliance package belongs.
        self.account_id = account_id  # type: long
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The name of the compliance package.
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The ID of the compliance package template.
        self.compliance_pack_template_id = compliance_pack_template_id  # type: str
        # The rules in the compliance package.
        self.config_rules = config_rules  # type: list[GetAggregateCompliancePackResponseBodyCompliancePackConfigRules]
        # The timestamp when the compliance package was created. Unit: milliseconds.
        self.create_timestamp = create_timestamp  # type: long
        # The description of the compliance package.
        self.description = description  # type: str
        # The risk level of the resources that are not compliant with the rules in the compliance package. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int
        # The evaluation scope of the compliance package.
        self.scope = scope  # type: GetAggregateCompliancePackResponseBodyCompliancePackScope
        # The status of the compliance package. Valid values:
        # 
        # *   ACTIVE: The compliance package was normal.
        # *   CREATING: The compliance package was being created.
        self.status = status  # type: str
        self.template_content = template_content  # type: str

    def validate(self):
        if self.config_rules:
            for k in self.config_rules:
                if k:
                    k.validate()
        if self.scope:
            self.scope.validate()

    def to_map(self):
        _map = super(GetAggregateCompliancePackResponseBodyCompliancePack, 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.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        if self.compliance_pack_template_id is not None:
            result['CompliancePackTemplateId'] = self.compliance_pack_template_id
        result['ConfigRules'] = []
        if self.config_rules is not None:
            for k in self.config_rules:
                result['ConfigRules'].append(k.to_map() if k else None)
        if self.create_timestamp is not None:
            result['CreateTimestamp'] = self.create_timestamp
        if self.description is not None:
            result['Description'] = self.description
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.scope is not None:
            result['Scope'] = self.scope.to_map()
        if self.status is not None:
            result['Status'] = self.status
        if self.template_content is not None:
            result['TemplateContent'] = self.template_content
        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('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        if m.get('CompliancePackTemplateId') is not None:
            self.compliance_pack_template_id = m.get('CompliancePackTemplateId')
        self.config_rules = []
        if m.get('ConfigRules') is not None:
            for k in m.get('ConfigRules'):
                temp_model = GetAggregateCompliancePackResponseBodyCompliancePackConfigRules()
                self.config_rules.append(temp_model.from_map(k))
        if m.get('CreateTimestamp') is not None:
            self.create_timestamp = m.get('CreateTimestamp')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('Scope') is not None:
            temp_model = GetAggregateCompliancePackResponseBodyCompliancePackScope()
            self.scope = temp_model.from_map(m['Scope'])
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('TemplateContent') is not None:
            self.template_content = m.get('TemplateContent')
        return self


class GetAggregateCompliancePackResponseBody(TeaModel):
    def __init__(self, compliance_pack=None, request_id=None):
        # The details of the compliance package.
        self.compliance_pack = compliance_pack  # type: GetAggregateCompliancePackResponseBodyCompliancePack
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_pack is not None:
            result['CompliancePack'] = self.compliance_pack.to_map()
        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('CompliancePack') is not None:
            temp_model = GetAggregateCompliancePackResponseBodyCompliancePack()
            self.compliance_pack = temp_model.from_map(m['CompliancePack'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateCompliancePackResponse(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: GetAggregateCompliancePackResponseBody

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

    def to_map(self):
        _map = super(GetAggregateCompliancePackResponse, 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 = GetAggregateCompliancePackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateCompliancePackReportRequest(TeaModel):
    def __init__(self, aggregator_id=None, compliance_pack_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_id = compliance_pack_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        return self


class GetAggregateCompliancePackReportResponseBodyCompliancePackReport(TeaModel):
    def __init__(self, account_id=None, compliance_pack_id=None, report_create_timestamp=None, report_status=None,
                 report_url=None):
        # The ID of the management account to which the compliance package belongs.
        self.account_id = account_id  # type: long
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The timestamp when the compliance evaluation report was generated. Unit: milliseconds.
        self.report_create_timestamp = report_create_timestamp  # type: long
        # The status of the compliance evaluation report. Valid values:
        # 
        # *   NONE: The compliance evaluation report is not generated.
        # *   CREATING: The compliance evaluation report is being generated.
        # *   COMPLETE: The compliance evaluation report is generated.
        self.report_status = report_status  # type: str
        # The URL that is used to download the compliance evaluation report.
        self.report_url = report_url  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetAggregateCompliancePackReportResponseBodyCompliancePackReport, 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.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.report_create_timestamp is not None:
            result['ReportCreateTimestamp'] = self.report_create_timestamp
        if self.report_status is not None:
            result['ReportStatus'] = self.report_status
        if self.report_url is not None:
            result['ReportUrl'] = self.report_url
        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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ReportCreateTimestamp') is not None:
            self.report_create_timestamp = m.get('ReportCreateTimestamp')
        if m.get('ReportStatus') is not None:
            self.report_status = m.get('ReportStatus')
        if m.get('ReportUrl') is not None:
            self.report_url = m.get('ReportUrl')
        return self


class GetAggregateCompliancePackReportResponseBody(TeaModel):
    def __init__(self, compliance_pack_report=None, request_id=None):
        # The compliance evaluation report that is generated based on a compliance package.
        self.compliance_pack_report = compliance_pack_report  # type: GetAggregateCompliancePackReportResponseBodyCompliancePackReport
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_pack_report is not None:
            result['CompliancePackReport'] = self.compliance_pack_report.to_map()
        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('CompliancePackReport') is not None:
            temp_model = GetAggregateCompliancePackReportResponseBodyCompliancePackReport()
            self.compliance_pack_report = temp_model.from_map(m['CompliancePackReport'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateCompliancePackReportResponse(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: GetAggregateCompliancePackReportResponseBody

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

    def to_map(self):
        _map = super(GetAggregateCompliancePackReportResponse, 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 = GetAggregateCompliancePackReportResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateComplianceSummaryRequest(TeaModel):
    def __init__(self, aggregator_id=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str

    def validate(self):
        pass

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

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

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


class GetAggregateComplianceSummaryResponseBodyComplianceSummaryComplianceSummaryByConfigRule(TeaModel):
    def __init__(self, compliance_summary_timestamp=None, compliant_count=None, non_compliant_count=None,
                 total_count=None):
        # The time when the compliance statistics were collected. Unit: milliseconds.
        self.compliance_summary_timestamp = compliance_summary_timestamp  # type: long
        # The number of compliant rules.
        self.compliant_count = compliant_count  # type: int
        # The number of non-compliant rules.
        self.non_compliant_count = non_compliant_count  # type: int
        # The total number of rules.
        self.total_count = total_count  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_summary_timestamp is not None:
            result['ComplianceSummaryTimestamp'] = self.compliance_summary_timestamp
        if self.compliant_count is not None:
            result['CompliantCount'] = self.compliant_count
        if self.non_compliant_count is not None:
            result['NonCompliantCount'] = self.non_compliant_count
        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('ComplianceSummaryTimestamp') is not None:
            self.compliance_summary_timestamp = m.get('ComplianceSummaryTimestamp')
        if m.get('CompliantCount') is not None:
            self.compliant_count = m.get('CompliantCount')
        if m.get('NonCompliantCount') is not None:
            self.non_compliant_count = m.get('NonCompliantCount')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class GetAggregateComplianceSummaryResponseBodyComplianceSummaryComplianceSummaryByResource(TeaModel):
    def __init__(self, compliance_summary_timestamp=None, compliant_count=None, non_compliant_count=None,
                 total_count=None):
        # The time when the compliance statistics were collected. Unit: milliseconds.
        self.compliance_summary_timestamp = compliance_summary_timestamp  # type: long
        # The number of compliant resources.
        self.compliant_count = compliant_count  # type: int
        # The number of non-compliant resources.
        self.non_compliant_count = non_compliant_count  # type: int
        # The total number of resources.
        self.total_count = total_count  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_summary_timestamp is not None:
            result['ComplianceSummaryTimestamp'] = self.compliance_summary_timestamp
        if self.compliant_count is not None:
            result['CompliantCount'] = self.compliant_count
        if self.non_compliant_count is not None:
            result['NonCompliantCount'] = self.non_compliant_count
        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('ComplianceSummaryTimestamp') is not None:
            self.compliance_summary_timestamp = m.get('ComplianceSummaryTimestamp')
        if m.get('CompliantCount') is not None:
            self.compliant_count = m.get('CompliantCount')
        if m.get('NonCompliantCount') is not None:
            self.non_compliant_count = m.get('NonCompliantCount')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class GetAggregateComplianceSummaryResponseBodyComplianceSummary(TeaModel):
    def __init__(self, compliance_summary_by_config_rule=None, compliance_summary_by_resource=None):
        # The summary of compliance statistics from the rule dimension.
        self.compliance_summary_by_config_rule = compliance_summary_by_config_rule  # type: GetAggregateComplianceSummaryResponseBodyComplianceSummaryComplianceSummaryByConfigRule
        # The summary of compliance statistics from the resource dimension.
        self.compliance_summary_by_resource = compliance_summary_by_resource  # type: GetAggregateComplianceSummaryResponseBodyComplianceSummaryComplianceSummaryByResource

    def validate(self):
        if self.compliance_summary_by_config_rule:
            self.compliance_summary_by_config_rule.validate()
        if self.compliance_summary_by_resource:
            self.compliance_summary_by_resource.validate()

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

        result = dict()
        if self.compliance_summary_by_config_rule is not None:
            result['ComplianceSummaryByConfigRule'] = self.compliance_summary_by_config_rule.to_map()
        if self.compliance_summary_by_resource is not None:
            result['ComplianceSummaryByResource'] = self.compliance_summary_by_resource.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceSummaryByConfigRule') is not None:
            temp_model = GetAggregateComplianceSummaryResponseBodyComplianceSummaryComplianceSummaryByConfigRule()
            self.compliance_summary_by_config_rule = temp_model.from_map(m['ComplianceSummaryByConfigRule'])
        if m.get('ComplianceSummaryByResource') is not None:
            temp_model = GetAggregateComplianceSummaryResponseBodyComplianceSummaryComplianceSummaryByResource()
            self.compliance_summary_by_resource = temp_model.from_map(m['ComplianceSummaryByResource'])
        return self


class GetAggregateComplianceSummaryResponseBody(TeaModel):
    def __init__(self, compliance_summary=None, request_id=None):
        # The compliance statistics.
        self.compliance_summary = compliance_summary  # type: GetAggregateComplianceSummaryResponseBodyComplianceSummary
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_summary is not None:
            result['ComplianceSummary'] = self.compliance_summary.to_map()
        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('ComplianceSummary') is not None:
            temp_model = GetAggregateComplianceSummaryResponseBodyComplianceSummary()
            self.compliance_summary = temp_model.from_map(m['ComplianceSummary'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateComplianceSummaryResponse(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: GetAggregateComplianceSummaryResponseBody

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

    def to_map(self):
        _map = super(GetAggregateComplianceSummaryResponse, 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 = GetAggregateComplianceSummaryResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateConfigDeliveryChannelRequest(TeaModel):
    def __init__(self, aggregator_id=None, delivery_channel_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the delivery channel.
        # 
        # For more information about how to obtain the ID of a delivery channel, see [ListAggregateConfigDeliveryChannels](~~429842~~).
        self.delivery_channel_id = delivery_channel_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        return self


class GetAggregateConfigDeliveryChannelResponseBodyDeliveryChannel(TeaModel):
    def __init__(self, account_id=None, aggregator_id=None, configuration_item_change_notification=None,
                 configuration_snapshot=None, delivery_channel_assume_role_arn=None, delivery_channel_condition=None,
                 delivery_channel_id=None, delivery_channel_name=None, delivery_channel_target_arn=None, delivery_channel_type=None,
                 delivery_snapshot_time=None, description=None, non_compliant_notification=None, oversized_data_osstarget_arn=None,
                 status=None):
        # The ID of the member in the account group.
        self.account_id = account_id  # type: str
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # Indicates whether the specified destination receives resource change logs. If the value of this parameter is true, Cloud Config delivers the resource change logs to OSS, Log Service, or MNS when the configurations of the resources change. Valid values:
        # 
        # *   true: The specified destination receives resource change logs.
        # *   false: The specified destination does not receive resource change logs.
        self.configuration_item_change_notification = configuration_item_change_notification  # type: bool
        # Indicates whether the specified destination receives scheduled resource snapshots. Cloud Config delivers scheduled resource snapshots at `04:00Z` and `16:00Z` to OSS, MNS, or Log Service every day. The time is displayed in UTC. Valid values:
        # 
        # *   true: The specified destination receives scheduled resource snapshots.
        # *   false: The specified destination does not receive scheduled resource snapshots.
        self.configuration_snapshot = configuration_snapshot  # type: bool
        # The ARN of the role that is assigned to the delivery channel.
        self.delivery_channel_assume_role_arn = delivery_channel_assume_role_arn  # type: str
        # The rule that is attached to the delivery channel. This parameter is available when you deliver data of all types to MNS or deliver snapshots to Log Service.
        # 
        # *   If the value of the DeliveryChannelType parameter is MNS, take note of the following settings of the lowest risk level and resource types of the events to which you subscribed:
        # 
        #     *   The lowest risk level of the events to which you want to subscribe is in the following format: `{"filterType":"RuleRiskLevel","value":"1","multiple":false}`.
        # 
        #         The `value` field indicates the risk level of the events to which you want to subscribe. Valid values: 1, 2, and 3. The value 1 indicates the high risk level, the value 2 indicates the medium risk level, and the value 3 indicates the low risk level.
        # 
        #     *   The setting of the resource types of the events to which you want to subscribe is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #         The `values` field indicates the resource types of the events to which you want to subscribe. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        # 
        # *   If you set the DeliveryChannelType parameter to SLS, the setting of the resource types of the snapshots to which you want to deliver is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #     The `values` field specifies the resource types of the snapshots to which you want to deliver. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        self.delivery_channel_condition = delivery_channel_condition  # type: str
        # The ID of the delivery channel.
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The name of the delivery channel.
        self.delivery_channel_name = delivery_channel_name  # type: str
        # The ARN of the delivery destination.
        # 
        # *   If the value of the DeliveryChannelType parameter is OSS, the value of this parameter is the ARN of the destination OSS bucket.
        # *   If the value of the DeliveryChannelType parameter is MNS, the value of this parameter is the ARN of the destination MNS topic.
        # *   If the value of the DeliveryChannelType parameter is SLS, the value of this parameter is the ARN of the destination Log Service Logstore.
        self.delivery_channel_target_arn = delivery_channel_target_arn  # type: str
        # The type of the delivery channel. Valid values:
        # 
        # *   OSS: Object Storage Service (OSS)
        # *   MNS: Message Service (MNS)
        # *   SLS: Log Service
        self.delivery_channel_type = delivery_channel_type  # type: str
        # The time when Cloud Config delivers scheduled resources snapshots every day.
        # 
        # Format: `HH:mmZ`. This time is displayed in UTC.
        self.delivery_snapshot_time = delivery_snapshot_time  # type: str
        # The description of the delivery channel.
        self.description = description  # type: str
        # Indicates whether the specified destination receives resource non-compliance events. If the value of this parameter is true, Cloud Config delivers resource non-compliance events to Log Service or MNS when resources are evaluated as non-compliant. Valid values:
        # 
        # *   true: The specified destination receives resource non-compliance events.
        # *   false: The specified destination does not receive resource non-compliance events.
        self.non_compliant_notification = non_compliant_notification  # type: bool
        # The ARN of the OSS bucket to which the delivered data is transferred when the size of the data exceeds the specified upper limit of the delivery channel.
        self.oversized_data_osstarget_arn = oversized_data_osstarget_arn  # type: str
        # The status of the delivery channel. Valid values:
        # 
        # *   0: The delivery channel is disabled.
        # *   1: The delivery channel is enabled.
        self.status = status  # type: int

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetAggregateConfigDeliveryChannelResponseBodyDeliveryChannel, 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.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.configuration_item_change_notification is not None:
            result['ConfigurationItemChangeNotification'] = self.configuration_item_change_notification
        if self.configuration_snapshot is not None:
            result['ConfigurationSnapshot'] = self.configuration_snapshot
        if self.delivery_channel_assume_role_arn is not None:
            result['DeliveryChannelAssumeRoleArn'] = self.delivery_channel_assume_role_arn
        if self.delivery_channel_condition is not None:
            result['DeliveryChannelCondition'] = self.delivery_channel_condition
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_id
        if self.delivery_channel_name is not None:
            result['DeliveryChannelName'] = self.delivery_channel_name
        if self.delivery_channel_target_arn is not None:
            result['DeliveryChannelTargetArn'] = self.delivery_channel_target_arn
        if self.delivery_channel_type is not None:
            result['DeliveryChannelType'] = self.delivery_channel_type
        if self.delivery_snapshot_time is not None:
            result['DeliverySnapshotTime'] = self.delivery_snapshot_time
        if self.description is not None:
            result['Description'] = self.description
        if self.non_compliant_notification is not None:
            result['NonCompliantNotification'] = self.non_compliant_notification
        if self.oversized_data_osstarget_arn is not None:
            result['OversizedDataOSSTargetArn'] = self.oversized_data_osstarget_arn
        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('AccountId') is not None:
            self.account_id = m.get('AccountId')
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigurationItemChangeNotification') is not None:
            self.configuration_item_change_notification = m.get('ConfigurationItemChangeNotification')
        if m.get('ConfigurationSnapshot') is not None:
            self.configuration_snapshot = m.get('ConfigurationSnapshot')
        if m.get('DeliveryChannelAssumeRoleArn') is not None:
            self.delivery_channel_assume_role_arn = m.get('DeliveryChannelAssumeRoleArn')
        if m.get('DeliveryChannelCondition') is not None:
            self.delivery_channel_condition = m.get('DeliveryChannelCondition')
        if m.get('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('DeliveryChannelName') is not None:
            self.delivery_channel_name = m.get('DeliveryChannelName')
        if m.get('DeliveryChannelTargetArn') is not None:
            self.delivery_channel_target_arn = m.get('DeliveryChannelTargetArn')
        if m.get('DeliveryChannelType') is not None:
            self.delivery_channel_type = m.get('DeliveryChannelType')
        if m.get('DeliverySnapshotTime') is not None:
            self.delivery_snapshot_time = m.get('DeliverySnapshotTime')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('NonCompliantNotification') is not None:
            self.non_compliant_notification = m.get('NonCompliantNotification')
        if m.get('OversizedDataOSSTargetArn') is not None:
            self.oversized_data_osstarget_arn = m.get('OversizedDataOSSTargetArn')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class GetAggregateConfigDeliveryChannelResponseBody(TeaModel):
    def __init__(self, delivery_channel=None, request_id=None):
        # The information about a delivery channel.
        self.delivery_channel = delivery_channel  # type: GetAggregateConfigDeliveryChannelResponseBodyDeliveryChannel
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.delivery_channel is not None:
            result['DeliveryChannel'] = self.delivery_channel.to_map()
        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('DeliveryChannel') is not None:
            temp_model = GetAggregateConfigDeliveryChannelResponseBodyDeliveryChannel()
            self.delivery_channel = temp_model.from_map(m['DeliveryChannel'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateConfigDeliveryChannelResponse(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: GetAggregateConfigDeliveryChannelResponseBody

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

    def to_map(self):
        _map = super(GetAggregateConfigDeliveryChannelResponse, 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 = GetAggregateConfigDeliveryChannelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateConfigRuleRequest(TeaModel):
    def __init__(self, aggregator_id=None, config_rule_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the rule.
        # 
        # You can call the [ListAggregateConfigRules](~~264148~~) operation to obtain the rule ID.
        self.config_rule_id = config_rule_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        return self


class GetAggregateConfigRuleResponseBodyConfigRuleCompliance(TeaModel):
    def __init__(self, compliance_type=None, count=None):
        # The statistics on the compliance evaluation results by compliance type. Valid values:
        # 
        # *   COMPLIANT: The resources are evaluated as compliant.
        # *   NON_COMPLIANT: The resources are evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to your resources.
        # *   INSUFFICIENT_DATA: No resource data is available.
        self.compliance_type = compliance_type  # type: str
        # The number of evaluated resources.
        self.count = count  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.count is not None:
            result['Count'] = self.count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('Count') is not None:
            self.count = m.get('Count')
        return self


class GetAggregateConfigRuleResponseBodyConfigRuleConfigRuleEvaluationStatus(TeaModel):
    def __init__(self, first_activated_timestamp=None, first_evaluation_started=None, last_error_code=None,
                 last_error_message=None, last_failed_evaluation_timestamp=None, last_failed_invocation_timestamp=None,
                 last_successful_evaluation_timestamp=None, last_successful_invocation_timestamp=None):
        # The timestamp when the rule was first triggered.
        self.first_activated_timestamp = first_activated_timestamp  # type: long
        # Indicates whether resources were evaluated based on the rule. Valid values:
        # 
        # *   true: Resources were evaluated based on the rule.
        # *   false: Resources were not evaluated based on the rule.
        self.first_evaluation_started = first_evaluation_started  # type: bool
        # The error code returned for the last failed compliance evaluation.
        self.last_error_code = last_error_code  # type: str
        # The error message returned for the last failed compliance evaluation.
        self.last_error_message = last_error_message  # type: str
        # The timestamp when the last failed compliance evaluation of the rule ended. Unit: milliseconds.
        self.last_failed_evaluation_timestamp = last_failed_evaluation_timestamp  # type: long
        # The timestamp when the last failed compliance evaluation of the rule started. Unit: milliseconds.
        self.last_failed_invocation_timestamp = last_failed_invocation_timestamp  # type: long
        # The timestamp when the last successful compliance evaluation of the rule ended. Unit: milliseconds.
        self.last_successful_evaluation_timestamp = last_successful_evaluation_timestamp  # type: long
        # The timestamp when the last successful compliance evaluation of the rule started. Unit: milliseconds.
        self.last_successful_invocation_timestamp = last_successful_invocation_timestamp  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.first_activated_timestamp is not None:
            result['FirstActivatedTimestamp'] = self.first_activated_timestamp
        if self.first_evaluation_started is not None:
            result['FirstEvaluationStarted'] = self.first_evaluation_started
        if self.last_error_code is not None:
            result['LastErrorCode'] = self.last_error_code
        if self.last_error_message is not None:
            result['LastErrorMessage'] = self.last_error_message
        if self.last_failed_evaluation_timestamp is not None:
            result['LastFailedEvaluationTimestamp'] = self.last_failed_evaluation_timestamp
        if self.last_failed_invocation_timestamp is not None:
            result['LastFailedInvocationTimestamp'] = self.last_failed_invocation_timestamp
        if self.last_successful_evaluation_timestamp is not None:
            result['LastSuccessfulEvaluationTimestamp'] = self.last_successful_evaluation_timestamp
        if self.last_successful_invocation_timestamp is not None:
            result['LastSuccessfulInvocationTimestamp'] = self.last_successful_invocation_timestamp
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('FirstActivatedTimestamp') is not None:
            self.first_activated_timestamp = m.get('FirstActivatedTimestamp')
        if m.get('FirstEvaluationStarted') is not None:
            self.first_evaluation_started = m.get('FirstEvaluationStarted')
        if m.get('LastErrorCode') is not None:
            self.last_error_code = m.get('LastErrorCode')
        if m.get('LastErrorMessage') is not None:
            self.last_error_message = m.get('LastErrorMessage')
        if m.get('LastFailedEvaluationTimestamp') is not None:
            self.last_failed_evaluation_timestamp = m.get('LastFailedEvaluationTimestamp')
        if m.get('LastFailedInvocationTimestamp') is not None:
            self.last_failed_invocation_timestamp = m.get('LastFailedInvocationTimestamp')
        if m.get('LastSuccessfulEvaluationTimestamp') is not None:
            self.last_successful_evaluation_timestamp = m.get('LastSuccessfulEvaluationTimestamp')
        if m.get('LastSuccessfulInvocationTimestamp') is not None:
            self.last_successful_invocation_timestamp = m.get('LastSuccessfulInvocationTimestamp')
        return self


class GetAggregateConfigRuleResponseBodyConfigRuleCreateBy(TeaModel):
    def __init__(self, aggregator_id=None, aggregator_name=None, compliance_pack_id=None,
                 compliance_pack_name=None, creator_id=None, creator_name=None, creator_type=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The name of the account group.
        self.aggregator_name = aggregator_name  # type: str
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The name of the compliance package.
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The ID of the account that was used to create the rule.
        self.creator_id = creator_id  # type: str
        # The name of the account that was used to create the rule.
        self.creator_name = creator_name  # type: str
        # The type of the entity to which the rule belongs. The value is fixed to `AGGREGATOR`, which indicates an account group.
        self.creator_type = creator_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.aggregator_name is not None:
            result['AggregatorName'] = self.aggregator_name
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        if self.creator_id is not None:
            result['CreatorId'] = self.creator_id
        if self.creator_name is not None:
            result['CreatorName'] = self.creator_name
        if self.creator_type is not None:
            result['CreatorType'] = self.creator_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('AggregatorName') is not None:
            self.aggregator_name = m.get('AggregatorName')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        if m.get('CreatorId') is not None:
            self.creator_id = m.get('CreatorId')
        if m.get('CreatorName') is not None:
            self.creator_name = m.get('CreatorName')
        if m.get('CreatorType') is not None:
            self.creator_type = m.get('CreatorType')
        return self


class GetAggregateConfigRuleResponseBodyConfigRuleManagedRuleSourceDetails(TeaModel):
    def __init__(self, event_source=None, maximum_execution_frequency=None, message_type=None):
        # The event source of the managed rule.
        # 
        # >  Only events related to Cloud Config are supported. The value is fixed to aliyun.config.
        self.event_source = event_source  # type: str
        # The intervals at which the managed rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour.
        # *   Three_Hours: 3 hours.
        # *   Six_Hours: 6 hours.
        # *   Twelve_Hours: 12 hours
        # *   TwentyFour_Hours: 24 hours
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The managed rule is triggered by configuration changes.
        # *   ScheduledNotification: The managed rule is periodically triggered.
        self.message_type = message_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.event_source is not None:
            result['EventSource'] = self.event_source
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.message_type is not None:
            result['MessageType'] = self.message_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EventSource') is not None:
            self.event_source = m.get('EventSource')
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('MessageType') is not None:
            self.message_type = m.get('MessageType')
        return self


class GetAggregateConfigRuleResponseBodyConfigRuleManagedRule(TeaModel):
    def __init__(self, compulsory_input_parameter_details=None, description=None, identifier=None, labels=None,
                 managed_rule_name=None, optional_input_parameter_details=None, source_details=None):
        # The required input parameters of the managed rule.
        self.compulsory_input_parameter_details = compulsory_input_parameter_details  # type: dict[str, any]
        # The description of the managed rule.
        self.description = description  # type: str
        # The identifier of the managed rule.
        self.identifier = identifier  # type: str
        # The tags of the managed rule.
        self.labels = labels  # type: list[str]
        # The name of the managed rule.
        self.managed_rule_name = managed_rule_name  # type: str
        # The optional input parameters of the managed rule.
        self.optional_input_parameter_details = optional_input_parameter_details  # type: dict[str, any]
        # The details of the source of the managed rule.
        self.source_details = source_details  # type: list[GetAggregateConfigRuleResponseBodyConfigRuleManagedRuleSourceDetails]

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

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

        result = dict()
        if self.compulsory_input_parameter_details is not None:
            result['CompulsoryInputParameterDetails'] = self.compulsory_input_parameter_details
        if self.description is not None:
            result['Description'] = self.description
        if self.identifier is not None:
            result['Identifier'] = self.identifier
        if self.labels is not None:
            result['Labels'] = self.labels
        if self.managed_rule_name is not None:
            result['ManagedRuleName'] = self.managed_rule_name
        if self.optional_input_parameter_details is not None:
            result['OptionalInputParameterDetails'] = self.optional_input_parameter_details
        result['SourceDetails'] = []
        if self.source_details is not None:
            for k in self.source_details:
                result['SourceDetails'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompulsoryInputParameterDetails') is not None:
            self.compulsory_input_parameter_details = m.get('CompulsoryInputParameterDetails')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('Identifier') is not None:
            self.identifier = m.get('Identifier')
        if m.get('Labels') is not None:
            self.labels = m.get('Labels')
        if m.get('ManagedRuleName') is not None:
            self.managed_rule_name = m.get('ManagedRuleName')
        if m.get('OptionalInputParameterDetails') is not None:
            self.optional_input_parameter_details = m.get('OptionalInputParameterDetails')
        self.source_details = []
        if m.get('SourceDetails') is not None:
            for k in m.get('SourceDetails'):
                temp_model = GetAggregateConfigRuleResponseBodyConfigRuleManagedRuleSourceDetails()
                self.source_details.append(temp_model.from_map(k))
        return self


class GetAggregateConfigRuleResponseBodyConfigRuleSourceSourceDetails(TeaModel):
    def __init__(self, event_source=None, maximum_execution_frequency=None, message_type=None):
        # The event source of the managed rule.
        # 
        # >  Only events related to Cloud Config are supported. The value is fixed to aliyun.config.
        self.event_source = event_source  # type: str
        # The intervals at which the managed rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour.
        # *   Three_Hours: 3 hours.
        # *   Six_Hours: 6 hours.
        # *   Twelve_Hours: 12 hours
        # *   TwentyFour_Hours: 24 hours
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The managed rule is triggered by configuration changes.
        # *   ScheduledNotification: The managed rule is periodically triggered.
        self.message_type = message_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.event_source is not None:
            result['EventSource'] = self.event_source
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.message_type is not None:
            result['MessageType'] = self.message_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EventSource') is not None:
            self.event_source = m.get('EventSource')
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('MessageType') is not None:
            self.message_type = m.get('MessageType')
        return self


class GetAggregateConfigRuleResponseBodyConfigRuleSource(TeaModel):
    def __init__(self, identifier=None, owner=None, source_details=None):
        # The identifier of the rule.
        # 
        # *   If the rule was created based on a managed rule, the value of this parameter is the name of the managed rule.
        # *   If the rule is a custom rule, the value of this parameter is the Alibaba Cloud Resource Name (ARN) of the relevant function in Function Compute.
        self.identifier = identifier  # type: str
        # The way in which the rule was created. Valid values:
        # 
        # *   CUSTOM_FC: The rule is a custom rule.
        # *   ALIYUN: The rule was created based on a managed rule of Alibaba Cloud.
        self.owner = owner  # type: str
        # The details of the source of the rule.
        self.source_details = source_details  # type: list[GetAggregateConfigRuleResponseBodyConfigRuleSourceSourceDetails]

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

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

        result = dict()
        if self.identifier is not None:
            result['Identifier'] = self.identifier
        if self.owner is not None:
            result['Owner'] = self.owner
        result['SourceDetails'] = []
        if self.source_details is not None:
            for k in self.source_details:
                result['SourceDetails'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Identifier') is not None:
            self.identifier = m.get('Identifier')
        if m.get('Owner') is not None:
            self.owner = m.get('Owner')
        self.source_details = []
        if m.get('SourceDetails') is not None:
            for k in m.get('SourceDetails'):
                temp_model = GetAggregateConfigRuleResponseBodyConfigRuleSourceSourceDetails()
                self.source_details.append(temp_model.from_map(k))
        return self


class GetAggregateConfigRuleResponseBodyConfigRule(TeaModel):
    def __init__(self, account_id=None, compliance=None, config_rule_arn=None, config_rule_evaluation_status=None,
                 config_rule_id=None, config_rule_name=None, config_rule_state=None, config_rule_trigger_types=None,
                 create_by=None, create_timestamp=None, description=None, exclude_account_ids_scope=None,
                 exclude_folder_ids_scope=None, exclude_resource_ids_scope=None, folder_ids_scope=None, input_parameters=None,
                 managed_rule=None, maximum_execution_frequency=None, modified_timestamp=None, region_ids_scope=None,
                 resource_group_ids_scope=None, resource_types_scope=None, risk_level=None, source=None, tag_key_logic_scope=None,
                 tag_key_scope=None, tag_value_scope=None):
        # The ID of the Alibaba Cloud account to which the rule belongs.
        self.account_id = account_id  # type: long
        # The details of compliance evaluation results.
        self.compliance = compliance  # type: GetAggregateConfigRuleResponseBodyConfigRuleCompliance
        # The ARN of the managed rule.
        self.config_rule_arn = config_rule_arn  # type: str
        # The information about compliance evaluations performed by the rule.
        self.config_rule_evaluation_status = config_rule_evaluation_status  # type: GetAggregateConfigRuleResponseBodyConfigRuleConfigRuleEvaluationStatus
        # The ID of the rule.
        self.config_rule_id = config_rule_id  # type: str
        # The name of the monitoring rule.
        self.config_rule_name = config_rule_name  # type: str
        # The status of the rule. Valid values:
        # 
        # *   ACTIVE: The rule is being used to monitor resource configurations.
        # *   DELETING: The rule is being deleted.
        # *   EVALUATING: The rule is triggered and is being used to monitor resource configurations.
        # *   INACTIVE: The rule is disabled and is no longer used to monitor resource configurations.
        self.config_rule_state = config_rule_state  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The managed rule is triggered by configuration changes.
        # *   ScheduledNotification: The managed rule is periodically triggered.
        self.config_rule_trigger_types = config_rule_trigger_types  # type: str
        # The information about the creation of the rule.
        self.create_by = create_by  # type: GetAggregateConfigRuleResponseBodyConfigRuleCreateBy
        # The timestamp when the rule was created. Unit: milliseconds.
        self.create_timestamp = create_timestamp  # type: long
        # The description of the managed rule.
        self.description = description  # type: str
        # The ID of the member account to which the rule does not apply, which means that the resources within the member account are not evaluated based on the rule.
        # 
        # >  This parameter applies only to a managed rule.
        self.exclude_account_ids_scope = exclude_account_ids_scope  # type: str
        # The ID of the resource directory to which the rule does not apply, which means that the resources within member accounts in the resource directory are not evaluated based on the rule.
        # 
        # > 
        # *   This parameter applies only to a rule of a global account group.
        # *   This parameter applies only to a managed rule.
        self.exclude_folder_ids_scope = exclude_folder_ids_scope  # type: str
        # The ID of the resource excluded from the compliance evaluations performed by the rule.
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the resource directory to which the rule applies, which means that the resources within member accounts in the resource directory are evaluated based on the rule.
        # 
        # > 
        # *   This parameter applies only to rules of a global account group.
        # *   This parameter applies only to managed rules.
        self.folder_ids_scope = folder_ids_scope  # type: str
        # The input parameters of the rule.
        self.input_parameters = input_parameters  # type: dict[str, any]
        # The details of the managed rule.
        self.managed_rule = managed_rule  # type: GetAggregateConfigRuleResponseBodyConfigRuleManagedRule
        # The intervals at which the managed rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour.
        # *   Three_Hours: 3 hours.
        # *   Six_Hours: 6 hours.
        # *   Twelve_Hours: 12 hours
        # *   TwentyFour_Hours: 24 hours
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The timestamp when the rule was last updated. Unit: milliseconds.
        self.modified_timestamp = modified_timestamp  # type: long
        # The ID of the region to which the rule applies.
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group to which the rule applies.
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The type of the resource evaluated by the rule.
        self.resource_types_scope = resource_types_scope  # type: str
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int
        # The information about how the rule was created.
        self.source = source  # type: GetAggregateConfigRuleResponseBodyConfigRuleSource
        # The logical relationship among the tag keys if you specify multiple tag keys by using the `TagKeyScope` parameter. For example, if the `TagKeyScope` parameter is set to `ECS,OSS` and the TagKeyLogicScope parameter is set to `AND`, the rule applies to resources with both the `ECS` and `OSS` tag keys. Valid values:
        # 
        # *   AND: the logical relationship of AND
        # *   OR: the logical relationship of OR
        self.tag_key_logic_scope = tag_key_logic_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with the specified tag key.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value used to filter resources. The rule applies only to the resources with the specified tag value.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        if self.compliance:
            self.compliance.validate()
        if self.config_rule_evaluation_status:
            self.config_rule_evaluation_status.validate()
        if self.create_by:
            self.create_by.validate()
        if self.managed_rule:
            self.managed_rule.validate()
        if self.source:
            self.source.validate()

    def to_map(self):
        _map = super(GetAggregateConfigRuleResponseBodyConfigRule, 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.compliance is not None:
            result['Compliance'] = self.compliance.to_map()
        if self.config_rule_arn is not None:
            result['ConfigRuleArn'] = self.config_rule_arn
        if self.config_rule_evaluation_status is not None:
            result['ConfigRuleEvaluationStatus'] = self.config_rule_evaluation_status.to_map()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_state is not None:
            result['ConfigRuleState'] = self.config_rule_state
        if self.config_rule_trigger_types is not None:
            result['ConfigRuleTriggerTypes'] = self.config_rule_trigger_types
        if self.create_by is not None:
            result['CreateBy'] = self.create_by.to_map()
        if self.create_timestamp is not None:
            result['CreateTimestamp'] = self.create_timestamp
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_account_ids_scope is not None:
            result['ExcludeAccountIdsScope'] = self.exclude_account_ids_scope
        if self.exclude_folder_ids_scope is not None:
            result['ExcludeFolderIdsScope'] = self.exclude_folder_ids_scope
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.folder_ids_scope is not None:
            result['FolderIdsScope'] = self.folder_ids_scope
        if self.input_parameters is not None:
            result['InputParameters'] = self.input_parameters
        if self.managed_rule is not None:
            result['ManagedRule'] = self.managed_rule.to_map()
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.modified_timestamp is not None:
            result['ModifiedTimestamp'] = self.modified_timestamp
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.resource_types_scope is not None:
            result['ResourceTypesScope'] = self.resource_types_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.source is not None:
            result['Source'] = self.source.to_map()
        if self.tag_key_logic_scope is not None:
            result['TagKeyLogicScope'] = self.tag_key_logic_scope
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        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('Compliance') is not None:
            temp_model = GetAggregateConfigRuleResponseBodyConfigRuleCompliance()
            self.compliance = temp_model.from_map(m['Compliance'])
        if m.get('ConfigRuleArn') is not None:
            self.config_rule_arn = m.get('ConfigRuleArn')
        if m.get('ConfigRuleEvaluationStatus') is not None:
            temp_model = GetAggregateConfigRuleResponseBodyConfigRuleConfigRuleEvaluationStatus()
            self.config_rule_evaluation_status = temp_model.from_map(m['ConfigRuleEvaluationStatus'])
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleState') is not None:
            self.config_rule_state = m.get('ConfigRuleState')
        if m.get('ConfigRuleTriggerTypes') is not None:
            self.config_rule_trigger_types = m.get('ConfigRuleTriggerTypes')
        if m.get('CreateBy') is not None:
            temp_model = GetAggregateConfigRuleResponseBodyConfigRuleCreateBy()
            self.create_by = temp_model.from_map(m['CreateBy'])
        if m.get('CreateTimestamp') is not None:
            self.create_timestamp = m.get('CreateTimestamp')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeAccountIdsScope') is not None:
            self.exclude_account_ids_scope = m.get('ExcludeAccountIdsScope')
        if m.get('ExcludeFolderIdsScope') is not None:
            self.exclude_folder_ids_scope = m.get('ExcludeFolderIdsScope')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('FolderIdsScope') is not None:
            self.folder_ids_scope = m.get('FolderIdsScope')
        if m.get('InputParameters') is not None:
            self.input_parameters = m.get('InputParameters')
        if m.get('ManagedRule') is not None:
            temp_model = GetAggregateConfigRuleResponseBodyConfigRuleManagedRule()
            self.managed_rule = temp_model.from_map(m['ManagedRule'])
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('ModifiedTimestamp') is not None:
            self.modified_timestamp = m.get('ModifiedTimestamp')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('Source') is not None:
            temp_model = GetAggregateConfigRuleResponseBodyConfigRuleSource()
            self.source = temp_model.from_map(m['Source'])
        if m.get('TagKeyLogicScope') is not None:
            self.tag_key_logic_scope = m.get('TagKeyLogicScope')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class GetAggregateConfigRuleResponseBody(TeaModel):
    def __init__(self, config_rule=None, request_id=None):
        # The details of the rule.
        self.config_rule = config_rule  # type: GetAggregateConfigRuleResponseBodyConfigRule
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.config_rule is not None:
            result['ConfigRule'] = self.config_rule.to_map()
        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('ConfigRule') is not None:
            temp_model = GetAggregateConfigRuleResponseBodyConfigRule()
            self.config_rule = temp_model.from_map(m['ConfigRule'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateConfigRuleResponse(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: GetAggregateConfigRuleResponseBody

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

    def to_map(self):
        _map = super(GetAggregateConfigRuleResponse, 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 = GetAggregateConfigRuleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateConfigRuleComplianceByPackRequest(TeaModel):
    def __init__(self, aggregator_id=None, compliance_pack_id=None):
        # The ID of the account group.
        # 
        # For information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the compliance package.
        # 
        # For information about how to obtain the ID of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_id = compliance_pack_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        return self


class GetAggregateConfigRuleComplianceByPackResponseBodyConfigRuleComplianceResultConfigRuleCompliances(TeaModel):
    def __init__(self, compliance_type=None, config_rule_id=None, config_rule_name=None):
        # The compliance evaluation result returned by the rule. Valid values:
        # 
        # *   COMPLIANT: The relevant resources are evaluated as compliant.
        # *   NON_COMPLIANT: The relevant resources are evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to your resources.
        # *   INSUFFICIENT_DATA: No resource data is available.
        self.compliance_type = compliance_type  # type: str
        # The ID of the rule.
        self.config_rule_id = config_rule_id  # type: str
        # The name of the rule.
        self.config_rule_name = config_rule_name  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        return self


class GetAggregateConfigRuleComplianceByPackResponseBodyConfigRuleComplianceResult(TeaModel):
    def __init__(self, compliance_pack_id=None, config_rule_compliances=None, non_compliant_count=None,
                 total_count=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The information about rules in the compliance package.
        self.config_rule_compliances = config_rule_compliances  # type: list[GetAggregateConfigRuleComplianceByPackResponseBodyConfigRuleComplianceResultConfigRuleCompliances]
        # The number of rules against which specific resources are evaluated as non-compliant.
        self.non_compliant_count = non_compliant_count  # type: int
        # The total number of rules in the compliance package.
        self.total_count = total_count  # type: int

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

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        result['ConfigRuleCompliances'] = []
        if self.config_rule_compliances is not None:
            for k in self.config_rule_compliances:
                result['ConfigRuleCompliances'].append(k.to_map() if k else None)
        if self.non_compliant_count is not None:
            result['NonCompliantCount'] = self.non_compliant_count
        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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        self.config_rule_compliances = []
        if m.get('ConfigRuleCompliances') is not None:
            for k in m.get('ConfigRuleCompliances'):
                temp_model = GetAggregateConfigRuleComplianceByPackResponseBodyConfigRuleComplianceResultConfigRuleCompliances()
                self.config_rule_compliances.append(temp_model.from_map(k))
        if m.get('NonCompliantCount') is not None:
            self.non_compliant_count = m.get('NonCompliantCount')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class GetAggregateConfigRuleComplianceByPackResponseBody(TeaModel):
    def __init__(self, config_rule_compliance_result=None, request_id=None):
        # The compliance evaluation results that are returned by rules in the compliance package.
        self.config_rule_compliance_result = config_rule_compliance_result  # type: GetAggregateConfigRuleComplianceByPackResponseBodyConfigRuleComplianceResult
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.config_rule_compliance_result is not None:
            result['ConfigRuleComplianceResult'] = self.config_rule_compliance_result.to_map()
        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('ConfigRuleComplianceResult') is not None:
            temp_model = GetAggregateConfigRuleComplianceByPackResponseBodyConfigRuleComplianceResult()
            self.config_rule_compliance_result = temp_model.from_map(m['ConfigRuleComplianceResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateConfigRuleComplianceByPackResponse(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: GetAggregateConfigRuleComplianceByPackResponseBody

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

    def to_map(self):
        _map = super(GetAggregateConfigRuleComplianceByPackResponse, 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 = GetAggregateConfigRuleComplianceByPackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateConfigRuleSummaryByRiskLevelRequest(TeaModel):
    def __init__(self, aggregator_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str

    def validate(self):
        pass

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

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

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


class GetAggregateConfigRuleSummaryByRiskLevelResponseBodyConfigRuleSummaries(TeaModel):
    def __init__(self, compliant_count=None, non_compliant_count=None, risk_level=None):
        # The number of rules against which specific resources are evaluated as compliant.
        self.compliant_count = compliant_count  # type: int
        # The number of rules against which specific resources are evaluated as non-compliant.
        self.non_compliant_count = non_compliant_count  # type: int
        # The risk level of the resources that do not comply with the rule. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.compliant_count is not None:
            result['CompliantCount'] = self.compliant_count
        if self.non_compliant_count is not None:
            result['NonCompliantCount'] = self.non_compliant_count
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompliantCount') is not None:
            self.compliant_count = m.get('CompliantCount')
        if m.get('NonCompliantCount') is not None:
            self.non_compliant_count = m.get('NonCompliantCount')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class GetAggregateConfigRuleSummaryByRiskLevelResponseBody(TeaModel):
    def __init__(self, config_rule_summaries=None, request_id=None):
        # The summary of compliance evaluation results by rule risk level.
        self.config_rule_summaries = config_rule_summaries  # type: list[GetAggregateConfigRuleSummaryByRiskLevelResponseBodyConfigRuleSummaries]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['ConfigRuleSummaries'] = []
        if self.config_rule_summaries is not None:
            for k in self.config_rule_summaries:
                result['ConfigRuleSummaries'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.config_rule_summaries = []
        if m.get('ConfigRuleSummaries') is not None:
            for k in m.get('ConfigRuleSummaries'):
                temp_model = GetAggregateConfigRuleSummaryByRiskLevelResponseBodyConfigRuleSummaries()
                self.config_rule_summaries.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateConfigRuleSummaryByRiskLevelResponse(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: GetAggregateConfigRuleSummaryByRiskLevelResponseBody

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

    def to_map(self):
        _map = super(GetAggregateConfigRuleSummaryByRiskLevelResponse, 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 = GetAggregateConfigRuleSummaryByRiskLevelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateConfigRulesReportRequest(TeaModel):
    def __init__(self, aggregator_id=None, report_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the compliance evaluation report.
        self.report_id = report_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.report_id is not None:
            result['ReportId'] = self.report_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ReportId') is not None:
            self.report_id = m.get('ReportId')
        return self


class GetAggregateConfigRulesReportResponseBodyConfigRulesReport(TeaModel):
    def __init__(self, account_id=None, aggregator_id=None, report_create_timestamp=None, report_id=None,
                 report_status=None, report_url=None):
        # The ID of the management account to which the rules belong.
        self.account_id = account_id  # type: long
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The timestamp when the compliance evaluation report was generated. Unit: milliseconds.
        self.report_create_timestamp = report_create_timestamp  # type: long
        # The ID of the compliance evaluation report.
        self.report_id = report_id  # type: str
        # The status of the compliance evaluation report. Valid values:
        # 
        # *   NONE: The compliance evaluation report was not generated.
        # *   CREATING: The compliance evaluation report was being generated.
        # *   COMPLETE: The compliance evaluation report was generated.
        self.report_status = report_status  # type: str
        # The URL that is used to download the compliance evaluation report.
        self.report_url = report_url  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetAggregateConfigRulesReportResponseBodyConfigRulesReport, 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.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.report_create_timestamp is not None:
            result['ReportCreateTimestamp'] = self.report_create_timestamp
        if self.report_id is not None:
            result['ReportId'] = self.report_id
        if self.report_status is not None:
            result['ReportStatus'] = self.report_status
        if self.report_url is not None:
            result['ReportUrl'] = self.report_url
        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('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ReportCreateTimestamp') is not None:
            self.report_create_timestamp = m.get('ReportCreateTimestamp')
        if m.get('ReportId') is not None:
            self.report_id = m.get('ReportId')
        if m.get('ReportStatus') is not None:
            self.report_status = m.get('ReportStatus')
        if m.get('ReportUrl') is not None:
            self.report_url = m.get('ReportUrl')
        return self


class GetAggregateConfigRulesReportResponseBody(TeaModel):
    def __init__(self, config_rules_report=None, request_id=None):
        # The information about the compliance evaluation report.
        self.config_rules_report = config_rules_report  # type: GetAggregateConfigRulesReportResponseBodyConfigRulesReport
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.config_rules_report is not None:
            result['ConfigRulesReport'] = self.config_rules_report.to_map()
        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('ConfigRulesReport') is not None:
            temp_model = GetAggregateConfigRulesReportResponseBodyConfigRulesReport()
            self.config_rules_report = temp_model.from_map(m['ConfigRulesReport'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateConfigRulesReportResponse(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: GetAggregateConfigRulesReportResponseBody

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

    def to_map(self):
        _map = super(GetAggregateConfigRulesReportResponse, 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 = GetAggregateConfigRulesReportResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateDiscoveredResourceRequest(TeaModel):
    def __init__(self, aggregator_id=None, region=None, resource_account_id=None, resource_id=None,
                 resource_owner_id=None, resource_type=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the region in which the resource resides.
        # 
        # For more information about how to query the ID of a region in which the resource resides, see [ListAggregateDiscoveredResources](~~411691~~).
        self.region = region  # type: str
        # The ID of the Alibaba Cloud account to which the resources in the account group belong.
        # > You can use either the `ResourceAccountId` or `ResourceOwnerId` parameter. We recommend that you use the ResourceAccountId parameter.
        self.resource_account_id = resource_account_id  # type: long
        # The resource ID.
        # 
        # For more information about how to query the ID of a resource, see [ListAggregateDiscoveredResources](~~411691~~).
        self.resource_id = resource_id  # type: str
        self.resource_owner_id = resource_owner_id  # type: long
        # The type of the resource.
        # 
        # For more information about how to obtain the type of a resource, see [ListAggregateDiscoveredResources](~~411691~~).
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_owner_id is not None:
            result['ResourceOwnerId'] = self.resource_owner_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceOwnerId') is not None:
            self.resource_owner_id = m.get('ResourceOwnerId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        return self


class GetAggregateDiscoveredResourceResponseBodyDiscoveredResourceDetail(TeaModel):
    def __init__(self, account_id=None, availability_zone=None, configuration=None, region=None,
                 resource_creation_time=None, resource_deleted=None, resource_id=None, resource_name=None, resource_status=None,
                 resource_type=None, tags=None):
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.account_id = account_id  # type: long
        # The ID of the zone where the resource resides.
        self.availability_zone = availability_zone  # type: str
        # The configuration of the resource.
        self.configuration = configuration  # type: str
        # The region ID.
        self.region = region  # type: str
        # The timestamp when the resource was created.
        self.resource_creation_time = resource_creation_time  # type: long
        # Indicates whether the resource was deleted. Valid values:
        # 
        # *   1: The resource was not deleted.
        # *   0: The resource was deleted.
        self.resource_deleted = resource_deleted  # type: int
        # The resource ID.
        self.resource_id = resource_id  # type: str
        # The name of the resource.
        self.resource_name = resource_name  # type: str
        # The status of the resource. The value of this parameter varies based on the resource type and may be empty. Examples:
        # 
        # *   If the value of the ResourceType parameter is ACS::ECS::Instance, the resource is an Elastic Compute Service (ECS) instance that is in a specific state. In this case, the valid values of this parameter are Running and Stopped.
        # *   If the value of the ResourceType parameter is ACS::OSS::Bucket, the resource is an Object Storage Service (OSS) bucket that is not in a specific state. In this case, this parameter is empty.
        self.resource_status = resource_status  # type: str
        # The type of the resource.
        self.resource_type = resource_type  # type: str
        # The tags of the resource.
        self.tags = tags  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetAggregateDiscoveredResourceResponseBodyDiscoveredResourceDetail, 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.availability_zone is not None:
            result['AvailabilityZone'] = self.availability_zone
        if self.configuration is not None:
            result['Configuration'] = self.configuration
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_creation_time is not None:
            result['ResourceCreationTime'] = self.resource_creation_time
        if self.resource_deleted is not None:
            result['ResourceDeleted'] = self.resource_deleted
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_name is not None:
            result['ResourceName'] = self.resource_name
        if self.resource_status is not None:
            result['ResourceStatus'] = self.resource_status
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.tags is not None:
            result['Tags'] = self.tags
        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('AvailabilityZone') is not None:
            self.availability_zone = m.get('AvailabilityZone')
        if m.get('Configuration') is not None:
            self.configuration = m.get('Configuration')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceCreationTime') is not None:
            self.resource_creation_time = m.get('ResourceCreationTime')
        if m.get('ResourceDeleted') is not None:
            self.resource_deleted = m.get('ResourceDeleted')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceName') is not None:
            self.resource_name = m.get('ResourceName')
        if m.get('ResourceStatus') is not None:
            self.resource_status = m.get('ResourceStatus')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('Tags') is not None:
            self.tags = m.get('Tags')
        return self


class GetAggregateDiscoveredResourceResponseBody(TeaModel):
    def __init__(self, discovered_resource_detail=None, request_id=None):
        # The information about the resource.
        self.discovered_resource_detail = discovered_resource_detail  # type: GetAggregateDiscoveredResourceResponseBodyDiscoveredResourceDetail
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.discovered_resource_detail is not None:
            result['DiscoveredResourceDetail'] = self.discovered_resource_detail.to_map()
        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('DiscoveredResourceDetail') is not None:
            temp_model = GetAggregateDiscoveredResourceResponseBodyDiscoveredResourceDetail()
            self.discovered_resource_detail = temp_model.from_map(m['DiscoveredResourceDetail'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateDiscoveredResourceResponse(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: GetAggregateDiscoveredResourceResponseBody

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

    def to_map(self):
        _map = super(GetAggregateDiscoveredResourceResponse, 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 = GetAggregateDiscoveredResourceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateResourceComplianceByConfigRuleRequest(TeaModel):
    def __init__(self, aggregator_id=None, compliance_type=None, config_rule_id=None, resource_account_id=None,
                 resource_owner_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The compliance evaluation result of the resources. Valid values:
        # 
        # *   COMPLIANT: The resource is evaluated as compliant.
        # *   NON_COMPLIANT: The resource is evaluated as incompliant.
        # *   NOT_APPLICABLE: The rule does not apply to your resources.
        # *   INSUFFICIENT_DATA: No resource data is available.
        self.compliance_type = compliance_type  # type: str
        # The ID of the rule.
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_id = config_rule_id  # type: str
        # The ID of the Alibaba Cloud account to which the resources in the account group belong.
        # 
        # > You can use either the ResourceAccountId or ResourceOwnerId parameter. We recommend that you use the ResourceAccountId parameter.
        self.resource_account_id = resource_account_id  # type: long
        self.resource_owner_id = resource_owner_id  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        if self.resource_owner_id is not None:
            result['ResourceOwnerId'] = self.resource_owner_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        if m.get('ResourceOwnerId') is not None:
            self.resource_owner_id = m.get('ResourceOwnerId')
        return self


class GetAggregateResourceComplianceByConfigRuleResponseBodyComplianceResultCompliances(TeaModel):
    def __init__(self, compliance_type=None, count=None):
        # The compliance evaluation results of the resources. Valid values:
        # 
        # *   COMPLIANT: The resource was evaluated as compliant.
        # *   NON_COMPLIANT: The resource was evaluated as incompliant.
        # *   NOT_APPLICABLE: The rule did not apply to your resources.
        # *   INSUFFICIENT_DATA: No resource data was available.
        self.compliance_type = compliance_type  # type: str
        # The number of resources that have compliance evaluation results. For example, if the value of the `ComplianceType` parameter is `COMPLIANT`, this parameter value indicates the number of compliant resources.
        self.count = count  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.count is not None:
            result['Count'] = self.count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('Count') is not None:
            self.count = m.get('Count')
        return self


class GetAggregateResourceComplianceByConfigRuleResponseBodyComplianceResult(TeaModel):
    def __init__(self, compliances=None, total_count=None):
        # The compliance list result.
        self.compliances = compliances  # type: list[GetAggregateResourceComplianceByConfigRuleResponseBodyComplianceResultCompliances]
        # The total number of evaluated resources.
        self.total_count = total_count  # type: long

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

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

        result = dict()
        result['Compliances'] = []
        if self.compliances is not None:
            for k in self.compliances:
                result['Compliances'].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()
        self.compliances = []
        if m.get('Compliances') is not None:
            for k in m.get('Compliances'):
                temp_model = GetAggregateResourceComplianceByConfigRuleResponseBodyComplianceResultCompliances()
                self.compliances.append(temp_model.from_map(k))
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class GetAggregateResourceComplianceByConfigRuleResponseBody(TeaModel):
    def __init__(self, compliance_result=None, request_id=None):
        # The compliance result.
        self.compliance_result = compliance_result  # type: GetAggregateResourceComplianceByConfigRuleResponseBodyComplianceResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_result is not None:
            result['ComplianceResult'] = self.compliance_result.to_map()
        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('ComplianceResult') is not None:
            temp_model = GetAggregateResourceComplianceByConfigRuleResponseBodyComplianceResult()
            self.compliance_result = temp_model.from_map(m['ComplianceResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateResourceComplianceByConfigRuleResponse(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: GetAggregateResourceComplianceByConfigRuleResponseBody

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

    def to_map(self):
        _map = super(GetAggregateResourceComplianceByConfigRuleResponse, 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 = GetAggregateResourceComplianceByConfigRuleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateResourceComplianceByPackRequest(TeaModel):
    def __init__(self, aggregator_id=None, compliance_pack_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_id = compliance_pack_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        return self


class GetAggregateResourceComplianceByPackResponseBodyResourceComplianceResult(TeaModel):
    def __init__(self, compliance_pack_id=None, non_compliant_count=None, total_count=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The number of non-compliant resources.
        self.non_compliant_count = non_compliant_count  # type: int
        # The total number of resources.
        self.total_count = total_count  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.non_compliant_count is not None:
            result['NonCompliantCount'] = self.non_compliant_count
        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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('NonCompliantCount') is not None:
            self.non_compliant_count = m.get('NonCompliantCount')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class GetAggregateResourceComplianceByPackResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_compliance_result=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # The compliance evaluation results returned.
        self.resource_compliance_result = resource_compliance_result  # type: GetAggregateResourceComplianceByPackResponseBodyResourceComplianceResult

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.resource_compliance_result is not None:
            result['ResourceComplianceResult'] = self.resource_compliance_result.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('ResourceComplianceResult') is not None:
            temp_model = GetAggregateResourceComplianceByPackResponseBodyResourceComplianceResult()
            self.resource_compliance_result = temp_model.from_map(m['ResourceComplianceResult'])
        return self


class GetAggregateResourceComplianceByPackResponse(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: GetAggregateResourceComplianceByPackResponseBody

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

    def to_map(self):
        _map = super(GetAggregateResourceComplianceByPackResponse, 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 = GetAggregateResourceComplianceByPackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateResourceComplianceGroupByRegionRequest(TeaModel):
    def __init__(self, aggregator_id=None, config_rule_ids=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The rule IDs. Separate multiple rule IDs with commas (,).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_ids is not None:
            result['ConfigRuleIds'] = self.config_rule_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleIds') is not None:
            self.config_rule_ids = m.get('ConfigRuleIds')
        return self


class GetAggregateResourceComplianceGroupByRegionResponseBodyComplianceResultComplianceResultListCompliances(TeaModel):
    def __init__(self, compliance_type=None, count=None):
        # The evaluation result. Valid values:
        # 
        # *   COMPLIANT: The resource is evaluated as compliant.
        # *   NON_COMPLIANT: The resource is evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resource.
        # *   INSUFFICIENT_DATA: No data is available.
        self.compliance_type = compliance_type  # type: str
        # The total number of evaluation results.
        self.count = count  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.count is not None:
            result['Count'] = self.count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('Count') is not None:
            self.count = m.get('Count')
        return self


class GetAggregateResourceComplianceGroupByRegionResponseBodyComplianceResultComplianceResultList(TeaModel):
    def __init__(self, compliances=None, region_id=None):
        # The queried evaluation results.
        self.compliances = compliances  # type: list[GetAggregateResourceComplianceGroupByRegionResponseBodyComplianceResultComplianceResultListCompliances]
        # The region ID of the evaluated resource.
        self.region_id = region_id  # type: str

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

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

        result = dict()
        result['Compliances'] = []
        if self.compliances is not None:
            for k in self.compliances:
                result['Compliances'].append(k.to_map() if k else None)
        if self.region_id is not None:
            result['RegionId'] = self.region_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.compliances = []
        if m.get('Compliances') is not None:
            for k in m.get('Compliances'):
                temp_model = GetAggregateResourceComplianceGroupByRegionResponseBodyComplianceResultComplianceResultListCompliances()
                self.compliances.append(temp_model.from_map(k))
        if m.get('RegionId') is not None:
            self.region_id = m.get('RegionId')
        return self


class GetAggregateResourceComplianceGroupByRegionResponseBodyComplianceResult(TeaModel):
    def __init__(self, compliance_result_list=None):
        # The evaluation results grouped by region.
        self.compliance_result_list = compliance_result_list  # type: list[GetAggregateResourceComplianceGroupByRegionResponseBodyComplianceResultComplianceResultList]

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

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

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

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


class GetAggregateResourceComplianceGroupByRegionResponseBody(TeaModel):
    def __init__(self, compliance_result=None, request_id=None):
        # The queried evaluation results.
        self.compliance_result = compliance_result  # type: GetAggregateResourceComplianceGroupByRegionResponseBodyComplianceResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_result is not None:
            result['ComplianceResult'] = self.compliance_result.to_map()
        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('ComplianceResult') is not None:
            temp_model = GetAggregateResourceComplianceGroupByRegionResponseBodyComplianceResult()
            self.compliance_result = temp_model.from_map(m['ComplianceResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateResourceComplianceGroupByRegionResponse(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: GetAggregateResourceComplianceGroupByRegionResponseBody

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

    def to_map(self):
        _map = super(GetAggregateResourceComplianceGroupByRegionResponse, 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 = GetAggregateResourceComplianceGroupByRegionResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateResourceComplianceGroupByResourceTypeRequest(TeaModel):
    def __init__(self, aggregator_id=None, config_rule_ids=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the rule. Separate multiple rule IDs with commas (,).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_ids is not None:
            result['ConfigRuleIds'] = self.config_rule_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleIds') is not None:
            self.config_rule_ids = m.get('ConfigRuleIds')
        return self


class GetAggregateResourceComplianceGroupByResourceTypeResponseBodyComplianceResultComplianceResultListCompliances(TeaModel):
    def __init__(self, compliance_type=None, count=None):
        # The evaluation result. Valid values:
        # 
        # *   COMPLIANT: The resource is evaluated as compliant.
        # *   NON_COMPLIANT: The resource is evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resource.
        # *   INSUFFICIENT_DATA: No data is available.
        self.compliance_type = compliance_type  # type: str
        # The number of statistical results.
        self.count = count  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.count is not None:
            result['Count'] = self.count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('Count') is not None:
            self.count = m.get('Count')
        return self


class GetAggregateResourceComplianceGroupByResourceTypeResponseBodyComplianceResultComplianceResultList(TeaModel):
    def __init__(self, compliances=None, resource_type=None):
        # The queried evaluation results.
        self.compliances = compliances  # type: list[GetAggregateResourceComplianceGroupByResourceTypeResponseBodyComplianceResultComplianceResultListCompliances]
        # The type of the evaluated resource.
        self.resource_type = resource_type  # type: str

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

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

        result = dict()
        result['Compliances'] = []
        if self.compliances is not None:
            for k in self.compliances:
                result['Compliances'].append(k.to_map() if k else None)
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.compliances = []
        if m.get('Compliances') is not None:
            for k in m.get('Compliances'):
                temp_model = GetAggregateResourceComplianceGroupByResourceTypeResponseBodyComplianceResultComplianceResultListCompliances()
                self.compliances.append(temp_model.from_map(k))
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        return self


class GetAggregateResourceComplianceGroupByResourceTypeResponseBodyComplianceResult(TeaModel):
    def __init__(self, compliance_result_list=None):
        # The evaluation results grouped by resource type.
        self.compliance_result_list = compliance_result_list  # type: list[GetAggregateResourceComplianceGroupByResourceTypeResponseBodyComplianceResultComplianceResultList]

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

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

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

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


class GetAggregateResourceComplianceGroupByResourceTypeResponseBody(TeaModel):
    def __init__(self, compliance_result=None, request_id=None):
        # The queried evaluation results.
        self.compliance_result = compliance_result  # type: GetAggregateResourceComplianceGroupByResourceTypeResponseBodyComplianceResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_result is not None:
            result['ComplianceResult'] = self.compliance_result.to_map()
        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('ComplianceResult') is not None:
            temp_model = GetAggregateResourceComplianceGroupByResourceTypeResponseBodyComplianceResult()
            self.compliance_result = temp_model.from_map(m['ComplianceResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateResourceComplianceGroupByResourceTypeResponse(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: GetAggregateResourceComplianceGroupByResourceTypeResponseBody

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

    def to_map(self):
        _map = super(GetAggregateResourceComplianceGroupByResourceTypeResponse, 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 = GetAggregateResourceComplianceGroupByResourceTypeResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateResourceComplianceTimelineRequest(TeaModel):
    def __init__(self, aggregator_id=None, end_time=None, max_results=None, next_token=None, region=None,
                 resource_account_id=None, resource_id=None, resource_owner_id=None, resource_type=None, start_time=None):
        # The ID of the account group.
        # 
        # For information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The end of the time range to query. The default value indicates the time when the GetAggregateResourceConfigurationTimeline operation is called. Unit: milliseconds.
        self.end_time = end_time  # type: long
        # The maximum number of entries returned for a single request. Valid values: 1 to 100.
        self.max_results = max_results  # type: int
        # The `token` that is used to initiate the next request if the response of the current request is truncated. You can use the token to initiate another request and obtain the remaining records.
        self.next_token = next_token  # type: str
        # The ID of the region where the resource resides.
        # 
        # For more information about how to obtain the ID of a region, see [ListAggregateDiscoveredResources](~~265983~~).
        self.region = region  # type: str
        # The ID of the Alibaba Cloud account to which the resources in the account group belong.
        # 
        # > You can use either the ResourceAccountId or ResourceOwnerId parameter. We recommend that you use the ResourceAccountId parameter.
        self.resource_account_id = resource_account_id  # type: long
        # The resource ID.
        # 
        # For more information about how to query the ID of a resource, see [ListAggregateDiscoveredResources](~~265983~~).
        self.resource_id = resource_id  # type: str
        self.resource_owner_id = resource_owner_id  # type: long
        # The resource type.
        # 
        # For more information about how to obtain the type of a resource, see [ListAggregateDiscoveredResources](~~265983~~).
        self.resource_type = resource_type  # type: str
        # The beginning of the time range to query. By default, Cloud Config retrieves the configuration changes in the last 30 days for the specified resource. Unit: milliseconds.
        self.start_time = start_time  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        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.region is not None:
            result['Region'] = self.region
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_owner_id is not None:
            result['ResourceOwnerId'] = self.resource_owner_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        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('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        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('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceOwnerId') is not None:
            self.resource_owner_id = m.get('ResourceOwnerId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        return self


class GetAggregateResourceComplianceTimelineResponseBodyResourceComplianceTimelineComplianceList(TeaModel):
    def __init__(self, account_id=None, availability_zone=None, capture_time=None, configuration=None,
                 configuration_diff=None, region=None, resource_create_time=None, resource_id=None, resource_name=None,
                 resource_status=None, resource_type=None, tags=None):
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.account_id = account_id  # type: str
        # The ID of the zone in which the resource resides.
        self.availability_zone = availability_zone  # type: str
        # The timestamp when the compliance evaluation was recorded. Unit: milliseconds.
        self.capture_time = capture_time  # type: long
        # The information about the rules that evaluated the resource and the compliance evaluation result.
        self.configuration = configuration  # type: str
        # The details of the resource change that triggered the compliance evaluation.
        self.configuration_diff = configuration_diff  # type: str
        # The ID of the region in which the resource resides.
        self.region = region  # type: str
        # The timestamp when the resource was created. Unit: milliseconds.
        self.resource_create_time = resource_create_time  # type: long
        # The ID of the resource.
        self.resource_id = resource_id  # type: str
        # The name of the resource.
        self.resource_name = resource_name  # type: str
        # The status of the resource. The parameter value varies based on the resource type and may be left empty. Examples:
        # 
        # *   If the ResourceType parameter is set to ACS::ECS::Instance, the resource is an Elastic Compute Service (ECS) instance that has a specific state. In this case, the valid values of this parameter are Running and Stopped.
        # *   If the ResourceType parameter is set to ACS::OSS::Bucket, the resource is an OSS bucket that does not have a specific state. In this case, this parameter is left empty.
        self.resource_status = resource_status  # type: str
        # The type of the resource.
        self.resource_type = resource_type  # type: str
        # The tags of the resource.
        self.tags = tags  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetAggregateResourceComplianceTimelineResponseBodyResourceComplianceTimelineComplianceList, 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.availability_zone is not None:
            result['AvailabilityZone'] = self.availability_zone
        if self.capture_time is not None:
            result['CaptureTime'] = self.capture_time
        if self.configuration is not None:
            result['Configuration'] = self.configuration
        if self.configuration_diff is not None:
            result['ConfigurationDiff'] = self.configuration_diff
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_create_time is not None:
            result['ResourceCreateTime'] = self.resource_create_time
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_name is not None:
            result['ResourceName'] = self.resource_name
        if self.resource_status is not None:
            result['ResourceStatus'] = self.resource_status
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.tags is not None:
            result['Tags'] = self.tags
        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('AvailabilityZone') is not None:
            self.availability_zone = m.get('AvailabilityZone')
        if m.get('CaptureTime') is not None:
            self.capture_time = m.get('CaptureTime')
        if m.get('Configuration') is not None:
            self.configuration = m.get('Configuration')
        if m.get('ConfigurationDiff') is not None:
            self.configuration_diff = m.get('ConfigurationDiff')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceCreateTime') is not None:
            self.resource_create_time = m.get('ResourceCreateTime')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceName') is not None:
            self.resource_name = m.get('ResourceName')
        if m.get('ResourceStatus') is not None:
            self.resource_status = m.get('ResourceStatus')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('Tags') is not None:
            self.tags = m.get('Tags')
        return self


class GetAggregateResourceComplianceTimelineResponseBodyResourceComplianceTimeline(TeaModel):
    def __init__(self, compliance_list=None, max_results=None, next_token=None):
        # The status of the resource. The parameter value varies based on the resource type and may be left empty. Examples:
        # 
        # *   If the value of the ResourceType parameter is ACS::ECS::Instance, the resource is an Elastic Compute Service (ECS) instance that has a specific state. In this case, the valid values of this parameter are Running and Stopped.
        # *   If the value of the ResourceType parameter is ACS::OSS::Bucket, the resource is an Object Storage Service (OSS) bucket that is not in a specific state. In this case, this parameter is empty.
        self.compliance_list = compliance_list  # type: list[GetAggregateResourceComplianceTimelineResponseBodyResourceComplianceTimelineComplianceList]
        # The maximum number of entries returned for a single request.
        self.max_results = max_results  # type: int
        # A pagination token. It can be used in the next request to retrieve a new page of results.
        self.next_token = next_token  # type: str

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

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

        result = dict()
        result['ComplianceList'] = []
        if self.compliance_list is not None:
            for k in self.compliance_list:
                result['ComplianceList'].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
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.compliance_list = []
        if m.get('ComplianceList') is not None:
            for k in m.get('ComplianceList'):
                temp_model = GetAggregateResourceComplianceTimelineResponseBodyResourceComplianceTimelineComplianceList()
                self.compliance_list.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')
        return self


class GetAggregateResourceComplianceTimelineResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_compliance_timeline=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # The information about the compliance timeline.
        self.resource_compliance_timeline = resource_compliance_timeline  # type: GetAggregateResourceComplianceTimelineResponseBodyResourceComplianceTimeline

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.resource_compliance_timeline is not None:
            result['ResourceComplianceTimeline'] = self.resource_compliance_timeline.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('ResourceComplianceTimeline') is not None:
            temp_model = GetAggregateResourceComplianceTimelineResponseBodyResourceComplianceTimeline()
            self.resource_compliance_timeline = temp_model.from_map(m['ResourceComplianceTimeline'])
        return self


class GetAggregateResourceComplianceTimelineResponse(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: GetAggregateResourceComplianceTimelineResponseBody

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

    def to_map(self):
        _map = super(GetAggregateResourceComplianceTimelineResponse, 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 = GetAggregateResourceComplianceTimelineResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateResourceConfigurationTimelineRequest(TeaModel):
    def __init__(self, aggregator_id=None, end_time=None, max_results=None, next_token=None, region=None,
                 resource_account_id=None, resource_id=None, resource_owner_id=None, resource_type=None, start_time=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The end of the time range to query. The default value indicates the time when the GetAggregateResourceConfigurationTimeline operation is called. Unit: milliseconds.
        self.end_time = end_time  # type: long
        # The maximum number of entries to return for a single request. Valid values: 1 to 100.
        self.max_results = max_results  # type: int
        # The `token` that is used to initiate the next request if the response of the current request is truncated. You can use the token to initiate another request and obtain the remaining records.
        self.next_token = next_token  # type: str
        # The ID of the region in which the resource resides.
        # 
        # For more information about how to obtain the ID of a region, see [ListAggregateDiscoveredResources](~~265983~~).
        self.region = region  # type: str
        # The ID of the Alibaba Cloud account to which the resource in the account group belongs.
        self.resource_account_id = resource_account_id  # type: long
        # The resource ID.
        # 
        # For more information about how to query the ID of a resource, see [ListAggregateDiscoveredResources](~~265983~~).
        self.resource_id = resource_id  # type: str
        self.resource_owner_id = resource_owner_id  # type: long
        # The type of the resource.
        # 
        # For more information about how to obtain the type of a resource, see [ListAggregateDiscoveredResources](~~265983~~).
        self.resource_type = resource_type  # type: str
        # The beginning of the time range to query. By default, Cloud Config retrieves the configuration changes in the last 30 days for the specified resource. Unit: milliseconds.
        self.start_time = start_time  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        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.region is not None:
            result['Region'] = self.region
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_owner_id is not None:
            result['ResourceOwnerId'] = self.resource_owner_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        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('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        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('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceOwnerId') is not None:
            self.resource_owner_id = m.get('ResourceOwnerId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        return self


class GetAggregateResourceConfigurationTimelineResponseBodyResourceConfigurationTimelineConfigurationList(TeaModel):
    def __init__(self, account_id=None, availability_zone=None, capture_time=None, configuration_diff=None,
                 region=None, resource_create_time=None, resource_event_type=None, resource_id=None, resource_name=None,
                 resource_type=None, tags=None):
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.account_id = account_id  # type: long
        # The ID of the zone in which the resource resides.
        self.availability_zone = availability_zone  # type: str
        # The timestamp when the resource change snapshot was recorded. Unit: milliseconds.
        self.capture_time = capture_time  # type: str
        # The details of the resource change that triggered the compliance evaluation.
        self.configuration_diff = configuration_diff  # type: str
        # The ID of the region in which the resource resides.
        self.region = region  # type: str
        # The timestamp when the resource was created. Unit: milliseconds.
        self.resource_create_time = resource_create_time  # type: str
        # The type of the resource change event involved. Valid values:
        # 
        # *   DISCOVERED: A resource is created.
        # *   DISCOVERED_REVISED: A resource is created by periodic remediation tasks.
        # *   MODIFY: A resource is modified.
        # *   MODIFY_REVISED: A resource is modified by periodic remediation tasks.
        # *   REMOVE: A resource is deleted.
        # 
        # > 
        # *   To ensure the integrity of resources, periodic remediation tasks are run to check data and generate events that indicate the creation of new resources. Such events are infrequent.
        # *   The time when a resource change event is generated by a periodic remediation task is considered as the detection time of Cloud Config. The detection time is later than the time when the resource is modified.
        self.resource_event_type = resource_event_type  # type: str
        # The ID of the resource.
        self.resource_id = resource_id  # type: str
        # The name of the resource.
        self.resource_name = resource_name  # type: str
        # The type of the resource.
        self.resource_type = resource_type  # type: str
        # The tags of the resource.
        self.tags = tags  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetAggregateResourceConfigurationTimelineResponseBodyResourceConfigurationTimelineConfigurationList, 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.availability_zone is not None:
            result['AvailabilityZone'] = self.availability_zone
        if self.capture_time is not None:
            result['CaptureTime'] = self.capture_time
        if self.configuration_diff is not None:
            result['ConfigurationDiff'] = self.configuration_diff
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_create_time is not None:
            result['ResourceCreateTime'] = self.resource_create_time
        if self.resource_event_type is not None:
            result['ResourceEventType'] = self.resource_event_type
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_name is not None:
            result['ResourceName'] = self.resource_name
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.tags is not None:
            result['Tags'] = self.tags
        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('AvailabilityZone') is not None:
            self.availability_zone = m.get('AvailabilityZone')
        if m.get('CaptureTime') is not None:
            self.capture_time = m.get('CaptureTime')
        if m.get('ConfigurationDiff') is not None:
            self.configuration_diff = m.get('ConfigurationDiff')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceCreateTime') is not None:
            self.resource_create_time = m.get('ResourceCreateTime')
        if m.get('ResourceEventType') is not None:
            self.resource_event_type = m.get('ResourceEventType')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceName') is not None:
            self.resource_name = m.get('ResourceName')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('Tags') is not None:
            self.tags = m.get('Tags')
        return self


class GetAggregateResourceConfigurationTimelineResponseBodyResourceConfigurationTimeline(TeaModel):
    def __init__(self, configuration_list=None, max_results=None, next_token=None):
        # The resource name.
        self.configuration_list = configuration_list  # type: list[GetAggregateResourceConfigurationTimelineResponseBodyResourceConfigurationTimelineConfigurationList]
        # The maximum number of entries returned for a single request.
        self.max_results = max_results  # type: int
        # The token that is used to initiate the next request.
        self.next_token = next_token  # type: str

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

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

        result = dict()
        result['ConfigurationList'] = []
        if self.configuration_list is not None:
            for k in self.configuration_list:
                result['ConfigurationList'].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
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.configuration_list = []
        if m.get('ConfigurationList') is not None:
            for k in m.get('ConfigurationList'):
                temp_model = GetAggregateResourceConfigurationTimelineResponseBodyResourceConfigurationTimelineConfigurationList()
                self.configuration_list.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')
        return self


class GetAggregateResourceConfigurationTimelineResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_configuration_timeline=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # The configuration timeline of the resource.
        self.resource_configuration_timeline = resource_configuration_timeline  # type: GetAggregateResourceConfigurationTimelineResponseBodyResourceConfigurationTimeline

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.resource_configuration_timeline is not None:
            result['ResourceConfigurationTimeline'] = self.resource_configuration_timeline.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('ResourceConfigurationTimeline') is not None:
            temp_model = GetAggregateResourceConfigurationTimelineResponseBodyResourceConfigurationTimeline()
            self.resource_configuration_timeline = temp_model.from_map(m['ResourceConfigurationTimeline'])
        return self


class GetAggregateResourceConfigurationTimelineResponse(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: GetAggregateResourceConfigurationTimelineResponseBody

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

    def to_map(self):
        _map = super(GetAggregateResourceConfigurationTimelineResponse, 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 = GetAggregateResourceConfigurationTimelineResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateResourceCountsGroupByRegionRequest(TeaModel):
    def __init__(self, aggregator_id=None, folder_id=None, resource_account_id=None, resource_owner_id=None,
                 resource_type=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the folder in the resource directory. For more information about how to obtain the ID of a folder, see [View the basic information of a folder](~~111223~~).
        self.folder_id = folder_id  # type: str
        # The ID of the Alibaba Cloud account to which the resources in the account group belong.
        # 
        # > You can use either the ResourceAccountId or ResourceOwnerId parameter. We recommend that you use the ResourceAccountId parameter.
        self.resource_account_id = resource_account_id  # type: long
        self.resource_owner_id = resource_owner_id  # type: long
        # The resource type.
        # 
        # For more information about how to obtain the type of a resource, see [ListAggregateDiscoveredResources](~~265983~~).
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.folder_id is not None:
            result['FolderId'] = self.folder_id
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        if self.resource_owner_id is not None:
            result['ResourceOwnerId'] = self.resource_owner_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('FolderId') is not None:
            self.folder_id = m.get('FolderId')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        if m.get('ResourceOwnerId') is not None:
            self.resource_owner_id = m.get('ResourceOwnerId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        return self


class GetAggregateResourceCountsGroupByRegionResponseBodyDiscoveredResourceCountsSummary(TeaModel):
    def __init__(self, group_name=None, region=None, resource_count=None):
        # The dimension by which statistics are collected.
        # 
        # >  In most cases, the `Region` parameter is returned instead of the GroupName parameter.
        self.group_name = group_name  # type: str
        # The ID of the region by which statistics are collected.
        self.region = region  # type: str
        # The total number of resources in the region.
        self.resource_count = resource_count  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.group_name is not None:
            result['GroupName'] = self.group_name
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_count is not None:
            result['ResourceCount'] = self.resource_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('GroupName') is not None:
            self.group_name = m.get('GroupName')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceCount') is not None:
            self.resource_count = m.get('ResourceCount')
        return self


class GetAggregateResourceCountsGroupByRegionResponseBody(TeaModel):
    def __init__(self, discovered_resource_counts_summary=None, request_id=None):
        # The ID of the region by which statistics are collected.
        self.discovered_resource_counts_summary = discovered_resource_counts_summary  # type: list[GetAggregateResourceCountsGroupByRegionResponseBodyDiscoveredResourceCountsSummary]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['DiscoveredResourceCountsSummary'] = []
        if self.discovered_resource_counts_summary is not None:
            for k in self.discovered_resource_counts_summary:
                result['DiscoveredResourceCountsSummary'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.discovered_resource_counts_summary = []
        if m.get('DiscoveredResourceCountsSummary') is not None:
            for k in m.get('DiscoveredResourceCountsSummary'):
                temp_model = GetAggregateResourceCountsGroupByRegionResponseBodyDiscoveredResourceCountsSummary()
                self.discovered_resource_counts_summary.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateResourceCountsGroupByRegionResponse(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: GetAggregateResourceCountsGroupByRegionResponseBody

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

    def to_map(self):
        _map = super(GetAggregateResourceCountsGroupByRegionResponse, 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 = GetAggregateResourceCountsGroupByRegionResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateResourceCountsGroupByResourceTypeRequest(TeaModel):
    def __init__(self, aggregator_id=None, folder_id=None, region=None, resource_account_id=None,
                 resource_owner_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the folder in the resource directory.
        # 
        # For more information about how to obtain the ID of a folder, see [View the basic information of a folder](~~111223~~).
        self.folder_id = folder_id  # type: str
        # The region ID.
        self.region = region  # type: str
        # The ID of the Alibaba Cloud account to which the resources in the account group belong.
        # 
        # > You can specify either the ResourceAccountId or ResourceOwnerId parameter. We recommend that you specify the ResourceAccountId parameter.
        self.resource_account_id = resource_account_id  # type: long
        self.resource_owner_id = resource_owner_id  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.folder_id is not None:
            result['FolderId'] = self.folder_id
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        if self.resource_owner_id is not None:
            result['ResourceOwnerId'] = self.resource_owner_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('FolderId') is not None:
            self.folder_id = m.get('FolderId')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        if m.get('ResourceOwnerId') is not None:
            self.resource_owner_id = m.get('ResourceOwnerId')
        return self


class GetAggregateResourceCountsGroupByResourceTypeResponseBodyDiscoveredResourceCountsSummary(TeaModel):
    def __init__(self, group_name=None, resource_count=None, resource_type=None):
        # This parameter is expired. The resource type by which statistics are collected.
        self.group_name = group_name  # type: str
        # The total number of resources in the region.
        self.resource_count = resource_count  # type: long
        # The resource type by which statistics are collected.
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.group_name is not None:
            result['GroupName'] = self.group_name
        if self.resource_count is not None:
            result['ResourceCount'] = self.resource_count
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('GroupName') is not None:
            self.group_name = m.get('GroupName')
        if m.get('ResourceCount') is not None:
            self.resource_count = m.get('ResourceCount')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        return self


class GetAggregateResourceCountsGroupByResourceTypeResponseBody(TeaModel):
    def __init__(self, discovered_resource_counts_summary=None, request_id=None):
        # The resource type by which the statistics are collected.
        self.discovered_resource_counts_summary = discovered_resource_counts_summary  # type: list[GetAggregateResourceCountsGroupByResourceTypeResponseBodyDiscoveredResourceCountsSummary]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['DiscoveredResourceCountsSummary'] = []
        if self.discovered_resource_counts_summary is not None:
            for k in self.discovered_resource_counts_summary:
                result['DiscoveredResourceCountsSummary'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.discovered_resource_counts_summary = []
        if m.get('DiscoveredResourceCountsSummary') is not None:
            for k in m.get('DiscoveredResourceCountsSummary'):
                temp_model = GetAggregateResourceCountsGroupByResourceTypeResponseBodyDiscoveredResourceCountsSummary()
                self.discovered_resource_counts_summary.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregateResourceCountsGroupByResourceTypeResponse(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: GetAggregateResourceCountsGroupByResourceTypeResponseBody

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

    def to_map(self):
        _map = super(GetAggregateResourceCountsGroupByResourceTypeResponse, 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 = GetAggregateResourceCountsGroupByResourceTypeResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregateResourceInventoryRequest(TeaModel):
    def __init__(self, aggregator_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str

    def validate(self):
        pass

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

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

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


class GetAggregateResourceInventoryResponseBodyResourceInventory(TeaModel):
    def __init__(self, download_url=None, resource_inventory_generate_time=None, status=None):
        # The download URL of the resource inventory.
        self.download_url = download_url  # type: str
        # The time when the resource inventory was generated. The value is a timestamp.
        # 
        # Unit: milliseconds.
        self.resource_inventory_generate_time = resource_inventory_generate_time  # type: long
        # The generation status of the resource inventory. Valid values:
        # 
        # *   CREATING: The resource inventory is being generated.
        # *   COMPLETE: The resource inventory is generated.
        self.status = status  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.download_url is not None:
            result['DownloadUrl'] = self.download_url
        if self.resource_inventory_generate_time is not None:
            result['ResourceInventoryGenerateTime'] = self.resource_inventory_generate_time
        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('DownloadUrl') is not None:
            self.download_url = m.get('DownloadUrl')
        if m.get('ResourceInventoryGenerateTime') is not None:
            self.resource_inventory_generate_time = m.get('ResourceInventoryGenerateTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class GetAggregateResourceInventoryResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_inventory=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # The information about the resource inventory.
        self.resource_inventory = resource_inventory  # type: GetAggregateResourceInventoryResponseBodyResourceInventory

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.resource_inventory is not None:
            result['ResourceInventory'] = self.resource_inventory.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('ResourceInventory') is not None:
            temp_model = GetAggregateResourceInventoryResponseBodyResourceInventory()
            self.resource_inventory = temp_model.from_map(m['ResourceInventory'])
        return self


class GetAggregateResourceInventoryResponse(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: GetAggregateResourceInventoryResponseBody

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

    def to_map(self):
        _map = super(GetAggregateResourceInventoryResponse, 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 = GetAggregateResourceInventoryResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggregatorRequest(TeaModel):
    def __init__(self, aggregator_id=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str

    def validate(self):
        pass

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

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

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


class GetAggregatorResponseBodyAggregatorAggregatorAccounts(TeaModel):
    def __init__(self, account_id=None, account_name=None, account_type=None, recorder_status=None):
        # The ID of the member account.
        self.account_id = account_id  # type: long
        # The name of the member account.
        self.account_name = account_name  # type: str
        # The affiliation of the member account. The value is fixed to ResourceDirectory.
        self.account_type = account_type  # type: str
        # The status of the configuration recorder for the member account. Valid values:
        # 
        # *   REGISTRABLE: The configuration recorder has not been registered.
        # *   BUILDING: The configuration recorder is being deployed.
        # *   REGISTERED: The configuration recorder has been registered.
        # *   REBUILDING: The configuration recorder is being redeployed.
        self.recorder_status = recorder_status  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetAggregatorResponseBodyAggregatorAggregatorAccounts, 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_type is not None:
            result['AccountType'] = self.account_type
        if self.recorder_status is not None:
            result['RecorderStatus'] = self.recorder_status
        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('AccountType') is not None:
            self.account_type = m.get('AccountType')
        if m.get('RecorderStatus') is not None:
            self.recorder_status = m.get('RecorderStatus')
        return self


class GetAggregatorResponseBodyAggregator(TeaModel):
    def __init__(self, account_id=None, aggregator_account_count=None, aggregator_accounts=None,
                 aggregator_create_timestamp=None, aggregator_id=None, aggregator_name=None, aggregator_status=None, aggregator_type=None,
                 description=None, folder_id=None):
        # The ID of the management account used to create the account group.
        self.account_id = account_id  # type: long
        # The number of member accounts in the account group.
        self.aggregator_account_count = aggregator_account_count  # type: long
        # The information about the member accounts in the account group.
        self.aggregator_accounts = aggregator_accounts  # type: list[GetAggregatorResponseBodyAggregatorAggregatorAccounts]
        # The timestamp when the account group was created.
        self.aggregator_create_timestamp = aggregator_create_timestamp  # type: str
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The name of the account group.
        self.aggregator_name = aggregator_name  # type: str
        # The status of the account group. Valid values:
        # 
        # *   0: The account group is being created.
        # *   1: The account group has been created.
        self.aggregator_status = aggregator_status  # type: int
        # The type of the account group. Valid values:
        # 
        # *   RD: global account group
        # *   CUSTOM: custom account group
        self.aggregator_type = aggregator_type  # type: str
        # The description of the account group.
        self.description = description  # type: str
        self.folder_id = folder_id  # type: str

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

    def to_map(self):
        _map = super(GetAggregatorResponseBodyAggregator, 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.aggregator_account_count is not None:
            result['AggregatorAccountCount'] = self.aggregator_account_count
        result['AggregatorAccounts'] = []
        if self.aggregator_accounts is not None:
            for k in self.aggregator_accounts:
                result['AggregatorAccounts'].append(k.to_map() if k else None)
        if self.aggregator_create_timestamp is not None:
            result['AggregatorCreateTimestamp'] = self.aggregator_create_timestamp
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.aggregator_name is not None:
            result['AggregatorName'] = self.aggregator_name
        if self.aggregator_status is not None:
            result['AggregatorStatus'] = self.aggregator_status
        if self.aggregator_type is not None:
            result['AggregatorType'] = self.aggregator_type
        if self.description is not None:
            result['Description'] = self.description
        if self.folder_id is not None:
            result['FolderId'] = self.folder_id
        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('AggregatorAccountCount') is not None:
            self.aggregator_account_count = m.get('AggregatorAccountCount')
        self.aggregator_accounts = []
        if m.get('AggregatorAccounts') is not None:
            for k in m.get('AggregatorAccounts'):
                temp_model = GetAggregatorResponseBodyAggregatorAggregatorAccounts()
                self.aggregator_accounts.append(temp_model.from_map(k))
        if m.get('AggregatorCreateTimestamp') is not None:
            self.aggregator_create_timestamp = m.get('AggregatorCreateTimestamp')
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('AggregatorName') is not None:
            self.aggregator_name = m.get('AggregatorName')
        if m.get('AggregatorStatus') is not None:
            self.aggregator_status = m.get('AggregatorStatus')
        if m.get('AggregatorType') is not None:
            self.aggregator_type = m.get('AggregatorType')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('FolderId') is not None:
            self.folder_id = m.get('FolderId')
        return self


class GetAggregatorResponseBody(TeaModel):
    def __init__(self, aggregator=None, request_id=None):
        # The details of the account group.
        self.aggregator = aggregator  # type: GetAggregatorResponseBodyAggregator
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.aggregator is not None:
            result['Aggregator'] = self.aggregator.to_map()
        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('Aggregator') is not None:
            temp_model = GetAggregatorResponseBodyAggregator()
            self.aggregator = temp_model.from_map(m['Aggregator'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetAggregatorResponse(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: GetAggregatorResponseBody

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

    def to_map(self):
        _map = super(GetAggregatorResponse, 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 = GetAggregatorResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetCompliancePackRequest(TeaModel):
    def __init__(self, compliance_pack_id=None):
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.compliance_pack_id = compliance_pack_id  # type: str

    def validate(self):
        pass

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

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

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


class GetCompliancePackResponseBodyCompliancePackConfigRulesConfigRuleParameters(TeaModel):
    def __init__(self, parameter_name=None, parameter_value=None, required=None):
        # The name of the input parameter.
        self.parameter_name = parameter_name  # type: str
        # The value of the input parameter.
        self.parameter_value = parameter_value  # type: str
        # Indicates whether the input parameter is required. Valid values:
        # 
        # *   true
        # *   false
        self.required = required  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.parameter_name is not None:
            result['ParameterName'] = self.parameter_name
        if self.parameter_value is not None:
            result['ParameterValue'] = self.parameter_value
        if self.required is not None:
            result['Required'] = self.required
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ParameterName') is not None:
            self.parameter_name = m.get('ParameterName')
        if m.get('ParameterValue') is not None:
            self.parameter_value = m.get('ParameterValue')
        if m.get('Required') is not None:
            self.required = m.get('Required')
        return self


class GetCompliancePackResponseBodyCompliancePackConfigRules(TeaModel):
    def __init__(self, config_rule_id=None, config_rule_name=None, config_rule_parameters=None, description=None,
                 managed_rule_identifier=None, resource_types_scope=None, risk_level=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The rule name.
        self.config_rule_name = config_rule_name  # type: str
        # The input parameters of the rule.
        self.config_rule_parameters = config_rule_parameters  # type: list[GetCompliancePackResponseBodyCompliancePackConfigRulesConfigRuleParameters]
        # The rule description.
        self.description = description  # type: str
        # The identifier of the managed rule.
        self.managed_rule_identifier = managed_rule_identifier  # type: str
        # The types of the resources evaluated based on the rule. Multiple resource types are separated with commas (,).
        self.resource_types_scope = resource_types_scope  # type: str
        # The risk level of the resources that do not comply with the rule. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int

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

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        result['ConfigRuleParameters'] = []
        if self.config_rule_parameters is not None:
            for k in self.config_rule_parameters:
                result['ConfigRuleParameters'].append(k.to_map() if k else None)
        if self.description is not None:
            result['Description'] = self.description
        if self.managed_rule_identifier is not None:
            result['ManagedRuleIdentifier'] = self.managed_rule_identifier
        if self.resource_types_scope is not None:
            result['ResourceTypesScope'] = self.resource_types_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        self.config_rule_parameters = []
        if m.get('ConfigRuleParameters') is not None:
            for k in m.get('ConfigRuleParameters'):
                temp_model = GetCompliancePackResponseBodyCompliancePackConfigRulesConfigRuleParameters()
                self.config_rule_parameters.append(temp_model.from_map(k))
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ManagedRuleIdentifier') is not None:
            self.managed_rule_identifier = m.get('ManagedRuleIdentifier')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class GetCompliancePackResponseBodyCompliancePackScope(TeaModel):
    def __init__(self, exclude_resource_ids_scope=None, region_ids_scope=None, resource_group_ids_scope=None,
                 tag_key_scope=None, tag_value_scope=None):
        # The ID of the resource that you do not want to evaluate by using the compliance package.
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the region whose resources you want to evaluate by using the compliance package.
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group whose resources you want to evaluate by using the compliance package.
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The tag key of the resource that you want to evaluate by using the compliance package.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value of the resource that you want to evaluate by using the compliance package.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class GetCompliancePackResponseBodyCompliancePack(TeaModel):
    def __init__(self, account_id=None, compliance_pack_id=None, compliance_pack_name=None,
                 compliance_pack_template_id=None, config_rules=None, create_timestamp=None, description=None, risk_level=None, scope=None,
                 status=None, template_content=None):
        # The ID of the Alibaba Cloud account to which the compliance package belongs.
        self.account_id = account_id  # type: long
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The name of the compliance package.
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The ID of the compliance package template.
        self.compliance_pack_template_id = compliance_pack_template_id  # type: str
        # The rules in the compliance package.
        self.config_rules = config_rules  # type: list[GetCompliancePackResponseBodyCompliancePackConfigRules]
        # The timestamp when the compliance package was created. Unit: milliseconds.
        self.create_timestamp = create_timestamp  # type: long
        # The description of the compliance package.
        self.description = description  # type: str
        # The risk level of the resources that are not compliant with the rules in the compliance package. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int
        # The resource group for which the compliance package took effect.
        self.scope = scope  # type: GetCompliancePackResponseBodyCompliancePackScope
        # The status of the compliance package. Valid values:
        # 
        # *   ACTIVE: The compliance package is normal.
        # *   CREATING: The compliance package is being created.
        self.status = status  # type: str
        self.template_content = template_content  # type: str

    def validate(self):
        if self.config_rules:
            for k in self.config_rules:
                if k:
                    k.validate()
        if self.scope:
            self.scope.validate()

    def to_map(self):
        _map = super(GetCompliancePackResponseBodyCompliancePack, 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.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        if self.compliance_pack_template_id is not None:
            result['CompliancePackTemplateId'] = self.compliance_pack_template_id
        result['ConfigRules'] = []
        if self.config_rules is not None:
            for k in self.config_rules:
                result['ConfigRules'].append(k.to_map() if k else None)
        if self.create_timestamp is not None:
            result['CreateTimestamp'] = self.create_timestamp
        if self.description is not None:
            result['Description'] = self.description
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.scope is not None:
            result['Scope'] = self.scope.to_map()
        if self.status is not None:
            result['Status'] = self.status
        if self.template_content is not None:
            result['TemplateContent'] = self.template_content
        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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        if m.get('CompliancePackTemplateId') is not None:
            self.compliance_pack_template_id = m.get('CompliancePackTemplateId')
        self.config_rules = []
        if m.get('ConfigRules') is not None:
            for k in m.get('ConfigRules'):
                temp_model = GetCompliancePackResponseBodyCompliancePackConfigRules()
                self.config_rules.append(temp_model.from_map(k))
        if m.get('CreateTimestamp') is not None:
            self.create_timestamp = m.get('CreateTimestamp')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('Scope') is not None:
            temp_model = GetCompliancePackResponseBodyCompliancePackScope()
            self.scope = temp_model.from_map(m['Scope'])
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('TemplateContent') is not None:
            self.template_content = m.get('TemplateContent')
        return self


class GetCompliancePackResponseBody(TeaModel):
    def __init__(self, compliance_pack=None, request_id=None):
        # The details of the compliance package.
        self.compliance_pack = compliance_pack  # type: GetCompliancePackResponseBodyCompliancePack
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_pack is not None:
            result['CompliancePack'] = self.compliance_pack.to_map()
        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('CompliancePack') is not None:
            temp_model = GetCompliancePackResponseBodyCompliancePack()
            self.compliance_pack = temp_model.from_map(m['CompliancePack'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetCompliancePackResponse(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: GetCompliancePackResponseBody

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

    def to_map(self):
        _map = super(GetCompliancePackResponse, 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 = GetCompliancePackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetCompliancePackReportRequest(TeaModel):
    def __init__(self, compliance_pack_id=None):
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.compliance_pack_id = compliance_pack_id  # type: str

    def validate(self):
        pass

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

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

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


class GetCompliancePackReportResponseBodyCompliancePackReport(TeaModel):
    def __init__(self, account_id=None, compliance_pack_id=None, report_create_timestamp=None, report_status=None,
                 report_url=None):
        # The ID of the Alibaba Cloud account to which the compliance package belongs.
        self.account_id = account_id  # type: long
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The timestamp when the compliance evaluation report was generated. Unit: milliseconds.
        self.report_create_timestamp = report_create_timestamp  # type: long
        # The status of the compliance evaluation report. Valid values:
        # 
        # *   NONE: The compliance evaluation report is not generated.
        # *   CREATING: The compliance evaluation report is being generated.
        # *   COMPLETE: The compliance evaluation report is generated.
        self.report_status = report_status  # type: str
        # The URL that is used to download the compliance evaluation report.
        self.report_url = report_url  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetCompliancePackReportResponseBodyCompliancePackReport, 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.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.report_create_timestamp is not None:
            result['ReportCreateTimestamp'] = self.report_create_timestamp
        if self.report_status is not None:
            result['ReportStatus'] = self.report_status
        if self.report_url is not None:
            result['ReportUrl'] = self.report_url
        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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ReportCreateTimestamp') is not None:
            self.report_create_timestamp = m.get('ReportCreateTimestamp')
        if m.get('ReportStatus') is not None:
            self.report_status = m.get('ReportStatus')
        if m.get('ReportUrl') is not None:
            self.report_url = m.get('ReportUrl')
        return self


class GetCompliancePackReportResponseBody(TeaModel):
    def __init__(self, compliance_pack_report=None, request_id=None):
        # The information about the compliance evaluation report.
        self.compliance_pack_report = compliance_pack_report  # type: GetCompliancePackReportResponseBodyCompliancePackReport
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_pack_report is not None:
            result['CompliancePackReport'] = self.compliance_pack_report.to_map()
        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('CompliancePackReport') is not None:
            temp_model = GetCompliancePackReportResponseBodyCompliancePackReport()
            self.compliance_pack_report = temp_model.from_map(m['CompliancePackReport'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetCompliancePackReportResponse(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: GetCompliancePackReportResponseBody

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

    def to_map(self):
        _map = super(GetCompliancePackReportResponse, 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 = GetCompliancePackReportResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetComplianceSummaryResponseBodyComplianceSummaryComplianceSummaryByConfigRule(TeaModel):
    def __init__(self, compliance_summary_timestamp=None, compliant_count=None, non_compliant_count=None,
                 total_count=None):
        # The time when the compliance summary was generated. Unit: milliseconds.
        self.compliance_summary_timestamp = compliance_summary_timestamp  # type: long
        # The number of rules evaluated as compliant.
        self.compliant_count = compliant_count  # type: int
        # The number of rules evaluated as non-compliant.
        self.non_compliant_count = non_compliant_count  # type: int
        # The total number of rules.
        self.total_count = total_count  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_summary_timestamp is not None:
            result['ComplianceSummaryTimestamp'] = self.compliance_summary_timestamp
        if self.compliant_count is not None:
            result['CompliantCount'] = self.compliant_count
        if self.non_compliant_count is not None:
            result['NonCompliantCount'] = self.non_compliant_count
        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('ComplianceSummaryTimestamp') is not None:
            self.compliance_summary_timestamp = m.get('ComplianceSummaryTimestamp')
        if m.get('CompliantCount') is not None:
            self.compliant_count = m.get('CompliantCount')
        if m.get('NonCompliantCount') is not None:
            self.non_compliant_count = m.get('NonCompliantCount')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class GetComplianceSummaryResponseBodyComplianceSummaryComplianceSummaryByResource(TeaModel):
    def __init__(self, compliance_summary_timestamp=None, compliant_count=None, non_compliant_count=None,
                 total_count=None):
        # The time when the compliance summary was generated. Unit: milliseconds.
        self.compliance_summary_timestamp = compliance_summary_timestamp  # type: long
        # The number of resources evaluated as compliant.
        self.compliant_count = compliant_count  # type: int
        # The number of resources evaluated as non-compliant.
        self.non_compliant_count = non_compliant_count  # type: int
        # The total number of resources.
        self.total_count = total_count  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_summary_timestamp is not None:
            result['ComplianceSummaryTimestamp'] = self.compliance_summary_timestamp
        if self.compliant_count is not None:
            result['CompliantCount'] = self.compliant_count
        if self.non_compliant_count is not None:
            result['NonCompliantCount'] = self.non_compliant_count
        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('ComplianceSummaryTimestamp') is not None:
            self.compliance_summary_timestamp = m.get('ComplianceSummaryTimestamp')
        if m.get('CompliantCount') is not None:
            self.compliant_count = m.get('CompliantCount')
        if m.get('NonCompliantCount') is not None:
            self.non_compliant_count = m.get('NonCompliantCount')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class GetComplianceSummaryResponseBodyComplianceSummary(TeaModel):
    def __init__(self, compliance_summary_by_config_rule=None, compliance_summary_by_resource=None):
        # The summary of compliance statistics from the rule dimension.
        self.compliance_summary_by_config_rule = compliance_summary_by_config_rule  # type: GetComplianceSummaryResponseBodyComplianceSummaryComplianceSummaryByConfigRule
        # The summary of compliance statistics from the resource dimension.
        self.compliance_summary_by_resource = compliance_summary_by_resource  # type: GetComplianceSummaryResponseBodyComplianceSummaryComplianceSummaryByResource

    def validate(self):
        if self.compliance_summary_by_config_rule:
            self.compliance_summary_by_config_rule.validate()
        if self.compliance_summary_by_resource:
            self.compliance_summary_by_resource.validate()

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

        result = dict()
        if self.compliance_summary_by_config_rule is not None:
            result['ComplianceSummaryByConfigRule'] = self.compliance_summary_by_config_rule.to_map()
        if self.compliance_summary_by_resource is not None:
            result['ComplianceSummaryByResource'] = self.compliance_summary_by_resource.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceSummaryByConfigRule') is not None:
            temp_model = GetComplianceSummaryResponseBodyComplianceSummaryComplianceSummaryByConfigRule()
            self.compliance_summary_by_config_rule = temp_model.from_map(m['ComplianceSummaryByConfigRule'])
        if m.get('ComplianceSummaryByResource') is not None:
            temp_model = GetComplianceSummaryResponseBodyComplianceSummaryComplianceSummaryByResource()
            self.compliance_summary_by_resource = temp_model.from_map(m['ComplianceSummaryByResource'])
        return self


class GetComplianceSummaryResponseBody(TeaModel):
    def __init__(self, compliance_summary=None, request_id=None):
        # The summary of compliance statistics.
        self.compliance_summary = compliance_summary  # type: GetComplianceSummaryResponseBodyComplianceSummary
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_summary is not None:
            result['ComplianceSummary'] = self.compliance_summary.to_map()
        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('ComplianceSummary') is not None:
            temp_model = GetComplianceSummaryResponseBodyComplianceSummary()
            self.compliance_summary = temp_model.from_map(m['ComplianceSummary'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetComplianceSummaryResponse(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: GetComplianceSummaryResponseBody

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

    def to_map(self):
        _map = super(GetComplianceSummaryResponse, 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 = GetComplianceSummaryResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetConfigDeliveryChannelRequest(TeaModel):
    def __init__(self, delivery_channel_id=None):
        # The ID of the delivery channel.
        # 
        # For more information about how to obtain the ID of a delivery channel, see [DescribeDeliveryChannels](~~429841~~).
        self.delivery_channel_id = delivery_channel_id  # type: str

    def validate(self):
        pass

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

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

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


class GetConfigDeliveryChannelResponseBodyDeliveryChannel(TeaModel):
    def __init__(self, account_id=None, configuration_item_change_notification=None, configuration_snapshot=None,
                 delivery_channel_assume_role_arn=None, delivery_channel_condition=None, delivery_channel_id=None, delivery_channel_name=None,
                 delivery_channel_target_arn=None, delivery_channel_type=None, delivery_snapshot_time=None, description=None,
                 non_compliant_notification=None, oversized_data_osstarget_arn=None, status=None):
        # The ID of your Alibaba Cloud account.
        self.account_id = account_id  # type: long
        # Indicates whether the specified destination receives resource change logs. If the value of this parameter is true, Cloud Config delivers the resource change logs to OSS, Log Service, or MNS when the configurations of the resources change. Valid values:
        # 
        # *   true: The specified destination receives resource change logs.
        # *   false: The specified destination does not receive resource change logs.
        self.configuration_item_change_notification = configuration_item_change_notification  # type: bool
        # Indicates whether the specified destination receives scheduled resource snapshots. Cloud Config delivers scheduled resource snapshots at `04:00Z` and `16:00Z` to OSS, MNS, or Log Service every day. The time is displayed in UTC. Valid values:
        # 
        # *   true: The specified destination receives scheduled resource snapshots.
        # *   false: The specified destination does not receive scheduled resource snapshots.
        self.configuration_snapshot = configuration_snapshot  # type: bool
        # The Alibaba Cloud Resource Name (ARN) of the role assumed by the delivery channel.
        self.delivery_channel_assume_role_arn = delivery_channel_assume_role_arn  # type: str
        # The rule that is attached to the delivery channel. This parameter is available when you deliver data of all types to MNS or deliver snapshots to Log Service.
        # 
        # *   If the value of the DeliveryChannelType parameter is MNS, take note of the following settings of the lowest risk level and resource types of the events to which you subscribed:
        # 
        #     *   The setting of the lowest risk level for the events to which you want to subscribe is in the following format: `{"filterType":"RuleRiskLevel","value":"1","multiple":false}`.
        # 
        #         The `value` field indicates the lowest risk level of the events to which you want to subscribe. Valid values: 1, 2, and 3. The value 1 indicates the high risk level, the value 2 indicates the medium risk level, and the value 3 indicates the low risk level.
        # 
        #     *   The setting of the resource types of the events to which you want to subscribe is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #         The `values` field indicates the resource types of the events to which you want to subscribe. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        # 
        # *   If you set the DeliveryChannelType parameter to SLS, the setting of the resource types of the snapshots to which you want to deliver is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #     The `values` field specifies the resource types of the snapshots to which you want to deliver. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        self.delivery_channel_condition = delivery_channel_condition  # type: str
        # The ID of the delivery channel.
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The name of the delivery channel.
        self.delivery_channel_name = delivery_channel_name  # type: str
        # The Alibaba Cloud Resource Name (ARN) of the delivery destination.
        # 
        # *   If the value of the DeliveryChannelType parameter is OSS, the value of this parameter is the ARN of the destination OSS bucket.
        # *   If the value of the DeliveryChannelType parameter is MNS, the value of this parameter is the ARN of the destination MNS topic.
        # *   If the value of the DeliveryChannelType parameter is SLS, the value of this parameter is the ARN of the destination Log Service Logstore.
        self.delivery_channel_target_arn = delivery_channel_target_arn  # type: str
        # The type of the delivery channel. Valid values:
        # 
        # *   OSS: Object Storage Service (OSS)
        # *   MNS: Message Service (MNS)
        # *   SLS: Log Service
        self.delivery_channel_type = delivery_channel_type  # type: str
        # The time when Cloud Config delivers scheduled resources snapshots every day.
        # 
        # Format: `HH:mmZ`. This time is displayed in UTC.
        self.delivery_snapshot_time = delivery_snapshot_time  # type: str
        # The description of the delivery channel.
        self.description = description  # type: str
        # Indicates whether the specified destination receives resource non-compliance events. If the value of this parameter is true, Cloud Config delivers resource non-compliance events to Log Service or MNS when resources are evaluated as non-compliant. Valid values:
        # 
        # *   true: The specified destination receives resource non-compliance events.
        # *   false: The specified destination does not receive resource non-compliance events.
        self.non_compliant_notification = non_compliant_notification  # type: bool
        # The ARN of the OSS bucket to which you want to transfer the delivery data when the size of the data exceeds the specified upper limit of the delivery channel.
        self.oversized_data_osstarget_arn = oversized_data_osstarget_arn  # type: str
        # The status of the delivery channel. Valid values:
        # 
        # *   0: The delivery channel is disabled.
        # *   1: The delivery channel is enabled.
        self.status = status  # type: int

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetConfigDeliveryChannelResponseBodyDeliveryChannel, 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.configuration_item_change_notification is not None:
            result['ConfigurationItemChangeNotification'] = self.configuration_item_change_notification
        if self.configuration_snapshot is not None:
            result['ConfigurationSnapshot'] = self.configuration_snapshot
        if self.delivery_channel_assume_role_arn is not None:
            result['DeliveryChannelAssumeRoleArn'] = self.delivery_channel_assume_role_arn
        if self.delivery_channel_condition is not None:
            result['DeliveryChannelCondition'] = self.delivery_channel_condition
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_id
        if self.delivery_channel_name is not None:
            result['DeliveryChannelName'] = self.delivery_channel_name
        if self.delivery_channel_target_arn is not None:
            result['DeliveryChannelTargetArn'] = self.delivery_channel_target_arn
        if self.delivery_channel_type is not None:
            result['DeliveryChannelType'] = self.delivery_channel_type
        if self.delivery_snapshot_time is not None:
            result['DeliverySnapshotTime'] = self.delivery_snapshot_time
        if self.description is not None:
            result['Description'] = self.description
        if self.non_compliant_notification is not None:
            result['NonCompliantNotification'] = self.non_compliant_notification
        if self.oversized_data_osstarget_arn is not None:
            result['OversizedDataOSSTargetArn'] = self.oversized_data_osstarget_arn
        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('AccountId') is not None:
            self.account_id = m.get('AccountId')
        if m.get('ConfigurationItemChangeNotification') is not None:
            self.configuration_item_change_notification = m.get('ConfigurationItemChangeNotification')
        if m.get('ConfigurationSnapshot') is not None:
            self.configuration_snapshot = m.get('ConfigurationSnapshot')
        if m.get('DeliveryChannelAssumeRoleArn') is not None:
            self.delivery_channel_assume_role_arn = m.get('DeliveryChannelAssumeRoleArn')
        if m.get('DeliveryChannelCondition') is not None:
            self.delivery_channel_condition = m.get('DeliveryChannelCondition')
        if m.get('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('DeliveryChannelName') is not None:
            self.delivery_channel_name = m.get('DeliveryChannelName')
        if m.get('DeliveryChannelTargetArn') is not None:
            self.delivery_channel_target_arn = m.get('DeliveryChannelTargetArn')
        if m.get('DeliveryChannelType') is not None:
            self.delivery_channel_type = m.get('DeliveryChannelType')
        if m.get('DeliverySnapshotTime') is not None:
            self.delivery_snapshot_time = m.get('DeliverySnapshotTime')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('NonCompliantNotification') is not None:
            self.non_compliant_notification = m.get('NonCompliantNotification')
        if m.get('OversizedDataOSSTargetArn') is not None:
            self.oversized_data_osstarget_arn = m.get('OversizedDataOSSTargetArn')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class GetConfigDeliveryChannelResponseBody(TeaModel):
    def __init__(self, delivery_channel=None, request_id=None):
        # The information about the delivery channel.
        self.delivery_channel = delivery_channel  # type: GetConfigDeliveryChannelResponseBodyDeliveryChannel
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.delivery_channel is not None:
            result['DeliveryChannel'] = self.delivery_channel.to_map()
        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('DeliveryChannel') is not None:
            temp_model = GetConfigDeliveryChannelResponseBodyDeliveryChannel()
            self.delivery_channel = temp_model.from_map(m['DeliveryChannel'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetConfigDeliveryChannelResponse(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: GetConfigDeliveryChannelResponseBody

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

    def to_map(self):
        _map = super(GetConfigDeliveryChannelResponse, 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 = GetConfigDeliveryChannelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetConfigRuleRequest(TeaModel):
    def __init__(self, config_rule_id=None):
        # The rule ID.
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_id = config_rule_id  # type: str

    def validate(self):
        pass

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

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

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


class GetConfigRuleResponseBodyConfigRuleCompliance(TeaModel):
    def __init__(self, compliance_type=None, count=None):
        # The statistics on the compliance evaluation results by compliance type. Valid values:
        # 
        # *   COMPLIANT: The resource was evaluated as compliant.
        # *   NON_COMPLIANT: The resource was evaluated as incompliant.
        # *   NOT_APPLICABLE: The rule did not apply to your resource.
        # *   INSUFFICIENT_DATA: No resource data was available.
        self.compliance_type = compliance_type  # type: str
        # The number of evaluated resources.
        self.count = count  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.count is not None:
            result['Count'] = self.count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('Count') is not None:
            self.count = m.get('Count')
        return self


class GetConfigRuleResponseBodyConfigRuleConfigRuleEvaluationStatus(TeaModel):
    def __init__(self, first_activated_timestamp=None, first_evaluation_started=None, last_error_code=None,
                 last_error_message=None, last_failed_evaluation_timestamp=None, last_failed_invocation_timestamp=None,
                 last_successful_evaluation_timestamp=None, last_successful_invocation_timestamp=None):
        # The timestamp when the rule was first triggered. Unit: milliseconds.
        self.first_activated_timestamp = first_activated_timestamp  # type: long
        # Indicates whether resources were evaluated based on the rule. Valid values:
        # 
        # *   true: Resources were evaluated based on the rule.
        # *   false: Resources were not evaluated based on the rule.
        self.first_evaluation_started = first_evaluation_started  # type: bool
        # The error code returned for the last failed compliance evaluation.
        self.last_error_code = last_error_code  # type: str
        # The error message returned for the last failed compliance evaluation.
        self.last_error_message = last_error_message  # type: str
        # The timestamp when the last failed compliance evaluation of the rule ended. Unit: milliseconds.
        self.last_failed_evaluation_timestamp = last_failed_evaluation_timestamp  # type: long
        # The timestamp when the last failed compliance evaluation of the rule started. Unit: milliseconds.
        self.last_failed_invocation_timestamp = last_failed_invocation_timestamp  # type: long
        # The timestamp when the last successful compliance evaluation of the rule ended. Unit: milliseconds.
        self.last_successful_evaluation_timestamp = last_successful_evaluation_timestamp  # type: long
        # The timestamp when the last successful compliance evaluation of the rule started. Unit: milliseconds.
        self.last_successful_invocation_timestamp = last_successful_invocation_timestamp  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.first_activated_timestamp is not None:
            result['FirstActivatedTimestamp'] = self.first_activated_timestamp
        if self.first_evaluation_started is not None:
            result['FirstEvaluationStarted'] = self.first_evaluation_started
        if self.last_error_code is not None:
            result['LastErrorCode'] = self.last_error_code
        if self.last_error_message is not None:
            result['LastErrorMessage'] = self.last_error_message
        if self.last_failed_evaluation_timestamp is not None:
            result['LastFailedEvaluationTimestamp'] = self.last_failed_evaluation_timestamp
        if self.last_failed_invocation_timestamp is not None:
            result['LastFailedInvocationTimestamp'] = self.last_failed_invocation_timestamp
        if self.last_successful_evaluation_timestamp is not None:
            result['LastSuccessfulEvaluationTimestamp'] = self.last_successful_evaluation_timestamp
        if self.last_successful_invocation_timestamp is not None:
            result['LastSuccessfulInvocationTimestamp'] = self.last_successful_invocation_timestamp
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('FirstActivatedTimestamp') is not None:
            self.first_activated_timestamp = m.get('FirstActivatedTimestamp')
        if m.get('FirstEvaluationStarted') is not None:
            self.first_evaluation_started = m.get('FirstEvaluationStarted')
        if m.get('LastErrorCode') is not None:
            self.last_error_code = m.get('LastErrorCode')
        if m.get('LastErrorMessage') is not None:
            self.last_error_message = m.get('LastErrorMessage')
        if m.get('LastFailedEvaluationTimestamp') is not None:
            self.last_failed_evaluation_timestamp = m.get('LastFailedEvaluationTimestamp')
        if m.get('LastFailedInvocationTimestamp') is not None:
            self.last_failed_invocation_timestamp = m.get('LastFailedInvocationTimestamp')
        if m.get('LastSuccessfulEvaluationTimestamp') is not None:
            self.last_successful_evaluation_timestamp = m.get('LastSuccessfulEvaluationTimestamp')
        if m.get('LastSuccessfulInvocationTimestamp') is not None:
            self.last_successful_invocation_timestamp = m.get('LastSuccessfulInvocationTimestamp')
        return self


class GetConfigRuleResponseBodyConfigRuleCreateBy(TeaModel):
    def __init__(self, compliance_pack_id=None, compliance_pack_name=None, creator_id=None, creator_name=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The name of the compliance package.
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The ID of the account that was used to create the rule.
        self.creator_id = creator_id  # type: str
        # The name of the account that was used to create the rule.
        self.creator_name = creator_name  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        if self.creator_id is not None:
            result['CreatorId'] = self.creator_id
        if self.creator_name is not None:
            result['CreatorName'] = self.creator_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        if m.get('CreatorId') is not None:
            self.creator_id = m.get('CreatorId')
        if m.get('CreatorName') is not None:
            self.creator_name = m.get('CreatorName')
        return self


class GetConfigRuleResponseBodyConfigRuleManagedRuleSourceDetails(TeaModel):
    def __init__(self, event_source=None, maximum_execution_frequency=None, message_type=None):
        # The event source.
        # 
        # >  Only events related to Cloud Config are supported. Valid value: aliyun.config.
        self.event_source = event_source  # type: str
        # The interval at which the rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour
        # *   Three_Hours: 3 hours
        # *   Six_Hours: 6 hours.
        # *   Twelve_Hours: 12 hours
        # *   TwentyFour_Hours: 24 hours
        # 
        # >  This parameter is returned if the managed rule is periodically triggered.
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
        # *   ScheduledNotification: The rule is periodically triggered.
        self.message_type = message_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.event_source is not None:
            result['EventSource'] = self.event_source
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.message_type is not None:
            result['MessageType'] = self.message_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EventSource') is not None:
            self.event_source = m.get('EventSource')
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('MessageType') is not None:
            self.message_type = m.get('MessageType')
        return self


class GetConfigRuleResponseBodyConfigRuleManagedRule(TeaModel):
    def __init__(self, compulsory_input_parameter_details=None, description=None, identifier=None, labels=None,
                 managed_rule_name=None, optional_input_parameter_details=None, source_details=None):
        # The required input parameters of the managed rule.
        self.compulsory_input_parameter_details = compulsory_input_parameter_details  # type: dict[str, any]
        # The description of the managed rule.
        self.description = description  # type: str
        # The ID of the managed rule.
        self.identifier = identifier  # type: str
        # The list of rule tags.
        self.labels = labels  # type: list[str]
        # The name of the managed rule.
        self.managed_rule_name = managed_rule_name  # type: str
        # The optional input parameters of the managed rule.
        self.optional_input_parameter_details = optional_input_parameter_details  # type: dict[str, any]
        # The details of the source of the managed rule.
        self.source_details = source_details  # type: list[GetConfigRuleResponseBodyConfigRuleManagedRuleSourceDetails]

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

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

        result = dict()
        if self.compulsory_input_parameter_details is not None:
            result['CompulsoryInputParameterDetails'] = self.compulsory_input_parameter_details
        if self.description is not None:
            result['Description'] = self.description
        if self.identifier is not None:
            result['Identifier'] = self.identifier
        if self.labels is not None:
            result['Labels'] = self.labels
        if self.managed_rule_name is not None:
            result['ManagedRuleName'] = self.managed_rule_name
        if self.optional_input_parameter_details is not None:
            result['OptionalInputParameterDetails'] = self.optional_input_parameter_details
        result['SourceDetails'] = []
        if self.source_details is not None:
            for k in self.source_details:
                result['SourceDetails'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompulsoryInputParameterDetails') is not None:
            self.compulsory_input_parameter_details = m.get('CompulsoryInputParameterDetails')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('Identifier') is not None:
            self.identifier = m.get('Identifier')
        if m.get('Labels') is not None:
            self.labels = m.get('Labels')
        if m.get('ManagedRuleName') is not None:
            self.managed_rule_name = m.get('ManagedRuleName')
        if m.get('OptionalInputParameterDetails') is not None:
            self.optional_input_parameter_details = m.get('OptionalInputParameterDetails')
        self.source_details = []
        if m.get('SourceDetails') is not None:
            for k in m.get('SourceDetails'):
                temp_model = GetConfigRuleResponseBodyConfigRuleManagedRuleSourceDetails()
                self.source_details.append(temp_model.from_map(k))
        return self


class GetConfigRuleResponseBodyConfigRuleScope(TeaModel):
    def __init__(self, compliance_resource_types=None):
        # The types of the resources to be evaluated against the rule. You can also view the resource types by using the ResourceTypesScope parameter.
        self.compliance_resource_types = compliance_resource_types  # type: list[str]

    def validate(self):
        pass

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

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

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


class GetConfigRuleResponseBodyConfigRuleSourceSourceDetails(TeaModel):
    def __init__(self, event_source=None, maximum_execution_frequency=None, message_type=None):
        # The event source.
        # 
        # >  Only events related to Cloud Config are supported. Valid value: aliyun.config.
        self.event_source = event_source  # type: str
        # The interval at which the rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour
        # *   Three_Hours: 3 hours
        # *   Six_Hours: 6 hours
        # *   Twelve_Hours: 12 hours
        # *   TwentyFour_Hours: 24 hours
        # 
        # >  This parameter is returned if the rule is periodically triggered.
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
        # *   ScheduledNotification: The rule is periodically triggered.
        self.message_type = message_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.event_source is not None:
            result['EventSource'] = self.event_source
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.message_type is not None:
            result['MessageType'] = self.message_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EventSource') is not None:
            self.event_source = m.get('EventSource')
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('MessageType') is not None:
            self.message_type = m.get('MessageType')
        return self


class GetConfigRuleResponseBodyConfigRuleSource(TeaModel):
    def __init__(self, identifier=None, owner=None, source_details=None):
        # The identifier of the evaluation rule.
        # 
        # *   If the rule was created based on a managed rule, the value of this parameter is the name of the managed rule.
        # *   If the rule is a custom rule, the value of this parameter is the Alibaba Cloud Resource Name (ARN) of the relevant function in Function Compute.
        self.identifier = identifier  # type: str
        # The method that is used to create the rule. Valid values:
        # 
        # *   CUSTOM_FC: a custom rule.
        # *   ALIYUN: a managed rule.
        self.owner = owner  # type: str
        # The details of the source of the rule.
        self.source_details = source_details  # type: list[GetConfigRuleResponseBodyConfigRuleSourceSourceDetails]

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

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

        result = dict()
        if self.identifier is not None:
            result['Identifier'] = self.identifier
        if self.owner is not None:
            result['Owner'] = self.owner
        result['SourceDetails'] = []
        if self.source_details is not None:
            for k in self.source_details:
                result['SourceDetails'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Identifier') is not None:
            self.identifier = m.get('Identifier')
        if m.get('Owner') is not None:
            self.owner = m.get('Owner')
        self.source_details = []
        if m.get('SourceDetails') is not None:
            for k in m.get('SourceDetails'):
                temp_model = GetConfigRuleResponseBodyConfigRuleSourceSourceDetails()
                self.source_details.append(temp_model.from_map(k))
        return self


class GetConfigRuleResponseBodyConfigRule(TeaModel):
    def __init__(self, account_id=None, compliance=None, config_rule_arn=None, config_rule_evaluation_status=None,
                 config_rule_id=None, config_rule_name=None, config_rule_state=None, config_rule_trigger_types=None,
                 create_by=None, create_timestamp=None, description=None, exclude_resource_ids_scope=None,
                 input_parameters=None, managed_rule=None, maximum_execution_frequency=None, modified_timestamp=None,
                 region_ids_scope=None, resource_group_ids_scope=None, resource_types_scope=None, risk_level=None, scope=None,
                 source=None, tag_key_logic_scope=None, tag_key_scope=None, tag_value_scope=None):
        # The ID of the Alibaba Cloud account to which the rule belongs.
        self.account_id = account_id  # type: long
        # The details of compliance evaluation results.
        self.compliance = compliance  # type: GetConfigRuleResponseBodyConfigRuleCompliance
        # The ARN of the managed rule.
        self.config_rule_arn = config_rule_arn  # type: str
        # The information about compliance evaluations performed by the rule.
        self.config_rule_evaluation_status = config_rule_evaluation_status  # type: GetConfigRuleResponseBodyConfigRuleConfigRuleEvaluationStatus
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The name of the defense rule.
        self.config_rule_name = config_rule_name  # type: str
        # The status of the rule. Valid values:
        # 
        # *   ACTIVE: The rule was being used to monitor resource configurations.
        # *   DELETING: The rule was being deleted.
        # *   EVALUATING: The rule was triggered and is being used to monitor resource configurations.
        # *   INACTIVE: The rule was disabled.
        self.config_rule_state = config_rule_state  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The rule was triggered by configuration changes.
        # *   ScheduledNotification: The rule was periodically triggered.
        self.config_rule_trigger_types = config_rule_trigger_types  # type: str
        # The information about the creation of the rule.
        self.create_by = create_by  # type: GetConfigRuleResponseBodyConfigRuleCreateBy
        # The timestamp when the rule was created. Unit: milliseconds.
        self.create_timestamp = create_timestamp  # type: long
        # The description of the managed rule.
        self.description = description  # type: str
        # The ID of the resource excluded from the compliance evaluations performed by the rule.
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The details of the input parameters of the rule.
        self.input_parameters = input_parameters  # type: dict[str, any]
        # The details of the managed rule.
        self.managed_rule = managed_rule  # type: GetConfigRuleResponseBodyConfigRuleManagedRule
        # The interval at which the rule was triggered. Valid values:
        # 
        # *   One_Hour: 1 hour.
        # *   Three_Hours: 3 hours.
        # *   Six_Hours: 6 hours.
        # *   Twelve_Hours: 12 hours.
        # *   TwentyFour_Hours: 24 hours.
        # 
        # > This parameter is returned if the managed rule is periodically triggered.
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The timestamp when the rule was last updated. Unit: milliseconds.
        self.modified_timestamp = modified_timestamp  # type: long
        # The ID of the region to which the rule applies.
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group to which the rule applies.
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The type of the resource to be evaluated by the rule.
        self.resource_types_scope = resource_types_scope  # type: str
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int
        # The effective scope of the rule.
        self.scope = scope  # type: GetConfigRuleResponseBodyConfigRuleScope
        # The information about how the rule was created.
        self.source = source  # type: GetConfigRuleResponseBodyConfigRuleSource
        # The ID of the member account to which the rule does not apply, which means that the resources within the member account are not evaluated based on the rule.
        # 
        # > This parameter applies only to a managed rule.
        self.tag_key_logic_scope = tag_key_logic_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with the specified tag key.
        # 
        # > The `TagKeyScope` and `TagValueScope` parameters are returned at the same time.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value used to filter resources. The rule applies only to the resources with the specified tag value.
        # 
        # > The `TagKeyScope` and `TagValueScope` parameters are returned at the same time.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        if self.compliance:
            self.compliance.validate()
        if self.config_rule_evaluation_status:
            self.config_rule_evaluation_status.validate()
        if self.create_by:
            self.create_by.validate()
        if self.managed_rule:
            self.managed_rule.validate()
        if self.scope:
            self.scope.validate()
        if self.source:
            self.source.validate()

    def to_map(self):
        _map = super(GetConfigRuleResponseBodyConfigRule, 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.compliance is not None:
            result['Compliance'] = self.compliance.to_map()
        if self.config_rule_arn is not None:
            result['ConfigRuleArn'] = self.config_rule_arn
        if self.config_rule_evaluation_status is not None:
            result['ConfigRuleEvaluationStatus'] = self.config_rule_evaluation_status.to_map()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_state is not None:
            result['ConfigRuleState'] = self.config_rule_state
        if self.config_rule_trigger_types is not None:
            result['ConfigRuleTriggerTypes'] = self.config_rule_trigger_types
        if self.create_by is not None:
            result['CreateBy'] = self.create_by.to_map()
        if self.create_timestamp is not None:
            result['CreateTimestamp'] = self.create_timestamp
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.input_parameters is not None:
            result['InputParameters'] = self.input_parameters
        if self.managed_rule is not None:
            result['ManagedRule'] = self.managed_rule.to_map()
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.modified_timestamp is not None:
            result['ModifiedTimestamp'] = self.modified_timestamp
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.resource_types_scope is not None:
            result['ResourceTypesScope'] = self.resource_types_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.scope is not None:
            result['Scope'] = self.scope.to_map()
        if self.source is not None:
            result['Source'] = self.source.to_map()
        if self.tag_key_logic_scope is not None:
            result['TagKeyLogicScope'] = self.tag_key_logic_scope
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        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('Compliance') is not None:
            temp_model = GetConfigRuleResponseBodyConfigRuleCompliance()
            self.compliance = temp_model.from_map(m['Compliance'])
        if m.get('ConfigRuleArn') is not None:
            self.config_rule_arn = m.get('ConfigRuleArn')
        if m.get('ConfigRuleEvaluationStatus') is not None:
            temp_model = GetConfigRuleResponseBodyConfigRuleConfigRuleEvaluationStatus()
            self.config_rule_evaluation_status = temp_model.from_map(m['ConfigRuleEvaluationStatus'])
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleState') is not None:
            self.config_rule_state = m.get('ConfigRuleState')
        if m.get('ConfigRuleTriggerTypes') is not None:
            self.config_rule_trigger_types = m.get('ConfigRuleTriggerTypes')
        if m.get('CreateBy') is not None:
            temp_model = GetConfigRuleResponseBodyConfigRuleCreateBy()
            self.create_by = temp_model.from_map(m['CreateBy'])
        if m.get('CreateTimestamp') is not None:
            self.create_timestamp = m.get('CreateTimestamp')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('InputParameters') is not None:
            self.input_parameters = m.get('InputParameters')
        if m.get('ManagedRule') is not None:
            temp_model = GetConfigRuleResponseBodyConfigRuleManagedRule()
            self.managed_rule = temp_model.from_map(m['ManagedRule'])
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('ModifiedTimestamp') is not None:
            self.modified_timestamp = m.get('ModifiedTimestamp')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('Scope') is not None:
            temp_model = GetConfigRuleResponseBodyConfigRuleScope()
            self.scope = temp_model.from_map(m['Scope'])
        if m.get('Source') is not None:
            temp_model = GetConfigRuleResponseBodyConfigRuleSource()
            self.source = temp_model.from_map(m['Source'])
        if m.get('TagKeyLogicScope') is not None:
            self.tag_key_logic_scope = m.get('TagKeyLogicScope')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class GetConfigRuleResponseBody(TeaModel):
    def __init__(self, config_rule=None, request_id=None):
        # The details of the rule.
        self.config_rule = config_rule  # type: GetConfigRuleResponseBodyConfigRule
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.config_rule is not None:
            result['ConfigRule'] = self.config_rule.to_map()
        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('ConfigRule') is not None:
            temp_model = GetConfigRuleResponseBodyConfigRule()
            self.config_rule = temp_model.from_map(m['ConfigRule'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetConfigRuleResponse(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: GetConfigRuleResponseBody

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

    def to_map(self):
        _map = super(GetConfigRuleResponse, 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 = GetConfigRuleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetConfigRuleComplianceByPackRequest(TeaModel):
    def __init__(self, compliance_pack_id=None):
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.compliance_pack_id = compliance_pack_id  # type: str

    def validate(self):
        pass

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

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

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


class GetConfigRuleComplianceByPackResponseBodyConfigRuleComplianceResultConfigRuleCompliances(TeaModel):
    def __init__(self, compliance_type=None, config_rule_id=None, config_rule_name=None):
        # The compliance evaluation result. Valid values:
        # 
        # *   COMPLIANT: The relevant resources are evaluated as compliant.
        # *   NON_COMPLIANT: The relevant resources are evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to your resources.
        # *   INSUFFICIENT_DATA: No resource data is available.
        self.compliance_type = compliance_type  # type: str
        # The ID of the rule enabled in the compliance package.
        self.config_rule_id = config_rule_id  # type: str
        # The name of the rule enabled in the compliance package.
        self.config_rule_name = config_rule_name  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        return self


class GetConfigRuleComplianceByPackResponseBodyConfigRuleComplianceResult(TeaModel):
    def __init__(self, compliance_pack_id=None, config_rule_compliances=None, non_compliant_count=None,
                 total_count=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The rule enabled in the compliance package and the compliance evaluation result returned by the rule.
        self.config_rule_compliances = config_rule_compliances  # type: list[GetConfigRuleComplianceByPackResponseBodyConfigRuleComplianceResultConfigRuleCompliances]
        # The number of rules against which specific resources are evaluated as non-compliant.
        self.non_compliant_count = non_compliant_count  # type: int
        # The total number of rules enabled in the compliance package.
        self.total_count = total_count  # type: int

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

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        result['ConfigRuleCompliances'] = []
        if self.config_rule_compliances is not None:
            for k in self.config_rule_compliances:
                result['ConfigRuleCompliances'].append(k.to_map() if k else None)
        if self.non_compliant_count is not None:
            result['NonCompliantCount'] = self.non_compliant_count
        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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        self.config_rule_compliances = []
        if m.get('ConfigRuleCompliances') is not None:
            for k in m.get('ConfigRuleCompliances'):
                temp_model = GetConfigRuleComplianceByPackResponseBodyConfigRuleComplianceResultConfigRuleCompliances()
                self.config_rule_compliances.append(temp_model.from_map(k))
        if m.get('NonCompliantCount') is not None:
            self.non_compliant_count = m.get('NonCompliantCount')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class GetConfigRuleComplianceByPackResponseBody(TeaModel):
    def __init__(self, config_rule_compliance_result=None, request_id=None):
        # The information about the compliance evaluation results returned.
        self.config_rule_compliance_result = config_rule_compliance_result  # type: GetConfigRuleComplianceByPackResponseBodyConfigRuleComplianceResult
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.config_rule_compliance_result is not None:
            result['ConfigRuleComplianceResult'] = self.config_rule_compliance_result.to_map()
        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('ConfigRuleComplianceResult') is not None:
            temp_model = GetConfigRuleComplianceByPackResponseBodyConfigRuleComplianceResult()
            self.config_rule_compliance_result = temp_model.from_map(m['ConfigRuleComplianceResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetConfigRuleComplianceByPackResponse(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: GetConfigRuleComplianceByPackResponseBody

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

    def to_map(self):
        _map = super(GetConfigRuleComplianceByPackResponse, 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 = GetConfigRuleComplianceByPackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetConfigRuleSummaryByRiskLevelResponseBodyConfigRuleSummaries(TeaModel):
    def __init__(self, compliant_count=None, non_compliant_count=None, risk_level=None):
        # The number of rules against which specific resources are evaluated as compliant.
        self.compliant_count = compliant_count  # type: int
        # The number of rules against which specific resources are evaluated as non-compliant.
        self.non_compliant_count = non_compliant_count  # type: int
        # The risk level of the resources that are not compliant with the rules. Valid values:
        # 
        # *   1: high risk level.
        # *   2: medium risk level.
        # *   3: low risk level.
        self.risk_level = risk_level  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.compliant_count is not None:
            result['CompliantCount'] = self.compliant_count
        if self.non_compliant_count is not None:
            result['NonCompliantCount'] = self.non_compliant_count
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompliantCount') is not None:
            self.compliant_count = m.get('CompliantCount')
        if m.get('NonCompliantCount') is not None:
            self.non_compliant_count = m.get('NonCompliantCount')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class GetConfigRuleSummaryByRiskLevelResponseBody(TeaModel):
    def __init__(self, config_rule_summaries=None, request_id=None):
        # The summary of compliance evaluation results by rule risk level.
        self.config_rule_summaries = config_rule_summaries  # type: list[GetConfigRuleSummaryByRiskLevelResponseBodyConfigRuleSummaries]
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['ConfigRuleSummaries'] = []
        if self.config_rule_summaries is not None:
            for k in self.config_rule_summaries:
                result['ConfigRuleSummaries'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.config_rule_summaries = []
        if m.get('ConfigRuleSummaries') is not None:
            for k in m.get('ConfigRuleSummaries'):
                temp_model = GetConfigRuleSummaryByRiskLevelResponseBodyConfigRuleSummaries()
                self.config_rule_summaries.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetConfigRuleSummaryByRiskLevelResponse(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: GetConfigRuleSummaryByRiskLevelResponseBody

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

    def to_map(self):
        _map = super(GetConfigRuleSummaryByRiskLevelResponse, 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 = GetConfigRuleSummaryByRiskLevelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetConfigRulesReportRequest(TeaModel):
    def __init__(self, report_id=None):
        # The ID of the compliance evaluation report.
        self.report_id = report_id  # type: str

    def validate(self):
        pass

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

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

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


class GetConfigRulesReportResponseBodyConfigRulesReport(TeaModel):
    def __init__(self, account_id=None, report_create_timestamp=None, report_id=None, report_status=None,
                 report_url=None):
        # The ID of the Alibaba Cloud account to which the rules belong.
        self.account_id = account_id  # type: long
        # The timestamp when the compliance evaluation report was generated. Unit: milliseconds.
        self.report_create_timestamp = report_create_timestamp  # type: long
        # The ID of the compliance evaluation report.
        self.report_id = report_id  # type: str
        # The status of the compliance evaluation report. Valid values:
        # 
        # *   NONE: The compliance evaluation report is not generated.
        # *   CREATING: The compliance evaluation report is being generated.
        # *   COMPLETE: The compliance evaluation report is generated.
        self.report_status = report_status  # type: str
        # The URL that is used to download the compliance evaluation report.
        self.report_url = report_url  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetConfigRulesReportResponseBodyConfigRulesReport, 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.report_create_timestamp is not None:
            result['ReportCreateTimestamp'] = self.report_create_timestamp
        if self.report_id is not None:
            result['ReportId'] = self.report_id
        if self.report_status is not None:
            result['ReportStatus'] = self.report_status
        if self.report_url is not None:
            result['ReportUrl'] = self.report_url
        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('ReportCreateTimestamp') is not None:
            self.report_create_timestamp = m.get('ReportCreateTimestamp')
        if m.get('ReportId') is not None:
            self.report_id = m.get('ReportId')
        if m.get('ReportStatus') is not None:
            self.report_status = m.get('ReportStatus')
        if m.get('ReportUrl') is not None:
            self.report_url = m.get('ReportUrl')
        return self


class GetConfigRulesReportResponseBody(TeaModel):
    def __init__(self, config_rules_report=None, request_id=None):
        # The information about the compliance evaluation report.
        self.config_rules_report = config_rules_report  # type: GetConfigRulesReportResponseBodyConfigRulesReport
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.config_rules_report is not None:
            result['ConfigRulesReport'] = self.config_rules_report.to_map()
        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('ConfigRulesReport') is not None:
            temp_model = GetConfigRulesReportResponseBodyConfigRulesReport()
            self.config_rules_report = temp_model.from_map(m['ConfigRulesReport'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetConfigRulesReportResponse(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: GetConfigRulesReportResponseBody

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

    def to_map(self):
        _map = super(GetConfigRulesReportResponse, 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 = GetConfigRulesReportResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetConfigurationRecorderResponseBodyConfigurationRecorder(TeaModel):
    def __init__(self, configuration_recorder_status=None, resource_types=None):
        # The status of the configuration recorder. Valid values:
        # 
        # *   REGISTRABLE: The configuration recorder has not been registered.
        # *   BUILDING: The configuration recorder is being deployed.
        # *   REGISTERED: The configuration recorder has been registered.
        # *   REBUILDING: The configuration recorder is being redeployed.
        self.configuration_recorder_status = configuration_recorder_status  # type: str
        # The types of resources that are monitored.
        self.resource_types = resource_types  # type: list[str]

    def validate(self):
        pass

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

        result = dict()
        if self.configuration_recorder_status is not None:
            result['ConfigurationRecorderStatus'] = self.configuration_recorder_status
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigurationRecorderStatus') is not None:
            self.configuration_recorder_status = m.get('ConfigurationRecorderStatus')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        return self


class GetConfigurationRecorderResponseBody(TeaModel):
    def __init__(self, configuration_recorder=None, request_id=None):
        # The details of the configuration recorder that monitors resources.
        self.configuration_recorder = configuration_recorder  # type: GetConfigurationRecorderResponseBodyConfigurationRecorder
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.configuration_recorder is not None:
            result['ConfigurationRecorder'] = self.configuration_recorder.to_map()
        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('ConfigurationRecorder') is not None:
            temp_model = GetConfigurationRecorderResponseBodyConfigurationRecorder()
            self.configuration_recorder = temp_model.from_map(m['ConfigurationRecorder'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetConfigurationRecorderResponse(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: GetConfigurationRecorderResponseBody

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

    def to_map(self):
        _map = super(GetConfigurationRecorderResponse, 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 = GetConfigurationRecorderResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetDiscoveredResourceRequest(TeaModel):
    def __init__(self, region=None, resource_id=None, resource_type=None):
        # The ID of the region in which the resource resides.
        # 
        # For more information about how to query the region ID of a resource, see [ListDiscoveredResources](~~411702~~).
        self.region = region  # type: str
        # The resource IDs.
        # 
        # For more information about how to query the ID of a resource, see [ListDiscoveredResources](~~411702~~).
        self.resource_id = resource_id  # type: str
        # The resource type.
        # 
        # For more information about how to obtain the type of a resource, see [ListDiscoveredResources](~~411702~~).
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Region') is not None:
            self.region = m.get('Region')
        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')
        return self


class GetDiscoveredResourceResponseBodyDiscoveredResourceDetail(TeaModel):
    def __init__(self, account_id=None, availability_zone=None, configuration=None, region=None,
                 resource_creation_time=None, resource_deleted=None, resource_id=None, resource_name=None, resource_status=None,
                 resource_type=None, tags=None):
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.account_id = account_id  # type: long
        # The ID of the zone in which the resource resides.
        self.availability_zone = availability_zone  # type: str
        # The configuration of the resource.
        self.configuration = configuration  # type: str
        # The region ID.
        self.region = region  # type: str
        # The time when the resource was created.
        self.resource_creation_time = resource_creation_time  # type: long
        # Indicates whether the resource was deleted. Valid values:
        # 
        # *   1: The resource was not deleted.
        # *   0: The resource was deleted.
        self.resource_deleted = resource_deleted  # type: int
        # The resource ID.
        self.resource_id = resource_id  # type: str
        # The resource name.
        self.resource_name = resource_name  # type: str
        # The status of the resource. The value of this parameter varies with the resource type and may be empty. Examples:
        # 
        # *   If the value of the ResourceType parameter is ACS::ECS::Instance, the resource is an Elastic Compute Service (ECS) instance that is in a specific state. In this case, the valid values of this parameter are Running and Stopped.
        # *   If the value of the ResourceType parameter is ACS::OSS::Bucket, the resource is an Object Storage Service (OSS) bucket that is not in a specific state. In this case, this parameter is empty.
        self.resource_status = resource_status  # type: str
        # The resource type.
        self.resource_type = resource_type  # type: str
        # The tags of the resource.
        self.tags = tags  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetDiscoveredResourceResponseBodyDiscoveredResourceDetail, 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.availability_zone is not None:
            result['AvailabilityZone'] = self.availability_zone
        if self.configuration is not None:
            result['Configuration'] = self.configuration
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_creation_time is not None:
            result['ResourceCreationTime'] = self.resource_creation_time
        if self.resource_deleted is not None:
            result['ResourceDeleted'] = self.resource_deleted
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_name is not None:
            result['ResourceName'] = self.resource_name
        if self.resource_status is not None:
            result['ResourceStatus'] = self.resource_status
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.tags is not None:
            result['Tags'] = self.tags
        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('AvailabilityZone') is not None:
            self.availability_zone = m.get('AvailabilityZone')
        if m.get('Configuration') is not None:
            self.configuration = m.get('Configuration')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceCreationTime') is not None:
            self.resource_creation_time = m.get('ResourceCreationTime')
        if m.get('ResourceDeleted') is not None:
            self.resource_deleted = m.get('ResourceDeleted')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceName') is not None:
            self.resource_name = m.get('ResourceName')
        if m.get('ResourceStatus') is not None:
            self.resource_status = m.get('ResourceStatus')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('Tags') is not None:
            self.tags = m.get('Tags')
        return self


class GetDiscoveredResourceResponseBody(TeaModel):
    def __init__(self, discovered_resource_detail=None, request_id=None):
        # The details of the resource.
        self.discovered_resource_detail = discovered_resource_detail  # type: GetDiscoveredResourceResponseBodyDiscoveredResourceDetail
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.discovered_resource_detail is not None:
            result['DiscoveredResourceDetail'] = self.discovered_resource_detail.to_map()
        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('DiscoveredResourceDetail') is not None:
            temp_model = GetDiscoveredResourceResponseBodyDiscoveredResourceDetail()
            self.discovered_resource_detail = temp_model.from_map(m['DiscoveredResourceDetail'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetDiscoveredResourceResponse(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: GetDiscoveredResourceResponseBody

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

    def to_map(self):
        _map = super(GetDiscoveredResourceResponse, 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 = GetDiscoveredResourceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetDiscoveredResourceCountsGroupByRegionRequest(TeaModel):
    def __init__(self, resource_type=None):
        # The resource type.
        # 
        # For more information about how to obtain the type of a resource, see [ListDiscoveredResources](~~169620~~).
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

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

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


class GetDiscoveredResourceCountsGroupByRegionResponseBodyDiscoveredResourceCountsSummary(TeaModel):
    def __init__(self, group_name=None, region=None, resource_count=None):
        # The dimension by which statistics are collected.
        # 
        # >  In most cases, the `Region` parameter instead of the GroupName parameter is returned.
        self.group_name = group_name  # type: str
        # The ID of the region by which statistics are collected.
        self.region = region  # type: str
        # The total number of resources.
        self.resource_count = resource_count  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.group_name is not None:
            result['GroupName'] = self.group_name
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_count is not None:
            result['ResourceCount'] = self.resource_count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('GroupName') is not None:
            self.group_name = m.get('GroupName')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceCount') is not None:
            self.resource_count = m.get('ResourceCount')
        return self


class GetDiscoveredResourceCountsGroupByRegionResponseBody(TeaModel):
    def __init__(self, discovered_resource_counts_summary=None, request_id=None):
        # The statistics on the resources.
        self.discovered_resource_counts_summary = discovered_resource_counts_summary  # type: list[GetDiscoveredResourceCountsGroupByRegionResponseBodyDiscoveredResourceCountsSummary]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['DiscoveredResourceCountsSummary'] = []
        if self.discovered_resource_counts_summary is not None:
            for k in self.discovered_resource_counts_summary:
                result['DiscoveredResourceCountsSummary'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.discovered_resource_counts_summary = []
        if m.get('DiscoveredResourceCountsSummary') is not None:
            for k in m.get('DiscoveredResourceCountsSummary'):
                temp_model = GetDiscoveredResourceCountsGroupByRegionResponseBodyDiscoveredResourceCountsSummary()
                self.discovered_resource_counts_summary.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetDiscoveredResourceCountsGroupByRegionResponse(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: GetDiscoveredResourceCountsGroupByRegionResponseBody

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

    def to_map(self):
        _map = super(GetDiscoveredResourceCountsGroupByRegionResponse, 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 = GetDiscoveredResourceCountsGroupByRegionResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetDiscoveredResourceCountsGroupByResourceTypeRequest(TeaModel):
    def __init__(self, region=None):
        # The region ID.
        self.region = region  # type: str

    def validate(self):
        pass

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

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

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


class GetDiscoveredResourceCountsGroupByResourceTypeResponseBodyDiscoveredResourceCountsSummary(TeaModel):
    def __init__(self, group_name=None, resource_count=None, resource_type=None):
        # The resource type by which the statistics are collected.
        # 
        # > We recommend that you use the `ResourceType` parameter.
        self.group_name = group_name  # type: str
        # The total number of resources.
        self.resource_count = resource_count  # type: long
        # The resource type by which the statistics are collected.
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.group_name is not None:
            result['GroupName'] = self.group_name
        if self.resource_count is not None:
            result['ResourceCount'] = self.resource_count
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('GroupName') is not None:
            self.group_name = m.get('GroupName')
        if m.get('ResourceCount') is not None:
            self.resource_count = m.get('ResourceCount')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        return self


class GetDiscoveredResourceCountsGroupByResourceTypeResponseBody(TeaModel):
    def __init__(self, discovered_resource_counts_summary=None, request_id=None):
        # The statistics on the resources.
        self.discovered_resource_counts_summary = discovered_resource_counts_summary  # type: list[GetDiscoveredResourceCountsGroupByResourceTypeResponseBodyDiscoveredResourceCountsSummary]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['DiscoveredResourceCountsSummary'] = []
        if self.discovered_resource_counts_summary is not None:
            for k in self.discovered_resource_counts_summary:
                result['DiscoveredResourceCountsSummary'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.discovered_resource_counts_summary = []
        if m.get('DiscoveredResourceCountsSummary') is not None:
            for k in m.get('DiscoveredResourceCountsSummary'):
                temp_model = GetDiscoveredResourceCountsGroupByResourceTypeResponseBodyDiscoveredResourceCountsSummary()
                self.discovered_resource_counts_summary.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetDiscoveredResourceCountsGroupByResourceTypeResponse(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: GetDiscoveredResourceCountsGroupByResourceTypeResponseBody

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

    def to_map(self):
        _map = super(GetDiscoveredResourceCountsGroupByResourceTypeResponse, 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 = GetDiscoveredResourceCountsGroupByResourceTypeResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetIntegratedServiceStatusRequest(TeaModel):
    def __init__(self, service_code=None):
        # The product code of the cloud product. Valid values:
        # 
        # cadt: Cloud Architecture Design Tool
        self.service_code = service_code  # type: str

    def validate(self):
        pass

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

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

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


class GetIntegratedServiceStatusResponseBody(TeaModel):
    def __init__(self, data=None, integrated_types=None, request_id=None):
        # Indicates whether the product has been integrated. Valid values:
        # 
        # *   true
        # *   false
        self.data = data  # type: bool
        # The types of the integrated events. Separate multiple event types with commas (,). Valid values:
        # 
        # *   ConfigurationItemChangeNotification: resource change event
        # *   NonCompliantNotification: non-compliance event
        self.integrated_types = integrated_types  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.data is not None:
            result['Data'] = self.data
        if self.integrated_types is not None:
            result['IntegratedTypes'] = self.integrated_types
        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('Data') is not None:
            self.data = m.get('Data')
        if m.get('IntegratedTypes') is not None:
            self.integrated_types = m.get('IntegratedTypes')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetIntegratedServiceStatusResponse(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: GetIntegratedServiceStatusResponseBody

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

    def to_map(self):
        _map = super(GetIntegratedServiceStatusResponse, 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 = GetIntegratedServiceStatusResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetManagedRuleRequest(TeaModel):
    def __init__(self, identifier=None):
        # The identifier of the managed rule.
        # 
        # You can call the [ListManagedRules](~~421144~~) operation to obtain the managed rule identifier.
        self.identifier = identifier  # type: str

    def validate(self):
        pass

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

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

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


class GetManagedRuleResponseBodyManagedRuleScope(TeaModel):
    def __init__(self, compliance_resource_types=None):
        # The type of resource to which the managed rule applies.
        self.compliance_resource_types = compliance_resource_types  # type: list[str]

    def validate(self):
        pass

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

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

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


class GetManagedRuleResponseBodyManagedRuleSourceDetails(TeaModel):
    def __init__(self, maximum_execution_frequency=None, message_type=None):
        # The interval at which the managed rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour.
        # *   Three_Hours: 3 hours.
        # *   Six_Hours: 6 hours.
        # *   Twelve_Hours: 12 hours
        # *   TwentyFour_Hours: 24 hours
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The trigger type of the managed rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The managed rule is triggered by configuration changes.
        # *   ScheduledNotification: The managed rule is periodically triggered.
        self.message_type = message_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.message_type is not None:
            result['MessageType'] = self.message_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('MessageType') is not None:
            self.message_type = m.get('MessageType')
        return self


class GetManagedRuleResponseBodyManagedRule(TeaModel):
    def __init__(self, compulsory_input_parameter_details=None, config_rule_name=None, description=None,
                 help_urls=None, identifier=None, labels=None, optional_input_parameter_details=None, risk_level=None,
                 scope=None, source_details=None):
        # The settings of the required input parameters for the managed rule.
        self.compulsory_input_parameter_details = compulsory_input_parameter_details  # type: dict[str, any]
        # The name of the managed rule.
        self.config_rule_name = config_rule_name  # type: str
        # The description of the managed rule.
        self.description = description  # type: str
        # The URL of the topic that provides guidance on remediation for the managed rule.
        self.help_urls = help_urls  # type: str
        # The identifier of the managed rule.
        self.identifier = identifier  # type: str
        # The tags of the managed rule.
        self.labels = labels  # type: list[str]
        # The settings of the optional input parameters for the managed rule.
        self.optional_input_parameter_details = optional_input_parameter_details  # type: dict[str, any]
        # The risk level of the resources that are not compliant with the managed rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int
        # The effective scope of the managed rule.
        self.scope = scope  # type: GetManagedRuleResponseBodyManagedRuleScope
        # The information about the trigger type of the managed rule.
        self.source_details = source_details  # type: list[GetManagedRuleResponseBodyManagedRuleSourceDetails]

    def validate(self):
        if self.scope:
            self.scope.validate()
        if self.source_details:
            for k in self.source_details:
                if k:
                    k.validate()

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

        result = dict()
        if self.compulsory_input_parameter_details is not None:
            result['CompulsoryInputParameterDetails'] = self.compulsory_input_parameter_details
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.description is not None:
            result['Description'] = self.description
        if self.help_urls is not None:
            result['HelpUrls'] = self.help_urls
        if self.identifier is not None:
            result['Identifier'] = self.identifier
        if self.labels is not None:
            result['Labels'] = self.labels
        if self.optional_input_parameter_details is not None:
            result['OptionalInputParameterDetails'] = self.optional_input_parameter_details
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.scope is not None:
            result['Scope'] = self.scope.to_map()
        result['SourceDetails'] = []
        if self.source_details is not None:
            for k in self.source_details:
                result['SourceDetails'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompulsoryInputParameterDetails') is not None:
            self.compulsory_input_parameter_details = m.get('CompulsoryInputParameterDetails')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('HelpUrls') is not None:
            self.help_urls = m.get('HelpUrls')
        if m.get('Identifier') is not None:
            self.identifier = m.get('Identifier')
        if m.get('Labels') is not None:
            self.labels = m.get('Labels')
        if m.get('OptionalInputParameterDetails') is not None:
            self.optional_input_parameter_details = m.get('OptionalInputParameterDetails')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('Scope') is not None:
            temp_model = GetManagedRuleResponseBodyManagedRuleScope()
            self.scope = temp_model.from_map(m['Scope'])
        self.source_details = []
        if m.get('SourceDetails') is not None:
            for k in m.get('SourceDetails'):
                temp_model = GetManagedRuleResponseBodyManagedRuleSourceDetails()
                self.source_details.append(temp_model.from_map(k))
        return self


class GetManagedRuleResponseBody(TeaModel):
    def __init__(self, managed_rule=None, request_id=None):
        # The details of the managed rule.
        self.managed_rule = managed_rule  # type: GetManagedRuleResponseBodyManagedRule
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.managed_rule is not None:
            result['ManagedRule'] = self.managed_rule.to_map()
        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('ManagedRule') is not None:
            temp_model = GetManagedRuleResponseBodyManagedRule()
            self.managed_rule = temp_model.from_map(m['ManagedRule'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetManagedRuleResponse(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: GetManagedRuleResponseBody

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

    def to_map(self):
        _map = super(GetManagedRuleResponse, 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 = GetManagedRuleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetRemediationTemplateRequest(TeaModel):
    def __init__(self, template_identifier=None):
        # The identifier of the automatic remediation template.
        # 
        # For more information about how to obtain the identifier of a remediation template, see [Compliance library](~~2337741~~).
        self.template_identifier = template_identifier  # type: str

    def validate(self):
        pass

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

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

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


class GetRemediationTemplateResponseBodyRemediationTemplates(TeaModel):
    def __init__(self, managed_rule_identifier=None, remediation_type=None, template_definition=None,
                 template_description=None, template_identifier=None, template_name=None):
        # The ID of the supported rule template.
        self.managed_rule_identifier = managed_rule_identifier  # type: str
        # The type of the automatic remediation template. Valid value: OOS.
        self.remediation_type = remediation_type  # type: str
        # The parameters of the automatic remediation template.
        self.template_definition = template_definition  # type: str
        # The description of the automatic remediation template.
        self.template_description = template_description  # type: str
        # The identifier of the automatic remediation template.
        self.template_identifier = template_identifier  # type: str
        # The name of the automatic remediation template.
        self.template_name = template_name  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.managed_rule_identifier is not None:
            result['ManagedRuleIdentifier'] = self.managed_rule_identifier
        if self.remediation_type is not None:
            result['RemediationType'] = self.remediation_type
        if self.template_definition is not None:
            result['TemplateDefinition'] = self.template_definition
        if self.template_description is not None:
            result['TemplateDescription'] = self.template_description
        if self.template_identifier is not None:
            result['TemplateIdentifier'] = self.template_identifier
        if self.template_name is not None:
            result['TemplateName'] = self.template_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ManagedRuleIdentifier') is not None:
            self.managed_rule_identifier = m.get('ManagedRuleIdentifier')
        if m.get('RemediationType') is not None:
            self.remediation_type = m.get('RemediationType')
        if m.get('TemplateDefinition') is not None:
            self.template_definition = m.get('TemplateDefinition')
        if m.get('TemplateDescription') is not None:
            self.template_description = m.get('TemplateDescription')
        if m.get('TemplateIdentifier') is not None:
            self.template_identifier = m.get('TemplateIdentifier')
        if m.get('TemplateName') is not None:
            self.template_name = m.get('TemplateName')
        return self


class GetRemediationTemplateResponseBody(TeaModel):
    def __init__(self, remediation_templates=None, request_id=None):
        # The information about the automatic remediation template.
        self.remediation_templates = remediation_templates  # type: list[GetRemediationTemplateResponseBodyRemediationTemplates]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['RemediationTemplates'] = []
        if self.remediation_templates is not None:
            for k in self.remediation_templates:
                result['RemediationTemplates'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.remediation_templates = []
        if m.get('RemediationTemplates') is not None:
            for k in m.get('RemediationTemplates'):
                temp_model = GetRemediationTemplateResponseBodyRemediationTemplates()
                self.remediation_templates.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetRemediationTemplateResponse(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: GetRemediationTemplateResponseBody

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

    def to_map(self):
        _map = super(GetRemediationTemplateResponse, 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 = GetRemediationTemplateResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetResourceComplianceByConfigRuleRequest(TeaModel):
    def __init__(self, compliance_type=None, config_rule_id=None):
        # The compliance evaluation result of the resource. Valid values:
        # 
        # *   COMPLIANT: The resource is evaluated as compliant.
        # *   NON_COMPLIANT: The resource is evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resource.
        # *   INSUFFICIENT_DATA: No resource data is available.
        self.compliance_type = compliance_type  # type: str
        # The ID of the rule.
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_id = config_rule_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        return self


class GetResourceComplianceByConfigRuleResponseBodyComplianceResultCompliances(TeaModel):
    def __init__(self, compliance_type=None, count=None):
        # The compliance evaluation result. Valid values:
        # 
        # *   COMPLIANT: The relevant resources are evaluated as compliant.
        # *   NON_COMPLIANT: The relevant resources are evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to your resources.
        # *   INSUFFICIENT_DATA: No resource data is available.
        self.compliance_type = compliance_type  # type: str
        # The number of resources that have the compliance evaluation result. For example, if the value of the `ComplianceType` parameter is `COMPLIANT`, this parameter value indicates the number of compliant resources.
        self.count = count  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.count is not None:
            result['Count'] = self.count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('Count') is not None:
            self.count = m.get('Count')
        return self


class GetResourceComplianceByConfigRuleResponseBodyComplianceResult(TeaModel):
    def __init__(self, compliances=None, total_count=None):
        # The information about the compliance evaluation.
        self.compliances = compliances  # type: list[GetResourceComplianceByConfigRuleResponseBodyComplianceResultCompliances]
        # The total number of evaluated resources.
        self.total_count = total_count  # type: long

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

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

        result = dict()
        result['Compliances'] = []
        if self.compliances is not None:
            for k in self.compliances:
                result['Compliances'].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()
        self.compliances = []
        if m.get('Compliances') is not None:
            for k in m.get('Compliances'):
                temp_model = GetResourceComplianceByConfigRuleResponseBodyComplianceResultCompliances()
                self.compliances.append(temp_model.from_map(k))
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class GetResourceComplianceByConfigRuleResponseBody(TeaModel):
    def __init__(self, compliance_result=None, request_id=None):
        # The compliance evaluation results returned.
        self.compliance_result = compliance_result  # type: GetResourceComplianceByConfigRuleResponseBodyComplianceResult
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_result is not None:
            result['ComplianceResult'] = self.compliance_result.to_map()
        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('ComplianceResult') is not None:
            temp_model = GetResourceComplianceByConfigRuleResponseBodyComplianceResult()
            self.compliance_result = temp_model.from_map(m['ComplianceResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetResourceComplianceByConfigRuleResponse(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: GetResourceComplianceByConfigRuleResponseBody

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

    def to_map(self):
        _map = super(GetResourceComplianceByConfigRuleResponse, 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 = GetResourceComplianceByConfigRuleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetResourceComplianceByPackRequest(TeaModel):
    def __init__(self, compliance_pack_id=None):
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.compliance_pack_id = compliance_pack_id  # type: str

    def validate(self):
        pass

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

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

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


class GetResourceComplianceByPackResponseBodyResourceComplianceResult(TeaModel):
    def __init__(self, compliance_pack_id=None, non_compliant_count=None, total_count=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The number of non-compliant resources.
        self.non_compliant_count = non_compliant_count  # type: int
        # The total number of resources.
        self.total_count = total_count  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.non_compliant_count is not None:
            result['NonCompliantCount'] = self.non_compliant_count
        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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('NonCompliantCount') is not None:
            self.non_compliant_count = m.get('NonCompliantCount')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class GetResourceComplianceByPackResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_compliance_result=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # The compliance evaluation results returned.
        self.resource_compliance_result = resource_compliance_result  # type: GetResourceComplianceByPackResponseBodyResourceComplianceResult

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.resource_compliance_result is not None:
            result['ResourceComplianceResult'] = self.resource_compliance_result.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('ResourceComplianceResult') is not None:
            temp_model = GetResourceComplianceByPackResponseBodyResourceComplianceResult()
            self.resource_compliance_result = temp_model.from_map(m['ResourceComplianceResult'])
        return self


class GetResourceComplianceByPackResponse(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: GetResourceComplianceByPackResponseBody

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

    def to_map(self):
        _map = super(GetResourceComplianceByPackResponse, 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 = GetResourceComplianceByPackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetResourceComplianceGroupByRegionRequest(TeaModel):
    def __init__(self, config_rule_ids=None):
        # The rule IDs. Separate multiple rule IDs with commas (,).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

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

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


class GetResourceComplianceGroupByRegionResponseBodyComplianceResultComplianceResultListCompliances(TeaModel):
    def __init__(self, compliance_type=None, count=None):
        # The evaluation result. Valid values:
        # 
        # *   COMPLIANT: The resource is evaluated as compliant.
        # *   NON_COMPLIANT: The resource is evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resource.
        # *   INSUFFICIENT_DATA: No data is available.
        self.compliance_type = compliance_type  # type: str
        # The total number of evaluation results.
        self.count = count  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.count is not None:
            result['Count'] = self.count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('Count') is not None:
            self.count = m.get('Count')
        return self


class GetResourceComplianceGroupByRegionResponseBodyComplianceResultComplianceResultList(TeaModel):
    def __init__(self, compliances=None, region_id=None):
        # The queried evaluation results.
        self.compliances = compliances  # type: list[GetResourceComplianceGroupByRegionResponseBodyComplianceResultComplianceResultListCompliances]
        # The region ID of the evaluated resource.
        self.region_id = region_id  # type: str

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

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

        result = dict()
        result['Compliances'] = []
        if self.compliances is not None:
            for k in self.compliances:
                result['Compliances'].append(k.to_map() if k else None)
        if self.region_id is not None:
            result['RegionId'] = self.region_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.compliances = []
        if m.get('Compliances') is not None:
            for k in m.get('Compliances'):
                temp_model = GetResourceComplianceGroupByRegionResponseBodyComplianceResultComplianceResultListCompliances()
                self.compliances.append(temp_model.from_map(k))
        if m.get('RegionId') is not None:
            self.region_id = m.get('RegionId')
        return self


class GetResourceComplianceGroupByRegionResponseBodyComplianceResult(TeaModel):
    def __init__(self, compliance_result_list=None):
        # The evaluation results grouped by region.
        self.compliance_result_list = compliance_result_list  # type: list[GetResourceComplianceGroupByRegionResponseBodyComplianceResultComplianceResultList]

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

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

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

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


class GetResourceComplianceGroupByRegionResponseBody(TeaModel):
    def __init__(self, compliance_result=None, request_id=None):
        # The queried evaluation results.
        self.compliance_result = compliance_result  # type: GetResourceComplianceGroupByRegionResponseBodyComplianceResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_result is not None:
            result['ComplianceResult'] = self.compliance_result.to_map()
        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('ComplianceResult') is not None:
            temp_model = GetResourceComplianceGroupByRegionResponseBodyComplianceResult()
            self.compliance_result = temp_model.from_map(m['ComplianceResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetResourceComplianceGroupByRegionResponse(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: GetResourceComplianceGroupByRegionResponseBody

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

    def to_map(self):
        _map = super(GetResourceComplianceGroupByRegionResponse, 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 = GetResourceComplianceGroupByRegionResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetResourceComplianceGroupByResourceTypeRequest(TeaModel):
    def __init__(self, config_rule_ids=None):
        # The rule IDs. Separate multiple rule IDs with commas (,).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

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

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


class GetResourceComplianceGroupByResourceTypeResponseBodyComplianceResultComplianceResultListCompliances(TeaModel):
    def __init__(self, compliance_type=None, count=None):
        # The evaluation result. Valid values:
        # 
        # *   COMPLIANT: The resource is evaluated as compliant.
        # *   NON_COMPLIANT: The resource is evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resource.
        # *   INSUFFICIENT_DATA: No data is available.
        self.compliance_type = compliance_type  # type: str
        # The total number of evaluation results.
        self.count = count  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.count is not None:
            result['Count'] = self.count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('Count') is not None:
            self.count = m.get('Count')
        return self


class GetResourceComplianceGroupByResourceTypeResponseBodyComplianceResultComplianceResultList(TeaModel):
    def __init__(self, compliances=None, resource_type=None):
        # The queried evaluation results.
        self.compliances = compliances  # type: list[GetResourceComplianceGroupByResourceTypeResponseBodyComplianceResultComplianceResultListCompliances]
        # The type of the evaluated resource.
        self.resource_type = resource_type  # type: str

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

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

        result = dict()
        result['Compliances'] = []
        if self.compliances is not None:
            for k in self.compliances:
                result['Compliances'].append(k.to_map() if k else None)
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.compliances = []
        if m.get('Compliances') is not None:
            for k in m.get('Compliances'):
                temp_model = GetResourceComplianceGroupByResourceTypeResponseBodyComplianceResultComplianceResultListCompliances()
                self.compliances.append(temp_model.from_map(k))
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        return self


class GetResourceComplianceGroupByResourceTypeResponseBodyComplianceResult(TeaModel):
    def __init__(self, compliance_result_list=None):
        # The evaluation results grouped by resource type.
        self.compliance_result_list = compliance_result_list  # type: list[GetResourceComplianceGroupByResourceTypeResponseBodyComplianceResultComplianceResultList]

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

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

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

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


class GetResourceComplianceGroupByResourceTypeResponseBody(TeaModel):
    def __init__(self, compliance_result=None, request_id=None):
        # The queried evaluation results.
        self.compliance_result = compliance_result  # type: GetResourceComplianceGroupByResourceTypeResponseBodyComplianceResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_result is not None:
            result['ComplianceResult'] = self.compliance_result.to_map()
        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('ComplianceResult') is not None:
            temp_model = GetResourceComplianceGroupByResourceTypeResponseBodyComplianceResult()
            self.compliance_result = temp_model.from_map(m['ComplianceResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class GetResourceComplianceGroupByResourceTypeResponse(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: GetResourceComplianceGroupByResourceTypeResponseBody

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

    def to_map(self):
        _map = super(GetResourceComplianceGroupByResourceTypeResponse, 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 = GetResourceComplianceGroupByResourceTypeResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetResourceComplianceTimelineRequest(TeaModel):
    def __init__(self, end_time=None, max_results=None, next_token=None, region=None, resource_id=None,
                 resource_type=None, start_time=None):
        # The timestamp that specifies the end of the time range to query. The default value is the time when the GetResourceComplianceTimeline operation is called. Unit: milliseconds.
        self.end_time = end_time  # type: long
        # The maximum number of entries to return for a single request. Valid values: 1 to 100.
        self.max_results = max_results  # type: int
        # The token that is used to initiate the next request. If the response of the current request is truncated, this token is used to initiate another request and obtain the remaining entries.
        self.next_token = next_token  # type: str
        # The ID of the region where the resource resides.
        self.region = region  # type: str
        # The ID of the resource.
        # 
        # For more information about how to obtain the ID of a resource, see [ListDiscoveredResources](~~169620~~).
        self.resource_id = resource_id  # type: str
        # The type of the resource.
        # 
        # For more information about how to obtain the type of a resource, see [ListDiscoveredResources](~~169620~~).
        self.resource_type = resource_type  # type: str
        # The timestamp that specifies the beginning of the time range to query. By default, Cloud Config retrieves the compliance evaluations in the last 30 days for the specified resource. Unit: milliseconds.
        self.start_time = start_time  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetResourceComplianceTimelineRequest, 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.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.region is not None:
            result['Region'] = self.region
        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.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('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('Region') is not None:
            self.region = m.get('Region')
        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('StartTime') is not None:
            self.start_time = m.get('StartTime')
        return self


class GetResourceComplianceTimelineResponseBodyResourceComplianceTimelineComplianceList(TeaModel):
    def __init__(self, account_id=None, availability_zone=None, capture_time=None, configuration=None,
                 configuration_diff=None, region=None, resource_create_time=None, resource_id=None, resource_name=None,
                 resource_status=None, resource_type=None, tags=None):
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.account_id = account_id  # type: str
        # The zone where the resource resides.
        self.availability_zone = availability_zone  # type: str
        # The timestamp when the compliance evaluation was recorded. Unit: milliseconds.
        self.capture_time = capture_time  # type: long
        # The information about the rules that evaluated the resource and the compliance evaluation result.
        self.configuration = configuration  # type: str
        # The details of the configuration change that triggered the compliance evaluation.
        self.configuration_diff = configuration_diff  # type: str
        # The ID of the region where the resource resides.
        self.region = region  # type: str
        # The timestamp when the resource was created. Unit: milliseconds.
        self.resource_create_time = resource_create_time  # type: long
        # The ID of the resource.
        self.resource_id = resource_id  # type: str
        # The name of the resource.
        self.resource_name = resource_name  # type: str
        # The status of the resource. The parameter value varies with the resource type and may be left empty. Examples:
        # 
        # *   If the ResourceType parameter is set to ACS::ECS::Instance, the resource is an Elastic Compute Service (ECS) instance that has a specific state. In this case, valid values of this parameter include Running and Stopped.
        # *   If the ResourceType parameter is set to ACS::OSS::Bucket, the resource is an Object Storage Service (OSS) bucket that does not have a specific state. In this case, this parameter is left empty.
        self.resource_status = resource_status  # type: str
        # The type of the resource.
        self.resource_type = resource_type  # type: str
        # The tags of the resource.
        self.tags = tags  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetResourceComplianceTimelineResponseBodyResourceComplianceTimelineComplianceList, 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.availability_zone is not None:
            result['AvailabilityZone'] = self.availability_zone
        if self.capture_time is not None:
            result['CaptureTime'] = self.capture_time
        if self.configuration is not None:
            result['Configuration'] = self.configuration
        if self.configuration_diff is not None:
            result['ConfigurationDiff'] = self.configuration_diff
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_create_time is not None:
            result['ResourceCreateTime'] = self.resource_create_time
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_name is not None:
            result['ResourceName'] = self.resource_name
        if self.resource_status is not None:
            result['ResourceStatus'] = self.resource_status
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.tags is not None:
            result['Tags'] = self.tags
        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('AvailabilityZone') is not None:
            self.availability_zone = m.get('AvailabilityZone')
        if m.get('CaptureTime') is not None:
            self.capture_time = m.get('CaptureTime')
        if m.get('Configuration') is not None:
            self.configuration = m.get('Configuration')
        if m.get('ConfigurationDiff') is not None:
            self.configuration_diff = m.get('ConfigurationDiff')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceCreateTime') is not None:
            self.resource_create_time = m.get('ResourceCreateTime')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceName') is not None:
            self.resource_name = m.get('ResourceName')
        if m.get('ResourceStatus') is not None:
            self.resource_status = m.get('ResourceStatus')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('Tags') is not None:
            self.tags = m.get('Tags')
        return self


class GetResourceComplianceTimelineResponseBodyResourceComplianceTimeline(TeaModel):
    def __init__(self, compliance_list=None, max_results=None, next_token=None):
        # The compliance evaluation records on the compliance timeline.
        self.compliance_list = compliance_list  # type: list[GetResourceComplianceTimelineResponseBodyResourceComplianceTimelineComplianceList]
        # The maximum number of entries that can be returned for a single request.
        self.max_results = max_results  # type: int
        # The token that is used to initiate the next request.
        self.next_token = next_token  # type: str

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

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

        result = dict()
        result['ComplianceList'] = []
        if self.compliance_list is not None:
            for k in self.compliance_list:
                result['ComplianceList'].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
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.compliance_list = []
        if m.get('ComplianceList') is not None:
            for k in m.get('ComplianceList'):
                temp_model = GetResourceComplianceTimelineResponseBodyResourceComplianceTimelineComplianceList()
                self.compliance_list.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')
        return self


class GetResourceComplianceTimelineResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_compliance_timeline=None):
        # The ID of the request.
        self.request_id = request_id  # type: str
        # The information about the compliance timeline.
        self.resource_compliance_timeline = resource_compliance_timeline  # type: GetResourceComplianceTimelineResponseBodyResourceComplianceTimeline

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.resource_compliance_timeline is not None:
            result['ResourceComplianceTimeline'] = self.resource_compliance_timeline.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('ResourceComplianceTimeline') is not None:
            temp_model = GetResourceComplianceTimelineResponseBodyResourceComplianceTimeline()
            self.resource_compliance_timeline = temp_model.from_map(m['ResourceComplianceTimeline'])
        return self


class GetResourceComplianceTimelineResponse(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: GetResourceComplianceTimelineResponseBody

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

    def to_map(self):
        _map = super(GetResourceComplianceTimelineResponse, 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 = GetResourceComplianceTimelineResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetResourceConfigurationTimelineRequest(TeaModel):
    def __init__(self, end_time=None, max_results=None, next_token=None, region=None, resource_id=None,
                 resource_type=None, start_time=None):
        # The end of the time range to query. The default value indicates the time when the GetResourceConfigurationTimeline operation is called. Unit: milliseconds.
        self.end_time = end_time  # type: long
        # The maximum number of entries to return for a single request. Valid values: 1 to 100.
        self.max_results = max_results  # type: int
        # The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of `NextToken`.
        self.next_token = next_token  # type: str
        # The region ID.
        self.region = region  # type: str
        # The resource IDs.
        # 
        # For more information about how to query the ID of a resource, see [ListDiscoveredResources](~~169620~~).
        self.resource_id = resource_id  # type: str
        # The resource type.
        # 
        # For more information about how to obtain the type of a resource, see [ListDiscoveredResources](~~169620~~).
        self.resource_type = resource_type  # type: str
        # The beginning of the time range to query. By default, Cloud Config retrieves the configuration changes in the last 30 days for the specified resource. Unit: milliseconds.
        self.start_time = start_time  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetResourceConfigurationTimelineRequest, 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.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.region is not None:
            result['Region'] = self.region
        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.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('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('Region') is not None:
            self.region = m.get('Region')
        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('StartTime') is not None:
            self.start_time = m.get('StartTime')
        return self


class GetResourceConfigurationTimelineResponseBodyResourceConfigurationTimelineConfigurationList(TeaModel):
    def __init__(self, account_id=None, availability_zone=None, capture_time=None, configuration_diff=None,
                 region=None, relationship=None, relationship_diff=None, resource_create_time=None,
                 resource_event_type=None, resource_id=None, resource_name=None, resource_type=None, tags=None):
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.account_id = account_id  # type: long
        # The zone ID.
        self.availability_zone = availability_zone  # type: str
        # The time when the resource change snapshot was recorded. Unit: milliseconds.
        self.capture_time = capture_time  # type: str
        # The details of the resource changes that trigger the compliance evaluation.
        self.configuration_diff = configuration_diff  # type: str
        # The region ID.
        self.region = region  # type: str
        # The details of each resource that is associated with the current resource, including the region ID, resource relationship, resource ID, and resource type.
        self.relationship = relationship  # type: str
        # The change records of the resource relationship.
        self.relationship_diff = relationship_diff  # type: str
        # The time when the resource was created. Unit: milliseconds.
        self.resource_create_time = resource_create_time  # type: str
        # The type of the resource change event. Valid values:
        # 
        # *   DISCOVERED: A resource is created.
        # *   DISCOVERED_REVISED: A resource is created by periodic remediation tasks.
        # *   MODIFY: A resource is modified.
        # *   MODIFY_REVISED: A resource is modified by periodic remediation tasks.
        # *   REMOVE: A resource is deleted.
        # 
        # > 
        # 
        # *   To ensure the integrity of resources, periodic remediation tasks are run to check data and generate events that indicate the creation of new resources. Such events are infrequent.
        # 
        # *   The time when a resource change event is generated by a periodic remediation task is considered as the detection time of Cloud Config. The detection time is later than the time when the resource is modified.
        self.resource_event_type = resource_event_type  # type: str
        # The resource ID.
        self.resource_id = resource_id  # type: str
        # The resource name.
        self.resource_name = resource_name  # type: str
        # The resource type.
        self.resource_type = resource_type  # type: str
        # The tags of the resource.
        self.tags = tags  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(GetResourceConfigurationTimelineResponseBodyResourceConfigurationTimelineConfigurationList, 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.availability_zone is not None:
            result['AvailabilityZone'] = self.availability_zone
        if self.capture_time is not None:
            result['CaptureTime'] = self.capture_time
        if self.configuration_diff is not None:
            result['ConfigurationDiff'] = self.configuration_diff
        if self.region is not None:
            result['Region'] = self.region
        if self.relationship is not None:
            result['Relationship'] = self.relationship
        if self.relationship_diff is not None:
            result['RelationshipDiff'] = self.relationship_diff
        if self.resource_create_time is not None:
            result['ResourceCreateTime'] = self.resource_create_time
        if self.resource_event_type is not None:
            result['ResourceEventType'] = self.resource_event_type
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_name is not None:
            result['ResourceName'] = self.resource_name
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.tags is not None:
            result['Tags'] = self.tags
        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('AvailabilityZone') is not None:
            self.availability_zone = m.get('AvailabilityZone')
        if m.get('CaptureTime') is not None:
            self.capture_time = m.get('CaptureTime')
        if m.get('ConfigurationDiff') is not None:
            self.configuration_diff = m.get('ConfigurationDiff')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('Relationship') is not None:
            self.relationship = m.get('Relationship')
        if m.get('RelationshipDiff') is not None:
            self.relationship_diff = m.get('RelationshipDiff')
        if m.get('ResourceCreateTime') is not None:
            self.resource_create_time = m.get('ResourceCreateTime')
        if m.get('ResourceEventType') is not None:
            self.resource_event_type = m.get('ResourceEventType')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceName') is not None:
            self.resource_name = m.get('ResourceName')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('Tags') is not None:
            self.tags = m.get('Tags')
        return self


class GetResourceConfigurationTimelineResponseBodyResourceConfigurationTimeline(TeaModel):
    def __init__(self, configuration_list=None, max_results=None, next_token=None):
        # The configuration changes on the configuration timeline.
        self.configuration_list = configuration_list  # type: list[GetResourceConfigurationTimelineResponseBodyResourceConfigurationTimelineConfigurationList]
        # The maximum number of entries returned for a single request.
        self.max_results = max_results  # type: int
        # A pagination token. It can be used in the next request to retrieve a new page of results.
        self.next_token = next_token  # type: str

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

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

        result = dict()
        result['ConfigurationList'] = []
        if self.configuration_list is not None:
            for k in self.configuration_list:
                result['ConfigurationList'].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
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.configuration_list = []
        if m.get('ConfigurationList') is not None:
            for k in m.get('ConfigurationList'):
                temp_model = GetResourceConfigurationTimelineResponseBodyResourceConfigurationTimelineConfigurationList()
                self.configuration_list.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')
        return self


class GetResourceConfigurationTimelineResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_configuration_timeline=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # The configuration timeline of the resource.
        self.resource_configuration_timeline = resource_configuration_timeline  # type: GetResourceConfigurationTimelineResponseBodyResourceConfigurationTimeline

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.resource_configuration_timeline is not None:
            result['ResourceConfigurationTimeline'] = self.resource_configuration_timeline.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('ResourceConfigurationTimeline') is not None:
            temp_model = GetResourceConfigurationTimelineResponseBodyResourceConfigurationTimeline()
            self.resource_configuration_timeline = temp_model.from_map(m['ResourceConfigurationTimeline'])
        return self


class GetResourceConfigurationTimelineResponse(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: GetResourceConfigurationTimelineResponseBody

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

    def to_map(self):
        _map = super(GetResourceConfigurationTimelineResponse, 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 = GetResourceConfigurationTimelineResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetResourceInventoryResponseBodyResourceInventory(TeaModel):
    def __init__(self, download_url=None, resource_inventory_generate_time=None, status=None):
        # The download URL of the resource inventory.
        self.download_url = download_url  # type: str
        # The time when the resource inventory was generated. The value is a timestamp.
        self.resource_inventory_generate_time = resource_inventory_generate_time  # type: long
        # The generation status of the resource inventory. Valid values:
        # 
        # *   CREATING: The resource inventory is being generated.
        # *   COMPLETE: The resource inventory is generated.
        self.status = status  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.download_url is not None:
            result['DownloadUrl'] = self.download_url
        if self.resource_inventory_generate_time is not None:
            result['ResourceInventoryGenerateTime'] = self.resource_inventory_generate_time
        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('DownloadUrl') is not None:
            self.download_url = m.get('DownloadUrl')
        if m.get('ResourceInventoryGenerateTime') is not None:
            self.resource_inventory_generate_time = m.get('ResourceInventoryGenerateTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class GetResourceInventoryResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_inventory=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # The information about the resource inventory.
        self.resource_inventory = resource_inventory  # type: GetResourceInventoryResponseBodyResourceInventory

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.resource_inventory is not None:
            result['ResourceInventory'] = self.resource_inventory.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('ResourceInventory') is not None:
            temp_model = GetResourceInventoryResponseBodyResourceInventory()
            self.resource_inventory = temp_model.from_map(m['ResourceInventory'])
        return self


class GetResourceInventoryResponse(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: GetResourceInventoryResponseBody

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

    def to_map(self):
        _map = super(GetResourceInventoryResponse, 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 = GetResourceInventoryResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetSupportedResourceRelationConfigRequest(TeaModel):
    def __init__(self, resource_type=None):
        # The resource type.
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

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

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


class GetSupportedResourceRelationConfigResponseBodyResourceRelationConfigList(TeaModel):
    def __init__(self, relation_type=None, target_resource_type=None):
        # The relationship type.
        self.relation_type = relation_type  # type: str
        # The resource type.
        self.target_resource_type = target_resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.relation_type is not None:
            result['RelationType'] = self.relation_type
        if self.target_resource_type is not None:
            result['TargetResourceType'] = self.target_resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RelationType') is not None:
            self.relation_type = m.get('RelationType')
        if m.get('TargetResourceType') is not None:
            self.target_resource_type = m.get('TargetResourceType')
        return self


class GetSupportedResourceRelationConfigResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_relation_config_list=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # The supported resource relationships.
        self.resource_relation_config_list = resource_relation_config_list  # type: list[GetSupportedResourceRelationConfigResponseBodyResourceRelationConfigList]

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        result['ResourceRelationConfigList'] = []
        if self.resource_relation_config_list is not None:
            for k in self.resource_relation_config_list:
                result['ResourceRelationConfigList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        self.resource_relation_config_list = []
        if m.get('ResourceRelationConfigList') is not None:
            for k in m.get('ResourceRelationConfigList'):
                temp_model = GetSupportedResourceRelationConfigResponseBodyResourceRelationConfigList()
                self.resource_relation_config_list.append(temp_model.from_map(k))
        return self


class GetSupportedResourceRelationConfigResponse(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: GetSupportedResourceRelationConfigResponseBody

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

    def to_map(self):
        _map = super(GetSupportedResourceRelationConfigResponse, 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 = GetSupportedResourceRelationConfigResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class IgnoreAggregateEvaluationResultsRequestResources(TeaModel):
    def __init__(self, region=None, resource_account_id=None, resource_id=None, resource_type=None):
        # The ID of the region in which the resource resides.
        # 
        # For more information about how to obtain the ID of a region, see [ListAggregateDiscoveredResources](~~265983~~).
        self.region = region  # type: str
        # The ID of the Alibaba Cloud account to which the resources belong.
        # 
        # >  You must specify the ID of the current management account or a member account in the account group of the management account.
        self.resource_account_id = resource_account_id  # type: long
        # The ID of the resource.
        # 
        # For more information about how to query the ID of a resource, see [ListAggregateDiscoveredResources](~~265983~~).
        self.resource_id = resource_id  # type: str
        # The type of the resource.
        # 
        # For more information about how to query the type of a resource, see [ListAggregateDiscoveredResources](~~265983~~).
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        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')
        return self


class IgnoreAggregateEvaluationResultsRequest(TeaModel):
    def __init__(self, aggregator_id=None, config_rule_id=None, ignore_date=None, reason=None, resources=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the rule.
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_id = config_rule_id  # type: str
        # The date from which the system automatically re-evaluates the ignored incompliant resources.
        # 
        # >  If you leave this parameter empty, the system does not automatically re-evaluate the ignored incompliant resources. You must manually re-evaluate the ignored incompliant resources.
        self.ignore_date = ignore_date  # type: str
        # The reason why you ignore the resource.
        self.reason = reason  # type: str
        # The resources to be ignored.
        self.resources = resources  # type: list[IgnoreAggregateEvaluationResultsRequestResources]

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

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.ignore_date is not None:
            result['IgnoreDate'] = self.ignore_date
        if self.reason is not None:
            result['Reason'] = self.reason
        result['Resources'] = []
        if self.resources is not None:
            for k in self.resources:
                result['Resources'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('IgnoreDate') is not None:
            self.ignore_date = m.get('IgnoreDate')
        if m.get('Reason') is not None:
            self.reason = m.get('Reason')
        self.resources = []
        if m.get('Resources') is not None:
            for k in m.get('Resources'):
                temp_model = IgnoreAggregateEvaluationResultsRequestResources()
                self.resources.append(temp_model.from_map(k))
        return self


class IgnoreAggregateEvaluationResultsShrinkRequest(TeaModel):
    def __init__(self, aggregator_id=None, config_rule_id=None, ignore_date=None, reason=None,
                 resources_shrink=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the rule.
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_id = config_rule_id  # type: str
        # The date from which the system automatically re-evaluates the ignored incompliant resources.
        # 
        # >  If you leave this parameter empty, the system does not automatically re-evaluate the ignored incompliant resources. You must manually re-evaluate the ignored incompliant resources.
        self.ignore_date = ignore_date  # type: str
        # The reason why you ignore the resource.
        self.reason = reason  # type: str
        # The resources to be ignored.
        self.resources_shrink = resources_shrink  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.ignore_date is not None:
            result['IgnoreDate'] = self.ignore_date
        if self.reason is not None:
            result['Reason'] = self.reason
        if self.resources_shrink is not None:
            result['Resources'] = self.resources_shrink
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('IgnoreDate') is not None:
            self.ignore_date = m.get('IgnoreDate')
        if m.get('Reason') is not None:
            self.reason = m.get('Reason')
        if m.get('Resources') is not None:
            self.resources_shrink = m.get('Resources')
        return self


class IgnoreAggregateEvaluationResultsResponseBody(TeaModel):
    def __init__(self, request_id=None):
        # The ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        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('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class IgnoreAggregateEvaluationResultsResponse(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: IgnoreAggregateEvaluationResultsResponseBody

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

    def to_map(self):
        _map = super(IgnoreAggregateEvaluationResultsResponse, 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 = IgnoreAggregateEvaluationResultsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class IgnoreEvaluationResultsRequestResources(TeaModel):
    def __init__(self, region=None, resource_account_id=None, resource_id=None, resource_type=None):
        # The ID of the region in which the resource resides.
        # 
        # For more information about how to obtain the ID of the region in which a resource resides, see [ListDiscoveredResources](~~169620~~).
        self.region = region  # type: str
        # The ID of the Alibaba Cloud account to which the resources belong.
        self.resource_account_id = resource_account_id  # type: long
        # The ID of the resource.
        # 
        # For more information about how to obtain the ID of a resource, see [ListDiscoveredResources](~~169620~~).
        self.resource_id = resource_id  # type: str
        # The type of the resource.
        # 
        # For more information about how to obtain the type of a resource, see [ListDiscoveredResources](~~169620~~).
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        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')
        return self


class IgnoreEvaluationResultsRequest(TeaModel):
    def __init__(self, config_rule_id=None, ignore_date=None, reason=None, resources=None):
        # The ID of the rule.
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_id = config_rule_id  # type: str
        # The date from which the system automatically re-evaluates the ignored incompliant resources.
        # 
        # >  If you leave this parameter empty, the system does not automatically re-evaluate the ignored incompliant resources. You must manually re-evaluate the ignored incompliant resources.
        self.ignore_date = ignore_date  # type: str
        # The reason why you want to ignore the resource.
        self.reason = reason  # type: str
        # The resources to be ignored.
        self.resources = resources  # type: list[IgnoreEvaluationResultsRequestResources]

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

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.ignore_date is not None:
            result['IgnoreDate'] = self.ignore_date
        if self.reason is not None:
            result['Reason'] = self.reason
        result['Resources'] = []
        if self.resources is not None:
            for k in self.resources:
                result['Resources'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('IgnoreDate') is not None:
            self.ignore_date = m.get('IgnoreDate')
        if m.get('Reason') is not None:
            self.reason = m.get('Reason')
        self.resources = []
        if m.get('Resources') is not None:
            for k in m.get('Resources'):
                temp_model = IgnoreEvaluationResultsRequestResources()
                self.resources.append(temp_model.from_map(k))
        return self


class IgnoreEvaluationResultsShrinkRequest(TeaModel):
    def __init__(self, config_rule_id=None, ignore_date=None, reason=None, resources_shrink=None):
        # The ID of the rule.
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_id = config_rule_id  # type: str
        # The date from which the system automatically re-evaluates the ignored incompliant resources.
        # 
        # >  If you leave this parameter empty, the system does not automatically re-evaluate the ignored incompliant resources. You must manually re-evaluate the ignored incompliant resources.
        self.ignore_date = ignore_date  # type: str
        # The reason why you want to ignore the resource.
        self.reason = reason  # type: str
        # The resources to be ignored.
        self.resources_shrink = resources_shrink  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.ignore_date is not None:
            result['IgnoreDate'] = self.ignore_date
        if self.reason is not None:
            result['Reason'] = self.reason
        if self.resources_shrink is not None:
            result['Resources'] = self.resources_shrink
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('IgnoreDate') is not None:
            self.ignore_date = m.get('IgnoreDate')
        if m.get('Reason') is not None:
            self.reason = m.get('Reason')
        if m.get('Resources') is not None:
            self.resources_shrink = m.get('Resources')
        return self


class IgnoreEvaluationResultsResponseBody(TeaModel):
    def __init__(self, request_id=None):
        # The ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        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('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class IgnoreEvaluationResultsResponse(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: IgnoreEvaluationResultsResponseBody

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

    def to_map(self):
        _map = super(IgnoreEvaluationResultsResponse, 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 = IgnoreEvaluationResultsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAggregateCompliancePacksRequest(TeaModel):
    def __init__(self, aggregator_id=None, page_number=None, page_size=None, status=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The page number.
        # 
        # Pages start from page 1. Default value: 1.
        self.page_number = page_number  # type: int
        # The number of entries per page.
        # 
        # Valid values: 1 to 100. Minimum value: 1. Default value: 10.
        self.page_size = page_size  # type: int
        # The status of the one or more compliance packages to be queried. Valid values:
        # 
        # *   ACTIVE: compliance packages that are available for use.
        # *   CREATING: compliance packages that are being created.
        self.status = status  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        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('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class ListAggregateCompliancePacksResponseBodyCompliancePacksResultCompliancePacks(TeaModel):
    def __init__(self, account_id=None, aggregator_id=None, compliance_pack_id=None, compliance_pack_name=None,
                 compliance_pack_template_id=None, create_timestamp=None, description=None, risk_level=None, status=None):
        # The ID of the management account to which the compliance package belongs.
        self.account_id = account_id  # type: long
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The name of the compliance package.
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The ID of the compliance package template.
        self.compliance_pack_template_id = compliance_pack_template_id  # type: str
        # The timestamp when the compliance package was created. Unit: milliseconds.
        self.create_timestamp = create_timestamp  # type: long
        # The description of the compliance package.
        self.description = description  # type: str
        # The risk level of the resources that are not compliant with the managed rules in the compliance package. Valid values:
        # 
        # *   1: high risk level.
        # *   2: medium risk level.
        # *   3: low risk level.
        self.risk_level = risk_level  # type: int
        # The status of the compliance package. Valid values:
        # 
        # *   ACTIVE: The compliance package is available for use.
        # *   CREATING: The compliance package is being created.
        self.status = status  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListAggregateCompliancePacksResponseBodyCompliancePacksResultCompliancePacks, 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.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        if self.compliance_pack_template_id is not None:
            result['CompliancePackTemplateId'] = self.compliance_pack_template_id
        if self.create_timestamp is not None:
            result['CreateTimestamp'] = self.create_timestamp
        if self.description is not None:
            result['Description'] = self.description
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        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('AccountId') is not None:
            self.account_id = m.get('AccountId')
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        if m.get('CompliancePackTemplateId') is not None:
            self.compliance_pack_template_id = m.get('CompliancePackTemplateId')
        if m.get('CreateTimestamp') is not None:
            self.create_timestamp = m.get('CreateTimestamp')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class ListAggregateCompliancePacksResponseBodyCompliancePacksResult(TeaModel):
    def __init__(self, compliance_packs=None, page_number=None, page_size=None, total_count=None):
        # The details of the compliance package.
        self.compliance_packs = compliance_packs  # type: list[ListAggregateCompliancePacksResponseBodyCompliancePacksResultCompliancePacks]
        # The page number of the returned page.
        self.page_number = page_number  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The total number of compliance packages returned.
        self.total_count = total_count  # type: long

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

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

        result = dict()
        result['CompliancePacks'] = []
        if self.compliance_packs is not None:
            for k in self.compliance_packs:
                result['CompliancePacks'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        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.compliance_packs = []
        if m.get('CompliancePacks') is not None:
            for k in m.get('CompliancePacks'):
                temp_model = ListAggregateCompliancePacksResponseBodyCompliancePacksResultCompliancePacks()
                self.compliance_packs.append(temp_model.from_map(k))
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        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 ListAggregateCompliancePacksResponseBody(TeaModel):
    def __init__(self, compliance_packs_result=None, request_id=None):
        # The information about the compliance packages.
        self.compliance_packs_result = compliance_packs_result  # type: ListAggregateCompliancePacksResponseBodyCompliancePacksResult
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_packs_result is not None:
            result['CompliancePacksResult'] = self.compliance_packs_result.to_map()
        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('CompliancePacksResult') is not None:
            temp_model = ListAggregateCompliancePacksResponseBodyCompliancePacksResult()
            self.compliance_packs_result = temp_model.from_map(m['CompliancePacksResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListAggregateCompliancePacksResponse(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: ListAggregateCompliancePacksResponseBody

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

    def to_map(self):
        _map = super(ListAggregateCompliancePacksResponse, 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 = ListAggregateCompliancePacksResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAggregateConfigDeliveryChannelsRequest(TeaModel):
    def __init__(self, aggregator_id=None, delivery_channel_ids=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The IDs of the delivery channels. Separate multiple IDs with commas (,).
        self.delivery_channel_ids = delivery_channel_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.delivery_channel_ids is not None:
            result['DeliveryChannelIds'] = self.delivery_channel_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('DeliveryChannelIds') is not None:
            self.delivery_channel_ids = m.get('DeliveryChannelIds')
        return self


class ListAggregateConfigDeliveryChannelsResponseBodyDeliveryChannels(TeaModel):
    def __init__(self, account_id=None, aggregator_id=None, configuration_item_change_notification=None,
                 configuration_snapshot=None, delivery_channel_assume_role_arn=None, delivery_channel_condition=None,
                 delivery_channel_id=None, delivery_channel_name=None, delivery_channel_target_arn=None, delivery_channel_type=None,
                 delivery_snapshot_time=None, description=None, non_compliant_notification=None, oversized_data_osstarget_arn=None,
                 status=None):
        # The ID of the member in the account group.
        self.account_id = account_id  # type: long
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # Indicates whether the specified destination receives resource change logs. If the value of this parameter is true, Cloud Config delivers the resource change logs to OSS, Log Service, or MNS when the configurations of the resources change. Valid values:
        # 
        # *   true: The specified destination receives resource change logs.
        # *   false: The specified destination does not receive resource change logs.
        self.configuration_item_change_notification = configuration_item_change_notification  # type: bool
        # Indicates whether the specified destination receives scheduled resource snapshots. Cloud Config delivers scheduled resource snapshots at `04:00Z` and `16:00Z` to OSS, MNS, or Log Service every day. The time is displayed in UTC. Valid values:
        # 
        # *   true: The specified destination receives scheduled resource snapshots.
        # *   false: The specified destination does not receive scheduled resource snapshots.
        self.configuration_snapshot = configuration_snapshot  # type: bool
        # The ARN of the role that is assigned to the delivery channel.
        self.delivery_channel_assume_role_arn = delivery_channel_assume_role_arn  # type: str
        # The rule that is attached to the delivery channel. This parameter is available when you deliver data of all types to MNS or deliver snapshots to Log Service.
        # 
        # *   If the value of the DeliveryChannelType parameter is MNS, take note of the following settings of the lowest risk level and resource types of the events to which you subscribed:
        # 
        #     *   The lowest risk level of the events to which you want to subscribe is in the following format: `{"filterType":"RuleRiskLevel","value":"1","multiple":false}`.
        # 
        #         The `value` field indicates the risk level of the events to which you want to subscribe. Valid values: 1, 2, and 3. The value 1 indicates the high risk level, the value 2 indicates the medium risk level, and the value 3 indicates the low risk level.
        # 
        #     *   The setting of the resource types of the events to which you want to subscribe is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #         The `values` field indicates the resource types of the events to which you want to subscribe. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        # 
        # *   If you set the DeliveryChannelType parameter to SLS, the setting of the resource types of the snapshots to which you want to deliver is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #     The `values` field specifies the resource types of the snapshots to which you want to deliver. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        self.delivery_channel_condition = delivery_channel_condition  # type: str
        # The ID of the delivery channel.
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The name of the delivery channel.
        self.delivery_channel_name = delivery_channel_name  # type: str
        # The ARN of the delivery destination.
        # 
        # *   If the value of the DeliveryChannelType parameter is OSS, the value of this parameter is the ARN of the destination OSS bucket.
        # *   If the value of the DeliveryChannelType parameter is MNS, the value of this parameter is the ARN of the destination MNS topic.
        # *   If the value of the DeliveryChannelType parameter is SLS, the value of this parameter is the ARN of the destination Log Service Logstore.
        self.delivery_channel_target_arn = delivery_channel_target_arn  # type: str
        # The type of the delivery channel. Valid values:
        # 
        # *   OSS: Object Storage Service (OSS)
        # *   MNS: Message Service (MNS)
        # *   SLS: Log Service
        self.delivery_channel_type = delivery_channel_type  # type: str
        # The time when Cloud Config delivers scheduled resources snapshots every day.
        # 
        # Format: `HH:mmZ`. This time is displayed in UTC.
        self.delivery_snapshot_time = delivery_snapshot_time  # type: str
        # The description of the delivery channel.
        self.description = description  # type: str
        # Indicates whether the specified destination receives resource non-compliance events. If the value of this parameter is true, Cloud Config delivers resource non-compliance events to Log Service or MNS when resources are evaluated as non-compliant. Valid values:
        # 
        # *   true: The specified destination receives resource non-compliance events.
        # *   false: The specified destination does not receive resource non-compliance events.
        self.non_compliant_notification = non_compliant_notification  # type: bool
        # The ARN of the OSS bucket to which the delivered data is transferred when the size of the data exceeds the specified upper limit of the delivery channel.
        self.oversized_data_osstarget_arn = oversized_data_osstarget_arn  # type: str
        # The status of the delivery channel. Valid values:
        # 
        # *   0: The delivery channel is disabled.
        # *   1: The delivery channel is enabled.
        self.status = status  # type: int

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListAggregateConfigDeliveryChannelsResponseBodyDeliveryChannels, 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.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.configuration_item_change_notification is not None:
            result['ConfigurationItemChangeNotification'] = self.configuration_item_change_notification
        if self.configuration_snapshot is not None:
            result['ConfigurationSnapshot'] = self.configuration_snapshot
        if self.delivery_channel_assume_role_arn is not None:
            result['DeliveryChannelAssumeRoleArn'] = self.delivery_channel_assume_role_arn
        if self.delivery_channel_condition is not None:
            result['DeliveryChannelCondition'] = self.delivery_channel_condition
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_id
        if self.delivery_channel_name is not None:
            result['DeliveryChannelName'] = self.delivery_channel_name
        if self.delivery_channel_target_arn is not None:
            result['DeliveryChannelTargetArn'] = self.delivery_channel_target_arn
        if self.delivery_channel_type is not None:
            result['DeliveryChannelType'] = self.delivery_channel_type
        if self.delivery_snapshot_time is not None:
            result['DeliverySnapshotTime'] = self.delivery_snapshot_time
        if self.description is not None:
            result['Description'] = self.description
        if self.non_compliant_notification is not None:
            result['NonCompliantNotification'] = self.non_compliant_notification
        if self.oversized_data_osstarget_arn is not None:
            result['OversizedDataOSSTargetArn'] = self.oversized_data_osstarget_arn
        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('AccountId') is not None:
            self.account_id = m.get('AccountId')
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigurationItemChangeNotification') is not None:
            self.configuration_item_change_notification = m.get('ConfigurationItemChangeNotification')
        if m.get('ConfigurationSnapshot') is not None:
            self.configuration_snapshot = m.get('ConfigurationSnapshot')
        if m.get('DeliveryChannelAssumeRoleArn') is not None:
            self.delivery_channel_assume_role_arn = m.get('DeliveryChannelAssumeRoleArn')
        if m.get('DeliveryChannelCondition') is not None:
            self.delivery_channel_condition = m.get('DeliveryChannelCondition')
        if m.get('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('DeliveryChannelName') is not None:
            self.delivery_channel_name = m.get('DeliveryChannelName')
        if m.get('DeliveryChannelTargetArn') is not None:
            self.delivery_channel_target_arn = m.get('DeliveryChannelTargetArn')
        if m.get('DeliveryChannelType') is not None:
            self.delivery_channel_type = m.get('DeliveryChannelType')
        if m.get('DeliverySnapshotTime') is not None:
            self.delivery_snapshot_time = m.get('DeliverySnapshotTime')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('NonCompliantNotification') is not None:
            self.non_compliant_notification = m.get('NonCompliantNotification')
        if m.get('OversizedDataOSSTargetArn') is not None:
            self.oversized_data_osstarget_arn = m.get('OversizedDataOSSTargetArn')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class ListAggregateConfigDeliveryChannelsResponseBody(TeaModel):
    def __init__(self, delivery_channels=None, request_id=None):
        # The information about the delivery channels.
        self.delivery_channels = delivery_channels  # type: list[ListAggregateConfigDeliveryChannelsResponseBodyDeliveryChannels]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['DeliveryChannels'] = []
        if self.delivery_channels is not None:
            for k in self.delivery_channels:
                result['DeliveryChannels'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.delivery_channels = []
        if m.get('DeliveryChannels') is not None:
            for k in m.get('DeliveryChannels'):
                temp_model = ListAggregateConfigDeliveryChannelsResponseBodyDeliveryChannels()
                self.delivery_channels.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListAggregateConfigDeliveryChannelsResponse(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: ListAggregateConfigDeliveryChannelsResponseBody

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

    def to_map(self):
        _map = super(ListAggregateConfigDeliveryChannelsResponse, 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 = ListAggregateConfigDeliveryChannelsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAggregateConfigRuleEvaluationResultsRequest(TeaModel):
    def __init__(self, aggregator_id=None, compliance_pack_id=None, compliance_type=None, config_rule_id=None,
                 max_results=None, next_token=None, regions=None, resource_account_id=None, resource_group_ids=None,
                 resource_owner_id=None, resource_types=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The compliance evaluation result of the resource. Valid values:
        # 
        # *   COMPLIANT: The resource is evaluated as compliant.
        # *   NON_COMPLIANT: The resource is evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resource.
        # *   INSUFFICIENT_DATA: No resource data is available.
        # *   IGNORED: The resource is ignored during compliance evaluation.
        self.compliance_type = compliance_type  # type: str
        # The ID of the rule.
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_id = config_rule_id  # type: str
        # The maximum number of entries to return for a single request. Valid values: 1 to 100.
        self.max_results = max_results  # type: int
        # The token that is used to initiate the next request. If the response to the current request is truncated, this token is used to initiate another request and obtain the remaining entries.``
        self.next_token = next_token  # type: str
        # The ID of the region whose resources you want to evaluate. Separate multiple region IDs with commas (,).
        self.regions = regions  # type: str
        # Member accountId to which the resource to be queried belongs.
        self.resource_account_id = resource_account_id  # type: long
        # The ID of the resource group whose resources you want to evaluate. Separate multiple resource group IDs with commas (,).
        self.resource_group_ids = resource_group_ids  # type: str
        self.resource_owner_id = resource_owner_id  # type: long
        # The type of the resources that you want to evaluate. Separate multiple resource types with commas (,).
        self.resource_types = resource_types  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        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.regions is not None:
            result['Regions'] = self.regions
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        if self.resource_group_ids is not None:
            result['ResourceGroupIds'] = self.resource_group_ids
        if self.resource_owner_id is not None:
            result['ResourceOwnerId'] = self.resource_owner_id
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        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('Regions') is not None:
            self.regions = m.get('Regions')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        if m.get('ResourceGroupIds') is not None:
            self.resource_group_ids = m.get('ResourceGroupIds')
        if m.get('ResourceOwnerId') is not None:
            self.resource_owner_id = m.get('ResourceOwnerId')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        return self


class ListAggregateConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifierEvaluationResultQualifier(TeaModel):
    def __init__(self, compliance_pack_id=None, config_rule_arn=None, config_rule_id=None, config_rule_name=None,
                 ignore_date=None, region_id=None, resource_id=None, resource_name=None, resource_owner_id=None,
                 resource_type=None):
        # The ID of the compliance package to which the rule belongs.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The Alibaba Cloud Resource Name (ARN) of the rule.
        self.config_rule_arn = config_rule_arn  # type: str
        # The ID of the rule.
        self.config_rule_id = config_rule_id  # type: str
        # The name of the rule.
        self.config_rule_name = config_rule_name  # type: str
        # The date on which the system automatically re-evaluates the ignored incompliant resources.
        # 
        # >  If this parameter is left empty, the system does not automatically re-evaluate the ignored incompliant resources. You must manually re-evaluate the ignored incompliant resources.
        self.ignore_date = ignore_date  # type: str
        # The ID of the region where the resource resides.
        self.region_id = region_id  # type: str
        # The ID of the resource.
        self.resource_id = resource_id  # type: str
        # The name of the resource.
        self.resource_name = resource_name  # type: str
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.resource_owner_id = resource_owner_id  # type: long
        # The type of the resource.
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.config_rule_arn is not None:
            result['ConfigRuleArn'] = self.config_rule_arn
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.ignore_date is not None:
            result['IgnoreDate'] = self.ignore_date
        if self.region_id is not None:
            result['RegionId'] = self.region_id
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_name is not None:
            result['ResourceName'] = self.resource_name
        if self.resource_owner_id is not None:
            result['ResourceOwnerId'] = self.resource_owner_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ConfigRuleArn') is not None:
            self.config_rule_arn = m.get('ConfigRuleArn')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('IgnoreDate') is not None:
            self.ignore_date = m.get('IgnoreDate')
        if m.get('RegionId') is not None:
            self.region_id = m.get('RegionId')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceName') is not None:
            self.resource_name = m.get('ResourceName')
        if m.get('ResourceOwnerId') is not None:
            self.resource_owner_id = m.get('ResourceOwnerId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        return self


class ListAggregateConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifier(TeaModel):
    def __init__(self, evaluation_result_qualifier=None, ordering_timestamp=None):
        # The information about the evaluated resource in the compliance evaluation result.
        self.evaluation_result_qualifier = evaluation_result_qualifier  # type: ListAggregateConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifierEvaluationResultQualifier
        # The timestamp when the compliance evaluation was performed. Unit: milliseconds.
        # 
        # >  This timestamp indicates the time when the rule was triggered. You can obtain the timestamp from the value of the `ConfigRuleInvokedTimestamp` parameter.
        self.ordering_timestamp = ordering_timestamp  # type: long

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

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

        result = dict()
        if self.evaluation_result_qualifier is not None:
            result['EvaluationResultQualifier'] = self.evaluation_result_qualifier.to_map()
        if self.ordering_timestamp is not None:
            result['OrderingTimestamp'] = self.ordering_timestamp
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EvaluationResultQualifier') is not None:
            temp_model = ListAggregateConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifierEvaluationResultQualifier()
            self.evaluation_result_qualifier = temp_model.from_map(m['EvaluationResultQualifier'])
        if m.get('OrderingTimestamp') is not None:
            self.ordering_timestamp = m.get('OrderingTimestamp')
        return self


class ListAggregateConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultList(TeaModel):
    def __init__(self, annotation=None, compliance_type=None, config_rule_invoked_timestamp=None,
                 evaluation_result_identifier=None, invoking_event_message_type=None, remediation_enabled=None, result_recorded_timestamp=None,
                 risk_level=None):
        # The annotation to the resource that is evaluated as incompliant. The following section describe the parameters that can be returned:
        # 
        # *   `configuration`: the current resource configuration that is evaluated as incompliant by using the rule.
        # *   `desiredValue`: the expected resource configuration that is evaluated as compliant by using the rule.
        # *   `operator`: the operator that is used to compare the current configuration with the expected configuration of the resource.
        # *   `property`: the JSON path of the current configuration in the resource property struct.
        # *   `reason`: the reason why the resource is evaluated as incompliant.
        self.annotation = annotation  # type: str
        # The compliance evaluation result of the resources. Valid values:
        # 
        # *   COMPLIANT: The resources are evaluated as compliant.
        # *   NON_COMPLIANT: The resources are evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resources.
        # *   INSUFFICIENT_DATA: No resource data is available.
        # *   IGNORED: The resources are ignored during compliance evaluation.
        self.compliance_type = compliance_type  # type: str
        # The timestamp when the rule was triggered for the compliance evaluation. Unit: milliseconds.
        self.config_rule_invoked_timestamp = config_rule_invoked_timestamp  # type: long
        # The identifier of the compliance evaluation result.
        self.evaluation_result_identifier = evaluation_result_identifier  # type: ListAggregateConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifier
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
        # *   ScheduledNotification: The rule is periodically triggered.
        self.invoking_event_message_type = invoking_event_message_type  # type: str
        # Indicates whether the remediation template is enabled. Valid values:
        # 
        # - true: The remediation template is enabled.
        # - false: The remediation template is disabled.
        self.remediation_enabled = remediation_enabled  # type: bool
        # The timestamp when the compliance evaluation result was generated. Unit: milliseconds.
        self.result_recorded_timestamp = result_recorded_timestamp  # type: long
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int

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

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

        result = dict()
        if self.annotation is not None:
            result['Annotation'] = self.annotation
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.config_rule_invoked_timestamp is not None:
            result['ConfigRuleInvokedTimestamp'] = self.config_rule_invoked_timestamp
        if self.evaluation_result_identifier is not None:
            result['EvaluationResultIdentifier'] = self.evaluation_result_identifier.to_map()
        if self.invoking_event_message_type is not None:
            result['InvokingEventMessageType'] = self.invoking_event_message_type
        if self.remediation_enabled is not None:
            result['RemediationEnabled'] = self.remediation_enabled
        if self.result_recorded_timestamp is not None:
            result['ResultRecordedTimestamp'] = self.result_recorded_timestamp
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Annotation') is not None:
            self.annotation = m.get('Annotation')
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('ConfigRuleInvokedTimestamp') is not None:
            self.config_rule_invoked_timestamp = m.get('ConfigRuleInvokedTimestamp')
        if m.get('EvaluationResultIdentifier') is not None:
            temp_model = ListAggregateConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifier()
            self.evaluation_result_identifier = temp_model.from_map(m['EvaluationResultIdentifier'])
        if m.get('InvokingEventMessageType') is not None:
            self.invoking_event_message_type = m.get('InvokingEventMessageType')
        if m.get('RemediationEnabled') is not None:
            self.remediation_enabled = m.get('RemediationEnabled')
        if m.get('ResultRecordedTimestamp') is not None:
            self.result_recorded_timestamp = m.get('ResultRecordedTimestamp')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class ListAggregateConfigRuleEvaluationResultsResponseBodyEvaluationResults(TeaModel):
    def __init__(self, evaluation_result_list=None, max_results=None, next_token=None):
        # The details of the compliance evaluation results.
        self.evaluation_result_list = evaluation_result_list  # type: list[ListAggregateConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultList]
        # The maximum number of entries returned per page.
        self.max_results = max_results  # type: int
        # The token that was used to initiate the next request.
        self.next_token = next_token  # type: str

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

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

        result = dict()
        result['EvaluationResultList'] = []
        if self.evaluation_result_list is not None:
            for k in self.evaluation_result_list:
                result['EvaluationResultList'].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
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.evaluation_result_list = []
        if m.get('EvaluationResultList') is not None:
            for k in m.get('EvaluationResultList'):
                temp_model = ListAggregateConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultList()
                self.evaluation_result_list.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')
        return self


class ListAggregateConfigRuleEvaluationResultsResponseBody(TeaModel):
    def __init__(self, evaluation_results=None, request_id=None):
        # The information about the compliance evaluation results returned.
        self.evaluation_results = evaluation_results  # type: ListAggregateConfigRuleEvaluationResultsResponseBodyEvaluationResults
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.evaluation_results is not None:
            result['EvaluationResults'] = self.evaluation_results.to_map()
        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('EvaluationResults') is not None:
            temp_model = ListAggregateConfigRuleEvaluationResultsResponseBodyEvaluationResults()
            self.evaluation_results = temp_model.from_map(m['EvaluationResults'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListAggregateConfigRuleEvaluationResultsResponse(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: ListAggregateConfigRuleEvaluationResultsResponseBody

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

    def to_map(self):
        _map = super(ListAggregateConfigRuleEvaluationResultsResponse, 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 = ListAggregateConfigRuleEvaluationResultsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAggregateConfigRuleEvaluationStatisticsRequest(TeaModel):
    def __init__(self, aggregator_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str

    def validate(self):
        pass

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

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

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


class ListAggregateConfigRuleEvaluationStatisticsResponseBodyEvaluationResults(TeaModel):
    def __init__(self, aggregator_id=None, non_compliant_resource_cnt=None, non_compliant_rule_cnt=None,
                 statistic_date=None, total_resource_cnt=None, total_rule_cnt=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The number of resources that are evaluated as non-compliant.
        self.non_compliant_resource_cnt = non_compliant_resource_cnt  # type: int
        # The number of rules based on which resources are evaluated as non-compliant.
        self.non_compliant_rule_cnt = non_compliant_rule_cnt  # type: int
        # The date on which the statistics are obtained.
        self.statistic_date = statistic_date  # type: str
        # The total number of resources.
        self.total_resource_cnt = total_resource_cnt  # type: int
        # The total number of rules.
        self.total_rule_cnt = total_rule_cnt  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.non_compliant_resource_cnt is not None:
            result['NonCompliantResourceCnt'] = self.non_compliant_resource_cnt
        if self.non_compliant_rule_cnt is not None:
            result['NonCompliantRuleCnt'] = self.non_compliant_rule_cnt
        if self.statistic_date is not None:
            result['StatisticDate'] = self.statistic_date
        if self.total_resource_cnt is not None:
            result['TotalResourceCnt'] = self.total_resource_cnt
        if self.total_rule_cnt is not None:
            result['TotalRuleCnt'] = self.total_rule_cnt
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('NonCompliantResourceCnt') is not None:
            self.non_compliant_resource_cnt = m.get('NonCompliantResourceCnt')
        if m.get('NonCompliantRuleCnt') is not None:
            self.non_compliant_rule_cnt = m.get('NonCompliantRuleCnt')
        if m.get('StatisticDate') is not None:
            self.statistic_date = m.get('StatisticDate')
        if m.get('TotalResourceCnt') is not None:
            self.total_resource_cnt = m.get('TotalResourceCnt')
        if m.get('TotalRuleCnt') is not None:
            self.total_rule_cnt = m.get('TotalRuleCnt')
        return self


class ListAggregateConfigRuleEvaluationStatisticsResponseBody(TeaModel):
    def __init__(self, evaluation_results=None, request_id=None):
        # The statistics of compliance evaluation results.
        self.evaluation_results = evaluation_results  # type: list[ListAggregateConfigRuleEvaluationStatisticsResponseBodyEvaluationResults]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['EvaluationResults'] = []
        if self.evaluation_results is not None:
            for k in self.evaluation_results:
                result['EvaluationResults'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.evaluation_results = []
        if m.get('EvaluationResults') is not None:
            for k in m.get('EvaluationResults'):
                temp_model = ListAggregateConfigRuleEvaluationStatisticsResponseBodyEvaluationResults()
                self.evaluation_results.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListAggregateConfigRuleEvaluationStatisticsResponse(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: ListAggregateConfigRuleEvaluationStatisticsResponseBody

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

    def to_map(self):
        _map = super(ListAggregateConfigRuleEvaluationStatisticsResponse, 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 = ListAggregateConfigRuleEvaluationStatisticsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAggregateConfigRulesRequest(TeaModel):
    def __init__(self, aggregator_id=None, compliance_type=None, config_rule_name=None, config_rule_state=None,
                 keyword=None, page_number=None, page_size=None, resource_types=None, risk_level=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The compliance evaluation result. Valid values:
        # 
        # *   COMPLIANT: The resource is evaluated as compliant.
        # *   NON_COMPLIANT: The resource is evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resource.
        # *   INSUFFICIENT_DATA: No resource data is available.
        self.compliance_type = compliance_type  # type: str
        # The name of the rule.
        self.config_rule_name = config_rule_name  # type: str
        # The status of the rule. Valid values:
        # 
        # *   ACTIVE: The rule is enabled.
        # *   DELETING: The rule is being deleted.
        # *   EVALUATING: The rule is being used to evaluate resource configurations.
        # *   INACTIVE: The rule is disabled.
        self.config_rule_state = config_rule_state  # type: str
        # The keyword that you want to use to query the rules.
        # 
        # You can perform a fuzzy search by rule ID, rule name, rule description, or managed rule ID.
        self.keyword = keyword  # type: str
        # The page number.
        # 
        # Pages start from page 1. Default value: 1.
        self.page_number = page_number  # type: int
        # The number of entries per page.
        # 
        # Valid values: 1 to 100. Minimum value: 1. Default value: 10.
        self.page_size = page_size  # type: int
        # Resource type for the rule to evaluate.
        self.resource_types = resource_types  # type: str
        # The risk level of the resources that do not comply with the rule. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_state is not None:
            result['ConfigRuleState'] = self.config_rule_state
        if self.keyword is not None:
            result['Keyword'] = self.keyword
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleState') is not None:
            self.config_rule_state = m.get('ConfigRuleState')
        if m.get('Keyword') is not None:
            self.keyword = m.get('Keyword')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleListCompliance(TeaModel):
    def __init__(self, compliance_type=None, count=None):
        # The compliance evaluation result. Valid values:
        # 
        # *   COMPLIANT: The resource is evaluated as compliant.
        # *   NON_COMPLIANT: The resource is evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resource.
        # *   INSUFFICIENT_DATA: No resource data is available.
        self.compliance_type = compliance_type  # type: str
        # The number of evaluated resources.
        self.count = count  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.count is not None:
            result['Count'] = self.count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('Count') is not None:
            self.count = m.get('Count')
        return self


class ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleListCreateBy(TeaModel):
    def __init__(self, aggregator_id=None, aggregator_name=None, compliance_pack_id=None,
                 compliance_pack_name=None, creator_id=None, creator_name=None, creator_type=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The name of the account group.
        self.aggregator_name = aggregator_name  # type: str
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The name of the compliance package.
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The ID of the management account that was used to create the rule.
        self.creator_id = creator_id  # type: str
        # The name of the management account that was used to create the rule.
        self.creator_name = creator_name  # type: str
        # The type of the creator of the rule. Valid value: AGGREGATOR, which indicates an account group.
        self.creator_type = creator_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.aggregator_name is not None:
            result['AggregatorName'] = self.aggregator_name
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        if self.creator_id is not None:
            result['CreatorId'] = self.creator_id
        if self.creator_name is not None:
            result['CreatorName'] = self.creator_name
        if self.creator_type is not None:
            result['CreatorType'] = self.creator_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('AggregatorName') is not None:
            self.aggregator_name = m.get('AggregatorName')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        if m.get('CreatorId') is not None:
            self.creator_id = m.get('CreatorId')
        if m.get('CreatorName') is not None:
            self.creator_name = m.get('CreatorName')
        if m.get('CreatorType') is not None:
            self.creator_type = m.get('CreatorType')
        return self


class ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleListTags(TeaModel):
    def __init__(self, key=None, value=None):
        # The tag key of the rule.
        self.key = key  # type: str
        # The tag value of the rule.
        self.value = value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleListTags, 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 ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleList(TeaModel):
    def __init__(self, account_id=None, automation_type=None, compliance=None, config_rule_arn=None,
                 config_rule_id=None, config_rule_name=None, config_rule_state=None, create_by=None, description=None,
                 resource_types_scope=None, risk_level=None, source_identifier=None, source_owner=None, tags=None):
        # The ID of the management account to which the rule belongs.
        self.account_id = account_id  # type: long
        # The type of the remediation template. Valid value: OOS, which indicates Operation Orchestration Service.
        self.automation_type = automation_type  # type: str
        # The compliance evaluation result.
        self.compliance = compliance  # type: ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleListCompliance
        # The ARN of the rule.
        self.config_rule_arn = config_rule_arn  # type: str
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The rule name.
        self.config_rule_name = config_rule_name  # type: str
        # The status of the rule. Valid values:
        # 
        # *   ACTIVE: The rule is enabled.
        # *   DELETING: The rule is being deleted.
        # *   EVALUATING: The rule is triggered and is being used to monitor resource configurations.
        # *   INACTIVE: The rule is disabled.
        self.config_rule_state = config_rule_state  # type: str
        # The information about the creation of the rule.
        self.create_by = create_by  # type: ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleListCreateBy
        # The description of the rule.
        self.description = description  # type: str
        # The types of resources evaluated by the rule. Multiple resource types are separated with commas (,).
        self.resource_types_scope = resource_types_scope  # type: str
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int
        # The ID of the rule.
        # 
        # *   If the rule is a managed rule, the value of this parameter is the name of the managed rule.
        # *   If the rule is a custom rule, the value of this parameter is the Alibaba Cloud Resource Name (ARN) of the relevant function in Function Compute.
        self.source_identifier = source_identifier  # type: str
        # The type of the rule. Valid values:
        # 
        # *   CUSTOM_FC: custom rule
        # *   ALIYUN: managed rule
        self.source_owner = source_owner  # type: str
        # The tags of the rule.
        self.tags = tags  # type: list[ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleListTags]

    def validate(self):
        if self.compliance:
            self.compliance.validate()
        if self.create_by:
            self.create_by.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleList, 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.automation_type is not None:
            result['AutomationType'] = self.automation_type
        if self.compliance is not None:
            result['Compliance'] = self.compliance.to_map()
        if self.config_rule_arn is not None:
            result['ConfigRuleArn'] = self.config_rule_arn
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_state is not None:
            result['ConfigRuleState'] = self.config_rule_state
        if self.create_by is not None:
            result['CreateBy'] = self.create_by.to_map()
        if self.description is not None:
            result['Description'] = self.description
        if self.resource_types_scope is not None:
            result['ResourceTypesScope'] = self.resource_types_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.source_identifier is not None:
            result['SourceIdentifier'] = self.source_identifier
        if self.source_owner is not None:
            result['SourceOwner'] = self.source_owner
        result['Tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['Tags'].append(k.to_map() if k else None)
        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('AutomationType') is not None:
            self.automation_type = m.get('AutomationType')
        if m.get('Compliance') is not None:
            temp_model = ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleListCompliance()
            self.compliance = temp_model.from_map(m['Compliance'])
        if m.get('ConfigRuleArn') is not None:
            self.config_rule_arn = m.get('ConfigRuleArn')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleState') is not None:
            self.config_rule_state = m.get('ConfigRuleState')
        if m.get('CreateBy') is not None:
            temp_model = ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleListCreateBy()
            self.create_by = temp_model.from_map(m['CreateBy'])
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('SourceIdentifier') is not None:
            self.source_identifier = m.get('SourceIdentifier')
        if m.get('SourceOwner') is not None:
            self.source_owner = m.get('SourceOwner')
        self.tags = []
        if m.get('Tags') is not None:
            for k in m.get('Tags'):
                temp_model = ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleListTags()
                self.tags.append(temp_model.from_map(k))
        return self


class ListAggregateConfigRulesResponseBodyConfigRules(TeaModel):
    def __init__(self, config_rule_list=None, page_number=None, page_size=None, total_count=None):
        # The details of the rule.
        self.config_rule_list = config_rule_list  # type: list[ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleList]
        # The number of the page returned.
        self.page_number = page_number  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The total number of rules.
        self.total_count = total_count  # type: long

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

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

        result = dict()
        result['ConfigRuleList'] = []
        if self.config_rule_list is not None:
            for k in self.config_rule_list:
                result['ConfigRuleList'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        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.config_rule_list = []
        if m.get('ConfigRuleList') is not None:
            for k in m.get('ConfigRuleList'):
                temp_model = ListAggregateConfigRulesResponseBodyConfigRulesConfigRuleList()
                self.config_rule_list.append(temp_model.from_map(k))
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        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 ListAggregateConfigRulesResponseBody(TeaModel):
    def __init__(self, config_rules=None, request_id=None):
        # The queried rules.
        self.config_rules = config_rules  # type: ListAggregateConfigRulesResponseBodyConfigRules
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.config_rules is not None:
            result['ConfigRules'] = self.config_rules.to_map()
        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('ConfigRules') is not None:
            temp_model = ListAggregateConfigRulesResponseBodyConfigRules()
            self.config_rules = temp_model.from_map(m['ConfigRules'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListAggregateConfigRulesResponse(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: ListAggregateConfigRulesResponseBody

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

    def to_map(self):
        _map = super(ListAggregateConfigRulesResponse, 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 = ListAggregateConfigRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAggregateDiscoveredResourcesRequest(TeaModel):
    def __init__(self, aggregator_id=None, max_results=None, next_token=None, regions=None,
                 resource_account_id=None, resource_deleted=None, resource_id=None, resource_owner_id=None, resource_types=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The maximum number of entries to return for a single request. Valid values: 1 to 100.
        self.max_results = max_results  # type: int
        # The `token` that you want to use to initiate the current request. If the response of the previous request is truncated, you can use this token to initiate another request and obtain the remaining entries.
        self.next_token = next_token  # type: str
        # The ID of the region in which the resource resides. Separate multiple region IDs with commas (,).
        self.regions = regions  # type: str
        # The ID of the Alibaba Cloud account to which the resources in the account group belong.
        self.resource_account_id = resource_account_id  # type: long
        # The status of the resource. Valid values:
        # 
        # *   0: The resource is deleted.
        # *   1 (default): The resource is retained.
        self.resource_deleted = resource_deleted  # type: int
        # The resource ID.
        self.resource_id = resource_id  # type: str
        self.resource_owner_id = resource_owner_id  # type: long
        # The type of the resource. Separate multiple resource types with commas (,).
        self.resource_types = resource_types  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        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.regions is not None:
            result['Regions'] = self.regions
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        if self.resource_deleted is not None:
            result['ResourceDeleted'] = self.resource_deleted
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_owner_id is not None:
            result['ResourceOwnerId'] = self.resource_owner_id
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        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('Regions') is not None:
            self.regions = m.get('Regions')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        if m.get('ResourceDeleted') is not None:
            self.resource_deleted = m.get('ResourceDeleted')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceOwnerId') is not None:
            self.resource_owner_id = m.get('ResourceOwnerId')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        return self


class ListAggregateDiscoveredResourcesResponseBodyDiscoveredResourceProfilesDiscoveredResourceProfileList(TeaModel):
    def __init__(self, account_id=None, availability_zone=None, region=None, resource_creation_time=None,
                 resource_deleted=None, resource_id=None, resource_name=None, resource_owner_id=None, resource_status=None,
                 resource_type=None, tags=None, version=None):
        # The ID of the Alibaba Cloud account to which the resource belongs. We recommend that you use the ResourceOwnerId parameter.
        self.account_id = account_id  # type: long
        # The ID of the zone in which the resource resides.
        self.availability_zone = availability_zone  # type: str
        # The region ID.
        self.region = region  # type: str
        # The time when the resource was created. Unit: milliseconds.
        self.resource_creation_time = resource_creation_time  # type: long
        # The status of the resource. Valid values:
        # 
        # *   0: The resource is deleted.
        # *   1: The resource is retained.
        self.resource_deleted = resource_deleted  # type: int
        # The resource ID.
        self.resource_id = resource_id  # type: str
        # The resource name.
        self.resource_name = resource_name  # type: str
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.resource_owner_id = resource_owner_id  # type: long
        # The status of the resource. The value of this parameter varies with the resource type and may be empty. Examples:
        # 
        # *   If the value of the ResourceType parameter is ACS::ECS::Instance, the resource is an Elastic Compute Service (ECS) instance that is in a specific state. In this case, the valid values of this parameter are Running and Stopped.
        # *   If the value of the ResourceType parameter is ACS::OSS::Bucket, the resource is an Object Storage Service (OSS) bucket that is not in a specific state. In this case, this parameter is empty.
        self.resource_status = resource_status  # type: str
        # The resource type.
        self.resource_type = resource_type  # type: str
        # The tags of the resource.
        self.tags = tags  # type: str
        # The build version of the resource.
        self.version = version  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListAggregateDiscoveredResourcesResponseBodyDiscoveredResourceProfilesDiscoveredResourceProfileList, 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.availability_zone is not None:
            result['AvailabilityZone'] = self.availability_zone
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_creation_time is not None:
            result['ResourceCreationTime'] = self.resource_creation_time
        if self.resource_deleted is not None:
            result['ResourceDeleted'] = self.resource_deleted
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_name is not None:
            result['ResourceName'] = self.resource_name
        if self.resource_owner_id is not None:
            result['ResourceOwnerId'] = self.resource_owner_id
        if self.resource_status is not None:
            result['ResourceStatus'] = self.resource_status
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.tags is not None:
            result['Tags'] = self.tags
        if self.version is not None:
            result['Version'] = self.version
        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('AvailabilityZone') is not None:
            self.availability_zone = m.get('AvailabilityZone')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceCreationTime') is not None:
            self.resource_creation_time = m.get('ResourceCreationTime')
        if m.get('ResourceDeleted') is not None:
            self.resource_deleted = m.get('ResourceDeleted')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceName') is not None:
            self.resource_name = m.get('ResourceName')
        if m.get('ResourceOwnerId') is not None:
            self.resource_owner_id = m.get('ResourceOwnerId')
        if m.get('ResourceStatus') is not None:
            self.resource_status = m.get('ResourceStatus')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('Tags') is not None:
            self.tags = m.get('Tags')
        if m.get('Version') is not None:
            self.version = m.get('Version')
        return self


class ListAggregateDiscoveredResourcesResponseBodyDiscoveredResourceProfiles(TeaModel):
    def __init__(self, discovered_resource_profile_list=None, max_results=None, next_token=None, total_count=None):
        # The queried resource.
        self.discovered_resource_profile_list = discovered_resource_profile_list  # type: list[ListAggregateDiscoveredResourcesResponseBodyDiscoveredResourceProfilesDiscoveredResourceProfileList]
        # The maximum number of entries returned on each page.
        self.max_results = max_results  # type: int
        # The token that was used to initiate the next request.
        self.next_token = next_token  # type: str
        # The total number of resources.
        self.total_count = total_count  # type: int

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

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

        result = dict()
        result['DiscoveredResourceProfileList'] = []
        if self.discovered_resource_profile_list is not None:
            for k in self.discovered_resource_profile_list:
                result['DiscoveredResourceProfileList'].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.discovered_resource_profile_list = []
        if m.get('DiscoveredResourceProfileList') is not None:
            for k in m.get('DiscoveredResourceProfileList'):
                temp_model = ListAggregateDiscoveredResourcesResponseBodyDiscoveredResourceProfilesDiscoveredResourceProfileList()
                self.discovered_resource_profile_list.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 ListAggregateDiscoveredResourcesResponseBody(TeaModel):
    def __init__(self, discovered_resource_profiles=None, request_id=None):
        # The queried resources.
        self.discovered_resource_profiles = discovered_resource_profiles  # type: ListAggregateDiscoveredResourcesResponseBodyDiscoveredResourceProfiles
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.discovered_resource_profiles is not None:
            result['DiscoveredResourceProfiles'] = self.discovered_resource_profiles.to_map()
        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('DiscoveredResourceProfiles') is not None:
            temp_model = ListAggregateDiscoveredResourcesResponseBodyDiscoveredResourceProfiles()
            self.discovered_resource_profiles = temp_model.from_map(m['DiscoveredResourceProfiles'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListAggregateDiscoveredResourcesResponse(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: ListAggregateDiscoveredResourcesResponseBody

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

    def to_map(self):
        _map = super(ListAggregateDiscoveredResourcesResponse, 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 = ListAggregateDiscoveredResourcesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAggregateRemediationExecutionsRequest(TeaModel):
    def __init__(self, aggregator_id=None, config_rule_id=None, execution_status=None, max_results=None,
                 next_token=None, resource_account_id=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The rule ID.
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_id = config_rule_id  # type: str
        # The status of the remediation. Valid values:
        # 
        # *   Success
        # *   Failed
        self.execution_status = execution_status  # type: str
        # The maximum number of entries to return for a single request. Valid values: 10 to 100.
        self.max_results = max_results  # type: long
        # The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.
        self.next_token = next_token  # type: str
        # The ID of the member account in the account group.
        self.resource_account_id = resource_account_id  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.execution_status is not None:
            result['ExecutionStatus'] = self.execution_status
        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.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ExecutionStatus') is not None:
            self.execution_status = m.get('ExecutionStatus')
        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('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        return self


class ListAggregateRemediationExecutionsResponseBodyRemediationExecutionDataRemediationExecutions(TeaModel):
    def __init__(self, execution_create_date=None, execution_invocation_id=None, execution_resource_ids=None,
                 execution_resource_type=None, execution_status=None, execution_status_message=None):
        # The time when the remediation record was created.
        self.execution_create_date = execution_create_date  # type: str
        # The invocation ID of the remediation record.
        self.execution_invocation_id = execution_invocation_id  # type: str
        # The IDs of the remediated resources. Multiple resource IDs are separated with commas (,).
        self.execution_resource_ids = execution_resource_ids  # type: str
        # The resource type.
        self.execution_resource_type = execution_resource_type  # type: str
        # The status of the remediation. Valid values:
        # 
        # *   Success
        # *   Failed
        self.execution_status = execution_status  # type: str
        # The error message returned when the remediation fails.
        self.execution_status_message = execution_status_message  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.execution_create_date is not None:
            result['ExecutionCreateDate'] = self.execution_create_date
        if self.execution_invocation_id is not None:
            result['ExecutionInvocationId'] = self.execution_invocation_id
        if self.execution_resource_ids is not None:
            result['ExecutionResourceIds'] = self.execution_resource_ids
        if self.execution_resource_type is not None:
            result['ExecutionResourceType'] = self.execution_resource_type
        if self.execution_status is not None:
            result['ExecutionStatus'] = self.execution_status
        if self.execution_status_message is not None:
            result['ExecutionStatusMessage'] = self.execution_status_message
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ExecutionCreateDate') is not None:
            self.execution_create_date = m.get('ExecutionCreateDate')
        if m.get('ExecutionInvocationId') is not None:
            self.execution_invocation_id = m.get('ExecutionInvocationId')
        if m.get('ExecutionResourceIds') is not None:
            self.execution_resource_ids = m.get('ExecutionResourceIds')
        if m.get('ExecutionResourceType') is not None:
            self.execution_resource_type = m.get('ExecutionResourceType')
        if m.get('ExecutionStatus') is not None:
            self.execution_status = m.get('ExecutionStatus')
        if m.get('ExecutionStatusMessage') is not None:
            self.execution_status_message = m.get('ExecutionStatusMessage')
        return self


class ListAggregateRemediationExecutionsResponseBodyRemediationExecutionData(TeaModel):
    def __init__(self, max_results=None, next_token=None, remediation_executions=None):
        # The maximum number of entries returned for a single request.
        self.max_results = max_results  # type: long
        # A pagination token. It can be used in the next request to retrieve a new page of results.
        self.next_token = next_token  # type: str
        # The queried remediation records.
        self.remediation_executions = remediation_executions  # type: list[ListAggregateRemediationExecutionsResponseBodyRemediationExecutionDataRemediationExecutions]

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

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

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

    def from_map(self, m=None):
        m = m or dict()
        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')
        self.remediation_executions = []
        if m.get('RemediationExecutions') is not None:
            for k in m.get('RemediationExecutions'):
                temp_model = ListAggregateRemediationExecutionsResponseBodyRemediationExecutionDataRemediationExecutions()
                self.remediation_executions.append(temp_model.from_map(k))
        return self


class ListAggregateRemediationExecutionsResponseBody(TeaModel):
    def __init__(self, remediation_execution_data=None, request_id=None):
        # The queried remediation records.
        self.remediation_execution_data = remediation_execution_data  # type: ListAggregateRemediationExecutionsResponseBodyRemediationExecutionData
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.remediation_execution_data is not None:
            result['RemediationExecutionData'] = self.remediation_execution_data.to_map()
        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('RemediationExecutionData') is not None:
            temp_model = ListAggregateRemediationExecutionsResponseBodyRemediationExecutionData()
            self.remediation_execution_data = temp_model.from_map(m['RemediationExecutionData'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListAggregateRemediationExecutionsResponse(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: ListAggregateRemediationExecutionsResponseBody

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

    def to_map(self):
        _map = super(ListAggregateRemediationExecutionsResponse, 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 = ListAggregateRemediationExecutionsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAggregateRemediationsRequest(TeaModel):
    def __init__(self, aggregator_id=None, config_rule_ids=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The rule IDs. Separate multiple rule IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_ids = config_rule_ids  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_ids is not None:
            result['ConfigRuleIds'] = self.config_rule_ids
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleIds') is not None:
            self.config_rule_ids = m.get('ConfigRuleIds')
        return self


class ListAggregateRemediationsResponseBodyRemediations(TeaModel):
    def __init__(self, account_id=None, aggregator_id=None, config_rule_id=None, invoke_type=None,
                 last_successful_invocation_id=None, last_successful_invocation_time=None, last_successful_invocation_type=None,
                 remediaiton_origin_params=None, remediation_id=None, remediation_source_type=None, remediation_template_id=None,
                 remediation_type=None):
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.account_id = account_id  # type: long
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The execution mode of the remediation template. Valid values:
        # 
        # *   NON_EXECUTION: The remediation template is not executed.
        # *   AUTO_EXECUTION: The remediation template is automatically executed.
        # *   MANUAL_EXECUTION: The remediation template is manually executed.
        # *   NOT_CONFIG: The execution mode is not specified.
        self.invoke_type = invoke_type  # type: str
        # The ID of the last successful execution of the remediation template.
        self.last_successful_invocation_id = last_successful_invocation_id  # type: str
        # The timestamp of the last successful execution of the remediation template. Unit: milliseconds.
        self.last_successful_invocation_time = last_successful_invocation_time  # type: long
        # The mode of the last successful execution of the remediation template. Valid values:
        # 
        # *   NON_EXECUTION: The remediation template is not executed.
        # *   AUTO_EXECUTION: The remediation template is automatically executed.
        # *   MANUAL_EXECUTION: The remediation template is manually executed.
        # *   NOT_CONFIG: The execution mode is not specified.
        self.last_successful_invocation_type = last_successful_invocation_type  # type: str
        # The converted configuration of the remediation template. This parameter is returned only for an OOS remediation template.
        self.remediaiton_origin_params = remediaiton_origin_params  # type: str
        # The ID of the remediation template.
        self.remediation_id = remediation_id  # type: str
        # The source of remediation template. Valid values:
        # 
        # *   ALIYUN: official template.
        # *   CUSTOM: custom template.
        # *   NONE: none.
        self.remediation_source_type = remediation_source_type  # type: str
        # The ID of the remediation template.
        self.remediation_template_id = remediation_template_id  # type: str
        # The type of the remediation template. Valid values:
        # 
        # *   OOS: Operation Orchestration Service (official remediation).
        # *   FC: Function Compute (custom remediation).
        self.remediation_type = remediation_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListAggregateRemediationsResponseBodyRemediations, 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.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.invoke_type is not None:
            result['InvokeType'] = self.invoke_type
        if self.last_successful_invocation_id is not None:
            result['LastSuccessfulInvocationId'] = self.last_successful_invocation_id
        if self.last_successful_invocation_time is not None:
            result['LastSuccessfulInvocationTime'] = self.last_successful_invocation_time
        if self.last_successful_invocation_type is not None:
            result['LastSuccessfulInvocationType'] = self.last_successful_invocation_type
        if self.remediaiton_origin_params is not None:
            result['RemediaitonOriginParams'] = self.remediaiton_origin_params
        if self.remediation_id is not None:
            result['RemediationId'] = self.remediation_id
        if self.remediation_source_type is not None:
            result['RemediationSourceType'] = self.remediation_source_type
        if self.remediation_template_id is not None:
            result['RemediationTemplateId'] = self.remediation_template_id
        if self.remediation_type is not None:
            result['RemediationType'] = self.remediation_type
        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('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('InvokeType') is not None:
            self.invoke_type = m.get('InvokeType')
        if m.get('LastSuccessfulInvocationId') is not None:
            self.last_successful_invocation_id = m.get('LastSuccessfulInvocationId')
        if m.get('LastSuccessfulInvocationTime') is not None:
            self.last_successful_invocation_time = m.get('LastSuccessfulInvocationTime')
        if m.get('LastSuccessfulInvocationType') is not None:
            self.last_successful_invocation_type = m.get('LastSuccessfulInvocationType')
        if m.get('RemediaitonOriginParams') is not None:
            self.remediaiton_origin_params = m.get('RemediaitonOriginParams')
        if m.get('RemediationId') is not None:
            self.remediation_id = m.get('RemediationId')
        if m.get('RemediationSourceType') is not None:
            self.remediation_source_type = m.get('RemediationSourceType')
        if m.get('RemediationTemplateId') is not None:
            self.remediation_template_id = m.get('RemediationTemplateId')
        if m.get('RemediationType') is not None:
            self.remediation_type = m.get('RemediationType')
        return self


class ListAggregateRemediationsResponseBody(TeaModel):
    def __init__(self, remediations=None, request_id=None):
        # An array that contains remediation templates.
        self.remediations = remediations  # type: list[ListAggregateRemediationsResponseBodyRemediations]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['Remediations'] = []
        if self.remediations is not None:
            for k in self.remediations:
                result['Remediations'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.remediations = []
        if m.get('Remediations') is not None:
            for k in m.get('Remediations'):
                temp_model = ListAggregateRemediationsResponseBodyRemediations()
                self.remediations.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListAggregateRemediationsResponse(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: ListAggregateRemediationsResponseBody

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

    def to_map(self):
        _map = super(ListAggregateRemediationsResponse, 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 = ListAggregateRemediationsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAggregateResourceEvaluationResultsRequest(TeaModel):
    def __init__(self, aggregator_id=None, compliance_type=None, max_results=None, next_token=None, region=None,
                 resource_id=None, resource_type=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The compliance evaluation result of the resource. Valid values:
        # 
        # *   COMPLIANT: The resource is evaluated as compliant.
        # *   NON_COMPLIANT: The resource is evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resource.
        # *   INSUFFICIENT_DATA: No data is available.
        # *   IGNORED: The resource is ignored during compliance evaluation.
        self.compliance_type = compliance_type  # type: str
        # The maximum number of entries to return for a single request. Valid values: 1 to 100.
        self.max_results = max_results  # type: int
        # The token that you want to use to initiate the current request. If the response of the previous request is truncated, you can use this token to initiate another request and obtain the remaining entries.``
        self.next_token = next_token  # type: str
        # The ID of the region where one or more resources that you want to query reside. For example, the value `global` indicates global regions and the value `cn-hangzhou` indicates the China (Hangzhou) region.
        # 
        # For more information about how to obtain the ID of a region, see [ListAggregateDiscoveredResources](~~265983~~).
        self.region = region  # type: str
        # The ID of the resource.
        # 
        # For more information about how to obtain the ID of a resource, see [ListAggregateDiscoveredResources](~~265983~~).
        self.resource_id = resource_id  # type: str
        # The type of the resource.
        # 
        # For more information about how to query the type of a resource, see [ListAggregateDiscoveredResources](~~265983~~).
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_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
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        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('Region') is not None:
            self.region = m.get('Region')
        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')
        return self


class ListAggregateResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifierEvaluationResultQualifier(TeaModel):
    def __init__(self, config_rule_arn=None, config_rule_id=None, config_rule_name=None, ignore_date=None,
                 region_id=None, resource_id=None, resource_name=None, resource_type=None):
        # The Alibaba Cloud Resource Name (ARN) of the rule.
        self.config_rule_arn = config_rule_arn  # type: str
        # The ID of the rule.
        self.config_rule_id = config_rule_id  # type: str
        # The name of the monitoring rule.
        self.config_rule_name = config_rule_name  # type: str
        # The date from which the system automatically re-evaluates the ignored incompliant resources.
        # 
        # >  If the value of this parameter is left empty, the system does not automatically re-evaluate the ignored incompliant resources. You must manually re-evaluate the ignored incompliant resources.
        self.ignore_date = ignore_date  # type: str
        # The ID of the region where the resource resides.
        self.region_id = region_id  # type: str
        # The ID of the resource.
        self.resource_id = resource_id  # type: str
        # The name of the resource.
        self.resource_name = resource_name  # type: str
        # The type of the resource.
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_arn is not None:
            result['ConfigRuleArn'] = self.config_rule_arn
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.ignore_date is not None:
            result['IgnoreDate'] = self.ignore_date
        if self.region_id is not None:
            result['RegionId'] = self.region_id
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_name is not None:
            result['ResourceName'] = self.resource_name
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleArn') is not None:
            self.config_rule_arn = m.get('ConfigRuleArn')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('IgnoreDate') is not None:
            self.ignore_date = m.get('IgnoreDate')
        if m.get('RegionId') is not None:
            self.region_id = m.get('RegionId')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceName') is not None:
            self.resource_name = m.get('ResourceName')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        return self


class ListAggregateResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifier(TeaModel):
    def __init__(self, evaluation_result_qualifier=None, ordering_timestamp=None):
        # The information about the evaluated resource in the compliance evaluation result.
        self.evaluation_result_qualifier = evaluation_result_qualifier  # type: ListAggregateResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifierEvaluationResultQualifier
        # The timestamp when the compliance evaluation was performed. Unit: milliseconds.
        self.ordering_timestamp = ordering_timestamp  # type: long

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

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

        result = dict()
        if self.evaluation_result_qualifier is not None:
            result['EvaluationResultQualifier'] = self.evaluation_result_qualifier.to_map()
        if self.ordering_timestamp is not None:
            result['OrderingTimestamp'] = self.ordering_timestamp
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EvaluationResultQualifier') is not None:
            temp_model = ListAggregateResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifierEvaluationResultQualifier()
            self.evaluation_result_qualifier = temp_model.from_map(m['EvaluationResultQualifier'])
        if m.get('OrderingTimestamp') is not None:
            self.ordering_timestamp = m.get('OrderingTimestamp')
        return self


class ListAggregateResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultList(TeaModel):
    def __init__(self, annotation=None, compliance_type=None, config_rule_invoked_timestamp=None,
                 evaluation_result_identifier=None, invoking_event_message_type=None, remediation_enabled=None, result_recorded_timestamp=None,
                 risk_level=None):
        # The annotation to the resource that is evaluated as incompliant.
        self.annotation = annotation  # type: str
        # The compliance evaluation result of the resources. Valid values:
        # 
        # *   COMPLIANT: The resources are evaluated as compliant.
        # *   NON_COMPLIANT: The resources are evaluated as incompliant.
        # *   NOT_APPLICABLE: The rule does not apply to your resources.
        # *   INSUFFICIENT_DATA: No resource data is available.
        # *   IGNORED: The resource is ignored during compliance evaluation.
        self.compliance_type = compliance_type  # type: str
        # The timestamp when the rule was triggered. Unit: milliseconds.
        self.config_rule_invoked_timestamp = config_rule_invoked_timestamp  # type: long
        # The identifying information about the compliance evaluation result.
        self.evaluation_result_identifier = evaluation_result_identifier  # type: ListAggregateResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifier
        # The trigger type of the managed rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The managed rule is triggered by configuration changes.
        # *   ScheduledNotification: The managed rule is periodically triggered.
        self.invoking_event_message_type = invoking_event_message_type  # type: str
        # Indicates whether the remediation template is enabled. Valid values:
        # 
        # - true: The remediation template is enabled.
        # - false: The remediation template is disabled.
        self.remediation_enabled = remediation_enabled  # type: bool
        # The timestamp when the compliance evaluation result was recorded. Unit: milliseconds.
        self.result_recorded_timestamp = result_recorded_timestamp  # type: long
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int

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

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

        result = dict()
        if self.annotation is not None:
            result['Annotation'] = self.annotation
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.config_rule_invoked_timestamp is not None:
            result['ConfigRuleInvokedTimestamp'] = self.config_rule_invoked_timestamp
        if self.evaluation_result_identifier is not None:
            result['EvaluationResultIdentifier'] = self.evaluation_result_identifier.to_map()
        if self.invoking_event_message_type is not None:
            result['InvokingEventMessageType'] = self.invoking_event_message_type
        if self.remediation_enabled is not None:
            result['RemediationEnabled'] = self.remediation_enabled
        if self.result_recorded_timestamp is not None:
            result['ResultRecordedTimestamp'] = self.result_recorded_timestamp
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Annotation') is not None:
            self.annotation = m.get('Annotation')
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('ConfigRuleInvokedTimestamp') is not None:
            self.config_rule_invoked_timestamp = m.get('ConfigRuleInvokedTimestamp')
        if m.get('EvaluationResultIdentifier') is not None:
            temp_model = ListAggregateResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifier()
            self.evaluation_result_identifier = temp_model.from_map(m['EvaluationResultIdentifier'])
        if m.get('InvokingEventMessageType') is not None:
            self.invoking_event_message_type = m.get('InvokingEventMessageType')
        if m.get('RemediationEnabled') is not None:
            self.remediation_enabled = m.get('RemediationEnabled')
        if m.get('ResultRecordedTimestamp') is not None:
            self.result_recorded_timestamp = m.get('ResultRecordedTimestamp')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class ListAggregateResourceEvaluationResultsResponseBodyEvaluationResults(TeaModel):
    def __init__(self, evaluation_result_list=None, max_results=None, next_token=None):
        # The details of the compliance evaluation result.
        self.evaluation_result_list = evaluation_result_list  # type: list[ListAggregateResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultList]
        # The maximum number of entries returned on each page.
        self.max_results = max_results  # type: int
        # The token that was used to initiate the next request.
        self.next_token = next_token  # type: str

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

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

        result = dict()
        result['EvaluationResultList'] = []
        if self.evaluation_result_list is not None:
            for k in self.evaluation_result_list:
                result['EvaluationResultList'].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
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.evaluation_result_list = []
        if m.get('EvaluationResultList') is not None:
            for k in m.get('EvaluationResultList'):
                temp_model = ListAggregateResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultList()
                self.evaluation_result_list.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')
        return self


class ListAggregateResourceEvaluationResultsResponseBody(TeaModel):
    def __init__(self, evaluation_results=None, request_id=None):
        # The information about the compliance evaluation results returned.
        self.evaluation_results = evaluation_results  # type: ListAggregateResourceEvaluationResultsResponseBodyEvaluationResults
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.evaluation_results is not None:
            result['EvaluationResults'] = self.evaluation_results.to_map()
        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('EvaluationResults') is not None:
            temp_model = ListAggregateResourceEvaluationResultsResponseBodyEvaluationResults()
            self.evaluation_results = temp_model.from_map(m['EvaluationResults'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListAggregateResourceEvaluationResultsResponse(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: ListAggregateResourceEvaluationResultsResponseBody

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

    def to_map(self):
        _map = super(ListAggregateResourceEvaluationResultsResponse, 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 = ListAggregateResourceEvaluationResultsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAggregateResourceRelationsRequest(TeaModel):
    def __init__(self, aggregator_id=None, max_results=None, next_token=None, region=None, relation_type=None,
                 resource_account_id=None, resource_id=None, resource_type=None, target_resource_id=None, target_resource_type=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The maximum number of entries to return for a single request. Valid values: 1 to 1000.
        self.max_results = max_results  # type: int
        # The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.
        self.next_token = next_token  # type: str
        # The ID of the region in which the resource resides.
        self.region = region  # type: str
        # The type of the relationship between the resource and the object.
        # 
        # Valid values:
        # 
        # *   IsContained: The object is included as part of the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   IsAttachedTo: The object is added to the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   IsAssociatedIn: The object is associated with the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   Contains: The actual value contains the expected value.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        self.relation_type = relation_type  # type: str
        # The ID of the Alibaba Cloud account to which the resources in the account group belong.
        self.resource_account_id = resource_account_id  # type: long
        # The resource ID.
        self.resource_id = resource_id  # type: str
        # The type of the resource.
        self.resource_type = resource_type  # type: str
        # The ID of the resource that is associated with the object.
        self.target_resource_id = target_resource_id  # type: str
        # The type of the resource that is associated with the object.
        self.target_resource_type = target_resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        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.region is not None:
            result['Region'] = self.region
        if self.relation_type is not None:
            result['RelationType'] = self.relation_type
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        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.target_resource_id is not None:
            result['TargetResourceId'] = self.target_resource_id
        if self.target_resource_type is not None:
            result['TargetResourceType'] = self.target_resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        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('Region') is not None:
            self.region = m.get('Region')
        if m.get('RelationType') is not None:
            self.relation_type = m.get('RelationType')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        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('TargetResourceId') is not None:
            self.target_resource_id = m.get('TargetResourceId')
        if m.get('TargetResourceType') is not None:
            self.target_resource_type = m.get('TargetResourceType')
        return self


class ListAggregateResourceRelationsResponseBodyResourceRelationsResourceRelationList(TeaModel):
    def __init__(self, account_id=None, relation_type=None, source_resource_id=None,
                 source_resource_region_id=None, source_resource_type=None, target_resource_id=None, target_resource_type=None):
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.account_id = account_id  # type: long
        # The type of the relationship between the resource and the object.
        # 
        # Valid values:
        # 
        # *   IsContained: The object is included as part of the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   IsAttachedTo: The object is added to the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   IsAssociatedIn: The object is associated with the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   Contains: The object contains the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        self.relation_type = relation_type  # type: str
        # The resource ID.
        self.source_resource_id = source_resource_id  # type: str
        # The ID of the region to which the current resource belongs.
        self.source_resource_region_id = source_resource_region_id  # type: str
        # The type of the resource.
        self.source_resource_type = source_resource_type  # type: str
        # The ID of the resource that is associated with the object.
        self.target_resource_id = target_resource_id  # type: str
        # The type of the resource that is associated with the object.
        self.target_resource_type = target_resource_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListAggregateResourceRelationsResponseBodyResourceRelationsResourceRelationList, 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.relation_type is not None:
            result['RelationType'] = self.relation_type
        if self.source_resource_id is not None:
            result['SourceResourceId'] = self.source_resource_id
        if self.source_resource_region_id is not None:
            result['SourceResourceRegionId'] = self.source_resource_region_id
        if self.source_resource_type is not None:
            result['SourceResourceType'] = self.source_resource_type
        if self.target_resource_id is not None:
            result['TargetResourceId'] = self.target_resource_id
        if self.target_resource_type is not None:
            result['TargetResourceType'] = self.target_resource_type
        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('RelationType') is not None:
            self.relation_type = m.get('RelationType')
        if m.get('SourceResourceId') is not None:
            self.source_resource_id = m.get('SourceResourceId')
        if m.get('SourceResourceRegionId') is not None:
            self.source_resource_region_id = m.get('SourceResourceRegionId')
        if m.get('SourceResourceType') is not None:
            self.source_resource_type = m.get('SourceResourceType')
        if m.get('TargetResourceId') is not None:
            self.target_resource_id = m.get('TargetResourceId')
        if m.get('TargetResourceType') is not None:
            self.target_resource_type = m.get('TargetResourceType')
        return self


class ListAggregateResourceRelationsResponseBodyResourceRelations(TeaModel):
    def __init__(self, max_results=None, next_token=None, resource_relation_list=None):
        # The maximum number of entries returned on each page.
        self.max_results = max_results  # type: int
        # The token that was used to initiate the next request.
        self.next_token = next_token  # type: str
        # The type of the relationship between the resource and the object.
        # 
        # Valid values:
        # 
        # *   IsContained: The object is included as part of the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   IsAttachedTo: The object is added to the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   IsAssociatedIn: The object is associated with the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   Contains: The actual value contains the expected value.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        self.resource_relation_list = resource_relation_list  # type: list[ListAggregateResourceRelationsResponseBodyResourceRelationsResourceRelationList]

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

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

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

    def from_map(self, m=None):
        m = m or dict()
        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')
        self.resource_relation_list = []
        if m.get('ResourceRelationList') is not None:
            for k in m.get('ResourceRelationList'):
                temp_model = ListAggregateResourceRelationsResponseBodyResourceRelationsResourceRelationList()
                self.resource_relation_list.append(temp_model.from_map(k))
        return self


class ListAggregateResourceRelationsResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_relations=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # The result of the relationship.
        self.resource_relations = resource_relations  # type: ListAggregateResourceRelationsResponseBodyResourceRelations

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.resource_relations is not None:
            result['ResourceRelations'] = self.resource_relations.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('ResourceRelations') is not None:
            temp_model = ListAggregateResourceRelationsResponseBodyResourceRelations()
            self.resource_relations = temp_model.from_map(m['ResourceRelations'])
        return self


class ListAggregateResourceRelationsResponse(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: ListAggregateResourceRelationsResponseBody

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

    def to_map(self):
        _map = super(ListAggregateResourceRelationsResponse, 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 = ListAggregateResourceRelationsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAggregateResourcesByAdvancedSearchRequest(TeaModel):
    def __init__(self, aggregator_id=None, sql=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The SQL statement used to query resources.
        self.sql = sql  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.sql is not None:
            result['Sql'] = self.sql
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('Sql') is not None:
            self.sql = m.get('Sql')
        return self


class ListAggregateResourcesByAdvancedSearchResponseBodyQueryResultsQueryResultList(TeaModel):
    def __init__(self, columns=None, values=None):
        # The field names.
        self.columns = columns  # type: list[str]
        # The resource data.
        self.values = values  # type: list[any]

    def validate(self):
        pass

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

        result = dict()
        if self.columns is not None:
            result['Columns'] = self.columns
        if self.values is not None:
            result['Values'] = self.values
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Columns') is not None:
            self.columns = m.get('Columns')
        if m.get('Values') is not None:
            self.values = m.get('Values')
        return self


class ListAggregateResourcesByAdvancedSearchResponseBodyQueryResults(TeaModel):
    def __init__(self, query_result_list=None):
        # The queried resources. A maximum of 1,000 data records can be returned. To view more data, use the download URL of the resource file.
        self.query_result_list = query_result_list  # type: ListAggregateResourcesByAdvancedSearchResponseBodyQueryResultsQueryResultList

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

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

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

    def from_map(self, m=None):
        m = m or dict()
        if m.get('QueryResultList') is not None:
            temp_model = ListAggregateResourcesByAdvancedSearchResponseBodyQueryResultsQueryResultList()
            self.query_result_list = temp_model.from_map(m['QueryResultList'])
        return self


class ListAggregateResourcesByAdvancedSearchResponseBody(TeaModel):
    def __init__(self, query_results=None, request_id=None):
        # The result of the request.
        self.query_results = query_results  # type: ListAggregateResourcesByAdvancedSearchResponseBodyQueryResults
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.query_results is not None:
            result['QueryResults'] = self.query_results.to_map()
        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('QueryResults') is not None:
            temp_model = ListAggregateResourcesByAdvancedSearchResponseBodyQueryResults()
            self.query_results = temp_model.from_map(m['QueryResults'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListAggregateResourcesByAdvancedSearchResponse(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: ListAggregateResourcesByAdvancedSearchResponseBody

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

    def to_map(self):
        _map = super(ListAggregateResourcesByAdvancedSearchResponse, 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 = ListAggregateResourcesByAdvancedSearchResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAggregatorsRequest(TeaModel):
    def __init__(self, max_results=None, next_token=None):
        # The maximum number of entries to return for a single request. Valid values: 1 to 100.
        self.max_results = max_results  # type: int
        # The token that is used to initiate the next request. If the response of the current request is truncated, this token is used to initiate another request and obtain the remaining entries.
        self.next_token = next_token  # type: str

    def validate(self):
        pass

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

        result = dict()
        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('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 ListAggregatorsResponseBodyAggregatorsResultAggregators(TeaModel):
    def __init__(self, account_id=None, aggregator_account_count=None, aggregator_create_timestamp=None,
                 aggregator_id=None, aggregator_name=None, aggregator_status=None, aggregator_type=None, description=None,
                 folder_id=None):
        # The ID of the management account used to create the account group.
        self.account_id = account_id  # type: long
        # The number of member accounts in the account group.
        self.aggregator_account_count = aggregator_account_count  # type: long
        # The timestamp when the account group was created.
        self.aggregator_create_timestamp = aggregator_create_timestamp  # type: long
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The name of the account group.
        self.aggregator_name = aggregator_name  # type: str
        # The status of the account group. Valid values:
        # 
        # *   0: being created.
        # *   1: created.
        self.aggregator_status = aggregator_status  # type: int
        # The type of the account group. Valid values:
        # 
        # *   RD: global account group.
        # *   CUSTOM: custom account group.
        self.aggregator_type = aggregator_type  # type: str
        # The description of the account group.
        self.description = description  # type: str
        self.folder_id = folder_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListAggregatorsResponseBodyAggregatorsResultAggregators, 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.aggregator_account_count is not None:
            result['AggregatorAccountCount'] = self.aggregator_account_count
        if self.aggregator_create_timestamp is not None:
            result['AggregatorCreateTimestamp'] = self.aggregator_create_timestamp
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.aggregator_name is not None:
            result['AggregatorName'] = self.aggregator_name
        if self.aggregator_status is not None:
            result['AggregatorStatus'] = self.aggregator_status
        if self.aggregator_type is not None:
            result['AggregatorType'] = self.aggregator_type
        if self.description is not None:
            result['Description'] = self.description
        if self.folder_id is not None:
            result['FolderId'] = self.folder_id
        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('AggregatorAccountCount') is not None:
            self.aggregator_account_count = m.get('AggregatorAccountCount')
        if m.get('AggregatorCreateTimestamp') is not None:
            self.aggregator_create_timestamp = m.get('AggregatorCreateTimestamp')
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('AggregatorName') is not None:
            self.aggregator_name = m.get('AggregatorName')
        if m.get('AggregatorStatus') is not None:
            self.aggregator_status = m.get('AggregatorStatus')
        if m.get('AggregatorType') is not None:
            self.aggregator_type = m.get('AggregatorType')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('FolderId') is not None:
            self.folder_id = m.get('FolderId')
        return self


class ListAggregatorsResponseBodyAggregatorsResult(TeaModel):
    def __init__(self, aggregators=None, next_token=None):
        # The information about the account groups.
        self.aggregators = aggregators  # type: list[ListAggregatorsResponseBodyAggregatorsResultAggregators]
        # The token that is used to initiate the next request. If the response of the current request is truncated, this token is used to initiate another request and obtain the remaining entries.
        self.next_token = next_token  # type: str

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

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

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

    def from_map(self, m=None):
        m = m or dict()
        self.aggregators = []
        if m.get('Aggregators') is not None:
            for k in m.get('Aggregators'):
                temp_model = ListAggregatorsResponseBodyAggregatorsResultAggregators()
                self.aggregators.append(temp_model.from_map(k))
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        return self


class ListAggregatorsResponseBody(TeaModel):
    def __init__(self, aggregators_result=None, request_id=None):
        # The account groups returned.
        self.aggregators_result = aggregators_result  # type: ListAggregatorsResponseBodyAggregatorsResult
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.aggregators_result is not None:
            result['AggregatorsResult'] = self.aggregators_result.to_map()
        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('AggregatorsResult') is not None:
            temp_model = ListAggregatorsResponseBodyAggregatorsResult()
            self.aggregators_result = temp_model.from_map(m['AggregatorsResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListAggregatorsResponse(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: ListAggregatorsResponseBody

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

    def to_map(self):
        _map = super(ListAggregatorsResponse, 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 = ListAggregatorsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListCompliancePackTemplatesRequest(TeaModel):
    def __init__(self, compliance_pack_template_id=None, page_number=None, page_size=None, resource_types=None):
        # The ID of the compliance package template.
        # 
        # For more information about how to obtain the ID of a compliance package template, see [ListCompliancePackTemplates](~~261176~~).
        self.compliance_pack_template_id = compliance_pack_template_id  # type: str
        # The page number.
        # 
        # Pages start from page 1. Default value: 1
        self.page_number = page_number  # type: int
        # The number of entries per page.
        # 
        # Valid values: 1 to 100. Minimum value: 1. Default value: 10.
        self.page_size = page_size  # type: int
        # The type of the resource evaluated by the rule.
        self.resource_types = resource_types  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_template_id is not None:
            result['CompliancePackTemplateId'] = self.compliance_pack_template_id
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompliancePackTemplateId') is not None:
            self.compliance_pack_template_id = m.get('CompliancePackTemplateId')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        return self


class ListCompliancePackTemplatesResponseBodyCompliancePackTemplatesResultCompliancePackTemplatesConfigRulesConfigRuleParameters(TeaModel):
    def __init__(self, parameter_name=None, parameter_value=None, required=None):
        # The name of the input parameter.
        self.parameter_name = parameter_name  # type: str
        # The value of the input parameter.
        self.parameter_value = parameter_value  # type: str
        # Indicates whether the input parameter is required. Valid values:
        # 
        # *   true: The parameter is required.
        # *   false: The input parameter is optional.
        self.required = required  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.parameter_name is not None:
            result['ParameterName'] = self.parameter_name
        if self.parameter_value is not None:
            result['ParameterValue'] = self.parameter_value
        if self.required is not None:
            result['Required'] = self.required
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ParameterName') is not None:
            self.parameter_name = m.get('ParameterName')
        if m.get('ParameterValue') is not None:
            self.parameter_value = m.get('ParameterValue')
        if m.get('Required') is not None:
            self.required = m.get('Required')
        return self


class ListCompliancePackTemplatesResponseBodyCompliancePackTemplatesResultCompliancePackTemplatesConfigRules(TeaModel):
    def __init__(self, config_rule_parameters=None, control_description=None, control_id=None, default_enable=None,
                 description=None, managed_rule_identifier=None, managed_rule_name=None, resource_types_scope=None,
                 risk_level=None):
        # The input parameters of the managed rule.
        self.config_rule_parameters = config_rule_parameters  # type: list[ListCompliancePackTemplatesResponseBodyCompliancePackTemplatesResultCompliancePackTemplatesConfigRulesConfigRuleParameters]
        # The description of the regulation. This parameter is available only for regulation compliance packages.
        self.control_description = control_description  # type: str
        # The ID of the regulation.
        # 
        # > This parameter is available only for regulation compliance packages.
        self.control_id = control_id  # type: str
        # Indicates whether the rule was enabled together with the compliance package. Default value: false. The value true indicates that the rule was enabled together with the compliance package. Valid values:
        # 
        # *   true
        # *   false
        self.default_enable = default_enable  # type: bool
        # The description of the managed rule.
        self.description = description  # type: str
        # The identifier of the managed rule.
        self.managed_rule_identifier = managed_rule_identifier  # type: str
        # The name of the managed rule.
        self.managed_rule_name = managed_rule_name  # type: str
        # The type of the resource evaluated based on the rule.
        self.resource_types_scope = resource_types_scope  # type: str
        # The risk level of the resources that are not compliant with the managed rule. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int

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

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

        result = dict()
        result['ConfigRuleParameters'] = []
        if self.config_rule_parameters is not None:
            for k in self.config_rule_parameters:
                result['ConfigRuleParameters'].append(k.to_map() if k else None)
        if self.control_description is not None:
            result['ControlDescription'] = self.control_description
        if self.control_id is not None:
            result['ControlId'] = self.control_id
        if self.default_enable is not None:
            result['DefaultEnable'] = self.default_enable
        if self.description is not None:
            result['Description'] = self.description
        if self.managed_rule_identifier is not None:
            result['ManagedRuleIdentifier'] = self.managed_rule_identifier
        if self.managed_rule_name is not None:
            result['ManagedRuleName'] = self.managed_rule_name
        if self.resource_types_scope is not None:
            result['ResourceTypesScope'] = self.resource_types_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.config_rule_parameters = []
        if m.get('ConfigRuleParameters') is not None:
            for k in m.get('ConfigRuleParameters'):
                temp_model = ListCompliancePackTemplatesResponseBodyCompliancePackTemplatesResultCompliancePackTemplatesConfigRulesConfigRuleParameters()
                self.config_rule_parameters.append(temp_model.from_map(k))
        if m.get('ControlDescription') is not None:
            self.control_description = m.get('ControlDescription')
        if m.get('ControlId') is not None:
            self.control_id = m.get('ControlId')
        if m.get('DefaultEnable') is not None:
            self.default_enable = m.get('DefaultEnable')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ManagedRuleIdentifier') is not None:
            self.managed_rule_identifier = m.get('ManagedRuleIdentifier')
        if m.get('ManagedRuleName') is not None:
            self.managed_rule_name = m.get('ManagedRuleName')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class ListCompliancePackTemplatesResponseBodyCompliancePackTemplatesResultCompliancePackTemplates(TeaModel):
    def __init__(self, compliance_pack_template_id=None, compliance_pack_template_name=None, config_rules=None,
                 description=None, labels=None, last_update=None, risk_level=None):
        # The ID of the compliance package template.
        self.compliance_pack_template_id = compliance_pack_template_id  # type: str
        # The name of the compliance package template.
        self.compliance_pack_template_name = compliance_pack_template_name  # type: str
        # The information about managed rules in the compliance package.
        self.config_rules = config_rules  # type: list[ListCompliancePackTemplatesResponseBodyCompliancePackTemplatesResultCompliancePackTemplatesConfigRules]
        # The description of the compliance package.
        self.description = description  # type: str
        # The tag of the compliance package.
        self.labels = labels  # type: str
        # The time when the compliance package was last updated.
        self.last_update = last_update  # type: int
        # The risk level of the resources that are not compliant with the managed rules in the compliance package. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int

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

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

        result = dict()
        if self.compliance_pack_template_id is not None:
            result['CompliancePackTemplateId'] = self.compliance_pack_template_id
        if self.compliance_pack_template_name is not None:
            result['CompliancePackTemplateName'] = self.compliance_pack_template_name
        result['ConfigRules'] = []
        if self.config_rules is not None:
            for k in self.config_rules:
                result['ConfigRules'].append(k.to_map() if k else None)
        if self.description is not None:
            result['Description'] = self.description
        if self.labels is not None:
            result['Labels'] = self.labels
        if self.last_update is not None:
            result['LastUpdate'] = self.last_update
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompliancePackTemplateId') is not None:
            self.compliance_pack_template_id = m.get('CompliancePackTemplateId')
        if m.get('CompliancePackTemplateName') is not None:
            self.compliance_pack_template_name = m.get('CompliancePackTemplateName')
        self.config_rules = []
        if m.get('ConfigRules') is not None:
            for k in m.get('ConfigRules'):
                temp_model = ListCompliancePackTemplatesResponseBodyCompliancePackTemplatesResultCompliancePackTemplatesConfigRules()
                self.config_rules.append(temp_model.from_map(k))
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('Labels') is not None:
            self.labels = m.get('Labels')
        if m.get('LastUpdate') is not None:
            self.last_update = m.get('LastUpdate')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class ListCompliancePackTemplatesResponseBodyCompliancePackTemplatesResult(TeaModel):
    def __init__(self, compliance_pack_templates=None, page_number=None, page_size=None, total_count=None):
        # The compliance package templates.
        self.compliance_pack_templates = compliance_pack_templates  # type: list[ListCompliancePackTemplatesResponseBodyCompliancePackTemplatesResultCompliancePackTemplates]
        # The page number.
        self.page_number = page_number  # type: int
        # The number of entries per page.
        self.page_size = page_size  # type: int
        # The total number of the compliance package templates returned.
        self.total_count = total_count  # type: long

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

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

        result = dict()
        result['CompliancePackTemplates'] = []
        if self.compliance_pack_templates is not None:
            for k in self.compliance_pack_templates:
                result['CompliancePackTemplates'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        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.compliance_pack_templates = []
        if m.get('CompliancePackTemplates') is not None:
            for k in m.get('CompliancePackTemplates'):
                temp_model = ListCompliancePackTemplatesResponseBodyCompliancePackTemplatesResultCompliancePackTemplates()
                self.compliance_pack_templates.append(temp_model.from_map(k))
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        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 ListCompliancePackTemplatesResponseBody(TeaModel):
    def __init__(self, compliance_pack_templates_result=None, request_id=None):
        # The information about the compliance package templates.
        self.compliance_pack_templates_result = compliance_pack_templates_result  # type: ListCompliancePackTemplatesResponseBodyCompliancePackTemplatesResult
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_pack_templates_result is not None:
            result['CompliancePackTemplatesResult'] = self.compliance_pack_templates_result.to_map()
        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('CompliancePackTemplatesResult') is not None:
            temp_model = ListCompliancePackTemplatesResponseBodyCompliancePackTemplatesResult()
            self.compliance_pack_templates_result = temp_model.from_map(m['CompliancePackTemplatesResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListCompliancePackTemplatesResponse(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: ListCompliancePackTemplatesResponseBody

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

    def to_map(self):
        _map = super(ListCompliancePackTemplatesResponse, 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 = ListCompliancePackTemplatesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListCompliancePacksRequest(TeaModel):
    def __init__(self, page_number=None, page_size=None, status=None):
        # The page number.
        # 
        # Pages start from page 1. Default value: 1.
        self.page_number = page_number  # type: int
        # The number of entries per page.
        # 
        # Valid values: 1 to 100. Minimum value: 1. Default value: 10.
        self.page_size = page_size  # type: int
        # The status of the compliance package to be queried. Valid values:
        # 
        # *   ACTIVE: The compliance package is active.
        # *   CREATING: The compliance package is being created.
        self.status = status  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        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('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class ListCompliancePacksResponseBodyCompliancePacksResultCompliancePacks(TeaModel):
    def __init__(self, account_id=None, compliance_pack_id=None, compliance_pack_name=None,
                 compliance_pack_template_id=None, create_timestamp=None, description=None, risk_level=None, status=None):
        # The ID of the Alibaba Cloud account to which the compliance package belongs.
        self.account_id = account_id  # type: long
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The name of the compliance package.
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The ID of the compliance package template based on which the compliance package was created.
        self.compliance_pack_template_id = compliance_pack_template_id  # type: str
        # The timestamp when the compliance package was created. Unit: milliseconds.
        self.create_timestamp = create_timestamp  # type: long
        # The description of the compliance package.
        self.description = description  # type: str
        # The risk level of the resources that are not compliant with the managed rules in the compliance package. Valid values:
        # 
        # *   1: high risk level.
        # *   2: medium risk level.
        # *   3: low risk level.
        self.risk_level = risk_level  # type: int
        # The status of the compliance package. Valid values:
        # 
        # *   ACTIVE: The compliance package is active.
        # *   CREATING: The compliance package is being created.
        self.status = status  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListCompliancePacksResponseBodyCompliancePacksResultCompliancePacks, 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.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        if self.compliance_pack_template_id is not None:
            result['CompliancePackTemplateId'] = self.compliance_pack_template_id
        if self.create_timestamp is not None:
            result['CreateTimestamp'] = self.create_timestamp
        if self.description is not None:
            result['Description'] = self.description
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        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('AccountId') is not None:
            self.account_id = m.get('AccountId')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        if m.get('CompliancePackTemplateId') is not None:
            self.compliance_pack_template_id = m.get('CompliancePackTemplateId')
        if m.get('CreateTimestamp') is not None:
            self.create_timestamp = m.get('CreateTimestamp')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class ListCompliancePacksResponseBodyCompliancePacksResult(TeaModel):
    def __init__(self, compliance_packs=None, page_number=None, page_size=None, total_count=None):
        # The details of the compliance package.
        self.compliance_packs = compliance_packs  # type: list[ListCompliancePacksResponseBodyCompliancePacksResultCompliancePacks]
        # The page number of the returned page.
        self.page_number = page_number  # type: int
        # The number of entries returned per page.
        self.page_size = page_size  # type: int
        # The total number of compliance packages returned.
        self.total_count = total_count  # type: long

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

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

        result = dict()
        result['CompliancePacks'] = []
        if self.compliance_packs is not None:
            for k in self.compliance_packs:
                result['CompliancePacks'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        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.compliance_packs = []
        if m.get('CompliancePacks') is not None:
            for k in m.get('CompliancePacks'):
                temp_model = ListCompliancePacksResponseBodyCompliancePacksResultCompliancePacks()
                self.compliance_packs.append(temp_model.from_map(k))
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        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 ListCompliancePacksResponseBody(TeaModel):
    def __init__(self, compliance_packs_result=None, request_id=None):
        # The compliance packages returned.
        self.compliance_packs_result = compliance_packs_result  # type: ListCompliancePacksResponseBodyCompliancePacksResult
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.compliance_packs_result is not None:
            result['CompliancePacksResult'] = self.compliance_packs_result.to_map()
        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('CompliancePacksResult') is not None:
            temp_model = ListCompliancePacksResponseBodyCompliancePacksResult()
            self.compliance_packs_result = temp_model.from_map(m['CompliancePacksResult'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListCompliancePacksResponse(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: ListCompliancePacksResponseBody

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

    def to_map(self):
        _map = super(ListCompliancePacksResponse, 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 = ListCompliancePacksResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListConfigDeliveryChannelsRequest(TeaModel):
    def __init__(self, delivery_channel_ids=None):
        # The ID of the delivery channel. Separate multiple IDs with commas (,).
        self.delivery_channel_ids = delivery_channel_ids  # type: str

    def validate(self):
        pass

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

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

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


class ListConfigDeliveryChannelsResponseBodyDeliveryChannels(TeaModel):
    def __init__(self, account_id=None, configuration_item_change_notification=None, configuration_snapshot=None,
                 delivery_channel_assume_role_arn=None, delivery_channel_condition=None, delivery_channel_id=None, delivery_channel_name=None,
                 delivery_channel_target_arn=None, delivery_channel_type=None, delivery_snapshot_time=None, description=None,
                 non_compliant_notification=None, oversized_data_osstarget_arn=None, status=None):
        # The ID of your Alibaba Cloud account.
        self.account_id = account_id  # type: long
        # Indicates whether the specified destination receives resource change logs. If the value of this parameter is true, Cloud Config delivers the resource change logs to OSS, Log Service, or MNS when the configurations of the resources change. Valid values:
        # 
        # *   true: The specified destination receives resource change logs.
        # *   false: The specified destination does not receive resource change logs.
        self.configuration_item_change_notification = configuration_item_change_notification  # type: bool
        # Indicates whether the specified destination receives scheduled resource snapshots. Cloud Config delivers scheduled resource snapshots at `04:00Z` and `16:00Z` to OSS, MNS, or Log Service every day. The time is displayed in UTC. Valid values:
        # 
        # *   true: The specified destination receives scheduled resource snapshots.
        # *   false: The specified destination does not receive scheduled resource snapshots.
        self.configuration_snapshot = configuration_snapshot  # type: bool
        # The ARN of the role assumed by the delivery channel.
        self.delivery_channel_assume_role_arn = delivery_channel_assume_role_arn  # type: str
        # The rule that is attached to the delivery channel. This parameter is available when you deliver data of all types to MNS or deliver snapshots to Log Service.
        # 
        # *   If the value of the DeliveryChannelType parameter is MNS, take note of the following settings of the lowest risk level and resource types of the events to which you subscribed:
        # 
        #     *   The setting of the lowest risk level for the events to which you want to subscribe is in the following format: `{"filterType":"RuleRiskLevel","value":"1","multiple":false}`.
        # 
        #         The `value` field indicates the lowest risk level of the events to which you want to subscribe. Valid values: 1, 2, and 3. The value 1 indicates the high risk level, the value 2 indicates the medium risk level, and the value 3 indicates the low risk level.
        # 
        #     *   The setting of the resource types of the events to which you want to subscribe is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #         The `values` field indicates the resource types of the events to which you want to subscribe. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        # 
        # *   If you set the DeliveryChannelType parameter to SLS, the setting of the resource types of the snapshots to which you want to deliver is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #     The `values` field specifies the resource types of the snapshots to which you want to deliver. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        self.delivery_channel_condition = delivery_channel_condition  # type: str
        # The ID of the delivery channel.
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The name of the delivery channel.
        self.delivery_channel_name = delivery_channel_name  # type: str
        # The Alibaba Cloud Resource Name (ARN) of the delivery destination.
        # 
        # *   If the value of the DeliveryChannelType parameter is OSS, the value of this parameter is the ARN of the destination OSS bucket.
        # *   If the value of the DeliveryChannelType parameter is MNS, the value of this parameter is the ARN of the destination MNS topic.
        # *   If the value of the DeliveryChannelType parameter is SLS, the value of this parameter is the ARN of the destination Log Service Logstore.
        self.delivery_channel_target_arn = delivery_channel_target_arn  # type: str
        # The type of the delivery channel. Valid values:
        # 
        # *   OSS: Object Storage Service (OSS)
        # *   MNS: Message Service (MNS)
        # *   SLS: Log Service
        self.delivery_channel_type = delivery_channel_type  # type: str
        # The time when Cloud Config delivers scheduled resources snapshots every day.
        # 
        # Format: `HH:mmZ`. This time is displayed in UTC.
        self.delivery_snapshot_time = delivery_snapshot_time  # type: str
        # The description of the delivery channel.
        self.description = description  # type: str
        # Indicates whether the specified destination receives resource non-compliance events. If the value of this parameter is true, Cloud Config delivers resource non-compliance events to Log Service or MNS when resources are evaluated as non-compliant. Valid values:
        # 
        # *   true: The specified destination receives resource non-compliance events.
        # *   false: The specified destination does not receive resource non-compliance events.
        self.non_compliant_notification = non_compliant_notification  # type: bool
        # The ARN of the OSS bucket to which you want to transfer the delivery data when the size of the data exceeds the specified upper limit of the delivery channel.
        self.oversized_data_osstarget_arn = oversized_data_osstarget_arn  # type: str
        # The status of the delivery channel. Valid values:
        # 
        # *   0: The delivery channel is disabled.
        # *   1: The delivery channel is enabled.
        self.status = status  # type: int

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListConfigDeliveryChannelsResponseBodyDeliveryChannels, 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.configuration_item_change_notification is not None:
            result['ConfigurationItemChangeNotification'] = self.configuration_item_change_notification
        if self.configuration_snapshot is not None:
            result['ConfigurationSnapshot'] = self.configuration_snapshot
        if self.delivery_channel_assume_role_arn is not None:
            result['DeliveryChannelAssumeRoleArn'] = self.delivery_channel_assume_role_arn
        if self.delivery_channel_condition is not None:
            result['DeliveryChannelCondition'] = self.delivery_channel_condition
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_id
        if self.delivery_channel_name is not None:
            result['DeliveryChannelName'] = self.delivery_channel_name
        if self.delivery_channel_target_arn is not None:
            result['DeliveryChannelTargetArn'] = self.delivery_channel_target_arn
        if self.delivery_channel_type is not None:
            result['DeliveryChannelType'] = self.delivery_channel_type
        if self.delivery_snapshot_time is not None:
            result['DeliverySnapshotTime'] = self.delivery_snapshot_time
        if self.description is not None:
            result['Description'] = self.description
        if self.non_compliant_notification is not None:
            result['NonCompliantNotification'] = self.non_compliant_notification
        if self.oversized_data_osstarget_arn is not None:
            result['OversizedDataOSSTargetArn'] = self.oversized_data_osstarget_arn
        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('AccountId') is not None:
            self.account_id = m.get('AccountId')
        if m.get('ConfigurationItemChangeNotification') is not None:
            self.configuration_item_change_notification = m.get('ConfigurationItemChangeNotification')
        if m.get('ConfigurationSnapshot') is not None:
            self.configuration_snapshot = m.get('ConfigurationSnapshot')
        if m.get('DeliveryChannelAssumeRoleArn') is not None:
            self.delivery_channel_assume_role_arn = m.get('DeliveryChannelAssumeRoleArn')
        if m.get('DeliveryChannelCondition') is not None:
            self.delivery_channel_condition = m.get('DeliveryChannelCondition')
        if m.get('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('DeliveryChannelName') is not None:
            self.delivery_channel_name = m.get('DeliveryChannelName')
        if m.get('DeliveryChannelTargetArn') is not None:
            self.delivery_channel_target_arn = m.get('DeliveryChannelTargetArn')
        if m.get('DeliveryChannelType') is not None:
            self.delivery_channel_type = m.get('DeliveryChannelType')
        if m.get('DeliverySnapshotTime') is not None:
            self.delivery_snapshot_time = m.get('DeliverySnapshotTime')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('NonCompliantNotification') is not None:
            self.non_compliant_notification = m.get('NonCompliantNotification')
        if m.get('OversizedDataOSSTargetArn') is not None:
            self.oversized_data_osstarget_arn = m.get('OversizedDataOSSTargetArn')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class ListConfigDeliveryChannelsResponseBody(TeaModel):
    def __init__(self, delivery_channels=None, request_id=None):
        # The information about the delivery channels.
        self.delivery_channels = delivery_channels  # type: list[ListConfigDeliveryChannelsResponseBodyDeliveryChannels]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['DeliveryChannels'] = []
        if self.delivery_channels is not None:
            for k in self.delivery_channels:
                result['DeliveryChannels'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.delivery_channels = []
        if m.get('DeliveryChannels') is not None:
            for k in m.get('DeliveryChannels'):
                temp_model = ListConfigDeliveryChannelsResponseBodyDeliveryChannels()
                self.delivery_channels.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListConfigDeliveryChannelsResponse(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: ListConfigDeliveryChannelsResponseBody

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

    def to_map(self):
        _map = super(ListConfigDeliveryChannelsResponse, 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 = ListConfigDeliveryChannelsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListConfigRuleEvaluationResultsRequest(TeaModel):
    def __init__(self, compliance_pack_id=None, compliance_type=None, config_rule_id=None, max_results=None,
                 next_token=None, regions=None, resource_group_ids=None, resource_types=None):
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The compliance evaluation result of the resource. Valid values:
        # 
        # *   COMPLIANT: The resource is evaluated as compliant.
        # *   NON_COMPLIANT: The resource is evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resource.
        # *   INSUFFICIENT_DATA: No data is available.
        # *   IGNORED: The resource is ignored during compliance evaluation.
        self.compliance_type = compliance_type  # type: str
        # The ID of the rule.
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_id = config_rule_id  # type: str
        # The maximum number of entries to return for a single request. Valid values: 1 to 100.
        self.max_results = max_results  # type: int
        # The token that is used to initiate the next request. If the response to the current request is truncated, this token is used to initiate another request and obtain the remaining entries.``
        self.next_token = next_token  # type: str
        # The ID of the region where the resources that you want to evaluate reside. Separate multiple region IDs with commas (,).
        self.regions = regions  # type: str
        # The ID of the resource group to which the resources that you want to evaluate belong. Separate multiple resource group IDs with commas (,).
        self.resource_group_ids = resource_group_ids  # type: str
        # The type of the resources that you want to evaluate. Separate multiple resource types with commas (,).
        self.resource_types = resource_types  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        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.regions is not None:
            result['Regions'] = self.regions
        if self.resource_group_ids is not None:
            result['ResourceGroupIds'] = self.resource_group_ids
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        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('Regions') is not None:
            self.regions = m.get('Regions')
        if m.get('ResourceGroupIds') is not None:
            self.resource_group_ids = m.get('ResourceGroupIds')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        return self


class ListConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifierEvaluationResultQualifier(TeaModel):
    def __init__(self, compliance_pack_id=None, config_rule_arn=None, config_rule_id=None, config_rule_name=None,
                 ignore_date=None, region_id=None, resource_id=None, resource_name=None, resource_owner_id=None,
                 resource_type=None):
        # The ID of the compliance package to which the rule belongs.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The Alibaba Cloud Resource Name (ARN) of the rule.
        self.config_rule_arn = config_rule_arn  # type: str
        # The ID of the rule.
        self.config_rule_id = config_rule_id  # type: str
        # The name of the rule.
        self.config_rule_name = config_rule_name  # type: str
        # The date on which the system automatically re-evaluates the ignored incompliant resources.
        # 
        # >  If this parameter is left empty, the system does not automatically re-evaluate the ignored incompliant resources. You must manually re-evaluate the ignored incompliant resources.
        self.ignore_date = ignore_date  # type: str
        # The ID of the region where the resource resides.
        self.region_id = region_id  # type: str
        # The ID of the resource.
        self.resource_id = resource_id  # type: str
        # The name of the resource.
        self.resource_name = resource_name  # type: str
        # The ID of the Alibaba Cloud account to which the resources belong.
        self.resource_owner_id = resource_owner_id  # type: long
        # The type of the resource.
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.config_rule_arn is not None:
            result['ConfigRuleArn'] = self.config_rule_arn
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.ignore_date is not None:
            result['IgnoreDate'] = self.ignore_date
        if self.region_id is not None:
            result['RegionId'] = self.region_id
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_name is not None:
            result['ResourceName'] = self.resource_name
        if self.resource_owner_id is not None:
            result['ResourceOwnerId'] = self.resource_owner_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ConfigRuleArn') is not None:
            self.config_rule_arn = m.get('ConfigRuleArn')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('IgnoreDate') is not None:
            self.ignore_date = m.get('IgnoreDate')
        if m.get('RegionId') is not None:
            self.region_id = m.get('RegionId')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceName') is not None:
            self.resource_name = m.get('ResourceName')
        if m.get('ResourceOwnerId') is not None:
            self.resource_owner_id = m.get('ResourceOwnerId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        return self


class ListConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifier(TeaModel):
    def __init__(self, evaluation_result_qualifier=None, ordering_timestamp=None):
        # The information about the evaluated resource in the compliance evaluation result.
        self.evaluation_result_qualifier = evaluation_result_qualifier  # type: ListConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifierEvaluationResultQualifier
        # The timestamp when the compliance evaluation was performed. Unit: milliseconds.
        self.ordering_timestamp = ordering_timestamp  # type: long

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

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

        result = dict()
        if self.evaluation_result_qualifier is not None:
            result['EvaluationResultQualifier'] = self.evaluation_result_qualifier.to_map()
        if self.ordering_timestamp is not None:
            result['OrderingTimestamp'] = self.ordering_timestamp
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EvaluationResultQualifier') is not None:
            temp_model = ListConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifierEvaluationResultQualifier()
            self.evaluation_result_qualifier = temp_model.from_map(m['EvaluationResultQualifier'])
        if m.get('OrderingTimestamp') is not None:
            self.ordering_timestamp = m.get('OrderingTimestamp')
        return self


class ListConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultList(TeaModel):
    def __init__(self, annotation=None, compliance_type=None, config_rule_invoked_timestamp=None,
                 evaluation_result_identifier=None, invoking_event_message_type=None, remediation_enabled=None, result_recorded_timestamp=None,
                 risk_level=None):
        # The annotation to the resource that is evaluated as non-compliant. The following parameters may be returned:
        # 
        # *   `configuration`: the current resource configuration that is evaluated as non-compliant.
        # *   `desiredValue`: the expected resource configuration that is evaluated as compliant.
        # *   `operator`: the operator that compares the current configuration with the expected configuration of the resource.
        # *   `property`: the JSON path of the current configuration in the resource property struct.
        # *   `reason`: the reason why the resource is evaluated as non-compliant.
        self.annotation = annotation  # type: str
        # The compliance evaluation result of the resources. Valid values:
        # 
        # *   COMPLIANT: The resources are evaluated as compliant.
        # *   NON_COMPLIANT: The resources are evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resources.
        # *   INSUFFICIENT_DATA: No resource data is available.
        # *   IGNORED: The resource is ignored during compliance evaluation.
        self.compliance_type = compliance_type  # type: str
        # The timestamp when the rule was triggered for the compliance evaluation. Unit: milliseconds.
        self.config_rule_invoked_timestamp = config_rule_invoked_timestamp  # type: long
        # The identifier of the compliance evaluation result.
        self.evaluation_result_identifier = evaluation_result_identifier  # type: ListConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifier
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
        # *   ScheduledNotification: The rule is periodically triggered.
        self.invoking_event_message_type = invoking_event_message_type  # type: str
        # Indicates whether the remediation template is enabled. Valid values:
        # 
        # - true: The remediation template is enabled.
        # - false: The remediation template is disabled.
        self.remediation_enabled = remediation_enabled  # type: bool
        # The timestamp when the compliance evaluation result was recorded. Unit: milliseconds.
        self.result_recorded_timestamp = result_recorded_timestamp  # type: long
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int

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

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

        result = dict()
        if self.annotation is not None:
            result['Annotation'] = self.annotation
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.config_rule_invoked_timestamp is not None:
            result['ConfigRuleInvokedTimestamp'] = self.config_rule_invoked_timestamp
        if self.evaluation_result_identifier is not None:
            result['EvaluationResultIdentifier'] = self.evaluation_result_identifier.to_map()
        if self.invoking_event_message_type is not None:
            result['InvokingEventMessageType'] = self.invoking_event_message_type
        if self.remediation_enabled is not None:
            result['RemediationEnabled'] = self.remediation_enabled
        if self.result_recorded_timestamp is not None:
            result['ResultRecordedTimestamp'] = self.result_recorded_timestamp
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Annotation') is not None:
            self.annotation = m.get('Annotation')
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('ConfigRuleInvokedTimestamp') is not None:
            self.config_rule_invoked_timestamp = m.get('ConfigRuleInvokedTimestamp')
        if m.get('EvaluationResultIdentifier') is not None:
            temp_model = ListConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifier()
            self.evaluation_result_identifier = temp_model.from_map(m['EvaluationResultIdentifier'])
        if m.get('InvokingEventMessageType') is not None:
            self.invoking_event_message_type = m.get('InvokingEventMessageType')
        if m.get('RemediationEnabled') is not None:
            self.remediation_enabled = m.get('RemediationEnabled')
        if m.get('ResultRecordedTimestamp') is not None:
            self.result_recorded_timestamp = m.get('ResultRecordedTimestamp')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class ListConfigRuleEvaluationResultsResponseBodyEvaluationResults(TeaModel):
    def __init__(self, evaluation_result_list=None, max_results=None, next_token=None):
        # The details of the compliance evaluation result.
        self.evaluation_result_list = evaluation_result_list  # type: list[ListConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultList]
        # The maximum number of entries returned per page.
        self.max_results = max_results  # type: int
        # The token that was used to initiate the next request.
        self.next_token = next_token  # type: str

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

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

        result = dict()
        result['EvaluationResultList'] = []
        if self.evaluation_result_list is not None:
            for k in self.evaluation_result_list:
                result['EvaluationResultList'].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
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.evaluation_result_list = []
        if m.get('EvaluationResultList') is not None:
            for k in m.get('EvaluationResultList'):
                temp_model = ListConfigRuleEvaluationResultsResponseBodyEvaluationResultsEvaluationResultList()
                self.evaluation_result_list.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')
        return self


class ListConfigRuleEvaluationResultsResponseBody(TeaModel):
    def __init__(self, evaluation_results=None, request_id=None):
        # The compliance evaluation result returned.
        self.evaluation_results = evaluation_results  # type: ListConfigRuleEvaluationResultsResponseBodyEvaluationResults
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.evaluation_results is not None:
            result['EvaluationResults'] = self.evaluation_results.to_map()
        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('EvaluationResults') is not None:
            temp_model = ListConfigRuleEvaluationResultsResponseBodyEvaluationResults()
            self.evaluation_results = temp_model.from_map(m['EvaluationResults'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListConfigRuleEvaluationResultsResponse(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: ListConfigRuleEvaluationResultsResponseBody

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

    def to_map(self):
        _map = super(ListConfigRuleEvaluationResultsResponse, 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 = ListConfigRuleEvaluationResultsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListConfigRuleEvaluationStatisticsResponseBodyEvaluationResults(TeaModel):
    def __init__(self, non_compliant_resource_cnt=None, non_compliant_rule_cnt=None, statistic_date=None,
                 total_resource_cnt=None, total_rule_cnt=None):
        # The number of resources that are evaluated as non-compliant.
        self.non_compliant_resource_cnt = non_compliant_resource_cnt  # type: int
        # The number of rules based on which resources are evaluated as non-compliant.
        self.non_compliant_rule_cnt = non_compliant_rule_cnt  # type: int
        # The date on which the statistics are obtained.
        self.statistic_date = statistic_date  # type: str
        # The total number of resources.
        self.total_resource_cnt = total_resource_cnt  # type: int
        # The total number of rules.
        self.total_rule_cnt = total_rule_cnt  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.non_compliant_resource_cnt is not None:
            result['NonCompliantResourceCnt'] = self.non_compliant_resource_cnt
        if self.non_compliant_rule_cnt is not None:
            result['NonCompliantRuleCnt'] = self.non_compliant_rule_cnt
        if self.statistic_date is not None:
            result['StatisticDate'] = self.statistic_date
        if self.total_resource_cnt is not None:
            result['TotalResourceCnt'] = self.total_resource_cnt
        if self.total_rule_cnt is not None:
            result['TotalRuleCnt'] = self.total_rule_cnt
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('NonCompliantResourceCnt') is not None:
            self.non_compliant_resource_cnt = m.get('NonCompliantResourceCnt')
        if m.get('NonCompliantRuleCnt') is not None:
            self.non_compliant_rule_cnt = m.get('NonCompliantRuleCnt')
        if m.get('StatisticDate') is not None:
            self.statistic_date = m.get('StatisticDate')
        if m.get('TotalResourceCnt') is not None:
            self.total_resource_cnt = m.get('TotalResourceCnt')
        if m.get('TotalRuleCnt') is not None:
            self.total_rule_cnt = m.get('TotalRuleCnt')
        return self


class ListConfigRuleEvaluationStatisticsResponseBody(TeaModel):
    def __init__(self, evaluation_results=None, request_id=None):
        # The statistics of compliance evaluation results.
        self.evaluation_results = evaluation_results  # type: list[ListConfigRuleEvaluationStatisticsResponseBodyEvaluationResults]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['EvaluationResults'] = []
        if self.evaluation_results is not None:
            for k in self.evaluation_results:
                result['EvaluationResults'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.evaluation_results = []
        if m.get('EvaluationResults') is not None:
            for k in m.get('EvaluationResults'):
                temp_model = ListConfigRuleEvaluationStatisticsResponseBodyEvaluationResults()
                self.evaluation_results.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListConfigRuleEvaluationStatisticsResponse(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: ListConfigRuleEvaluationStatisticsResponseBody

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

    def to_map(self):
        _map = super(ListConfigRuleEvaluationStatisticsResponse, 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 = ListConfigRuleEvaluationStatisticsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListConfigRulesRequest(TeaModel):
    def __init__(self, compliance_type=None, config_rule_name=None, config_rule_state=None, keyword=None,
                 page_number=None, page_size=None, resource_types=None, risk_level=None):
        # The compliance evaluation result. Valid values:
        # 
        # *   COMPLIANT: The resources are evaluated as compliant.
        # *   NON_COMPLIANT: The resources are evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resources.
        # *   INSUFFICIENT_DATA: No resource data is available.
        self.compliance_type = compliance_type  # type: str
        # The name of the rule.
        self.config_rule_name = config_rule_name  # type: str
        # The status of the rule. Valid values:
        # 
        # *   ACTIVE: The rule is enabled.
        # *   DELETING: The rule is being deleted.
        # *   EVALUATING: The rule is triggered and is being used to monitor resource configurations.
        # *   INACTIVE: The rule is disabled.
        self.config_rule_state = config_rule_state  # type: str
        # The query keyword.
        # 
        # You can perform a fuzzy search by rule ID, rule name, rule description, or managed rule ID.
        self.keyword = keyword  # type: str
        # The page number.
        # 
        # Pages start from page 1. Default value: 1
        self.page_number = page_number  # type: int
        # The number of entries per page.
        # 
        # Valid values: 1 to 100. Minimum value: 1. Default value: 10.
        self.page_size = page_size  # type: int
        # The type of the resources to be evaluated based on the rule.
        self.resource_types = resource_types  # type: str
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_state is not None:
            result['ConfigRuleState'] = self.config_rule_state
        if self.keyword is not None:
            result['Keyword'] = self.keyword
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleState') is not None:
            self.config_rule_state = m.get('ConfigRuleState')
        if m.get('Keyword') is not None:
            self.keyword = m.get('Keyword')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class ListConfigRulesResponseBodyConfigRulesConfigRuleListCompliance(TeaModel):
    def __init__(self, compliance_type=None, count=None):
        # The compliance evaluation result. Valid values:
        # 
        # - COMPLIANT: The resource is evaluated as compliant.
        # 
        # - NON_COMPLIANT: The resource is evaluated as non-compliant.
        # 
        # - NOT_APPLICABLE: The rule does not apply to the resource.
        # 
        # - INSUFFICIENT_DATA: No resource data is available.
        self.compliance_type = compliance_type  # type: str
        # The number of evaluated resources.
        self.count = count  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.count is not None:
            result['Count'] = self.count
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('Count') is not None:
            self.count = m.get('Count')
        return self


class ListConfigRulesResponseBodyConfigRulesConfigRuleListCreateBy(TeaModel):
    def __init__(self, compliance_pack_id=None, compliance_pack_name=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The name of the compliance package.
        self.compliance_pack_name = compliance_pack_name  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        return self


class ListConfigRulesResponseBodyConfigRulesConfigRuleListTags(TeaModel):
    def __init__(self, key=None, value=None):
        # The tag key of the rule.
        self.key = key  # type: str
        # The tag value of the rule.
        self.value = value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListConfigRulesResponseBodyConfigRulesConfigRuleListTags, 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 ListConfigRulesResponseBodyConfigRulesConfigRuleList(TeaModel):
    def __init__(self, account_id=None, automation_type=None, compliance=None, config_rule_arn=None,
                 config_rule_id=None, config_rule_name=None, config_rule_state=None, create_by=None, description=None,
                 resource_types_scope=None, risk_level=None, source_identifier=None, source_owner=None, tags=None):
        # The ID of the management account to which the rule belongs.
        self.account_id = account_id  # type: long
        # The type of the remediation template. Valid value: OOS, which indicates Operation Orchestration Service.
        self.automation_type = automation_type  # type: str
        # The compliance evaluation result.
        self.compliance = compliance  # type: ListConfigRulesResponseBodyConfigRulesConfigRuleListCompliance
        # The ARN of the rule.
        self.config_rule_arn = config_rule_arn  # type: str
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The rule name.
        self.config_rule_name = config_rule_name  # type: str
        # The status of the rule. Valid values:
        # 
        # - ACTIVE: The rule is enabled.
        # 
        # - DELETING: The rule is being deleted.
        # 
        # - EVALUATING: The rule is triggered and is being used to monitor resource configurations.
        # 
        # - INACTIVE: The rule is disabled.
        self.config_rule_state = config_rule_state  # type: str
        # The information about the creation of the rule.
        self.create_by = create_by  # type: ListConfigRulesResponseBodyConfigRulesConfigRuleListCreateBy
        # The description of the rule.
        self.description = description  # type: str
        # The types of resources evaluated by the rule. Multiple resource types are separated with commas (,).
        self.resource_types_scope = resource_types_scope  # type: str
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # - 1: high
        # 
        # - 2: medium
        # 
        # - 3: low
        self.risk_level = risk_level  # type: int
        # The ID of the rule.
        # 
        # - If the rule is a managed rule, the value of this parameter is the name of the managed rule.
        # 
        # - If the rule is a custom rule, the value of this parameter is the Alibaba Cloud Resource Name (ARN) of the relevant function in Function Compute.
        self.source_identifier = source_identifier  # type: str
        # The type of the rule. Valid values:
        # 
        # - CUSTOM_FC: custom rule
        # 
        # - ALIYUN: managed rule
        self.source_owner = source_owner  # type: str
        # The tags of the rule.
        self.tags = tags  # type: list[ListConfigRulesResponseBodyConfigRulesConfigRuleListTags]

    def validate(self):
        if self.compliance:
            self.compliance.validate()
        if self.create_by:
            self.create_by.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(ListConfigRulesResponseBodyConfigRulesConfigRuleList, 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.automation_type is not None:
            result['AutomationType'] = self.automation_type
        if self.compliance is not None:
            result['Compliance'] = self.compliance.to_map()
        if self.config_rule_arn is not None:
            result['ConfigRuleArn'] = self.config_rule_arn
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_state is not None:
            result['ConfigRuleState'] = self.config_rule_state
        if self.create_by is not None:
            result['CreateBy'] = self.create_by.to_map()
        if self.description is not None:
            result['Description'] = self.description
        if self.resource_types_scope is not None:
            result['ResourceTypesScope'] = self.resource_types_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.source_identifier is not None:
            result['SourceIdentifier'] = self.source_identifier
        if self.source_owner is not None:
            result['SourceOwner'] = self.source_owner
        result['Tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['Tags'].append(k.to_map() if k else None)
        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('AutomationType') is not None:
            self.automation_type = m.get('AutomationType')
        if m.get('Compliance') is not None:
            temp_model = ListConfigRulesResponseBodyConfigRulesConfigRuleListCompliance()
            self.compliance = temp_model.from_map(m['Compliance'])
        if m.get('ConfigRuleArn') is not None:
            self.config_rule_arn = m.get('ConfigRuleArn')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleState') is not None:
            self.config_rule_state = m.get('ConfigRuleState')
        if m.get('CreateBy') is not None:
            temp_model = ListConfigRulesResponseBodyConfigRulesConfigRuleListCreateBy()
            self.create_by = temp_model.from_map(m['CreateBy'])
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('SourceIdentifier') is not None:
            self.source_identifier = m.get('SourceIdentifier')
        if m.get('SourceOwner') is not None:
            self.source_owner = m.get('SourceOwner')
        self.tags = []
        if m.get('Tags') is not None:
            for k in m.get('Tags'):
                temp_model = ListConfigRulesResponseBodyConfigRulesConfigRuleListTags()
                self.tags.append(temp_model.from_map(k))
        return self


class ListConfigRulesResponseBodyConfigRules(TeaModel):
    def __init__(self, config_rule_list=None, page_number=None, page_size=None, total_count=None):
        # The rule list.
        self.config_rule_list = config_rule_list  # type: list[ListConfigRulesResponseBodyConfigRulesConfigRuleList]
        # The page number.
        self.page_number = page_number  # type: int
        # The number of entries per page.
        self.page_size = page_size  # type: int
        # The total number of rules.
        self.total_count = total_count  # type: long

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

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

        result = dict()
        result['ConfigRuleList'] = []
        if self.config_rule_list is not None:
            for k in self.config_rule_list:
                result['ConfigRuleList'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        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.config_rule_list = []
        if m.get('ConfigRuleList') is not None:
            for k in m.get('ConfigRuleList'):
                temp_model = ListConfigRulesResponseBodyConfigRulesConfigRuleList()
                self.config_rule_list.append(temp_model.from_map(k))
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        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 ListConfigRulesResponseBody(TeaModel):
    def __init__(self, config_rules=None, request_id=None):
        # The queried rules.
        self.config_rules = config_rules  # type: ListConfigRulesResponseBodyConfigRules
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.config_rules is not None:
            result['ConfigRules'] = self.config_rules.to_map()
        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('ConfigRules') is not None:
            temp_model = ListConfigRulesResponseBodyConfigRules()
            self.config_rules = temp_model.from_map(m['ConfigRules'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListConfigRulesResponse(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: ListConfigRulesResponseBody

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

    def to_map(self):
        _map = super(ListConfigRulesResponse, 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 = ListConfigRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListDiscoveredResourcesRequest(TeaModel):
    def __init__(self, max_results=None, next_token=None, regions=None, resource_deleted=None, resource_id=None,
                 resource_types=None):
        # The maximum number of entries returned for a single request. Valid values: 1 to 100.
        self.max_results = max_results  # type: int
        # The `token` that you want to use to initiate the current request. If the response of the previous request is truncated, you can use this token to initiate another request and obtain the remaining entries.
        self.next_token = next_token  # type: str
        # The ID of the region where the resource resides. Separate multiple region IDs with commas (,).
        self.regions = regions  # type: str
        # The status of the resource. Valid values:
        # 
        # *   0: The resource is deleted.
        # *   1 (default): The resource is retained.
        self.resource_deleted = resource_deleted  # type: int
        # The resource ID.
        self.resource_id = resource_id  # type: str
        # The type of the resource. Separate multiple resource types with commas (,).
        self.resource_types = resource_types  # type: str

    def validate(self):
        pass

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

        result = dict()
        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.regions is not None:
            result['Regions'] = self.regions
        if self.resource_deleted is not None:
            result['ResourceDeleted'] = self.resource_deleted
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        return result

    def from_map(self, m=None):
        m = m or dict()
        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('Regions') is not None:
            self.regions = m.get('Regions')
        if m.get('ResourceDeleted') is not None:
            self.resource_deleted = m.get('ResourceDeleted')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        return self


class ListDiscoveredResourcesResponseBodyDiscoveredResourceProfilesDiscoveredResourceProfileList(TeaModel):
    def __init__(self, account_id=None, availability_zone=None, region=None, resource_creation_time=None,
                 resource_deleted=None, resource_id=None, resource_name=None, resource_status=None, resource_type=None, tags=None,
                 version=None):
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.account_id = account_id  # type: long
        # The zone.
        self.availability_zone = availability_zone  # type: str
        # The region ID.
        self.region = region  # type: str
        # The timestamp when the resource was created. Unit: milliseconds.
        self.resource_creation_time = resource_creation_time  # type: long
        # The status of the resource. Valid values:
        # 
        # *   0: The resource is deleted.
        # *   1: The resource is retained.
        self.resource_deleted = resource_deleted  # type: int
        # The resource ID.
        self.resource_id = resource_id  # type: str
        # The name of the resource.
        self.resource_name = resource_name  # type: str
        # The status of the resource. The value of this parameter varies based on the resource type and may be empty. Examples:
        # 
        # *   If the value of the ResourceType parameter is ACS::ECS::Instance, the resource is an Elastic Compute Service (ECS) instance that is in a specific state. In this case, the valid values of this parameter are Running and Stopped.
        # *   If the value of the ResourceType parameter is ACS::OSS::Bucket, the resource is an Object Storage Service (OSS) bucket that is not in a specific state. In this case, this parameter is empty.
        self.resource_status = resource_status  # type: str
        # The type of the resource.
        self.resource_type = resource_type  # type: str
        # The tags of the resource.
        self.tags = tags  # type: str
        # The version of the resource change.
        self.version = version  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListDiscoveredResourcesResponseBodyDiscoveredResourceProfilesDiscoveredResourceProfileList, 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.availability_zone is not None:
            result['AvailabilityZone'] = self.availability_zone
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_creation_time is not None:
            result['ResourceCreationTime'] = self.resource_creation_time
        if self.resource_deleted is not None:
            result['ResourceDeleted'] = self.resource_deleted
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_name is not None:
            result['ResourceName'] = self.resource_name
        if self.resource_status is not None:
            result['ResourceStatus'] = self.resource_status
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.tags is not None:
            result['Tags'] = self.tags
        if self.version is not None:
            result['Version'] = self.version
        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('AvailabilityZone') is not None:
            self.availability_zone = m.get('AvailabilityZone')
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceCreationTime') is not None:
            self.resource_creation_time = m.get('ResourceCreationTime')
        if m.get('ResourceDeleted') is not None:
            self.resource_deleted = m.get('ResourceDeleted')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceName') is not None:
            self.resource_name = m.get('ResourceName')
        if m.get('ResourceStatus') is not None:
            self.resource_status = m.get('ResourceStatus')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('Tags') is not None:
            self.tags = m.get('Tags')
        if m.get('Version') is not None:
            self.version = m.get('Version')
        return self


class ListDiscoveredResourcesResponseBodyDiscoveredResourceProfiles(TeaModel):
    def __init__(self, discovered_resource_profile_list=None, max_results=None, next_token=None, total_count=None):
        # The details of the resources.
        self.discovered_resource_profile_list = discovered_resource_profile_list  # type: list[ListDiscoveredResourcesResponseBodyDiscoveredResourceProfilesDiscoveredResourceProfileList]
        # The maximum number of entries returned on each page.
        self.max_results = max_results  # type: int
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.next_token = next_token  # type: str
        # The total number of resources.
        self.total_count = total_count  # type: int

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

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

        result = dict()
        result['DiscoveredResourceProfileList'] = []
        if self.discovered_resource_profile_list is not None:
            for k in self.discovered_resource_profile_list:
                result['DiscoveredResourceProfileList'].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.discovered_resource_profile_list = []
        if m.get('DiscoveredResourceProfileList') is not None:
            for k in m.get('DiscoveredResourceProfileList'):
                temp_model = ListDiscoveredResourcesResponseBodyDiscoveredResourceProfilesDiscoveredResourceProfileList()
                self.discovered_resource_profile_list.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 ListDiscoveredResourcesResponseBody(TeaModel):
    def __init__(self, discovered_resource_profiles=None, request_id=None):
        # The resources.
        self.discovered_resource_profiles = discovered_resource_profiles  # type: ListDiscoveredResourcesResponseBodyDiscoveredResourceProfiles
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.discovered_resource_profiles is not None:
            result['DiscoveredResourceProfiles'] = self.discovered_resource_profiles.to_map()
        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('DiscoveredResourceProfiles') is not None:
            temp_model = ListDiscoveredResourcesResponseBodyDiscoveredResourceProfiles()
            self.discovered_resource_profiles = temp_model.from_map(m['DiscoveredResourceProfiles'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListDiscoveredResourcesResponse(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: ListDiscoveredResourcesResponseBody

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

    def to_map(self):
        _map = super(ListDiscoveredResourcesResponse, 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 = ListDiscoveredResourcesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIntegratedServiceResponseBodyData(TeaModel):
    def __init__(self, integrated_types=None, service_code=None, service_name=None, status=None):
        # The types of the integrated events. Separate multiple event types with commas (,). Valid values:
        # 
        # *   ConfigurationItemChangeNotification: resource change event
        # *   NonCompliantNotification: non-compliance event
        self.integrated_types = integrated_types  # type: str
        # The identifier of the cloud service. Valid values:
        # 
        # *   eventbridge: event bus
        # *   cms: CloudMonitor
        # *   bpstudio: Cloud Architect Design Tools (CADT)
        self.service_code = service_code  # type: str
        # The name of the cloud service.
        self.service_name = service_name  # type: str
        # The integration status of the cloud service. Valid values:
        # 
        # *   1: The cloud service is integrated.
        # *   0: The cloud service is not integrated.
        self.status = status  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.integrated_types is not None:
            result['IntegratedTypes'] = self.integrated_types
        if self.service_code is not None:
            result['ServiceCode'] = self.service_code
        if self.service_name is not None:
            result['ServiceName'] = self.service_name
        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('IntegratedTypes') is not None:
            self.integrated_types = m.get('IntegratedTypes')
        if m.get('ServiceCode') is not None:
            self.service_code = m.get('ServiceCode')
        if m.get('ServiceName') is not None:
            self.service_name = m.get('ServiceName')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class ListIntegratedServiceResponseBody(TeaModel):
    def __init__(self, data=None, request_id=None):
        # The information about the cloud service that can be integrated.
        self.data = data  # type: list[ListIntegratedServiceResponseBodyData]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        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.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.data = []
        if m.get('Data') is not None:
            for k in m.get('Data'):
                temp_model = ListIntegratedServiceResponseBodyData()
                self.data.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListIntegratedServiceResponse(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: ListIntegratedServiceResponseBody

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

    def to_map(self):
        _map = super(ListIntegratedServiceResponse, 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 = ListIntegratedServiceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListManagedRulesRequest(TeaModel):
    def __init__(self, keyword=None, page_number=None, page_size=None, resource_types=None, risk_level=None):
        # The keyword that you want to use to filter managed rules.
        self.keyword = keyword  # type: str
        # The page number.
        # 
        # Pages start from page 1. Default value: 1.
        self.page_number = page_number  # type: int
        # The number of entries per page.
        # 
        # Valid values: 1 to 100. Minimum value: 1. Default value: 10.
        self.page_size = page_size  # type: int
        # The type of the resources to be evaluated based on the rule.
        self.resource_types = resource_types  # type: str
        # The risk level that you want to use to filter managed rules. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int

    def validate(self):
        pass

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

        result = dict()
        if self.keyword is not None:
            result['Keyword'] = self.keyword
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Keyword') is not None:
            self.keyword = m.get('Keyword')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class ListManagedRulesResponseBodyManagedRulesManagedRuleListScope(TeaModel):
    def __init__(self, compliance_resource_types=None):
        # The type of resource to which the managed rule applies.
        self.compliance_resource_types = compliance_resource_types  # type: list[str]

    def validate(self):
        pass

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

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

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


class ListManagedRulesResponseBodyManagedRulesManagedRuleList(TeaModel):
    def __init__(self, config_rule_name=None, description=None, help_urls=None, identifier=None, labels=None,
                 remediation_template_identifier=None, remediation_template_name=None, risk_level=None, scope=None,
                 support_preview_managed_rule=None):
        # The name of the managed rule.
        self.config_rule_name = config_rule_name  # type: str
        # The description of the managed rule.
        self.description = description  # type: str
        # The URL of the topic that describes how the managed rule remediates the incompliant configurations.
        self.help_urls = help_urls  # type: str
        # The unique identifier of the managed rule.
        self.identifier = identifier  # type: str
        # Classification description of the managed rule.
        self.labels = labels  # type: list[str]
        # Supported remediation template id.
        self.remediation_template_identifier = remediation_template_identifier  # type: str
        # Supported remediation template name.
        self.remediation_template_name = remediation_template_name  # type: str
        # The risk level of the resources that do not comply with the managed rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int
        # The effective scope of the managed rule.
        self.scope = scope  # type: ListManagedRulesResponseBodyManagedRulesManagedRuleListScope
        # Whether pre-check is supported. Value:
        # 
        # - true: Supported
        # 
        # - false: not supported
        self.support_preview_managed_rule = support_preview_managed_rule  # type: bool

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

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

        result = dict()
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.description is not None:
            result['Description'] = self.description
        if self.help_urls is not None:
            result['HelpUrls'] = self.help_urls
        if self.identifier is not None:
            result['Identifier'] = self.identifier
        if self.labels is not None:
            result['Labels'] = self.labels
        if self.remediation_template_identifier is not None:
            result['RemediationTemplateIdentifier'] = self.remediation_template_identifier
        if self.remediation_template_name is not None:
            result['RemediationTemplateName'] = self.remediation_template_name
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.scope is not None:
            result['Scope'] = self.scope.to_map()
        if self.support_preview_managed_rule is not None:
            result['SupportPreviewManagedRule'] = self.support_preview_managed_rule
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('HelpUrls') is not None:
            self.help_urls = m.get('HelpUrls')
        if m.get('Identifier') is not None:
            self.identifier = m.get('Identifier')
        if m.get('Labels') is not None:
            self.labels = m.get('Labels')
        if m.get('RemediationTemplateIdentifier') is not None:
            self.remediation_template_identifier = m.get('RemediationTemplateIdentifier')
        if m.get('RemediationTemplateName') is not None:
            self.remediation_template_name = m.get('RemediationTemplateName')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('Scope') is not None:
            temp_model = ListManagedRulesResponseBodyManagedRulesManagedRuleListScope()
            self.scope = temp_model.from_map(m['Scope'])
        if m.get('SupportPreviewManagedRule') is not None:
            self.support_preview_managed_rule = m.get('SupportPreviewManagedRule')
        return self


class ListManagedRulesResponseBodyManagedRules(TeaModel):
    def __init__(self, managed_rule_list=None, page_number=None, page_size=None, total_count=None):
        # The name of the remediation template.
        self.managed_rule_list = managed_rule_list  # type: list[ListManagedRulesResponseBodyManagedRulesManagedRuleList]
        # The page number of the returned page. Minimum value: 1.
        self.page_number = page_number  # type: int
        # The number of entries returned per page. Valid values: 1 to 500.
        self.page_size = page_size  # type: int
        # The total number of managed rules returned.
        self.total_count = total_count  # type: long

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

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

        result = dict()
        result['ManagedRuleList'] = []
        if self.managed_rule_list is not None:
            for k in self.managed_rule_list:
                result['ManagedRuleList'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        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.managed_rule_list = []
        if m.get('ManagedRuleList') is not None:
            for k in m.get('ManagedRuleList'):
                temp_model = ListManagedRulesResponseBodyManagedRulesManagedRuleList()
                self.managed_rule_list.append(temp_model.from_map(k))
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        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 ListManagedRulesResponseBody(TeaModel):
    def __init__(self, managed_rules=None, request_id=None):
        # The managed rules.
        self.managed_rules = managed_rules  # type: ListManagedRulesResponseBodyManagedRules
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.managed_rules is not None:
            result['ManagedRules'] = self.managed_rules.to_map()
        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('ManagedRules') is not None:
            temp_model = ListManagedRulesResponseBodyManagedRules()
            self.managed_rules = temp_model.from_map(m['ManagedRules'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListManagedRulesResponse(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: ListManagedRulesResponseBody

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

    def to_map(self):
        _map = super(ListManagedRulesResponse, 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 = ListManagedRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListPreManagedRulesRequest(TeaModel):
    def __init__(self, page_number=None, page_size=None, resource_types=None):
        # The number of the page to return.
        # 
        # Pages start from page 1. Default value: 1.
        self.page_number = page_number  # type: long
        # The number of entries to return on each page.
        # 
        # Default value: 10.
        self.page_size = page_size  # type: long
        # The type of the resource.
        self.resource_types = resource_types  # type: list[str]

    def validate(self):
        pass

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

        result = dict()
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        return self


class ListPreManagedRulesShrinkRequest(TeaModel):
    def __init__(self, page_number=None, page_size=None, resource_types_shrink=None):
        # The number of the page to return.
        # 
        # Pages start from page 1. Default value: 1.
        self.page_number = page_number  # type: long
        # The number of entries to return on each page.
        # 
        # Default value: 10.
        self.page_size = page_size  # type: long
        # The type of the resource.
        self.resource_types_shrink = resource_types_shrink  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.resource_types_shrink is not None:
            result['ResourceTypes'] = self.resource_types_shrink
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('ResourceTypes') is not None:
            self.resource_types_shrink = m.get('ResourceTypes')
        return self


class ListPreManagedRulesResponseBodyManagedRules(TeaModel):
    def __init__(self, compulsory_input_parameter_details=None, config_rule_name=None, description=None,
                 help_urls=None, identifier=None, optional_input_parameter_details=None, resource_type=None):
        # The required input parameters of the evaluation rule.
        self.compulsory_input_parameter_details = compulsory_input_parameter_details  # type: dict[str, any]
        # The name of the evaluation rule.
        self.config_rule_name = config_rule_name  # type: str
        # The description of the evaluation rule.
        self.description = description  # type: str
        # The URL of the topic that describes how the managed rule remediates the incompliant configurations.
        self.help_urls = help_urls  # type: str
        # The identifier of the evaluation rule.
        self.identifier = identifier  # type: str
        # The details of the optional input parameters of the evaluation rule.
        self.optional_input_parameter_details = optional_input_parameter_details  # type: dict[str, any]
        # The type of the resource.
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compulsory_input_parameter_details is not None:
            result['CompulsoryInputParameterDetails'] = self.compulsory_input_parameter_details
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.description is not None:
            result['Description'] = self.description
        if self.help_urls is not None:
            result['HelpUrls'] = self.help_urls
        if self.identifier is not None:
            result['Identifier'] = self.identifier
        if self.optional_input_parameter_details is not None:
            result['OptionalInputParameterDetails'] = self.optional_input_parameter_details
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompulsoryInputParameterDetails') is not None:
            self.compulsory_input_parameter_details = m.get('CompulsoryInputParameterDetails')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('HelpUrls') is not None:
            self.help_urls = m.get('HelpUrls')
        if m.get('Identifier') is not None:
            self.identifier = m.get('Identifier')
        if m.get('OptionalInputParameterDetails') is not None:
            self.optional_input_parameter_details = m.get('OptionalInputParameterDetails')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        return self


class ListPreManagedRulesResponseBody(TeaModel):
    def __init__(self, managed_rules=None, page_number=None, page_size=None, request_id=None):
        # The evaluation rules.
        self.managed_rules = managed_rules  # type: list[ListPreManagedRulesResponseBodyManagedRules]
        # The page number of the returned page.
        self.page_number = page_number  # type: long
        # The number of entries returned per page.
        self.page_size = page_size  # type: long
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        result['ManagedRules'] = []
        if self.managed_rules is not None:
            for k in self.managed_rules:
                result['ManagedRules'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.managed_rules = []
        if m.get('ManagedRules') is not None:
            for k in m.get('ManagedRules'):
                temp_model = ListPreManagedRulesResponseBodyManagedRules()
                self.managed_rules.append(temp_model.from_map(k))
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        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')
        return self


class ListPreManagedRulesResponse(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: ListPreManagedRulesResponseBody

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

    def to_map(self):
        _map = super(ListPreManagedRulesResponse, 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 = ListPreManagedRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListRemediationExecutionsRequest(TeaModel):
    def __init__(self, config_rule_id=None, execution_status=None, max_results=None, next_token=None):
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The status of the remediation. Valid values:
        # 
        # *   Success
        # *   Failed
        self.execution_status = execution_status  # type: str
        # The maximum number of entries to return for a single request. Valid values: 10 to 100.
        self.max_results = max_results  # type: long
        # The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.
        self.next_token = next_token  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.execution_status is not None:
            result['ExecutionStatus'] = self.execution_status
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ExecutionStatus') is not None:
            self.execution_status = m.get('ExecutionStatus')
        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 ListRemediationExecutionsResponseBodyRemediationExecutionDataRemediationExecutions(TeaModel):
    def __init__(self, execution_create_date=None, execution_invocation_id=None, execution_resource_ids=None,
                 execution_resource_type=None, execution_status=None, execution_status_message=None):
        # The time when the remediation record was created.
        self.execution_create_date = execution_create_date  # type: str
        # The invocation ID of the remediation record.
        self.execution_invocation_id = execution_invocation_id  # type: str
        # The IDs of the remediated resources. Multiple resource IDs are separated with commas (,).
        self.execution_resource_ids = execution_resource_ids  # type: str
        # The resource type.
        self.execution_resource_type = execution_resource_type  # type: str
        # The status of the remediation. Valid values:
        # 
        # *   Success
        # *   Failed
        self.execution_status = execution_status  # type: str
        # The error message returned when the remediation fails.
        self.execution_status_message = execution_status_message  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.execution_create_date is not None:
            result['ExecutionCreateDate'] = self.execution_create_date
        if self.execution_invocation_id is not None:
            result['ExecutionInvocationId'] = self.execution_invocation_id
        if self.execution_resource_ids is not None:
            result['ExecutionResourceIds'] = self.execution_resource_ids
        if self.execution_resource_type is not None:
            result['ExecutionResourceType'] = self.execution_resource_type
        if self.execution_status is not None:
            result['ExecutionStatus'] = self.execution_status
        if self.execution_status_message is not None:
            result['ExecutionStatusMessage'] = self.execution_status_message
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ExecutionCreateDate') is not None:
            self.execution_create_date = m.get('ExecutionCreateDate')
        if m.get('ExecutionInvocationId') is not None:
            self.execution_invocation_id = m.get('ExecutionInvocationId')
        if m.get('ExecutionResourceIds') is not None:
            self.execution_resource_ids = m.get('ExecutionResourceIds')
        if m.get('ExecutionResourceType') is not None:
            self.execution_resource_type = m.get('ExecutionResourceType')
        if m.get('ExecutionStatus') is not None:
            self.execution_status = m.get('ExecutionStatus')
        if m.get('ExecutionStatusMessage') is not None:
            self.execution_status_message = m.get('ExecutionStatusMessage')
        return self


class ListRemediationExecutionsResponseBodyRemediationExecutionData(TeaModel):
    def __init__(self, max_results=None, next_token=None, remediation_executions=None):
        # The maximum number of entries returned for a single request.
        self.max_results = max_results  # type: long
        # A pagination token. It can be used in the next request to retrieve a new page of results.
        self.next_token = next_token  # type: str
        # The queried remediation records.
        self.remediation_executions = remediation_executions  # type: list[ListRemediationExecutionsResponseBodyRemediationExecutionDataRemediationExecutions]

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

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

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

    def from_map(self, m=None):
        m = m or dict()
        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')
        self.remediation_executions = []
        if m.get('RemediationExecutions') is not None:
            for k in m.get('RemediationExecutions'):
                temp_model = ListRemediationExecutionsResponseBodyRemediationExecutionDataRemediationExecutions()
                self.remediation_executions.append(temp_model.from_map(k))
        return self


class ListRemediationExecutionsResponseBody(TeaModel):
    def __init__(self, remediation_execution_data=None, request_id=None):
        # The queried remediation records.
        self.remediation_execution_data = remediation_execution_data  # type: ListRemediationExecutionsResponseBodyRemediationExecutionData
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.remediation_execution_data is not None:
            result['RemediationExecutionData'] = self.remediation_execution_data.to_map()
        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('RemediationExecutionData') is not None:
            temp_model = ListRemediationExecutionsResponseBodyRemediationExecutionData()
            self.remediation_execution_data = temp_model.from_map(m['RemediationExecutionData'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListRemediationExecutionsResponse(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: ListRemediationExecutionsResponseBody

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

    def to_map(self):
        _map = super(ListRemediationExecutionsResponse, 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 = ListRemediationExecutionsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListRemediationTemplatesRequest(TeaModel):
    def __init__(self, managed_rule_identifier=None, page_number=None, page_size=None, remediation_type=None):
        # The identifier of the managed rule.
        # 
        # You can call the [ListCompliancePackTemplates](~~261176~~) operation to obtain the managed rule identifier.
        self.managed_rule_identifier = managed_rule_identifier  # type: str
        # The page number. Pages start from 1.
        self.page_number = page_number  # type: long
        # The number of entries per page. Valid values: 1 to 100.
        self.page_size = page_size  # type: long
        # The type of the remediation template. Valid value: OOS, which stands for Operation Orchestration Service.
        self.remediation_type = remediation_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.managed_rule_identifier is not None:
            result['ManagedRuleIdentifier'] = self.managed_rule_identifier
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.remediation_type is not None:
            result['RemediationType'] = self.remediation_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ManagedRuleIdentifier') is not None:
            self.managed_rule_identifier = m.get('ManagedRuleIdentifier')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('RemediationType') is not None:
            self.remediation_type = m.get('RemediationType')
        return self


class ListRemediationTemplatesResponseBodyRemediationTemplates(TeaModel):
    def __init__(self, remediation_type=None, template_definition=None, template_description=None,
                 template_identifier=None, template_name=None):
        # The type of the remediation template. Valid value: OOS, which indicates Operation Orchestration Service.
        self.remediation_type = remediation_type  # type: str
        # The definition of the remediation template.
        self.template_definition = template_definition  # type: str
        # The description of the remediation template.
        self.template_description = template_description  # type: str
        # The ID of the remediation template.
        self.template_identifier = template_identifier  # type: str
        # The name of the remediation template.
        self.template_name = template_name  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.remediation_type is not None:
            result['RemediationType'] = self.remediation_type
        if self.template_definition is not None:
            result['TemplateDefinition'] = self.template_definition
        if self.template_description is not None:
            result['TemplateDescription'] = self.template_description
        if self.template_identifier is not None:
            result['TemplateIdentifier'] = self.template_identifier
        if self.template_name is not None:
            result['TemplateName'] = self.template_name
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RemediationType') is not None:
            self.remediation_type = m.get('RemediationType')
        if m.get('TemplateDefinition') is not None:
            self.template_definition = m.get('TemplateDefinition')
        if m.get('TemplateDescription') is not None:
            self.template_description = m.get('TemplateDescription')
        if m.get('TemplateIdentifier') is not None:
            self.template_identifier = m.get('TemplateIdentifier')
        if m.get('TemplateName') is not None:
            self.template_name = m.get('TemplateName')
        return self


class ListRemediationTemplatesResponseBody(TeaModel):
    def __init__(self, page_number=None, page_size=None, remediation_templates=None, request_id=None,
                 total_count=None):
        # The page number. Pages start from page 1.
        self.page_number = page_number  # type: long
        # The number of entries per page. Valid values: 1 to 100.
        self.page_size = page_size  # type: long
        # The queried remediation templates.
        self.remediation_templates = remediation_templates  # type: list[ListRemediationTemplatesResponseBodyRemediationTemplates]
        # The ID of the request.
        self.request_id = request_id  # type: str
        # The total number of remediation templates.
        self.total_count = total_count  # type: str

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

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

        result = dict()
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        result['RemediationTemplates'] = []
        if self.remediation_templates is not None:
            for k in self.remediation_templates:
                result['RemediationTemplates'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        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('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        self.remediation_templates = []
        if m.get('RemediationTemplates') is not None:
            for k in m.get('RemediationTemplates'):
                temp_model = ListRemediationTemplatesResponseBodyRemediationTemplates()
                self.remediation_templates.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class ListRemediationTemplatesResponse(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: ListRemediationTemplatesResponseBody

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

    def to_map(self):
        _map = super(ListRemediationTemplatesResponse, 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 = ListRemediationTemplatesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListRemediationsRequest(TeaModel):
    def __init__(self, config_rule_ids=None, page_number=None, page_size=None):
        # The rule IDs. Separate multiple rule IDs with commas (,).
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_ids = config_rule_ids  # type: str
        # The page number. Pages start from page 1.
        self.page_number = page_number  # type: long
        # The number of entries per page. Valid values: 1 to 50.
        self.page_size = page_size  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_ids is not None:
            result['ConfigRuleIds'] = self.config_rule_ids
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        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('ConfigRuleIds') is not None:
            self.config_rule_ids = m.get('ConfigRuleIds')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        return self


class ListRemediationsResponseBodyRemediations(TeaModel):
    def __init__(self, account_id=None, config_rule_id=None, invoke_type=None, last_successful_invocation_id=None,
                 last_successful_invocation_time=None, last_successful_invocation_type=None, remediation_id=None, remediation_origin_params=None,
                 remediation_source_type=None, remediation_template_id=None, remediation_type=None):
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.account_id = account_id  # type: long
        # The rule ID.
        self.config_rule_id = config_rule_id  # type: str
        # The execution mode of the remediation template. Valid values:
        # 
        # *   NON_EXECUTION: The remediation template was not executed.
        # *   AUTO_EXECUTION: The remediation template was automatically executed.
        # *   MANUAL_EXECUTION: The remediation template was manually executed.
        # *   NOT_CONFIG: The execution mode was not specified.
        self.invoke_type = invoke_type  # type: str
        # The ID of the last successful execution of the remediation template.
        self.last_successful_invocation_id = last_successful_invocation_id  # type: str
        # The timestamp of the last successful execution of the remediation template Unit: milliseconds.
        self.last_successful_invocation_time = last_successful_invocation_time  # type: long
        # The mode of the last successful execution of the remediation template. Valid values:
        # 
        # *   NON_EXECUTION: The remediation template was not executed.
        # *   AUTO_EXECUTION: The remediation template was automatically executed.
        # *   MANUAL_EXECUTION: The remediation template was manually executed.
        # *   NOT_CONFIG: The execution mode was not specified.
        self.last_successful_invocation_type = last_successful_invocation_type  # type: str
        # The ID of the remediation template.
        self.remediation_id = remediation_id  # type: str
        # The converted configuration of the remediation template. This parameter is available only for an OOS remediation template.
        self.remediation_origin_params = remediation_origin_params  # type: str
        # The source of remediation. Valid values:
        # 
        # *   ALIYUN: official template.
        # *   CUSTOM: custom template.
        # *   NONE: none.
        self.remediation_source_type = remediation_source_type  # type: str
        # The ID of the remediation template.
        self.remediation_template_id = remediation_template_id  # type: str
        # The type of the remediation template. Valid values:
        # 
        # *   OOS: Operation Orchestration Service (official remediation)
        # *   FC: Function Compute (custom remediation)
        self.remediation_type = remediation_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListRemediationsResponseBodyRemediations, 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.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.invoke_type is not None:
            result['InvokeType'] = self.invoke_type
        if self.last_successful_invocation_id is not None:
            result['LastSuccessfulInvocationId'] = self.last_successful_invocation_id
        if self.last_successful_invocation_time is not None:
            result['LastSuccessfulInvocationTime'] = self.last_successful_invocation_time
        if self.last_successful_invocation_type is not None:
            result['LastSuccessfulInvocationType'] = self.last_successful_invocation_type
        if self.remediation_id is not None:
            result['RemediationId'] = self.remediation_id
        if self.remediation_origin_params is not None:
            result['RemediationOriginParams'] = self.remediation_origin_params
        if self.remediation_source_type is not None:
            result['RemediationSourceType'] = self.remediation_source_type
        if self.remediation_template_id is not None:
            result['RemediationTemplateId'] = self.remediation_template_id
        if self.remediation_type is not None:
            result['RemediationType'] = self.remediation_type
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('InvokeType') is not None:
            self.invoke_type = m.get('InvokeType')
        if m.get('LastSuccessfulInvocationId') is not None:
            self.last_successful_invocation_id = m.get('LastSuccessfulInvocationId')
        if m.get('LastSuccessfulInvocationTime') is not None:
            self.last_successful_invocation_time = m.get('LastSuccessfulInvocationTime')
        if m.get('LastSuccessfulInvocationType') is not None:
            self.last_successful_invocation_type = m.get('LastSuccessfulInvocationType')
        if m.get('RemediationId') is not None:
            self.remediation_id = m.get('RemediationId')
        if m.get('RemediationOriginParams') is not None:
            self.remediation_origin_params = m.get('RemediationOriginParams')
        if m.get('RemediationSourceType') is not None:
            self.remediation_source_type = m.get('RemediationSourceType')
        if m.get('RemediationTemplateId') is not None:
            self.remediation_template_id = m.get('RemediationTemplateId')
        if m.get('RemediationType') is not None:
            self.remediation_type = m.get('RemediationType')
        return self


class ListRemediationsResponseBody(TeaModel):
    def __init__(self, page_number=None, page_size=None, remediations=None, request_id=None, total_count=None):
        # The page number. Pages start from page 1.
        self.page_number = page_number  # type: long
        # The number of entries per page. Valid values: 1 to 50.
        self.page_size = page_size  # type: long
        # The converted configuration of the remediation template. This parameter is returned only for an OOS remediation template.
        self.remediations = remediations  # type: list[ListRemediationsResponseBodyRemediations]
        # The request ID.
        self.request_id = request_id  # type: str
        # The total number of remediation settings.
        self.total_count = total_count  # type: str

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

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

        result = dict()
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        result['Remediations'] = []
        if self.remediations is not None:
            for k in self.remediations:
                result['Remediations'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        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('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        self.remediations = []
        if m.get('Remediations') is not None:
            for k in m.get('Remediations'):
                temp_model = ListRemediationsResponseBodyRemediations()
                self.remediations.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


class ListRemediationsResponse(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: ListRemediationsResponseBody

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

    def to_map(self):
        _map = super(ListRemediationsResponse, 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 = ListRemediationsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListResourceEvaluationResultsRequest(TeaModel):
    def __init__(self, compliance_type=None, max_results=None, next_token=None, region=None, resource_id=None,
                 resource_type=None):
        # The compliance evaluation result of the resource. Valid values:
        # 
        # *   COMPLIANT: The resource is evaluated as compliant.
        # *   NON_COMPLIANT: The resource is evaluated as non-compliant.
        # *   NOT_APPLICABLE: The rule does not apply to the resource.
        # *   INSUFFICIENT_DATA: No data is available.
        # *   IGNORED: The resource is ignored during compliance evaluation.
        self.compliance_type = compliance_type  # type: str
        # The maximum number of entries to return for a single request. Valid values: 1 to 100.
        self.max_results = max_results  # type: int
        # The token that you want to use to initiate the current request. If the response of the previous request is truncated, you can use this token to initiate another request and obtain the remaining entries.``
        self.next_token = next_token  # type: str
        # The ID of the region where one or more resources you want to query reside. For example, the value `global` indicates global regions and the value `cn-hangzhou` indicates the China (Hangzhou) region.
        # 
        # For more information about how to obtain the ID of the region where a resource resides, see [ListDiscoveredResources](~~169620~~).
        self.region = region  # type: str
        # The ID of the resource.
        # 
        # For more information about how to obtain the ID of a resource, see [ListDiscoveredResources](~~169620~~).
        self.resource_id = resource_id  # type: str
        # The type of the resource.
        # 
        # For more information about how to query the type of a resource, see [ListDiscoveredResources](~~169620~~).
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_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
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        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('Region') is not None:
            self.region = m.get('Region')
        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')
        return self


class ListResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifierEvaluationResultQualifier(TeaModel):
    def __init__(self, config_rule_arn=None, config_rule_id=None, config_rule_name=None, ignore_date=None,
                 region_id=None, resource_id=None, resource_name=None, resource_type=None):
        # The Alibaba Cloud Resource Name (ARN) of the rule.
        self.config_rule_arn = config_rule_arn  # type: str
        # The ID of the rule.
        self.config_rule_id = config_rule_id  # type: str
        # The name of the monitoring rule.
        self.config_rule_name = config_rule_name  # type: str
        # The date from which the system automatically re-evaluates the ignored incompliant resources.
        # 
        # >  If the value of this parameter is left empty, the system does not automatically re-evaluate the ignored incompliant resources. You must re-evaluate the ignored incompliant resources.
        self.ignore_date = ignore_date  # type: str
        # The ID of the region where your resources reside.
        self.region_id = region_id  # type: str
        # The ID of the resource.
        self.resource_id = resource_id  # type: str
        # The name of the resource.
        self.resource_name = resource_name  # type: str
        # The type of the resource.
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_arn is not None:
            result['ConfigRuleArn'] = self.config_rule_arn
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.ignore_date is not None:
            result['IgnoreDate'] = self.ignore_date
        if self.region_id is not None:
            result['RegionId'] = self.region_id
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_name is not None:
            result['ResourceName'] = self.resource_name
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleArn') is not None:
            self.config_rule_arn = m.get('ConfigRuleArn')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('IgnoreDate') is not None:
            self.ignore_date = m.get('IgnoreDate')
        if m.get('RegionId') is not None:
            self.region_id = m.get('RegionId')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceName') is not None:
            self.resource_name = m.get('ResourceName')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        return self


class ListResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifier(TeaModel):
    def __init__(self, evaluation_result_qualifier=None, ordering_timestamp=None):
        # The information about the evaluated resource returned in the compliance evaluation result.
        self.evaluation_result_qualifier = evaluation_result_qualifier  # type: ListResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifierEvaluationResultQualifier
        # The timestamp when the compliance evaluation was performed. Unit: milliseconds.
        self.ordering_timestamp = ordering_timestamp  # type: long

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

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

        result = dict()
        if self.evaluation_result_qualifier is not None:
            result['EvaluationResultQualifier'] = self.evaluation_result_qualifier.to_map()
        if self.ordering_timestamp is not None:
            result['OrderingTimestamp'] = self.ordering_timestamp
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('EvaluationResultQualifier') is not None:
            temp_model = ListResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifierEvaluationResultQualifier()
            self.evaluation_result_qualifier = temp_model.from_map(m['EvaluationResultQualifier'])
        if m.get('OrderingTimestamp') is not None:
            self.ordering_timestamp = m.get('OrderingTimestamp')
        return self


class ListResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultList(TeaModel):
    def __init__(self, annotation=None, compliance_type=None, config_rule_invoked_timestamp=None,
                 evaluation_result_identifier=None, invoking_event_message_type=None, remediation_enabled=None, result_recorded_timestamp=None,
                 risk_level=None):
        # The annotation to the resource that is evaluated as incompliant. The following section describes the parameters that can be returned:
        # 
        # *   `configuration`: the current resource configuration that is evaluated as incompliant by using the rule.
        # *   `desiredValue`: the expected resource configuration that is evaluated as compliant by using the rule.
        # *   `operator`: the operator that is used to compare the current configuration with the expected configuration of the resource.
        # *   `property`: the JSON path of the current configuration in the resource property struct.
        # *   `reason`: the reason why the resource is evaluated as incompliant.
        self.annotation = annotation  # type: str
        # The compliance evaluation result of the resources. Valid values:
        # 
        # *   COMPLIANT: The resources are evaluated as compliant.
        # *   NON_COMPLIANT: The resources are evaluated as incompliant.
        # *   NOT_APPLICABLE: The rule does not apply to your resources.
        # *   INSUFFICIENT_DATA: No resource data is available.
        # *   IGNORED: The resource is ignored during compliance evaluation.
        self.compliance_type = compliance_type  # type: str
        # The timestamp when the rule was triggered for the compliance evaluation. Unit: milliseconds.
        self.config_rule_invoked_timestamp = config_rule_invoked_timestamp  # type: long
        # The identifying information about the compliance evaluation result.
        self.evaluation_result_identifier = evaluation_result_identifier  # type: ListResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifier
        # The trigger type of the managed rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The managed rule is triggered by configuration changes.
        # *   ScheduledNotification: The managed rule is periodically triggered.
        self.invoking_event_message_type = invoking_event_message_type  # type: str
        # Indicates whether the remediation template is enabled. Valid values:
        # 
        # - true: The remediation template is enabled.
        # - false: The remediation template is disabled.
        self.remediation_enabled = remediation_enabled  # type: bool
        # The timestamp when the compliance evaluation result was recorded. Unit: milliseconds.
        self.result_recorded_timestamp = result_recorded_timestamp  # type: long
        # The risk level of the resources that do not comply with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int

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

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

        result = dict()
        if self.annotation is not None:
            result['Annotation'] = self.annotation
        if self.compliance_type is not None:
            result['ComplianceType'] = self.compliance_type
        if self.config_rule_invoked_timestamp is not None:
            result['ConfigRuleInvokedTimestamp'] = self.config_rule_invoked_timestamp
        if self.evaluation_result_identifier is not None:
            result['EvaluationResultIdentifier'] = self.evaluation_result_identifier.to_map()
        if self.invoking_event_message_type is not None:
            result['InvokingEventMessageType'] = self.invoking_event_message_type
        if self.remediation_enabled is not None:
            result['RemediationEnabled'] = self.remediation_enabled
        if self.result_recorded_timestamp is not None:
            result['ResultRecordedTimestamp'] = self.result_recorded_timestamp
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Annotation') is not None:
            self.annotation = m.get('Annotation')
        if m.get('ComplianceType') is not None:
            self.compliance_type = m.get('ComplianceType')
        if m.get('ConfigRuleInvokedTimestamp') is not None:
            self.config_rule_invoked_timestamp = m.get('ConfigRuleInvokedTimestamp')
        if m.get('EvaluationResultIdentifier') is not None:
            temp_model = ListResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultListEvaluationResultIdentifier()
            self.evaluation_result_identifier = temp_model.from_map(m['EvaluationResultIdentifier'])
        if m.get('InvokingEventMessageType') is not None:
            self.invoking_event_message_type = m.get('InvokingEventMessageType')
        if m.get('RemediationEnabled') is not None:
            self.remediation_enabled = m.get('RemediationEnabled')
        if m.get('ResultRecordedTimestamp') is not None:
            self.result_recorded_timestamp = m.get('ResultRecordedTimestamp')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class ListResourceEvaluationResultsResponseBodyEvaluationResults(TeaModel):
    def __init__(self, evaluation_result_list=None, max_results=None, next_token=None):
        # The details of the compliance evaluation result.
        self.evaluation_result_list = evaluation_result_list  # type: list[ListResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultList]
        # The maximum number of entries to return for a single request.
        self.max_results = max_results  # type: int
        # The token that was used to initiate the next request.
        self.next_token = next_token  # type: str

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

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

        result = dict()
        result['EvaluationResultList'] = []
        if self.evaluation_result_list is not None:
            for k in self.evaluation_result_list:
                result['EvaluationResultList'].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
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.evaluation_result_list = []
        if m.get('EvaluationResultList') is not None:
            for k in m.get('EvaluationResultList'):
                temp_model = ListResourceEvaluationResultsResponseBodyEvaluationResultsEvaluationResultList()
                self.evaluation_result_list.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')
        return self


class ListResourceEvaluationResultsResponseBody(TeaModel):
    def __init__(self, evaluation_results=None, request_id=None):
        # The information about the compliance evaluation results returned.
        self.evaluation_results = evaluation_results  # type: ListResourceEvaluationResultsResponseBodyEvaluationResults
        # The ID of the request.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.evaluation_results is not None:
            result['EvaluationResults'] = self.evaluation_results.to_map()
        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('EvaluationResults') is not None:
            temp_model = ListResourceEvaluationResultsResponseBodyEvaluationResults()
            self.evaluation_results = temp_model.from_map(m['EvaluationResults'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListResourceEvaluationResultsResponse(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: ListResourceEvaluationResultsResponseBody

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

    def to_map(self):
        _map = super(ListResourceEvaluationResultsResponse, 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 = ListResourceEvaluationResultsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListResourceRelationsRequest(TeaModel):
    def __init__(self, max_results=None, next_token=None, region=None, relation_type=None, resource_id=None,
                 resource_type=None, target_resource_id=None, target_resource_type=None):
        # The maximum number of entries to return for a single request. Valid values: 1 to 1000.
        self.max_results = max_results  # type: int
        # The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.
        self.next_token = next_token  # type: str
        # The ID of the region in which the resource resides.
        self.region = region  # type: str
        # The type of the relationship between the resource and the object.
        # 
        # Valid values:
        # 
        # *   IsContained: The object is included as part of the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   IsAttachedTo: The object is added to the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   IsAssociatedIn: The object is associated with the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   Contains: The actual value contains the expected value.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        self.relation_type = relation_type  # type: str
        # The resource ID.
        self.resource_id = resource_id  # type: str
        # The type of the resource.
        self.resource_type = resource_type  # type: str
        # The ID of the resource that is associated with the object.
        self.target_resource_id = target_resource_id  # type: str
        # The type of the resource that is associated with the object.
        self.target_resource_type = target_resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        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.region is not None:
            result['Region'] = self.region
        if self.relation_type is not None:
            result['RelationType'] = self.relation_type
        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.target_resource_id is not None:
            result['TargetResourceId'] = self.target_resource_id
        if self.target_resource_type is not None:
            result['TargetResourceType'] = self.target_resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        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('Region') is not None:
            self.region = m.get('Region')
        if m.get('RelationType') is not None:
            self.relation_type = m.get('RelationType')
        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('TargetResourceId') is not None:
            self.target_resource_id = m.get('TargetResourceId')
        if m.get('TargetResourceType') is not None:
            self.target_resource_type = m.get('TargetResourceType')
        return self


class ListResourceRelationsResponseBodyResourceRelationsResourceRelationList(TeaModel):
    def __init__(self, account_id=None, relation_type=None, source_resource_id=None,
                 source_resource_region_id=None, source_resource_type=None, target_resource_id=None, target_resource_type=None):
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.account_id = account_id  # type: long
        # The type of the relationship between the resource and the object.
        # 
        # Valid values:
        # 
        # *   IsContained: The object is included as part of the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   IsAttachedTo: The object is added to the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   IsAssociatedIn: The object is associated with the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   Contains: The object contains the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        self.relation_type = relation_type  # type: str
        # The resource ID.
        self.source_resource_id = source_resource_id  # type: str
        # The ID of the region to which the current resource belongs.
        self.source_resource_region_id = source_resource_region_id  # type: str
        # The type of the resource.
        self.source_resource_type = source_resource_type  # type: str
        # The ID of the resource that is associated with the object.
        self.target_resource_id = target_resource_id  # type: str
        # The type of the resource that is associated with the object.
        self.target_resource_type = target_resource_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListResourceRelationsResponseBodyResourceRelationsResourceRelationList, 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.relation_type is not None:
            result['RelationType'] = self.relation_type
        if self.source_resource_id is not None:
            result['SourceResourceId'] = self.source_resource_id
        if self.source_resource_region_id is not None:
            result['SourceResourceRegionId'] = self.source_resource_region_id
        if self.source_resource_type is not None:
            result['SourceResourceType'] = self.source_resource_type
        if self.target_resource_id is not None:
            result['TargetResourceId'] = self.target_resource_id
        if self.target_resource_type is not None:
            result['TargetResourceType'] = self.target_resource_type
        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('RelationType') is not None:
            self.relation_type = m.get('RelationType')
        if m.get('SourceResourceId') is not None:
            self.source_resource_id = m.get('SourceResourceId')
        if m.get('SourceResourceRegionId') is not None:
            self.source_resource_region_id = m.get('SourceResourceRegionId')
        if m.get('SourceResourceType') is not None:
            self.source_resource_type = m.get('SourceResourceType')
        if m.get('TargetResourceId') is not None:
            self.target_resource_id = m.get('TargetResourceId')
        if m.get('TargetResourceType') is not None:
            self.target_resource_type = m.get('TargetResourceType')
        return self


class ListResourceRelationsResponseBodyResourceRelations(TeaModel):
    def __init__(self, max_results=None, next_token=None, resource_relation_list=None):
        # The maximum number of entries returned on each page.
        self.max_results = max_results  # type: int
        # The token that was used to initiate the next request.
        self.next_token = next_token  # type: str
        # The type of the relationship between the resource and the object.
        # 
        # Valid values:
        # 
        # *   IsContained: The object is included as part of the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   IsAttachedTo: The object is added to the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   IsAssociatedIn: The object is associated with the resource.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        # *   Contains: The actual value contains the expected value.
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        # 
        #     <!-- -->
        self.resource_relation_list = resource_relation_list  # type: list[ListResourceRelationsResponseBodyResourceRelationsResourceRelationList]

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

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

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

    def from_map(self, m=None):
        m = m or dict()
        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')
        self.resource_relation_list = []
        if m.get('ResourceRelationList') is not None:
            for k in m.get('ResourceRelationList'):
                temp_model = ListResourceRelationsResponseBodyResourceRelationsResourceRelationList()
                self.resource_relation_list.append(temp_model.from_map(k))
        return self


class ListResourceRelationsResponseBody(TeaModel):
    def __init__(self, request_id=None, resource_relations=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # The result of the relationship.
        self.resource_relations = resource_relations  # type: ListResourceRelationsResponseBodyResourceRelations

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

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.resource_relations is not None:
            result['ResourceRelations'] = self.resource_relations.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('ResourceRelations') is not None:
            temp_model = ListResourceRelationsResponseBodyResourceRelations()
            self.resource_relations = temp_model.from_map(m['ResourceRelations'])
        return self


class ListResourceRelationsResponse(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: ListResourceRelationsResponseBody

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

    def to_map(self):
        _map = super(ListResourceRelationsResponse, 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 = ListResourceRelationsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListResourcesByAdvancedSearchRequest(TeaModel):
    def __init__(self, sql=None):
        # The SQL statement.
        self.sql = sql  # type: str

    def validate(self):
        pass

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

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

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


class ListResourcesByAdvancedSearchResponseBodyQueryResultsQueryResultList(TeaModel):
    def __init__(self, columns=None, values=None):
        # The field names.
        self.columns = columns  # type: list[str]
        # The resource data.
        self.values = values  # type: list[any]

    def validate(self):
        pass

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

        result = dict()
        if self.columns is not None:
            result['Columns'] = self.columns
        if self.values is not None:
            result['Values'] = self.values
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Columns') is not None:
            self.columns = m.get('Columns')
        if m.get('Values') is not None:
            self.values = m.get('Values')
        return self


class ListResourcesByAdvancedSearchResponseBodyQueryResults(TeaModel):
    def __init__(self, query_result_list=None):
        # The queried resources. A maximum of 1,000 data records can be returned. To view more data, use the download URL of the resource file.
        self.query_result_list = query_result_list  # type: ListResourcesByAdvancedSearchResponseBodyQueryResultsQueryResultList

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

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

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

    def from_map(self, m=None):
        m = m or dict()
        if m.get('QueryResultList') is not None:
            temp_model = ListResourcesByAdvancedSearchResponseBodyQueryResultsQueryResultList()
            self.query_result_list = temp_model.from_map(m['QueryResultList'])
        return self


class ListResourcesByAdvancedSearchResponseBody(TeaModel):
    def __init__(self, query_results=None, request_id=None):
        # The result of the request.
        self.query_results = query_results  # type: ListResourcesByAdvancedSearchResponseBodyQueryResults
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.query_results is not None:
            result['QueryResults'] = self.query_results.to_map()
        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('QueryResults') is not None:
            temp_model = ListResourcesByAdvancedSearchResponseBodyQueryResults()
            self.query_results = temp_model.from_map(m['QueryResults'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListResourcesByAdvancedSearchResponse(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: ListResourcesByAdvancedSearchResponseBody

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

    def to_map(self):
        _map = super(ListResourcesByAdvancedSearchResponse, 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 = ListResourcesByAdvancedSearchResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListSupportedProductsRequest(TeaModel):
    def __init__(self, max_results=None, next_token=None):
        # The maximum number of entries to return for a single request. Valid values: 1 to 500.
        self.max_results = max_results  # type: int
        # The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.
        self.next_token = next_token  # type: str

    def validate(self):
        pass

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

        result = dict()
        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('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 ListSupportedProductsResponseBodyProductsResourceTypeList(TeaModel):
    def __init__(self, resource_type=None, type_name_en=None, type_name_zh=None, type_page_link=None):
        # The identifier of the resource type.
        self.resource_type = resource_type  # type: str
        # The English name of the resource type.
        self.type_name_en = type_name_en  # type: str
        # The Chinese name of the resource type.
        self.type_name_zh = type_name_zh  # type: str
        # The URL of the resource type in the console.
        self.type_page_link = type_page_link  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.type_name_en is not None:
            result['TypeNameEn'] = self.type_name_en
        if self.type_name_zh is not None:
            result['TypeNameZh'] = self.type_name_zh
        if self.type_page_link is not None:
            result['TypePageLink'] = self.type_page_link
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('TypeNameEn') is not None:
            self.type_name_en = m.get('TypeNameEn')
        if m.get('TypeNameZh') is not None:
            self.type_name_zh = m.get('TypeNameZh')
        if m.get('TypePageLink') is not None:
            self.type_page_link = m.get('TypePageLink')
        return self


class ListSupportedProductsResponseBodyProducts(TeaModel):
    def __init__(self, product_name_en=None, product_name_zh=None, resource_type_list=None):
        # The English name of the cloud service.
        self.product_name_en = product_name_en  # type: str
        # The Chinese name of the cloud service.
        self.product_name_zh = product_name_zh  # type: str
        # The resource types that are supported by Cloud Config.
        self.resource_type_list = resource_type_list  # type: list[ListSupportedProductsResponseBodyProductsResourceTypeList]

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

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

        result = dict()
        if self.product_name_en is not None:
            result['ProductNameEn'] = self.product_name_en
        if self.product_name_zh is not None:
            result['ProductNameZh'] = self.product_name_zh
        result['ResourceTypeList'] = []
        if self.resource_type_list is not None:
            for k in self.resource_type_list:
                result['ResourceTypeList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ProductNameEn') is not None:
            self.product_name_en = m.get('ProductNameEn')
        if m.get('ProductNameZh') is not None:
            self.product_name_zh = m.get('ProductNameZh')
        self.resource_type_list = []
        if m.get('ResourceTypeList') is not None:
            for k in m.get('ResourceTypeList'):
                temp_model = ListSupportedProductsResponseBodyProductsResourceTypeList()
                self.resource_type_list.append(temp_model.from_map(k))
        return self


class ListSupportedProductsResponseBody(TeaModel):
    def __init__(self, max_results=None, next_token=None, products=None, request_id=None):
        # The maximum number of entries returned for a single request. Valid values: 1 to 500.
        self.max_results = max_results  # type: str
        # A pagination token. It can be used in the next request to retrieve a new page of results.
        self.next_token = next_token  # type: str
        # The cloud services that are supported by Cloud Config.
        self.products = products  # type: list[ListSupportedProductsResponseBodyProducts]
        # The request ID.
        self.request_id = request_id  # type: str

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

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

        result = dict()
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        result['Products'] = []
        if self.products is not None:
            for k in self.products:
                result['Products'].append(k.to_map() if k else None)
        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('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        self.products = []
        if m.get('Products') is not None:
            for k in m.get('Products'):
                temp_model = ListSupportedProductsResponseBodyProducts()
                self.products.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class ListSupportedProductsResponse(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: ListSupportedProductsResponseBody

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

    def to_map(self):
        _map = super(ListSupportedProductsResponse, 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 = ListSupportedProductsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListTagResourcesRequestTag(TeaModel):
    def __init__(self, key=None, value=None):
        # The key of the tag that is added to the resource.
        # 
        # You can add up to 20 tag keys to a resource.
        self.key = key  # type: str
        # The value of the tag that is added to the resource.
        # 
        # You can add up to 20 tag values to a resource.
        self.value = value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListTagResourcesRequestTag, 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 ListTagResourcesRequest(TeaModel):
    def __init__(self, next_token=None, region_id=None, resource_id=None, resource_type=None, tag=None):
        # The pagination token that is used in the next request to retrieve a new page of results.
        self.next_token = next_token  # type: str
        # The region ID of the tag.
        self.region_id = region_id  # type: str
        # The resource ID.
        # 
        # You can add tags to up to 50 resources.
        self.resource_id = resource_id  # type: list[str]
        # The resource type. Valid values:
        # 
        # *   `ACS::Config::Rule`
        # *   `ACS::Config::AggregateConfigRule`
        # *   `ACS::Config::Aggregator`
        # *   `ACS::Config::CompliancePack`
        # *   `ACS::Config::AggregateCompliancePack`
        self.resource_type = resource_type  # type: str
        # The tags of the resource.
        # 
        # You can add up to 20 tags to a resource.
        self.tag = tag  # type: list[ListTagResourcesRequestTag]

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

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

        result = dict()
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.region_id is not None:
            result['RegionId'] = self.region_id
        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('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('RegionId') is not None:
            self.region_id = m.get('RegionId')
        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 = ListTagResourcesRequestTag()
                self.tag.append(temp_model.from_map(k))
        return self


class ListTagResourcesShrinkRequest(TeaModel):
    def __init__(self, next_token=None, region_id=None, resource_id=None, resource_type=None, tag_shrink=None):
        # The pagination token that is used in the next request to retrieve a new page of results.
        self.next_token = next_token  # type: str
        # The region ID of the tag.
        self.region_id = region_id  # type: str
        # The resource ID.
        # 
        # You can add tags to up to 50 resources.
        self.resource_id = resource_id  # type: list[str]
        # The resource type. Valid values:
        # 
        # *   `ACS::Config::Rule`
        # *   `ACS::Config::AggregateConfigRule`
        # *   `ACS::Config::Aggregator`
        # *   `ACS::Config::CompliancePack`
        # *   `ACS::Config::AggregateCompliancePack`
        self.resource_type = resource_type  # type: str
        # The tags of the resource.
        # 
        # You can add up to 20 tags to a resource.
        self.tag_shrink = tag_shrink  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.region_id is not None:
            result['RegionId'] = self.region_id
        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_shrink is not None:
            result['Tag'] = self.tag_shrink
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('RegionId') is not None:
            self.region_id = m.get('RegionId')
        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('Tag') is not None:
            self.tag_shrink = m.get('Tag')
        return self


class ListTagResourcesResponseBodyTagResourcesTagResource(TeaModel):
    def __init__(self, resource_id=None, resource_type=None, tag_key=None, tag_value=None):
        # The resource ID.
        self.resource_id = resource_id  # type: str
        # The resource type.
        self.resource_type = resource_type  # type: str
        # The tag key.
        self.tag_key = tag_key  # type: str
        # The tag value.
        self.tag_value = tag_value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(ListTagResourcesResponseBodyTagResourcesTagResource, 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
        if self.tag_key is not None:
            result['TagKey'] = self.tag_key
        if self.tag_value is not None:
            result['TagValue'] = self.tag_value
        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')
        if m.get('TagKey') is not None:
            self.tag_key = m.get('TagKey')
        if m.get('TagValue') is not None:
            self.tag_value = m.get('TagValue')
        return self


class ListTagResourcesResponseBodyTagResources(TeaModel):
    def __init__(self, tag_resource=None):
        self.tag_resource = tag_resource  # type: list[ListTagResourcesResponseBodyTagResourcesTagResource]

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

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

        result = dict()
        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()
        self.tag_resource = []
        if m.get('TagResource') is not None:
            for k in m.get('TagResource'):
                temp_model = ListTagResourcesResponseBodyTagResourcesTagResource()
                self.tag_resource.append(temp_model.from_map(k))
        return self


class ListTagResourcesResponseBody(TeaModel):
    def __init__(self, next_token=None, request_id=None, tag_resources=None):
        # A pagination token. It can be used in the next request to retrieve a new page of results.
        # 
        # > If NextToken is empty, no next page exists.
        self.next_token = next_token  # type: str
        # The request ID.
        self.request_id = request_id  # type: str
        # The tags of the resource.
        self.tag_resources = tag_resources  # type: ListTagResourcesResponseBodyTagResources

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

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

        result = dict()
        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.tag_resources is not None:
            result['TagResources'] = self.tag_resources.to_map()
        return result

    def from_map(self, m=None):
        m = m or dict()
        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('TagResources') is not None:
            temp_model = ListTagResourcesResponseBodyTagResources()
            self.tag_resources = temp_model.from_map(m['TagResources'])
        return self


class ListTagResourcesResponse(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: ListTagResourcesResponseBody

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

    def to_map(self):
        _map = super(ListTagResourcesResponse, 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 = ListTagResourcesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class PutEvaluationsRequest(TeaModel):
    def __init__(self, delete_mode=None, evaluations=None, result_token=None):
        # Specifies whether to enable the delete mode. Valid values:
        # 
        # *   true: enables the delete mode
        # *   false (default): disables the delete mode
        # 
        # > This parameter is valid only when you manually trigger or periodically trigger custom rules to evaluate resources. If you enable the delete mode, the evaluation results that are not updated during the current evaluation are automatically deleted.
        self.delete_mode = delete_mode  # type: bool
        # The evaluation results.
        self.evaluations = evaluations  # type: str
        # The callback token. When Cloud Config triggers a custom rule to evaluate resources, the token information is sent to Function Compute as an input parameter. The token must be specified when you submit the evaluation results.
        self.result_token = result_token  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.delete_mode is not None:
            result['DeleteMode'] = self.delete_mode
        if self.evaluations is not None:
            result['Evaluations'] = self.evaluations
        if self.result_token is not None:
            result['ResultToken'] = self.result_token
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('DeleteMode') is not None:
            self.delete_mode = m.get('DeleteMode')
        if m.get('Evaluations') is not None:
            self.evaluations = m.get('Evaluations')
        if m.get('ResultToken') is not None:
            self.result_token = m.get('ResultToken')
        return self


class PutEvaluationsResponseBody(TeaModel):
    def __init__(self, request_id=None, result=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # The submission status of the evaluation results of the custom rule. Valid values:
        # 
        # *   true: The evaluation results are submitted.
        # *   false: The evaluation results failed to be submitted.
        self.result = result  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.result is not None:
            result['Result'] = self.result
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Result') is not None:
            self.result = m.get('Result')
        return self


class PutEvaluationsResponse(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: PutEvaluationsResponseBody

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

    def to_map(self):
        _map = super(PutEvaluationsResponse, 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 = PutEvaluationsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class RevertAggregateEvaluationResultsRequestResources(TeaModel):
    def __init__(self, region=None, resource_account_id=None, resource_id=None, resource_type=None):
        # The ID of the region where the resource resides.
        # 
        # For more information about how to obtain the ID of a region, see [ListAggregateDiscoveredResources](~~265983~~).
        self.region = region  # type: str
        # The ID of the Alibaba Cloud account to which the resource belongs.
        # 
        # > You must specify the ID of the current management account or a member account in the account group of the management account.
        self.resource_account_id = resource_account_id  # type: long
        # The resource ID.
        # 
        # For more information about how to query the ID of a resource, see [ListAggregateDiscoveredResources](~~265983~~).
        self.resource_id = resource_id  # type: str
        # The type of resource.
        # 
        # For more information about how to obtain the type of a resource, see [ListAggregateDiscoveredResources](~~265983~~).
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        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')
        return self


class RevertAggregateEvaluationResultsRequest(TeaModel):
    def __init__(self, aggregator_id=None, config_rule_id=None, resources=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the rule in the account group.
        self.config_rule_id = config_rule_id  # type: str
        # The resources that you want to re-evaluate.
        self.resources = resources  # type: list[RevertAggregateEvaluationResultsRequestResources]

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

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        result['Resources'] = []
        if self.resources is not None:
            for k in self.resources:
                result['Resources'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        self.resources = []
        if m.get('Resources') is not None:
            for k in m.get('Resources'):
                temp_model = RevertAggregateEvaluationResultsRequestResources()
                self.resources.append(temp_model.from_map(k))
        return self


class RevertAggregateEvaluationResultsShrinkRequest(TeaModel):
    def __init__(self, aggregator_id=None, config_rule_id=None, resources_shrink=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the rule in the account group.
        self.config_rule_id = config_rule_id  # type: str
        # The resources that you want to re-evaluate.
        self.resources_shrink = resources_shrink  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.resources_shrink is not None:
            result['Resources'] = self.resources_shrink
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('Resources') is not None:
            self.resources_shrink = m.get('Resources')
        return self


class RevertAggregateEvaluationResultsResponseBody(TeaModel):
    def __init__(self, request_id=None):
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        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('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class RevertAggregateEvaluationResultsResponse(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: RevertAggregateEvaluationResultsResponseBody

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

    def to_map(self):
        _map = super(RevertAggregateEvaluationResultsResponse, 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 = RevertAggregateEvaluationResultsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class RevertEvaluationResultsRequestResources(TeaModel):
    def __init__(self, region=None, resource_account_id=None, resource_id=None, resource_type=None):
        # The ID of the region in which the resource resides.
        # 
        # For more information about how to obtain the ID of the region in which a resource resides, see [ListDiscoveredResources](~~169620~~).
        self.region = region  # type: str
        # The ID of the Alibaba Cloud account to which the resource belongs.
        self.resource_account_id = resource_account_id  # type: long
        # The resource ID.
        # 
        # For more information about how to obtain the ID of a resource, see [ListDiscoveredResources](~~169620~~).
        self.resource_id = resource_id  # type: str
        # The resource type.
        # 
        # For more information about how to query the type of a resource, see [ListDiscoveredResources](~~169620~~).
        self.resource_type = resource_type  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.region is not None:
            result['Region'] = self.region
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('Region') is not None:
            self.region = m.get('Region')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        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')
        return self


class RevertEvaluationResultsRequest(TeaModel):
    def __init__(self, config_rule_id=None, resources=None):
        # The rule ID.
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_id = config_rule_id  # type: str
        # The resources that are to be re-evaluated.
        self.resources = resources  # type: list[RevertEvaluationResultsRequestResources]

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

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        result['Resources'] = []
        if self.resources is not None:
            for k in self.resources:
                result['Resources'].append(k.to_map() if k else None)
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        self.resources = []
        if m.get('Resources') is not None:
            for k in m.get('Resources'):
                temp_model = RevertEvaluationResultsRequestResources()
                self.resources.append(temp_model.from_map(k))
        return self


class RevertEvaluationResultsShrinkRequest(TeaModel):
    def __init__(self, config_rule_id=None, resources_shrink=None):
        # The rule ID.
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_id = config_rule_id  # type: str
        # The resources that are to be re-evaluated.
        self.resources_shrink = resources_shrink  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.resources_shrink is not None:
            result['Resources'] = self.resources_shrink
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('Resources') is not None:
            self.resources_shrink = m.get('Resources')
        return self


class RevertEvaluationResultsResponseBody(TeaModel):
    def __init__(self, request_id=None):
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        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('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class RevertEvaluationResultsResponse(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: RevertEvaluationResultsResponseBody

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

    def to_map(self):
        _map = super(RevertEvaluationResultsResponse, 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 = RevertEvaluationResultsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class StartAggregateConfigRuleEvaluationRequest(TeaModel):
    def __init__(self, aggregator_id=None, compliance_pack_id=None, config_rule_id=None, revert_evaluation=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        # 
        # > You must configure either the `CompliancePackId` or `ConfigRuleId` parameter.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The rule ID.
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_id = config_rule_id  # type: str
        # Specifies whether to re-evaluate the ignored incompliant resource. Valid values:
        # 
        # *   true: The ignored incompliant resource based on the rule are re-evaluated.
        # *   false: The ignored incompliant resource based on the rule are not re-evaluated.
        self.revert_evaluation = revert_evaluation  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.revert_evaluation is not None:
            result['RevertEvaluation'] = self.revert_evaluation
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('RevertEvaluation') is not None:
            self.revert_evaluation = m.get('RevertEvaluation')
        return self


class StartAggregateConfigRuleEvaluationResponseBody(TeaModel):
    def __init__(self, request_id=None, result=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # Indicates whether the involved resources were evaluated. Valid values:
        # 
        # *   true: The involved resources were evaluated.
        # *   false: The involved resources were not evaluated
        self.result = result  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.result is not None:
            result['Result'] = self.result
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Result') is not None:
            self.result = m.get('Result')
        return self


class StartAggregateConfigRuleEvaluationResponse(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: StartAggregateConfigRuleEvaluationResponseBody

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

    def to_map(self):
        _map = super(StartAggregateConfigRuleEvaluationResponse, 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 = StartAggregateConfigRuleEvaluationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class StartAggregateRemediationRequest(TeaModel):
    def __init__(self, aggregator_id=None, config_rule_id=None, resource_account_id=None):
        # The ID of the account group.
        # 
        # For information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The rule ID.
        # 
        # For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_id = config_rule_id  # type: str
        # The ID of the Alibaba Cloud account to which the resources to be remediated belong. If this parameter is left empty, non-compliant resources of all accounts in the account group are remediated.
        # 
        # > You must specify the ID of the current management account or a member account in the account group of the management account.
        self.resource_account_id = resource_account_id  # type: long

    def validate(self):
        pass

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

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.resource_account_id is not None:
            result['ResourceAccountId'] = self.resource_account_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ResourceAccountId') is not None:
            self.resource_account_id = m.get('ResourceAccountId')
        return self


class StartAggregateRemediationResponseBody(TeaModel):
    def __init__(self, data=None, request_id=None):
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true
        # *   false
        self.data = data  # type: bool
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

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

        result = dict()
        if self.data is not None:
            result['Data'] = self.data
        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('Data') is not None:
            self.data = m.get('Data')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class StartAggregateRemediationResponse(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: StartAggregateRemediationResponseBody

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

    def to_map(self):
        _map = super(StartAggregateRemediationResponse, 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 = StartAggregateRemediationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class StartConfigRuleEvaluationRequest(TeaModel):
    def __init__(self, compliance_pack_id=None, config_rule_id=None, revert_evaluation=None):
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListCompliancePacks](~~606968~~).
        # 
        # >  You must set either the CompliancePackId or ConfigRuleId parameter.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The rule ID.
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~609222~~).
        self.config_rule_id = config_rule_id  # type: str
        # Specifies whether to re-evaluate ignored non-compliant resources. Valid values:
        # 
        # *   true: re-evaluates ignored non-compliant resources based on the rule.
        # *   false: continues to ignore non-compliant resources.
        self.revert_evaluation = revert_evaluation  # type: bool

    def validate(self):
        pass

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

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.revert_evaluation is not None:
            result['RevertEvaluation'] = self.revert_evaluation
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('RevertEvaluation') is not None:
            self.revert_evaluation = m.get('RevertEvaluation')
        return self


class StartConfigRuleEvaluationResponseBody(TeaModel):
    def __init__(self, request_id=None, result=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # Indicates whether the operation is successful. Valid values:
        # 
        # *   true
        # *   false
        self.result = result  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(StartConfigRuleEvaluationResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.result is not None:
            result['Result'] = self.result
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Result') is not None:
            self.result = m.get('Result')
        return self


class StartConfigRuleEvaluationResponse(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: StartConfigRuleEvaluationResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(StartConfigRuleEvaluationResponse, 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 = StartConfigRuleEvaluationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class StartConfigurationRecorderResponseBodyConfigurationRecorder(TeaModel):
    def __init__(self, configuration_recorder_status=None, resource_types=None):
        # The status of the configuration recorder. Valid values:
        # 
        # *   REGISTRABLE: The configuration recorder has not been registered.
        # *   BUILDING: The configuration recorder is being deployed.
        # *   REGISTERED: The configuration recorder has been registered.
        # *   REBUILDING: The configuration recorder is being redeployed.
        self.configuration_recorder_status = configuration_recorder_status  # type: str
        # The types of the resources that are monitored by Cloud Config.
        self.resource_types = resource_types  # type: list[str]

    def validate(self):
        pass

    def to_map(self):
        _map = super(StartConfigurationRecorderResponseBodyConfigurationRecorder, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.configuration_recorder_status is not None:
            result['ConfigurationRecorderStatus'] = self.configuration_recorder_status
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigurationRecorderStatus') is not None:
            self.configuration_recorder_status = m.get('ConfigurationRecorderStatus')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        return self


class StartConfigurationRecorderResponseBody(TeaModel):
    def __init__(self, configuration_recorder=None, request_id=None):
        # The details of the configuration recorder.
        self.configuration_recorder = configuration_recorder  # type: StartConfigurationRecorderResponseBodyConfigurationRecorder
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        if self.configuration_recorder:
            self.configuration_recorder.validate()

    def to_map(self):
        _map = super(StartConfigurationRecorderResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.configuration_recorder is not None:
            result['ConfigurationRecorder'] = self.configuration_recorder.to_map()
        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('ConfigurationRecorder') is not None:
            temp_model = StartConfigurationRecorderResponseBodyConfigurationRecorder()
            self.configuration_recorder = temp_model.from_map(m['ConfigurationRecorder'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class StartConfigurationRecorderResponse(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: StartConfigurationRecorderResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(StartConfigurationRecorderResponse, 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 = StartConfigurationRecorderResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class StartRemediationRequest(TeaModel):
    def __init__(self, config_rule_id=None):
        # The rule ID.
        # 
        # For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_id = config_rule_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(StartRemediationRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        return self


class StartRemediationResponseBody(TeaModel):
    def __init__(self, data=None, request_id=None):
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true: The request was successful.
        # *   false: The request failed.
        self.data = data  # type: bool
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(StartRemediationResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.data is not None:
            result['Data'] = self.data
        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('Data') is not None:
            self.data = m.get('Data')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class StartRemediationResponse(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: StartRemediationResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(StartRemediationResponse, 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 = StartRemediationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class StopConfigurationRecorderResponseBody(TeaModel):
    def __init__(self, request_id=None, stop_configuration_recorder_result=None):
        # The request ID.
        self.request_id = request_id  # type: str
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true: The request was successful.
        # *   false: The request failed.
        self.stop_configuration_recorder_result = stop_configuration_recorder_result  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(StopConfigurationRecorderResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.stop_configuration_recorder_result is not None:
            result['StopConfigurationRecorderResult'] = self.stop_configuration_recorder_result
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('StopConfigurationRecorderResult') is not None:
            self.stop_configuration_recorder_result = m.get('StopConfigurationRecorderResult')
        return self


class StopConfigurationRecorderResponse(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: StopConfigurationRecorderResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(StopConfigurationRecorderResponse, 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 = StopConfigurationRecorderResponseBody()
            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 that is added to the resource.
        # 
        # You can add up to 20 tag keys to a resource.
        self.key = key  # type: str
        # The value of the tag that is added to the resource.
        # 
        # You can add up to 20 tag values to a resource.
        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, region_id=None, resource_id=None, resource_type=None, tag=None):
        # The region ID of the tags.
        self.region_id = region_id  # type: str
        # The resource IDs. You can add tags to up to 50 resources.
        self.resource_id = resource_id  # type: list[str]
        # The resource type. Valid values:
        # 
        # *   `ACS::Config::Rule`
        # *   `ACS::Config::AggregateConfigRule`
        # *   `ACS::Config::Aggregator`
        # *   `ACS::Config::CompliancePack`
        # *   `ACS::Config::AggregateCompliancePack`
        self.resource_type = resource_type  # type: str
        # The tag value of the resource.
        # 
        # You can specify up to 20 tag values.
        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.region_id is not None:
            result['RegionId'] = self.region_id
        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('RegionId') is not None:
            self.region_id = m.get('RegionId')
        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 TagResourcesShrinkRequest(TeaModel):
    def __init__(self, region_id=None, resource_id=None, resource_type=None, tag_shrink=None):
        # The region ID of the tags.
        self.region_id = region_id  # type: str
        # The resource IDs. You can add tags to up to 50 resources.
        self.resource_id = resource_id  # type: list[str]
        # The resource type. Valid values:
        # 
        # *   `ACS::Config::Rule`
        # *   `ACS::Config::AggregateConfigRule`
        # *   `ACS::Config::Aggregator`
        # *   `ACS::Config::CompliancePack`
        # *   `ACS::Config::AggregateCompliancePack`
        self.resource_type = resource_type  # type: str
        # The tag value of the resource.
        # 
        # You can specify up to 20 tag values.
        self.tag_shrink = tag_shrink  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(TagResourcesShrinkRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.region_id is not None:
            result['RegionId'] = self.region_id
        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_shrink is not None:
            result['Tag'] = self.tag_shrink
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('RegionId') is not None:
            self.region_id = m.get('RegionId')
        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('Tag') is not None:
            self.tag_shrink = m.get('Tag')
        return self


class TagResourcesResponseBody(TeaModel):
    def __init__(self, request_id=None):
        # The request ID.
        self.request_id = request_id  # type: str

    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.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('RequestId') is not None:
            self.request_id = m.get('RequestId')
        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):
        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 UntagResourcesRequest(TeaModel):
    def __init__(self, all=None, region_id=None, resource_id=None, resource_type=None, tag_key=None):
        # Specifies whether to remove all tags from the resource. Valid values:
        # 
        # *   true: All tags are removed from the resource.
        # *   false (default): The specified tags are removed from the resource.
        self.all = all  # type: bool
        # The region ID of the tag.
        self.region_id = region_id  # type: str
        # The resource ID.
        # 
        # You can remove tags from up to 50 resources at a time.
        self.resource_id = resource_id  # type: list[str]
        # The resource type. Valid values:
        # 
        # *   `ACS::Config::Rule`
        # *   `ACS::Config::AggregateConfigRule`
        # *   `ACS::Config::Aggregator`
        # *   `ACS::Config::CompliancePack`
        # *   `ACS::Config::AggregateCompliancePack`
        self.resource_type = resource_type  # type: str
        # The tags of the resource.
        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.region_id is not None:
            result['RegionId'] = self.region_id
        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('RegionId') is not None:
            self.region_id = m.get('RegionId')
        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, request_id=None):
        # The request ID.
        self.request_id = request_id  # type: str

    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.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('RequestId') is not None:
            self.request_id = m.get('RequestId')
        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):
        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 UpdateAggregateCompliancePackRequestConfigRulesConfigRuleParameters(TeaModel):
    def __init__(self, parameter_name=None, parameter_value=None):
        # The name of the input parameter.
        # 
        # You must configure the `ParameterName` and `ParameterValue` parameters or neither of them. If the managed rule has an input parameter but no default value exists, you must configure this parameter. For more information about how to obtain the name of an input parameter for a managed rule, see [ListCompliancePackTemplates](~~261176~~).
        self.parameter_name = parameter_name  # type: str
        # The value of the input parameter.
        # 
        # You must configure the `ParameterName` and `ParameterValue` parameters or neither of them. If the managed rule has an input parameter but no default value exists you must configure this parameter. For more information about how to obtain the value of an input parameter for a managed rule, see [ListCompliancePackTemplates](~~261176~~).
        self.parameter_value = parameter_value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateAggregateCompliancePackRequestConfigRulesConfigRuleParameters, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.parameter_name is not None:
            result['ParameterName'] = self.parameter_name
        if self.parameter_value is not None:
            result['ParameterValue'] = self.parameter_value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ParameterName') is not None:
            self.parameter_name = m.get('ParameterName')
        if m.get('ParameterValue') is not None:
            self.parameter_value = m.get('ParameterValue')
        return self


class UpdateAggregateCompliancePackRequestConfigRules(TeaModel):
    def __init__(self, config_rule_id=None, config_rule_name=None, config_rule_parameters=None, description=None,
                 managed_rule_identifier=None, risk_level=None):
        # The ID of the rule. If you configure this parameter, Cloud Config adds the rule of the specified ID to the compliance package.
        # 
        # You only need to configure the `ManagedRuleIdentifier` or `ConfigRuleId` parameter. If you configure both parameters, the value of the `ConfigRuleId` parameter takes precedence. For more information about how to obtain the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_id = config_rule_id  # type: str
        # The name of the rule.
        self.config_rule_name = config_rule_name  # type: str
        # The input parameter settings of the rule.
        self.config_rule_parameters = config_rule_parameters  # type: list[UpdateAggregateCompliancePackRequestConfigRulesConfigRuleParameters]
        # The description of the rule.
        self.description = description  # type: str
        # The ID of the managed rule. Cloud Config automatically creates a managed rule based on the specified ID and adds the rule to the compliance package.
        # 
        # You only need to configure the `ManagedRuleIdentifier` or `ConfigRuleId` parameter. If you configure both parameters, the value of the `ConfigRuleId` parameter takes precedence. For more information about how to obtain the ID of a managed rule, see [ListCompliancePackTemplates](~~261176~~).
        self.managed_rule_identifier = managed_rule_identifier  # type: str
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int

    def validate(self):
        if self.config_rule_parameters:
            for k in self.config_rule_parameters:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(UpdateAggregateCompliancePackRequestConfigRules, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        result['ConfigRuleParameters'] = []
        if self.config_rule_parameters is not None:
            for k in self.config_rule_parameters:
                result['ConfigRuleParameters'].append(k.to_map() if k else None)
        if self.description is not None:
            result['Description'] = self.description
        if self.managed_rule_identifier is not None:
            result['ManagedRuleIdentifier'] = self.managed_rule_identifier
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        self.config_rule_parameters = []
        if m.get('ConfigRuleParameters') is not None:
            for k in m.get('ConfigRuleParameters'):
                temp_model = UpdateAggregateCompliancePackRequestConfigRulesConfigRuleParameters()
                self.config_rule_parameters.append(temp_model.from_map(k))
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ManagedRuleIdentifier') is not None:
            self.managed_rule_identifier = m.get('ManagedRuleIdentifier')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class UpdateAggregateCompliancePackRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, compliance_pack_id=None, compliance_pack_name=None,
                 config_rules=None, description=None, exclude_resource_ids_scope=None, region_ids_scope=None,
                 resource_group_ids_scope=None, risk_level=None, tag_key_scope=None, tag_value_scope=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The client token that you want to use to ensure the idempotency of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.``
        self.client_token = client_token  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The name of the compliance package.
        # 
        # For more information about how to obtain the name of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The rules in the compliance package.
        # 
        # If you leave this parameter empty, the rules in the compliance package remain unchanged. If you configure this parameter, Cloud Config replaces the existing rules in the compliance package with the specified rules.
        self.config_rules = config_rules  # type: list[UpdateAggregateCompliancePackRequestConfigRules]
        # The description of the compliance package.
        # 
        # For more information about how to obtain the description of a compliance package, see [ListCompliancePacks](~~262059~~).
        self.description = description  # type: str
        # The ID of the resource that you do not want to evaluate by using the compliance package. Separate multiple resource IDs with commas (,).
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the region whose resources you want to evaluate by using the compliance package. Separate multiple region IDs with commas (,).
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group whose resources you want to evaluate by using the compliance package. Separate multiple resource group IDs with commas (,).
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The risk level of the resources that are not compliant with the rules in the compliance package. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int
        # The tag key of the resource that you want to evaluate by using the compliance package.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value of the resource that you want to evaluate by using the compliance package.
        # 
        # >  You must configure the TagValueScope parameter together with the TagKeyScope parameter.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        if self.config_rules:
            for k in self.config_rules:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(UpdateAggregateCompliancePackRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        result['ConfigRules'] = []
        if self.config_rules is not None:
            for k in self.config_rules:
                result['ConfigRules'].append(k.to_map() if k else None)
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        self.config_rules = []
        if m.get('ConfigRules') is not None:
            for k in m.get('ConfigRules'):
                temp_model = UpdateAggregateCompliancePackRequestConfigRules()
                self.config_rules.append(temp_model.from_map(k))
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class UpdateAggregateCompliancePackShrinkRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, compliance_pack_id=None, compliance_pack_name=None,
                 config_rules_shrink=None, description=None, exclude_resource_ids_scope=None, region_ids_scope=None,
                 resource_group_ids_scope=None, risk_level=None, tag_key_scope=None, tag_value_scope=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The client token that you want to use to ensure the idempotency of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.``
        self.client_token = client_token  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The name of the compliance package.
        # 
        # For more information about how to obtain the name of a compliance package, see [ListAggregateCompliancePacks](~~262059~~).
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The rules in the compliance package.
        # 
        # If you leave this parameter empty, the rules in the compliance package remain unchanged. If you configure this parameter, Cloud Config replaces the existing rules in the compliance package with the specified rules.
        self.config_rules_shrink = config_rules_shrink  # type: str
        # The description of the compliance package.
        # 
        # For more information about how to obtain the description of a compliance package, see [ListCompliancePacks](~~262059~~).
        self.description = description  # type: str
        # The ID of the resource that you do not want to evaluate by using the compliance package. Separate multiple resource IDs with commas (,).
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the region whose resources you want to evaluate by using the compliance package. Separate multiple region IDs with commas (,).
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group whose resources you want to evaluate by using the compliance package. Separate multiple resource group IDs with commas (,).
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The risk level of the resources that are not compliant with the rules in the compliance package. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int
        # The tag key of the resource that you want to evaluate by using the compliance package.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value of the resource that you want to evaluate by using the compliance package.
        # 
        # >  You must configure the TagValueScope parameter together with the TagKeyScope parameter.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateAggregateCompliancePackShrinkRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        if self.config_rules_shrink is not None:
            result['ConfigRules'] = self.config_rules_shrink
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        if m.get('ConfigRules') is not None:
            self.config_rules_shrink = m.get('ConfigRules')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class UpdateAggregateCompliancePackResponseBody(TeaModel):
    def __init__(self, compliance_pack_id=None, request_id=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateAggregateCompliancePackResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class UpdateAggregateCompliancePackResponse(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: UpdateAggregateCompliancePackResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UpdateAggregateCompliancePackResponse, 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 = UpdateAggregateCompliancePackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAggregateConfigDeliveryChannelRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, configuration_item_change_notification=None,
                 configuration_snapshot=None, delivery_channel_condition=None, delivery_channel_id=None, delivery_channel_name=None,
                 delivery_channel_target_arn=None, delivery_snapshot_time=None, description=None, non_compliant_notification=None,
                 oversized_data_osstarget_arn=None, status=None):
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of the account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests.
        # 
        # The `token` can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [Ensure idempotence](~~25693~~)
        self.client_token = client_token  # type: str
        # Specifies whether to deliver resource change logs. If you set this parameter to true, Cloud Config delivers resource change logs to OSS, Log Service, or MNS when the configurations of the resources change. Valid values:
        # 
        # *   true: Cloud Config delivers resource change logs.
        # *   false (default): Cloud Config does not deliver resource change logs.
        # 
        # > This parameter is available for delivery channels of the OSS, SLS, and MNS types.
        self.configuration_item_change_notification = configuration_item_change_notification  # type: bool
        # Specifies whether to deliver scheduled resource snapshots. Cloud Config delivers scheduled resource snapshots at `04:00Z` and `16:00Z` to OSS, MNS, or Log Service every day. The time is displayed in UTC. Valid values:
        # 
        # *   true: Cloud Config delivers scheduled resource snapshots.
        # *   false (default): Cloud Config does not deliver scheduled resource snapshots.
        self.configuration_snapshot = configuration_snapshot  # type: bool
        # The rule that is attached to the delivery channel. This parameter is available when you deliver data of all types to MNS or deliver snapshots to Log Service.
        # 
        # *   If the value of the DeliveryChannelType parameter is MNS, take note of the following settings of the lowest risk level and resource types of the events to which you subscribed:
        # 
        #     *   The lowest risk level of the events to which you want to subscribe is in the following format: `{"filterType":"RuleRiskLevel","value":"1","multiple":false}`.
        # 
        #         The `value` field indicates the lowest risk level of the events to which you subscribed. Valid values: 1, 2, and 3, where 1 indicates the high risk level, 2 indicates the medium risk level, and 3 indicates the low risk level.
        # 
        #     *   The setting of the resource types of the events to which you want to subscribe is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #         The `values` field indicates the resource types of the events to which you subscribed. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        # 
        # *   If you set the DeliveryChannelType parameter to SLS, the setting of the resource types of the snapshots to which you want to deliver is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #     The `values` field specifies the resource types of the snapshots to which you want to deliver. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        self.delivery_channel_condition = delivery_channel_condition  # type: str
        # The ID of the delivery channel.
        # 
        # For more information about how to obtain the ID of a delivery channel, see [ListAggregateConfigDeliveryChannels](~~429842~~).
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The name of the delivery channel.
        self.delivery_channel_name = delivery_channel_name  # type: str
        # The ARN of the delivery destination. Valid values:
        # 
        # *   `acs:oss:{RegionId}:{accountId}:{bucketName}` if your delivery destination is an OSS bucket. Example: `acs:oss:cn-shanghai:100931896542****:new-bucket`.
        # *   `acs:mns:{RegionId}:{accountId}:/topics/{topicName}` if your delivery destination is an MNS topic. Example: `acs:mns:cn-shanghai:100931896542****:/topics/topic1`.
        # *   `acs:log:{RegionId}:{accountId}:project/{projectName}/logstore/{logstoreName}` if your delivery destination is a Log Service Logstore. Example: `acs:log:cn-shanghai:100931896542****:project/project1/logstore/logstore1`.
        self.delivery_channel_target_arn = delivery_channel_target_arn  # type: str
        # The time when Cloud Config delivers scheduled resources snapshots every day.
        # 
        # Format: `HH:mmZ`. This time is displayed in UTC.
        # 
        # > When you enable the scheduled resource delivery feature, you can specify a custom delivery time for this parameter. If you do not configure this parameter, Cloud Config automatically delivers scheduled resource snapshots at `04:00Z` and `16:00Z` every day.
        self.delivery_snapshot_time = delivery_snapshot_time  # type: str
        # The description of the delivery channel.
        self.description = description  # type: str
        # Specifies whether to deliver resource non-compliance events. If you set this parameter to true, Cloud Config delivers resource non-compliance events to Log Service or MNS when resources are considered non-compliant. Valid values:
        # 
        # *   true: Cloud Config delivers resource non-compliance events.
        # *   false (default): Cloud Config does not deliver resource non-compliance events.
        # 
        # > This parameter is available only for delivery channels of the SLS or MNS type.
        self.non_compliant_notification = non_compliant_notification  # type: bool
        # The ARN of the OSS bucket to which the delivered data is transferred when the size of the data exceeds the specified upper limit of the delivery channel. Format: `acs:oss:{RegionId}:{accountId}:{bucketName}`.
        # 
        # If you do not configure this parameter, Cloud Config delivers only summary data.
        # 
        # > This parameter is available only for delivery channels of the SLS or MNS type. The upper limit on the storage size of delivery channels of the SLS type is 1 MB, and the upper limit on the storage size of delivery channels of the MNS type is 64 KB.
        self.oversized_data_osstarget_arn = oversized_data_osstarget_arn  # type: str
        # Specifies whether to enable the delivery channel. Valid values:
        # 
        # *   0: The delivery channel is disabled. Cloud Config retains the most recent delivery configuration and stops resource data delivery.
        # *   1 (default): The delivery channel is enabled.
        self.status = status  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateAggregateConfigDeliveryChannelRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.configuration_item_change_notification is not None:
            result['ConfigurationItemChangeNotification'] = self.configuration_item_change_notification
        if self.configuration_snapshot is not None:
            result['ConfigurationSnapshot'] = self.configuration_snapshot
        if self.delivery_channel_condition is not None:
            result['DeliveryChannelCondition'] = self.delivery_channel_condition
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_id
        if self.delivery_channel_name is not None:
            result['DeliveryChannelName'] = self.delivery_channel_name
        if self.delivery_channel_target_arn is not None:
            result['DeliveryChannelTargetArn'] = self.delivery_channel_target_arn
        if self.delivery_snapshot_time is not None:
            result['DeliverySnapshotTime'] = self.delivery_snapshot_time
        if self.description is not None:
            result['Description'] = self.description
        if self.non_compliant_notification is not None:
            result['NonCompliantNotification'] = self.non_compliant_notification
        if self.oversized_data_osstarget_arn is not None:
            result['OversizedDataOSSTargetArn'] = self.oversized_data_osstarget_arn
        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('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('ConfigurationItemChangeNotification') is not None:
            self.configuration_item_change_notification = m.get('ConfigurationItemChangeNotification')
        if m.get('ConfigurationSnapshot') is not None:
            self.configuration_snapshot = m.get('ConfigurationSnapshot')
        if m.get('DeliveryChannelCondition') is not None:
            self.delivery_channel_condition = m.get('DeliveryChannelCondition')
        if m.get('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('DeliveryChannelName') is not None:
            self.delivery_channel_name = m.get('DeliveryChannelName')
        if m.get('DeliveryChannelTargetArn') is not None:
            self.delivery_channel_target_arn = m.get('DeliveryChannelTargetArn')
        if m.get('DeliverySnapshotTime') is not None:
            self.delivery_snapshot_time = m.get('DeliverySnapshotTime')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('NonCompliantNotification') is not None:
            self.non_compliant_notification = m.get('NonCompliantNotification')
        if m.get('OversizedDataOSSTargetArn') is not None:
            self.oversized_data_osstarget_arn = m.get('OversizedDataOSSTargetArn')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class UpdateAggregateConfigDeliveryChannelResponseBody(TeaModel):
    def __init__(self, delivery_channel_id=None, request_id=None):
        # The ID of the delivery channel.
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateAggregateConfigDeliveryChannelResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_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('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class UpdateAggregateConfigDeliveryChannelResponse(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: UpdateAggregateConfigDeliveryChannelResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UpdateAggregateConfigDeliveryChannelResponse, 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 = UpdateAggregateConfigDeliveryChannelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAggregateConfigRuleRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, config_rule_id=None, config_rule_name=None,
                 config_rule_trigger_types=None, description=None, exclude_account_ids_scope=None, exclude_folder_ids_scope=None,
                 exclude_resource_ids_scope=None, folder_ids_scope=None, input_parameters=None, maximum_execution_frequency=None,
                 region_ids_scope=None, resource_group_ids_scope=None, resource_types_scope=None, risk_level=None,
                 tag_key_logic_scope=None, tag_key_scope=None, tag_value_scope=None):
        # The ID of the account group.
        # 
        # For more information about how to query the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # 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 make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The ID of the rule.
        # 
        # For more information about how to query the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_id = config_rule_id  # type: str
        # The name of the rule.
        # 
        # For more information about how to query the name of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_name = config_rule_name  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
        # *   ScheduledNotification: The rule is periodically triggered.
        # 
        # >  This parameter applies only to a custom rule.
        self.config_rule_trigger_types = config_rule_trigger_types  # type: str
        # The description of the rule.
        self.description = description  # type: str
        # The ID of the member account to which the rule does not apply, which means that the resources within the member account are not evaluated based on the rule. Separate multiple member account IDs with commas (,).
        # 
        # >  This parameter applies only to a managed rule.
        self.exclude_account_ids_scope = exclude_account_ids_scope  # type: str
        # The ID of the resource directory to which the rule does not apply, which means that the resources within member accounts in the resource directory are not evaluated based on the rule. Separate multiple resource directory IDs with commas (,).
        # 
        # > 
        # *   This parameter applies only to a rule of a global account group.
        # *   This parameter applies only to a managed rule.
        self.exclude_folder_ids_scope = exclude_folder_ids_scope  # type: str
        # The ID of the resource to be excluded from the compliance evaluations performed by the rule. Separate multiple resource IDs with commas (,).
        # 
        # >  This parameter applies only to a managed rule.
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the resource directory to which the rule applies, which means that the resources within member accounts in the resource directory are evaluated based on the rule.
        # 
        # > 
        # *   This parameter applies only to a rule of a global account group.
        # *   This parameter applies only to a managed rule.
        self.folder_ids_scope = folder_ids_scope  # type: str
        # The input parameters of the rule.
        self.input_parameters = input_parameters  # type: dict[str, any]
        # The intervals at which the rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour
        # *   Three_Hours: 3 hours
        # *   Six_Hours: 6 hours
        # *   Twelve_Hours: 12 hours
        # *   TwentyFour_Hours: 24 hours
        # 
        # >  This parameter is required if the `ConfigRuleTriggerTypes` parameter is set to `ScheduledNotification`.
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The ID of the region to which the rule applies. Separate multiple region IDs with commas (,).
        # 
        # >  This parameter applies only to a managed rule.
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group to which the rule applies. Separate multiple resource group IDs with commas (,).
        # 
        # >  This parameter applies only to a managed rule.
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The type of the resource to be evaluated by the rule. Separate multiple resource types with commas (,).
        self.resource_types_scope = resource_types_scope  # type: list[str]
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int
        # The logical relationship among the tag keys if you specify multiple tag keys for the `TagKeyScope` parameter. For example, if you set the `TagKeyScope` parameter to `ECS,OSS` and the TagKeyLogicScope parameter to `AND`, the rule applies to resources with both the `ECS` and `OSS` tag keys. Valid values:
        # 
        # *   AND
        # *   OR
        self.tag_key_logic_scope = tag_key_logic_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with the specified tag key.
        # 
        # >  This parameter applies only to a managed rule. You must set the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value used to filter resources. The rule applies only to the resources with the specified tag value.
        # 
        # >  This parameter applies only to a managed rule. You must set the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateAggregateConfigRuleRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_trigger_types is not None:
            result['ConfigRuleTriggerTypes'] = self.config_rule_trigger_types
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_account_ids_scope is not None:
            result['ExcludeAccountIdsScope'] = self.exclude_account_ids_scope
        if self.exclude_folder_ids_scope is not None:
            result['ExcludeFolderIdsScope'] = self.exclude_folder_ids_scope
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.folder_ids_scope is not None:
            result['FolderIdsScope'] = self.folder_ids_scope
        if self.input_parameters is not None:
            result['InputParameters'] = self.input_parameters
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.resource_types_scope is not None:
            result['ResourceTypesScope'] = self.resource_types_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.tag_key_logic_scope is not None:
            result['TagKeyLogicScope'] = self.tag_key_logic_scope
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleTriggerTypes') is not None:
            self.config_rule_trigger_types = m.get('ConfigRuleTriggerTypes')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeAccountIdsScope') is not None:
            self.exclude_account_ids_scope = m.get('ExcludeAccountIdsScope')
        if m.get('ExcludeFolderIdsScope') is not None:
            self.exclude_folder_ids_scope = m.get('ExcludeFolderIdsScope')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('FolderIdsScope') is not None:
            self.folder_ids_scope = m.get('FolderIdsScope')
        if m.get('InputParameters') is not None:
            self.input_parameters = m.get('InputParameters')
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('TagKeyLogicScope') is not None:
            self.tag_key_logic_scope = m.get('TagKeyLogicScope')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class UpdateAggregateConfigRuleShrinkRequest(TeaModel):
    def __init__(self, aggregator_id=None, client_token=None, config_rule_id=None, config_rule_name=None,
                 config_rule_trigger_types=None, description=None, exclude_account_ids_scope=None, exclude_folder_ids_scope=None,
                 exclude_resource_ids_scope=None, folder_ids_scope=None, input_parameters_shrink=None, maximum_execution_frequency=None,
                 region_ids_scope=None, resource_group_ids_scope=None, resource_types_scope_shrink=None, risk_level=None,
                 tag_key_logic_scope=None, tag_key_scope=None, tag_value_scope=None):
        # The ID of the account group.
        # 
        # For more information about how to query the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # 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 make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The ID of the rule.
        # 
        # For more information about how to query the ID of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_id = config_rule_id  # type: str
        # The name of the rule.
        # 
        # For more information about how to query the name of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_name = config_rule_name  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
        # *   ScheduledNotification: The rule is periodically triggered.
        # 
        # >  This parameter applies only to a custom rule.
        self.config_rule_trigger_types = config_rule_trigger_types  # type: str
        # The description of the rule.
        self.description = description  # type: str
        # The ID of the member account to which the rule does not apply, which means that the resources within the member account are not evaluated based on the rule. Separate multiple member account IDs with commas (,).
        # 
        # >  This parameter applies only to a managed rule.
        self.exclude_account_ids_scope = exclude_account_ids_scope  # type: str
        # The ID of the resource directory to which the rule does not apply, which means that the resources within member accounts in the resource directory are not evaluated based on the rule. Separate multiple resource directory IDs with commas (,).
        # 
        # > 
        # *   This parameter applies only to a rule of a global account group.
        # *   This parameter applies only to a managed rule.
        self.exclude_folder_ids_scope = exclude_folder_ids_scope  # type: str
        # The ID of the resource to be excluded from the compliance evaluations performed by the rule. Separate multiple resource IDs with commas (,).
        # 
        # >  This parameter applies only to a managed rule.
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the resource directory to which the rule applies, which means that the resources within member accounts in the resource directory are evaluated based on the rule.
        # 
        # > 
        # *   This parameter applies only to a rule of a global account group.
        # *   This parameter applies only to a managed rule.
        self.folder_ids_scope = folder_ids_scope  # type: str
        # The input parameters of the rule.
        self.input_parameters_shrink = input_parameters_shrink  # type: str
        # The intervals at which the rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour
        # *   Three_Hours: 3 hours
        # *   Six_Hours: 6 hours
        # *   Twelve_Hours: 12 hours
        # *   TwentyFour_Hours: 24 hours
        # 
        # >  This parameter is required if the `ConfigRuleTriggerTypes` parameter is set to `ScheduledNotification`.
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The ID of the region to which the rule applies. Separate multiple region IDs with commas (,).
        # 
        # >  This parameter applies only to a managed rule.
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group to which the rule applies. Separate multiple resource group IDs with commas (,).
        # 
        # >  This parameter applies only to a managed rule.
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The type of the resource to be evaluated by the rule. Separate multiple resource types with commas (,).
        self.resource_types_scope_shrink = resource_types_scope_shrink  # type: str
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int
        # The logical relationship among the tag keys if you specify multiple tag keys for the `TagKeyScope` parameter. For example, if you set the `TagKeyScope` parameter to `ECS,OSS` and the TagKeyLogicScope parameter to `AND`, the rule applies to resources with both the `ECS` and `OSS` tag keys. Valid values:
        # 
        # *   AND
        # *   OR
        self.tag_key_logic_scope = tag_key_logic_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with the specified tag key.
        # 
        # >  This parameter applies only to a managed rule. You must set the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value used to filter resources. The rule applies only to the resources with the specified tag value.
        # 
        # >  This parameter applies only to a managed rule. You must set the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateAggregateConfigRuleShrinkRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_trigger_types is not None:
            result['ConfigRuleTriggerTypes'] = self.config_rule_trigger_types
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_account_ids_scope is not None:
            result['ExcludeAccountIdsScope'] = self.exclude_account_ids_scope
        if self.exclude_folder_ids_scope is not None:
            result['ExcludeFolderIdsScope'] = self.exclude_folder_ids_scope
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.folder_ids_scope is not None:
            result['FolderIdsScope'] = self.folder_ids_scope
        if self.input_parameters_shrink is not None:
            result['InputParameters'] = self.input_parameters_shrink
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.resource_types_scope_shrink is not None:
            result['ResourceTypesScope'] = self.resource_types_scope_shrink
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.tag_key_logic_scope is not None:
            result['TagKeyLogicScope'] = self.tag_key_logic_scope
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleTriggerTypes') is not None:
            self.config_rule_trigger_types = m.get('ConfigRuleTriggerTypes')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeAccountIdsScope') is not None:
            self.exclude_account_ids_scope = m.get('ExcludeAccountIdsScope')
        if m.get('ExcludeFolderIdsScope') is not None:
            self.exclude_folder_ids_scope = m.get('ExcludeFolderIdsScope')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('FolderIdsScope') is not None:
            self.folder_ids_scope = m.get('FolderIdsScope')
        if m.get('InputParameters') is not None:
            self.input_parameters_shrink = m.get('InputParameters')
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope_shrink = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('TagKeyLogicScope') is not None:
            self.tag_key_logic_scope = m.get('TagKeyLogicScope')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class UpdateAggregateConfigRuleResponseBody(TeaModel):
    def __init__(self, config_rule_id=None, request_id=None):
        # The ID of the rule.
        self.config_rule_id = config_rule_id  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateAggregateConfigRuleResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class UpdateAggregateConfigRuleResponse(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: UpdateAggregateConfigRuleResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UpdateAggregateConfigRuleResponse, 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 = UpdateAggregateConfigRuleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAggregateRemediationRequest(TeaModel):
    def __init__(self, aggregator_id=None, invoke_type=None, params=None, remediation_id=None,
                 remediation_template_id=None, remediation_type=None, source_type=None):
        # The ID of the account group.
        # 
        # You can the [ListAggregators](~~255797~~) operation to obtain the ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The execution mode of the remediation. Valid values:
        # 
        # *   NON_EXECUTION: The remediation is not executed.
        # *   AUTO_EXECUTION: The remediation is automatically executed.
        # *   MANUAL_EXECUTION: The remediation is manually executed.
        # *   NOT_CONFIG: The execution mode is not specified.
        self.invoke_type = invoke_type  # type: str
        # The desired parameter values of the remediation setting.
        self.params = params  # type: str
        # The ID of the remediation setting.
        # 
        # You can call the [ListAggregateRemediations](~~270036~~) operation to obtain the ID of the remediation setting.
        self.remediation_id = remediation_id  # type: str
        # The ID of the remediation template.
        # 
        # You can call the [ListRemediationTemplates](~~270066~~) operation to obtain the ID of the remediation template.
        self.remediation_template_id = remediation_template_id  # type: str
        # The type of the remediation template. Valid values:
        # 
        # *   OOS: Operation Orchestration Service (OOS)
        # *   FC: Function Compute. You can use Function Compute to configure custom remediation settings.
        self.remediation_type = remediation_type  # type: str
        # The type of the rule for which the remediation template is configured. Valid values:
        # 
        # *   ALIYUN: managed rule.
        # *   CUSTOM: custom rule.
        # *   NONE: The rule is not specified.
        self.source_type = source_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateAggregateRemediationRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.invoke_type is not None:
            result['InvokeType'] = self.invoke_type
        if self.params is not None:
            result['Params'] = self.params
        if self.remediation_id is not None:
            result['RemediationId'] = self.remediation_id
        if self.remediation_template_id is not None:
            result['RemediationTemplateId'] = self.remediation_template_id
        if self.remediation_type is not None:
            result['RemediationType'] = self.remediation_type
        if self.source_type is not None:
            result['SourceType'] = self.source_type
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('InvokeType') is not None:
            self.invoke_type = m.get('InvokeType')
        if m.get('Params') is not None:
            self.params = m.get('Params')
        if m.get('RemediationId') is not None:
            self.remediation_id = m.get('RemediationId')
        if m.get('RemediationTemplateId') is not None:
            self.remediation_template_id = m.get('RemediationTemplateId')
        if m.get('RemediationType') is not None:
            self.remediation_type = m.get('RemediationType')
        if m.get('SourceType') is not None:
            self.source_type = m.get('SourceType')
        return self


class UpdateAggregateRemediationResponseBody(TeaModel):
    def __init__(self, remediation_id=None, request_id=None):
        # The ID of the remediation setting.
        self.remediation_id = remediation_id  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateAggregateRemediationResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.remediation_id is not None:
            result['RemediationId'] = self.remediation_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('RemediationId') is not None:
            self.remediation_id = m.get('RemediationId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class UpdateAggregateRemediationResponse(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: UpdateAggregateRemediationResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UpdateAggregateRemediationResponse, 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 = UpdateAggregateRemediationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAggregatorRequestAggregatorAccounts(TeaModel):
    def __init__(self, account_id=None, account_name=None, account_type=None):
        # The member account ID, which indicates the Alibaba Cloud account ID of the member account.
        # 
        # For more information about how to obtain the ID of a member account, see [ListAccounts](~~160016~~).
        # 
        # >  If you want to update the member account list, you must set the `AccountId`, `AccountName` and `AccountType` parameters.
        self.account_id = account_id  # type: long
        # The member account name, which indicates the name of the Alibaba Cloud account that corresponds to the member account.
        # 
        # For more information about how to obtain the name of a member account, see [ListAccounts](~~160016~~).
        # 
        # >  If you want to update the member account list, you must set the `AccountId`, `AccountName` and `AccountType` parameters.
        self.account_name = account_name  # type: str
        # The affiliation of the member account. You can set this parameter to only ResourceDirectory.
        # 
        # >  If you want to update the member account list, you must set the `AccountId`, `AccountName` and `AccountType` parameters.
        self.account_type = account_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateAggregatorRequestAggregatorAccounts, 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_type is not None:
            result['AccountType'] = self.account_type
        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('AccountType') is not None:
            self.account_type = m.get('AccountType')
        return self


class UpdateAggregatorRequest(TeaModel):
    def __init__(self, aggregator_accounts=None, aggregator_id=None, aggregator_name=None, client_token=None,
                 description=None):
        # The information about the member accounts in the account group.
        # 
        # >  When you modify the configurations of an account group, this parameter can be left empty. In this case, the member account list is not updated. If you want to update the member account list, you must set the `AccountId`, `AccountName` and `AccountType` parameters.
        self.aggregator_accounts = aggregator_accounts  # type: list[UpdateAggregatorRequestAggregatorAccounts]
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The name of the account group.
        # 
        # For more information about how to obtain the name of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_name = aggregator_name  # type: str
        # 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. The token can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The description of the account group.
        # 
        # For more information about how to obtain the description of an account group, see [ListAggregators](~~255797~~).
        self.description = description  # type: str

    def validate(self):
        if self.aggregator_accounts:
            for k in self.aggregator_accounts:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(UpdateAggregatorRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        result['AggregatorAccounts'] = []
        if self.aggregator_accounts is not None:
            for k in self.aggregator_accounts:
                result['AggregatorAccounts'].append(k.to_map() if k else None)
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.aggregator_name is not None:
            result['AggregatorName'] = self.aggregator_name
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.description is not None:
            result['Description'] = self.description
        return result

    def from_map(self, m=None):
        m = m or dict()
        self.aggregator_accounts = []
        if m.get('AggregatorAccounts') is not None:
            for k in m.get('AggregatorAccounts'):
                temp_model = UpdateAggregatorRequestAggregatorAccounts()
                self.aggregator_accounts.append(temp_model.from_map(k))
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('AggregatorName') is not None:
            self.aggregator_name = m.get('AggregatorName')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        return self


class UpdateAggregatorShrinkRequest(TeaModel):
    def __init__(self, aggregator_accounts_shrink=None, aggregator_id=None, aggregator_name=None,
                 client_token=None, description=None):
        # The information about the member accounts in the account group.
        # 
        # >  When you modify the configurations of an account group, this parameter can be left empty. In this case, the member account list is not updated. If you want to update the member account list, you must set the `AccountId`, `AccountName` and `AccountType` parameters.
        self.aggregator_accounts_shrink = aggregator_accounts_shrink  # type: str
        # The ID of the account group.
        # 
        # For more information about how to obtain the ID of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_id = aggregator_id  # type: str
        # The name of the account group.
        # 
        # For more information about how to obtain the name of an account group, see [ListAggregators](~~255797~~).
        self.aggregator_name = aggregator_name  # type: str
        # 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. The token can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The description of the account group.
        # 
        # For more information about how to obtain the description of an account group, see [ListAggregators](~~255797~~).
        self.description = description  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateAggregatorShrinkRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aggregator_accounts_shrink is not None:
            result['AggregatorAccounts'] = self.aggregator_accounts_shrink
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_id
        if self.aggregator_name is not None:
            result['AggregatorName'] = self.aggregator_name
        if self.client_token is not None:
            result['ClientToken'] = self.client_token
        if self.description is not None:
            result['Description'] = self.description
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('AggregatorAccounts') is not None:
            self.aggregator_accounts_shrink = m.get('AggregatorAccounts')
        if m.get('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('AggregatorName') is not None:
            self.aggregator_name = m.get('AggregatorName')
        if m.get('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        return self


class UpdateAggregatorResponseBody(TeaModel):
    def __init__(self, aggregator_id=None, request_id=None):
        # The ID of the account group.
        self.aggregator_id = aggregator_id  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateAggregatorResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aggregator_id is not None:
            result['AggregatorId'] = self.aggregator_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('AggregatorId') is not None:
            self.aggregator_id = m.get('AggregatorId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class UpdateAggregatorResponse(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: UpdateAggregatorResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UpdateAggregatorResponse, 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 = UpdateAggregatorResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateCompliancePackRequestConfigRulesConfigRuleParameters(TeaModel):
    def __init__(self, parameter_name=None, parameter_value=None):
        # The name of the input parameter.
        # 
        # You must configure the `ParameterName` and `ParameterValue` parameters or neither of them. If the managed rule has an input parameter but no default value exists, you must configure this parameter. For more information about how to obtain the name of an input parameter for a managed rule, see [ListCompliancePackTemplates](~~261176~~).
        self.parameter_name = parameter_name  # type: str
        # The value of the input parameter.
        # 
        # You must configure the `ParameterName` and `ParameterValue` parameters or neither of them. If the managed rule has an input parameter but no default value exists, you must configure this parameter. For more information about how to obtain the value of an input parameter for a managed rule, see [ListCompliancePackTemplates](~~261176~~).
        self.parameter_value = parameter_value  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateCompliancePackRequestConfigRulesConfigRuleParameters, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.parameter_name is not None:
            result['ParameterName'] = self.parameter_name
        if self.parameter_value is not None:
            result['ParameterValue'] = self.parameter_value
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ParameterName') is not None:
            self.parameter_name = m.get('ParameterName')
        if m.get('ParameterValue') is not None:
            self.parameter_value = m.get('ParameterValue')
        return self


class UpdateCompliancePackRequestConfigRules(TeaModel):
    def __init__(self, config_rule_id=None, config_rule_name=None, config_rule_parameters=None, description=None,
                 managed_rule_identifier=None, risk_level=None):
        # The ID of the rule. If you configure this parameter, Cloud Config adds the rule of the specified ID to the compliance package.
        # 
        # You only need to configure the `ManagedRuleIdentifier` or `ConfigRuleId` parameter. If you configure both parameters, the value of the `ConfigRuleId` parameter takes precedence. For more information about how to obtain the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_id = config_rule_id  # type: str
        # The name of the rule.
        self.config_rule_name = config_rule_name  # type: str
        # The details of the input parameters of the rule.
        self.config_rule_parameters = config_rule_parameters  # type: list[UpdateCompliancePackRequestConfigRulesConfigRuleParameters]
        # The description of the rule.
        self.description = description  # type: str
        # The ID of the managed rule. Cloud Config automatically create a managed rule of the specified ID and adds the rule to the compliance package.
        # 
        # You only need to configure the `ManagedRuleIdentifier` or `ConfigRuleId` parameter. If you configure both parameters, the value of the `ConfigRuleId` parameter take precedence. For more information about how to obtain the ID of a managed rule, see [ListCompliancePackTemplates](~~261176~~).
        self.managed_rule_identifier = managed_rule_identifier  # type: str
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int

    def validate(self):
        if self.config_rule_parameters:
            for k in self.config_rule_parameters:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(UpdateCompliancePackRequestConfigRules, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        result['ConfigRuleParameters'] = []
        if self.config_rule_parameters is not None:
            for k in self.config_rule_parameters:
                result['ConfigRuleParameters'].append(k.to_map() if k else None)
        if self.description is not None:
            result['Description'] = self.description
        if self.managed_rule_identifier is not None:
            result['ManagedRuleIdentifier'] = self.managed_rule_identifier
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        self.config_rule_parameters = []
        if m.get('ConfigRuleParameters') is not None:
            for k in m.get('ConfigRuleParameters'):
                temp_model = UpdateCompliancePackRequestConfigRulesConfigRuleParameters()
                self.config_rule_parameters.append(temp_model.from_map(k))
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ManagedRuleIdentifier') is not None:
            self.managed_rule_identifier = m.get('ManagedRuleIdentifier')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        return self


class UpdateCompliancePackRequest(TeaModel):
    def __init__(self, client_token=None, compliance_pack_id=None, compliance_pack_name=None, config_rules=None,
                 description=None, exclude_resource_ids_scope=None, region_ids_scope=None, resource_group_ids_scope=None,
                 risk_level=None, tag_key_scope=None, tag_value_scope=None):
        # The client token that you want to use to ensure the idempotency of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.``
        self.client_token = client_token  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The name of the compliance package.
        # 
        # For more information about how to obtain the name of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The rules in the compliance package.
        # 
        # If you leave this parameter empty, the rules in the compliance package remain unchanged. If you configure this parameter, Cloud Config replaces the existing rules in the compliance package with the specified rules.
        self.config_rules = config_rules  # type: list[UpdateCompliancePackRequestConfigRules]
        # The description of the compliance package.
        # 
        # For more information about how to obtain the description of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.description = description  # type: str
        # The ID of the resource that you do not want to evaluate by using the compliance package. Separate multiple resource IDs with commas (,).
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the region whose resources you want to evaluate by using the compliance package. Separate multiple region IDs with commas (,).
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group whose resources you want to evaluate by using the compliance package. Separate multiple resource group IDs with commas (,).
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The risk level of the resources that are not compliant with the rules in the compliance package. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int
        # The tag key of the resource that you want to evaluate by using the compliance package.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value of the resource that you want to evaluate by using the compliance package.
        # 
        # >  You must configure the TagValueScope parameter together with the TagValueScope parameter.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        if self.config_rules:
            for k in self.config_rules:
                if k:
                    k.validate()

    def to_map(self):
        _map = super(UpdateCompliancePackRequest, 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.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        result['ConfigRules'] = []
        if self.config_rules is not None:
            for k in self.config_rules:
                result['ConfigRules'].append(k.to_map() if k else None)
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        self.config_rules = []
        if m.get('ConfigRules') is not None:
            for k in m.get('ConfigRules'):
                temp_model = UpdateCompliancePackRequestConfigRules()
                self.config_rules.append(temp_model.from_map(k))
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class UpdateCompliancePackShrinkRequest(TeaModel):
    def __init__(self, client_token=None, compliance_pack_id=None, compliance_pack_name=None,
                 config_rules_shrink=None, description=None, exclude_resource_ids_scope=None, region_ids_scope=None,
                 resource_group_ids_scope=None, risk_level=None, tag_key_scope=None, tag_value_scope=None):
        # The client token that you want to use to ensure the idempotency of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.``
        self.client_token = client_token  # type: str
        # The ID of the compliance package.
        # 
        # For more information about how to obtain the ID of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The name of the compliance package.
        # 
        # For more information about how to obtain the name of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.compliance_pack_name = compliance_pack_name  # type: str
        # The rules in the compliance package.
        # 
        # If you leave this parameter empty, the rules in the compliance package remain unchanged. If you configure this parameter, Cloud Config replaces the existing rules in the compliance package with the specified rules.
        self.config_rules_shrink = config_rules_shrink  # type: str
        # The description of the compliance package.
        # 
        # For more information about how to obtain the description of a compliance package, see [ListCompliancePacks](~~263332~~).
        self.description = description  # type: str
        # The ID of the resource that you do not want to evaluate by using the compliance package. Separate multiple resource IDs with commas (,).
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The ID of the region whose resources you want to evaluate by using the compliance package. Separate multiple region IDs with commas (,).
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group whose resources you want to evaluate by using the compliance package. Separate multiple resource group IDs with commas (,).
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The risk level of the resources that are not compliant with the rules in the compliance package. Valid values:
        # 
        # *   1: high
        # *   2: medium
        # *   3: low
        self.risk_level = risk_level  # type: int
        # The tag key of the resource that you want to evaluate by using the compliance package.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag value of the resource that you want to evaluate by using the compliance package.
        # 
        # >  You must configure the TagValueScope parameter together with the TagValueScope parameter.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateCompliancePackShrinkRequest, 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.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_id
        if self.compliance_pack_name is not None:
            result['CompliancePackName'] = self.compliance_pack_name
        if self.config_rules_shrink is not None:
            result['ConfigRules'] = self.config_rules_shrink
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('CompliancePackName') is not None:
            self.compliance_pack_name = m.get('CompliancePackName')
        if m.get('ConfigRules') is not None:
            self.config_rules_shrink = m.get('ConfigRules')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class UpdateCompliancePackResponseBody(TeaModel):
    def __init__(self, compliance_pack_id=None, request_id=None):
        # The ID of the compliance package.
        self.compliance_pack_id = compliance_pack_id  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateCompliancePackResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.compliance_pack_id is not None:
            result['CompliancePackId'] = self.compliance_pack_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('CompliancePackId') is not None:
            self.compliance_pack_id = m.get('CompliancePackId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class UpdateCompliancePackResponse(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: UpdateCompliancePackResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UpdateCompliancePackResponse, 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 = UpdateCompliancePackResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateConfigDeliveryChannelRequest(TeaModel):
    def __init__(self, client_token=None, configuration_item_change_notification=None,
                 configuration_snapshot=None, delivery_channel_condition=None, delivery_channel_id=None, delivery_channel_name=None,
                 delivery_channel_target_arn=None, delivery_snapshot_time=None, description=None, non_compliant_notification=None,
                 oversized_data_osstarget_arn=None, status=None):
        # The client token that is used to ensure the idempotency of the request. You can use the client to generate the token, but you must ensure that the token is unique among different requests.
        # 
        # The `token` can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](~~25693~~).
        self.client_token = client_token  # type: str
        # Specifies whether to deliver resource change logs. If you set this parameter to true, Cloud Config delivers resource change logs to OSS, Log Service, or MNS when the configurations of the resources change. Valid values:
        # 
        # *   true: Cloud Config delivers resource change logs.
        # *   false (default): Cloud Config does not deliver resource change logs.
        # 
        # > This parameter is available for delivery channels of the OSS, SLS, and MNS types.
        self.configuration_item_change_notification = configuration_item_change_notification  # type: bool
        # Specifies whether to deliver scheduled resource snapshots. Cloud Config delivers scheduled resource snapshots at `04:00Z` and `16:00Z` to OSS, MNS, or Log Service every day. The time is displayed in UTC. Valid values:
        # 
        # *   true: Cloud Config delivers scheduled resource snapshots.
        # *   false (default): Cloud Config does not deliver scheduled resource snapshots.
        self.configuration_snapshot = configuration_snapshot  # type: bool
        # The rule that you want to attach to the delivery channel. This parameter is available when you deliver data of all types to MNS or deliver snapshots to Log Service.
        # 
        # *   If the value of the DeliveryChannelType parameter is MNS, take note of the following settings of the lowest risk level and resource types of the events to which you subscribed:
        # 
        #     *   The setting of the lowest risk level for the events to which you want to subscribe is in the following format: `{"filterType":"RuleRiskLevel","value":"1","multiple":false}`.
        # 
        #         The `value` field indicates the lowest risk level of the events to which you want to subscribe. Valid values: 1, 2, and 3. The value 1 indicates the high risk level, the value 2 indicates the medium risk level, and the value 3 indicates the low risk level.
        # 
        #     *   The setting of the resource types of the events to which you want to subscribe is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #         The `values` field indicates the resource types of the events to which you want to subscribe. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        # 
        # *   If you set the DeliveryChannelType parameter to SLS, the setting of the resource types of the snapshots to which you want to deliver is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #     The `values` field specifies the resource types of the snapshots to which you want to deliver. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        self.delivery_channel_condition = delivery_channel_condition  # type: str
        # The ID of the delivery channel.
        # 
        # For more information about how to obtain the ID of a delivery channel, see [DescribeDeliveryChannels](~~429841~~).
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The name of the delivery channel.
        self.delivery_channel_name = delivery_channel_name  # type: str
        # The Alibaba Cloud Resource Name (ARN) of the delivery destination. Valid values:
        # 
        # *   `acs:oss:{RegionId}:{accountId}:{bucketName}` if your delivery destination is an OSS bucket. Example: `acs:oss:cn-shanghai:100931896542****:new-bucket`.
        # *   `acs:mns:{RegionId}:{accountId}:/topics/{topicName}` if your delivery destination is an MNS topic. Example: `acs:mns:cn-shanghai:100931896542****:/topics/topic1`.
        # *   `acs:log:{RegionId}:{accountId}:project/{projectName}/logstore/{logstoreName}` if your delivery destination is a Log Service Logstore. Example: `acs:log:cn-shanghai:100931896542****:project/project1/logstore/logstore1`.
        self.delivery_channel_target_arn = delivery_channel_target_arn  # type: str
        # The time when you want Cloud Config to deliver scheduled resource snapshots every day.
        # 
        # Format: `HH:mmZ`. This time is displayed in UTC.
        # 
        # > When you enable the scheduled resource delivery feature, you can configure this parameter to specify a custom delivery time. If you do not configure this parameter, Cloud Config automatically delivers scheduled resource snapshots at `04:00Z` and `16:00Z` every day.
        self.delivery_snapshot_time = delivery_snapshot_time  # type: str
        # The description of the delivery channel.
        self.description = description  # type: str
        # Specifies whether to deliver resource non-compliance events. If you set this parameter to true, Cloud Config delivers resource non-compliance events to Log Service or MNS when resources are considered non-compliant. Valid values:
        # 
        # *   true: Cloud Config delivers resource non-compliance events.
        # *   false (default): Cloud Config does not deliver resource non-compliance events.
        # 
        # > This parameter is available only for delivery channels of the SLS or MNS type.
        self.non_compliant_notification = non_compliant_notification  # type: bool
        # The ARN of the OSS bucket to which you want to transfer the delivery data when the size of the data exceeds the specified upper limit of the delivery channel. Format: `acs:oss:{RegionId}:{accountId}:{bucketName}`.
        # 
        # If you do not configure this parameter, Cloud Config delivers only summary data.
        # 
        # > This parameter is available only for delivery channels of the SLS or MNS type. The maximum storage size of delivery channels of the SLS type is 1 MB, and the maximum storage size of delivery channels of the MNS type is 64 KB.
        self.oversized_data_osstarget_arn = oversized_data_osstarget_arn  # type: str
        # Specifies whether to enable the delivery channel. Valid values:
        # 
        # *   0: Cloud Config disables the delivery channel. Cloud Config retains the most recent delivery configuration and stops resource data delivery.
        # *   1 (default): Cloud Config enables the delivery channel.
        self.status = status  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateConfigDeliveryChannelRequest, 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.configuration_item_change_notification is not None:
            result['ConfigurationItemChangeNotification'] = self.configuration_item_change_notification
        if self.configuration_snapshot is not None:
            result['ConfigurationSnapshot'] = self.configuration_snapshot
        if self.delivery_channel_condition is not None:
            result['DeliveryChannelCondition'] = self.delivery_channel_condition
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_id
        if self.delivery_channel_name is not None:
            result['DeliveryChannelName'] = self.delivery_channel_name
        if self.delivery_channel_target_arn is not None:
            result['DeliveryChannelTargetArn'] = self.delivery_channel_target_arn
        if self.delivery_snapshot_time is not None:
            result['DeliverySnapshotTime'] = self.delivery_snapshot_time
        if self.description is not None:
            result['Description'] = self.description
        if self.non_compliant_notification is not None:
            result['NonCompliantNotification'] = self.non_compliant_notification
        if self.oversized_data_osstarget_arn is not None:
            result['OversizedDataOSSTargetArn'] = self.oversized_data_osstarget_arn
        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('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('ConfigurationItemChangeNotification') is not None:
            self.configuration_item_change_notification = m.get('ConfigurationItemChangeNotification')
        if m.get('ConfigurationSnapshot') is not None:
            self.configuration_snapshot = m.get('ConfigurationSnapshot')
        if m.get('DeliveryChannelCondition') is not None:
            self.delivery_channel_condition = m.get('DeliveryChannelCondition')
        if m.get('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('DeliveryChannelName') is not None:
            self.delivery_channel_name = m.get('DeliveryChannelName')
        if m.get('DeliveryChannelTargetArn') is not None:
            self.delivery_channel_target_arn = m.get('DeliveryChannelTargetArn')
        if m.get('DeliverySnapshotTime') is not None:
            self.delivery_snapshot_time = m.get('DeliverySnapshotTime')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('NonCompliantNotification') is not None:
            self.non_compliant_notification = m.get('NonCompliantNotification')
        if m.get('OversizedDataOSSTargetArn') is not None:
            self.oversized_data_osstarget_arn = m.get('OversizedDataOSSTargetArn')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class UpdateConfigDeliveryChannelResponseBody(TeaModel):
    def __init__(self, delivery_channel_id=None, request_id=None):
        # The ID of the delivery channel.
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateConfigDeliveryChannelResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_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('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class UpdateConfigDeliveryChannelResponse(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: UpdateConfigDeliveryChannelResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UpdateConfigDeliveryChannelResponse, 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 = UpdateConfigDeliveryChannelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateConfigRuleRequest(TeaModel):
    def __init__(self, client_token=None, config_rule_id=None, config_rule_name=None,
                 config_rule_trigger_types=None, description=None, exclude_resource_ids_scope=None, input_parameters=None,
                 maximum_execution_frequency=None, region_ids_scope=None, resource_group_ids_scope=None, resource_types_scope=None,
                 risk_level=None, tag_key_logic_scope=None, tag_key_scope=None, tag_value_scope=None):
        # The client token that you want to use to ensure the idempotency of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.``
        self.client_token = client_token  # type: str
        # The ID of the rule.
        # 
        # For more information about how to query the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_id = config_rule_id  # type: str
        # The name of the rule.
        # 
        # For more information about how to query the name of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_name = config_rule_name  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
        # *   ScheduledNotification: The rule is periodically triggered.
        # 
        # >  This parameter applies only to custom rules.
        self.config_rule_trigger_types = config_rule_trigger_types  # type: str
        # The description of the rule. You can enter up to 500 characters.
        self.description = description  # type: str
        # The ID of the resource to be excluded from the compliance evaluations performed by the rule. Separate multiple resource IDs with commas (,).
        # 
        # >  This parameter applies only to managed rules.
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The input parameters of the rule.
        self.input_parameters = input_parameters  # type: dict[str, any]
        # The intervals at which the rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour.
        # *   Three_Hours: 3 hours.
        # *   Six_Hours: 6 hours.
        # *   Twelve_Hours: 12 hours.
        # *   TwentyFour_Hours (default): 24 hours.
        # 
        # >  This parameter is required if you set the `ConfigRuleTriggerTypes` parameter to `ScheduledNotification`.
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The ID of the region to which the rule applies. Separate multiple region IDs with commas (,).
        # 
        # >  This parameter applies only to managed rules.
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group to which the rule applies. Separate multiple resource group IDs with commas (,).
        # 
        # >  This parameter applies only to managed rules.
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The type of the resource to be evaluated by the rule. Separate multiple resource types with commas (,).
        self.resource_types_scope = resource_types_scope  # type: list[str]
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int
        # The logical relationship among the tag keys if you specify multiple tag keys by using the `TagKeyScope` parameter. For example, if the `TagKeyScope` parameter is set to `ECS,OSS` and the TagKeyLogicScope parameter is set to `AND`, the rule applies to resources with both the `ECS` and `OSS` tag keys. Valid values:
        # 
        # *   AND: logical AND
        # *   OR: logical OR
        self.tag_key_logic_scope = tag_key_logic_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with the specified tag key.
        # 
        # >  This parameter applies only to managed rules. You must configure the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with the specified tag key.
        # 
        # >  This parameter applies only to managed rules. You must configure the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateConfigRuleRequest, 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.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_trigger_types is not None:
            result['ConfigRuleTriggerTypes'] = self.config_rule_trigger_types
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.input_parameters is not None:
            result['InputParameters'] = self.input_parameters
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.resource_types_scope is not None:
            result['ResourceTypesScope'] = self.resource_types_scope
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.tag_key_logic_scope is not None:
            result['TagKeyLogicScope'] = self.tag_key_logic_scope
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleTriggerTypes') is not None:
            self.config_rule_trigger_types = m.get('ConfigRuleTriggerTypes')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('InputParameters') is not None:
            self.input_parameters = m.get('InputParameters')
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('TagKeyLogicScope') is not None:
            self.tag_key_logic_scope = m.get('TagKeyLogicScope')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class UpdateConfigRuleShrinkRequest(TeaModel):
    def __init__(self, client_token=None, config_rule_id=None, config_rule_name=None,
                 config_rule_trigger_types=None, description=None, exclude_resource_ids_scope=None, input_parameters_shrink=None,
                 maximum_execution_frequency=None, region_ids_scope=None, resource_group_ids_scope=None, resource_types_scope_shrink=None,
                 risk_level=None, tag_key_logic_scope=None, tag_key_scope=None, tag_value_scope=None):
        # The client token that you want to use to ensure the idempotency of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.``
        self.client_token = client_token  # type: str
        # The ID of the rule.
        # 
        # For more information about how to query the ID of a rule, see [ListConfigRules](~~169607~~).
        self.config_rule_id = config_rule_id  # type: str
        # The name of the rule.
        # 
        # For more information about how to query the name of a rule, see [ListAggregateConfigRules](~~264148~~).
        self.config_rule_name = config_rule_name  # type: str
        # The trigger type of the rule. Valid values:
        # 
        # *   ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
        # *   ScheduledNotification: The rule is periodically triggered.
        # 
        # >  This parameter applies only to custom rules.
        self.config_rule_trigger_types = config_rule_trigger_types  # type: str
        # The description of the rule. You can enter up to 500 characters.
        self.description = description  # type: str
        # The ID of the resource to be excluded from the compliance evaluations performed by the rule. Separate multiple resource IDs with commas (,).
        # 
        # >  This parameter applies only to managed rules.
        self.exclude_resource_ids_scope = exclude_resource_ids_scope  # type: str
        # The input parameters of the rule.
        self.input_parameters_shrink = input_parameters_shrink  # type: str
        # The intervals at which the rule is triggered. Valid values:
        # 
        # *   One_Hour: 1 hour.
        # *   Three_Hours: 3 hours.
        # *   Six_Hours: 6 hours.
        # *   Twelve_Hours: 12 hours.
        # *   TwentyFour_Hours (default): 24 hours.
        # 
        # >  This parameter is required if you set the `ConfigRuleTriggerTypes` parameter to `ScheduledNotification`.
        self.maximum_execution_frequency = maximum_execution_frequency  # type: str
        # The ID of the region to which the rule applies. Separate multiple region IDs with commas (,).
        # 
        # >  This parameter applies only to managed rules.
        self.region_ids_scope = region_ids_scope  # type: str
        # The ID of the resource group to which the rule applies. Separate multiple resource group IDs with commas (,).
        # 
        # >  This parameter applies only to managed rules.
        self.resource_group_ids_scope = resource_group_ids_scope  # type: str
        # The type of the resource to be evaluated by the rule. Separate multiple resource types with commas (,).
        self.resource_types_scope_shrink = resource_types_scope_shrink  # type: str
        # The risk level of the resources that are not compliant with the rule. Valid values:
        # 
        # *   1: high risk level
        # *   2: medium risk level
        # *   3: low risk level
        self.risk_level = risk_level  # type: int
        # The logical relationship among the tag keys if you specify multiple tag keys by using the `TagKeyScope` parameter. For example, if the `TagKeyScope` parameter is set to `ECS,OSS` and the TagKeyLogicScope parameter is set to `AND`, the rule applies to resources with both the `ECS` and `OSS` tag keys. Valid values:
        # 
        # *   AND: logical AND
        # *   OR: logical OR
        self.tag_key_logic_scope = tag_key_logic_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with the specified tag key.
        # 
        # >  This parameter applies only to managed rules. You must configure the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_key_scope = tag_key_scope  # type: str
        # The tag key used to filter resources. The rule applies only to the resources with the specified tag key.
        # 
        # >  This parameter applies only to managed rules. You must configure the `TagKeyScope` and `TagValueScope` parameters at the same time.
        self.tag_value_scope = tag_value_scope  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateConfigRuleShrinkRequest, 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.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_id
        if self.config_rule_name is not None:
            result['ConfigRuleName'] = self.config_rule_name
        if self.config_rule_trigger_types is not None:
            result['ConfigRuleTriggerTypes'] = self.config_rule_trigger_types
        if self.description is not None:
            result['Description'] = self.description
        if self.exclude_resource_ids_scope is not None:
            result['ExcludeResourceIdsScope'] = self.exclude_resource_ids_scope
        if self.input_parameters_shrink is not None:
            result['InputParameters'] = self.input_parameters_shrink
        if self.maximum_execution_frequency is not None:
            result['MaximumExecutionFrequency'] = self.maximum_execution_frequency
        if self.region_ids_scope is not None:
            result['RegionIdsScope'] = self.region_ids_scope
        if self.resource_group_ids_scope is not None:
            result['ResourceGroupIdsScope'] = self.resource_group_ids_scope
        if self.resource_types_scope_shrink is not None:
            result['ResourceTypesScope'] = self.resource_types_scope_shrink
        if self.risk_level is not None:
            result['RiskLevel'] = self.risk_level
        if self.tag_key_logic_scope is not None:
            result['TagKeyLogicScope'] = self.tag_key_logic_scope
        if self.tag_key_scope is not None:
            result['TagKeyScope'] = self.tag_key_scope
        if self.tag_value_scope is not None:
            result['TagValueScope'] = self.tag_value_scope
        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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('ConfigRuleName') is not None:
            self.config_rule_name = m.get('ConfigRuleName')
        if m.get('ConfigRuleTriggerTypes') is not None:
            self.config_rule_trigger_types = m.get('ConfigRuleTriggerTypes')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ExcludeResourceIdsScope') is not None:
            self.exclude_resource_ids_scope = m.get('ExcludeResourceIdsScope')
        if m.get('InputParameters') is not None:
            self.input_parameters_shrink = m.get('InputParameters')
        if m.get('MaximumExecutionFrequency') is not None:
            self.maximum_execution_frequency = m.get('MaximumExecutionFrequency')
        if m.get('RegionIdsScope') is not None:
            self.region_ids_scope = m.get('RegionIdsScope')
        if m.get('ResourceGroupIdsScope') is not None:
            self.resource_group_ids_scope = m.get('ResourceGroupIdsScope')
        if m.get('ResourceTypesScope') is not None:
            self.resource_types_scope_shrink = m.get('ResourceTypesScope')
        if m.get('RiskLevel') is not None:
            self.risk_level = m.get('RiskLevel')
        if m.get('TagKeyLogicScope') is not None:
            self.tag_key_logic_scope = m.get('TagKeyLogicScope')
        if m.get('TagKeyScope') is not None:
            self.tag_key_scope = m.get('TagKeyScope')
        if m.get('TagValueScope') is not None:
            self.tag_value_scope = m.get('TagValueScope')
        return self


class UpdateConfigRuleResponseBody(TeaModel):
    def __init__(self, config_rule_id=None, request_id=None):
        # The ID of the rule.
        self.config_rule_id = config_rule_id  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateConfigRuleResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.config_rule_id is not None:
            result['ConfigRuleId'] = self.config_rule_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('ConfigRuleId') is not None:
            self.config_rule_id = m.get('ConfigRuleId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class UpdateConfigRuleResponse(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: UpdateConfigRuleResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UpdateConfigRuleResponse, 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 = UpdateConfigRuleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateConfigurationRecorderRequest(TeaModel):
    def __init__(self, resource_types=None):
        # The resource types. Separate multiple resource types with commas (,).
        self.resource_types = resource_types  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateConfigurationRecorderRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        return self


class UpdateConfigurationRecorderResponseBodyConfigurationRecorder(TeaModel):
    def __init__(self, configuration_recorder_status=None, resource_types=None):
        # The status of the configuration recorder. Valid values:
        # 
        # *   REGISTRABLE: The configuration recorder has not been registered.
        # *   BUILDING: The configuration recorder is being deployed.
        # *   REGISTERED: The configuration recorder has been registered.
        # *   REBUILDING: The configuration recorder is being redeployed.
        self.configuration_recorder_status = configuration_recorder_status  # type: str
        # The types of the resources that are monitored by Cloud Config.
        self.resource_types = resource_types  # type: list[str]

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateConfigurationRecorderResponseBodyConfigurationRecorder, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.configuration_recorder_status is not None:
            result['ConfigurationRecorderStatus'] = self.configuration_recorder_status
        if self.resource_types is not None:
            result['ResourceTypes'] = self.resource_types
        return result

    def from_map(self, m=None):
        m = m or dict()
        if m.get('ConfigurationRecorderStatus') is not None:
            self.configuration_recorder_status = m.get('ConfigurationRecorderStatus')
        if m.get('ResourceTypes') is not None:
            self.resource_types = m.get('ResourceTypes')
        return self


class UpdateConfigurationRecorderResponseBody(TeaModel):
    def __init__(self, configuration_recorder=None, request_id=None):
        # The details of the configuration recorder.
        self.configuration_recorder = configuration_recorder  # type: UpdateConfigurationRecorderResponseBodyConfigurationRecorder
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        if self.configuration_recorder:
            self.configuration_recorder.validate()

    def to_map(self):
        _map = super(UpdateConfigurationRecorderResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.configuration_recorder is not None:
            result['ConfigurationRecorder'] = self.configuration_recorder.to_map()
        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('ConfigurationRecorder') is not None:
            temp_model = UpdateConfigurationRecorderResponseBodyConfigurationRecorder()
            self.configuration_recorder = temp_model.from_map(m['ConfigurationRecorder'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class UpdateConfigurationRecorderResponse(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: UpdateConfigurationRecorderResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UpdateConfigurationRecorderResponse, 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 = UpdateConfigurationRecorderResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateDeliveryChannelRequest(TeaModel):
    def __init__(self, client_token=None, configuration_item_change_notification=None,
                 configuration_snapshot=None, delivery_channel_assume_role_arn=None, delivery_channel_condition=None,
                 delivery_channel_id=None, delivery_channel_name=None, delivery_channel_target_arn=None, description=None,
                 non_compliant_notification=None, oversized_data_osstarget_arn=None, status=None):
        # The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests.
        # 
        # The `token` can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [Ensure idempotence](~~25693~~)
        self.client_token = client_token  # type: str
        # Specifies whether to deliver resource change logs. If the value of this parameter is true, Cloud Config delivers the resource change logs to OSS, Log Service, or MNS when the configurations of the resources change. Valid values:
        # 
        # *   true
        # *   false (default)
        # 
        # > This parameter is available for delivery channels of the OSS, Log Service, and MNS types.
        self.configuration_item_change_notification = configuration_item_change_notification  # type: bool
        # Specifies whether to deliver scheduled resource snapshots to the OSS bucket. If the value of this parameter is true, the scheduled resource snapshots are delivered to the specified OSS bucket at 00:00:00 and 12:00:00 on a daily basis. Valid values:
        # 
        # *   true
        # *   false (default)
        # 
        # > This parameter is applicable only to delivery channels of the OSS type.
        self.configuration_snapshot = configuration_snapshot  # type: bool
        # The ARN of the role that you want to assign to the delivery channel. Specify the ARN in the following format: `acs:ram::{accountId}:role/aliyunserviceroleforconfig`.
        self.delivery_channel_assume_role_arn = delivery_channel_assume_role_arn  # type: str
        # The rule that is attached to the delivery channel. This parameter is available only for delivery channels of the MNS type.
        # 
        # This parameter specifies the lowest risk level and the resource types for the events to which you want to subscribe.
        # 
        # *   The setting of the lowest risk level for the events to which you want to subscribe is in the following format: `{"filterType":"RuleRiskLevel","value":"1","multiple":false}`.
        # 
        #     The `value` field specifies the lowest risk level of the events to which you want to subscribe. Valid values: 1, 2, and 3. The value 1 indicates the high risk level. The value 2 indicates the medium risk level. The value 3 indicates the low risk level.
        # 
        # *   The setting of the resource types of the events to which you want to subscribe is in the following format: `{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}`.
        # 
        #     The `values` field specifies the resource types of the events to which you want to subscribe. The value of the field is a JSON array. Examples:
        # 
        # `[{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}]`
        self.delivery_channel_condition = delivery_channel_condition  # type: str
        # The ID of the delivery channel.
        # 
        # For more information about how to obtain the ID of the delivery channel, see [DescribeDeliveryChannels](~~174466~~).
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The name of the delivery channel.
        # 
        # > If you do not configure this parameter, this parameter is left empty.
        self.delivery_channel_name = delivery_channel_name  # type: str
        # The ARN of the delivery destination. Valid values:
        # 
        # *   `acs:oss:{RegionId}:{accountId}:{bucketName}` if your delivery destination is an OSS bucket. Example: `acs:oss:cn-shanghai:100931896542****:new-bucket`.
        # *   `acs:mns:{RegionId}:{accountId}:/topics/{topicName}` if your delivery destination is an MNS topic. Example: `acs:mns:cn-shanghai:100931896542****:/topics/topic1`.
        # *   `acs:log:{RegionId}:{accountId}:project/{projectName}/logstore/{logstoreName}` if your delivery destination is a Log Service Logstore. Example: `acs:log:cn-shanghai:100931896542****:project/project1/logstore/logstore1`.
        self.delivery_channel_target_arn = delivery_channel_target_arn  # type: str
        # The description of the delivery channel.
        self.description = description  # type: str
        # Specifies whether to deliver resource non-compliance events. If the value of this parameter is true, Cloud Config delivers resource non-compliance events to Log Service or MNS when resources are evaluated as non-compliant. Valid values:
        # 
        # *   true
        # *   false (default)
        # 
        # > This parameter is available only for delivery channels of the Log Service or MNS type.
        self.non_compliant_notification = non_compliant_notification  # type: bool
        # The ARN of the OSS bucket to which you want to transfer the delivery data when the size of the data exceeds the specified upper limit of the delivery channel. Format: `acs:oss:{RegionId}:{accountId}:{bucketName}`.
        # 
        # If you do not configure this parameter, Cloud Config delivers only summary data.
        # 
        # > This parameter is available only for delivery channels of the Log Service or MNS type. The maximum storage size of delivery channels of the Log Service type is 1 MB, and the maximum storage size of delivery channels of the MNS type is 64 KB.
        self.oversized_data_osstarget_arn = oversized_data_osstarget_arn  # type: str
        # Specifies whether to enable the delivery channel. Valid values:
        # 
        # *   0: The delivery channel is disabled for Cloud Config. Cloud Config retains the most recent delivery configuration and stops resource data delivery.
        # *   1 (default): The delivery channel is enabled for Cloud Config.
        self.status = status  # type: long

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateDeliveryChannelRequest, 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.configuration_item_change_notification is not None:
            result['ConfigurationItemChangeNotification'] = self.configuration_item_change_notification
        if self.configuration_snapshot is not None:
            result['ConfigurationSnapshot'] = self.configuration_snapshot
        if self.delivery_channel_assume_role_arn is not None:
            result['DeliveryChannelAssumeRoleArn'] = self.delivery_channel_assume_role_arn
        if self.delivery_channel_condition is not None:
            result['DeliveryChannelCondition'] = self.delivery_channel_condition
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_id
        if self.delivery_channel_name is not None:
            result['DeliveryChannelName'] = self.delivery_channel_name
        if self.delivery_channel_target_arn is not None:
            result['DeliveryChannelTargetArn'] = self.delivery_channel_target_arn
        if self.description is not None:
            result['Description'] = self.description
        if self.non_compliant_notification is not None:
            result['NonCompliantNotification'] = self.non_compliant_notification
        if self.oversized_data_osstarget_arn is not None:
            result['OversizedDataOSSTargetArn'] = self.oversized_data_osstarget_arn
        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('ClientToken') is not None:
            self.client_token = m.get('ClientToken')
        if m.get('ConfigurationItemChangeNotification') is not None:
            self.configuration_item_change_notification = m.get('ConfigurationItemChangeNotification')
        if m.get('ConfigurationSnapshot') is not None:
            self.configuration_snapshot = m.get('ConfigurationSnapshot')
        if m.get('DeliveryChannelAssumeRoleArn') is not None:
            self.delivery_channel_assume_role_arn = m.get('DeliveryChannelAssumeRoleArn')
        if m.get('DeliveryChannelCondition') is not None:
            self.delivery_channel_condition = m.get('DeliveryChannelCondition')
        if m.get('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('DeliveryChannelName') is not None:
            self.delivery_channel_name = m.get('DeliveryChannelName')
        if m.get('DeliveryChannelTargetArn') is not None:
            self.delivery_channel_target_arn = m.get('DeliveryChannelTargetArn')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('NonCompliantNotification') is not None:
            self.non_compliant_notification = m.get('NonCompliantNotification')
        if m.get('OversizedDataOSSTargetArn') is not None:
            self.oversized_data_osstarget_arn = m.get('OversizedDataOSSTargetArn')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class UpdateDeliveryChannelResponseBody(TeaModel):
    def __init__(self, delivery_channel_id=None, request_id=None):
        # The ID of the delivery channel.
        self.delivery_channel_id = delivery_channel_id  # type: str
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateDeliveryChannelResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.delivery_channel_id is not None:
            result['DeliveryChannelId'] = self.delivery_channel_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('DeliveryChannelId') is not None:
            self.delivery_channel_id = m.get('DeliveryChannelId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class UpdateDeliveryChannelResponse(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: UpdateDeliveryChannelResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UpdateDeliveryChannelResponse, 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 = UpdateDeliveryChannelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateIntegratedServiceStatusRequest(TeaModel):
    def __init__(self, integrated_types=None, service_code=None, status=None):
        # The types of the integrated events. Separate multiple event types with commas (,). Valid values:
        # 
        # *   ConfigurationItemChangeNotification: resource change event
        # *   NonCompliantNotification: non-compliance event
        self.integrated_types = integrated_types  # type: str
        # The product code of the cloud product. Valid values:
        # 
        # *   cadt: Cloud Architecture Design Tool
        self.service_code = service_code  # type: str
        # Specifies whether you want the product to be integrated. Valid values:
        # 
        # *   true
        # *   false
        self.status = status  # type: bool

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateIntegratedServiceStatusRequest, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.integrated_types is not None:
            result['IntegratedTypes'] = self.integrated_types
        if self.service_code is not None:
            result['ServiceCode'] = self.service_code
        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('IntegratedTypes') is not None:
            self.integrated_types = m.get('IntegratedTypes')
        if m.get('ServiceCode') is not None:
            self.service_code = m.get('ServiceCode')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class UpdateIntegratedServiceStatusResponseBody(TeaModel):
    def __init__(self, request_id=None):
        # The request ID.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateIntegratedServiceStatusResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        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('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class UpdateIntegratedServiceStatusResponse(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: UpdateIntegratedServiceStatusResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UpdateIntegratedServiceStatusResponse, 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 = UpdateIntegratedServiceStatusResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateRemediationRequest(TeaModel):
    def __init__(self, client_token=None, invoke_type=None, params=None, remediation_id=None,
                 remediation_template_id=None, remediation_type=None, source_type=None):
        # The client token that is used to ensure the idempotency of the request. You can use the client to generate the value, but you must ensure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.
        self.client_token = client_token  # type: str
        # The execution mode of the remediation. Valid values:
        # 
        # *   NON_EXECUTION: The remediation is not executed.
        # *   AUTO_EXECUTION: The remediation is automatically executed.
        # *   MANUAL_EXECUTION: The remediation is manually executed.
        # *   NOT_CONFIG: The execution mode is not specified.
        self.invoke_type = invoke_type  # type: str
        # The desired parameter values of the remediation setting.
        self.params = params  # type: str
        # The ID of the remediation setting.
        # 
        # You can call the [ListRemediations](~~270772~~) operation to obtain the ID of the remediation setting.
        self.remediation_id = remediation_id  # type: str
        # The ID of the remediation template.
        # 
        # You can call the [ListRemediationTemplates](~~270066~~) operation to obtain the ID of the remediation template.
        self.remediation_template_id = remediation_template_id  # type: str
        # The type of the remediation template. Valid values:
        # 
        # *   OOS: Operation Orchestration Service (OOS)
        # *   FC: Function Compute. You can use Function Compute to configure custom remediation settings.
        self.remediation_type = remediation_type  # type: str
        # The source of the remediation setting. Valid values:
        # 
        # *   ALIYUN: the default remediation setting of Alibaba Cloud.
        # *   CUSTOM: a custom remediation setting.
        # *   NONE: The source is not specified.
        self.source_type = source_type  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateRemediationRequest, 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.invoke_type is not None:
            result['InvokeType'] = self.invoke_type
        if self.params is not None:
            result['Params'] = self.params
        if self.remediation_id is not None:
            result['RemediationId'] = self.remediation_id
        if self.remediation_template_id is not None:
            result['RemediationTemplateId'] = self.remediation_template_id
        if self.remediation_type is not None:
            result['RemediationType'] = self.remediation_type
        if self.source_type is not None:
            result['SourceType'] = self.source_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('InvokeType') is not None:
            self.invoke_type = m.get('InvokeType')
        if m.get('Params') is not None:
            self.params = m.get('Params')
        if m.get('RemediationId') is not None:
            self.remediation_id = m.get('RemediationId')
        if m.get('RemediationTemplateId') is not None:
            self.remediation_template_id = m.get('RemediationTemplateId')
        if m.get('RemediationType') is not None:
            self.remediation_type = m.get('RemediationType')
        if m.get('SourceType') is not None:
            self.source_type = m.get('SourceType')
        return self


class UpdateRemediationResponseBody(TeaModel):
    def __init__(self, remediation_id=None, request_id=None):
        # The ID of the remediation setting.
        self.remediation_id = remediation_id  # type: str
        # The ID of the request.
        self.request_id = request_id  # type: str

    def validate(self):
        pass

    def to_map(self):
        _map = super(UpdateRemediationResponseBody, self).to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.remediation_id is not None:
            result['RemediationId'] = self.remediation_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('RemediationId') is not None:
            self.remediation_id = m.get('RemediationId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


class UpdateRemediationResponse(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: UpdateRemediationResponseBody

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super(UpdateRemediationResponse, 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 = UpdateRemediationResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


