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


class AddonMetaDashboards(TeaModel):
    def __init__(
        self,
        description: str = None,
        name: str = None,
        url: str = None,
    ):
        self.description = description
        self.name = name
        self.url = url

    def validate(self):
        pass

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.name is not None:
            result['name'] = self.name
        if self.url is not None:
            result['url'] = self.url
        return result

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


class AddonMetaEnvironmentsCommonSchemaRefs(TeaModel):
    def __init__(
        self,
        group: str = None,
        version: str = None,
    ):
        self.group = group
        self.version = version

    def validate(self):
        pass

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

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

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


class AddonMetaEnvironmentsDependencies(TeaModel):
    def __init__(
        self,
        cluster_types: List[str] = None,
        features: Dict[str, bool] = None,
        services: List[str] = None,
    ):
        self.cluster_types = cluster_types
        self.features = features
        self.services = services

    def validate(self):
        pass

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

        result = dict()
        if self.cluster_types is not None:
            result['clusterTypes'] = self.cluster_types
        if self.features is not None:
            result['features'] = self.features
        if self.services is not None:
            result['services'] = self.services
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clusterTypes') is not None:
            self.cluster_types = m.get('clusterTypes')
        if m.get('features') is not None:
            self.features = m.get('features')
        if m.get('services') is not None:
            self.services = m.get('services')
        return self


class AddonMetaEnvironmentsPoliciesBindEntity(TeaModel):
    def __init__(
        self,
        entity_group_mode: bool = None,
        entity_type: str = None,
        single_entity_mode: bool = None,
        vpc_id_field_key: str = None,
    ):
        self.entity_group_mode = entity_group_mode
        self.entity_type = entity_type
        self.single_entity_mode = single_entity_mode
        self.vpc_id_field_key = vpc_id_field_key

    def validate(self):
        pass

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

        result = dict()
        if self.entity_group_mode is not None:
            result['entityGroupMode'] = self.entity_group_mode
        if self.entity_type is not None:
            result['entityType'] = self.entity_type
        if self.single_entity_mode is not None:
            result['singleEntityMode'] = self.single_entity_mode
        if self.vpc_id_field_key is not None:
            result['vpcIdFieldKey'] = self.vpc_id_field_key
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('entityGroupMode') is not None:
            self.entity_group_mode = m.get('entityGroupMode')
        if m.get('entityType') is not None:
            self.entity_type = m.get('entityType')
        if m.get('singleEntityMode') is not None:
            self.single_entity_mode = m.get('singleEntityMode')
        if m.get('vpcIdFieldKey') is not None:
            self.vpc_id_field_key = m.get('vpcIdFieldKey')
        return self


class AddonMetaEnvironmentsPoliciesMetricCheckRule(TeaModel):
    def __init__(
        self,
        prom_ql: List[str] = None,
    ):
        self.prom_ql = prom_ql

    def validate(self):
        pass

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

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

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


class AddonMetaEnvironmentsPoliciesProtocols(TeaModel):
    def __init__(
        self,
        description: str = None,
        icon: str = None,
        label: str = None,
        name: str = None,
    ):
        self.description = description
        self.icon = icon
        self.label = label
        self.name = name

    def validate(self):
        pass

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.icon is not None:
            result['icon'] = self.icon
        if self.label is not None:
            result['label'] = self.label
        if self.name is not None:
            result['name'] = self.name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('icon') is not None:
            self.icon = m.get('icon')
        if m.get('label') is not None:
            self.label = m.get('label')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class AddonMetaEnvironmentsPolicies(TeaModel):
    def __init__(
        self,
        alert_default_status: str = None,
        bind_default_policy: bool = None,
        bind_entity: AddonMetaEnvironmentsPoliciesBindEntity = None,
        default_install: bool = None,
        enable_service_account: bool = None,
        metric_check_rule: AddonMetaEnvironmentsPoliciesMetricCheckRule = None,
        need_restart_after_integration: bool = None,
        protocols: List[AddonMetaEnvironmentsPoliciesProtocols] = None,
        target_addon_name: str = None,
    ):
        self.alert_default_status = alert_default_status
        self.bind_default_policy = bind_default_policy
        self.bind_entity = bind_entity
        self.default_install = default_install
        self.enable_service_account = enable_service_account
        self.metric_check_rule = metric_check_rule
        self.need_restart_after_integration = need_restart_after_integration
        self.protocols = protocols
        self.target_addon_name = target_addon_name

    def validate(self):
        if self.bind_entity:
            self.bind_entity.validate()
        if self.metric_check_rule:
            self.metric_check_rule.validate()
        if self.protocols:
            for k in self.protocols:
                if k:
                    k.validate()

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

        result = dict()
        if self.alert_default_status is not None:
            result['alertDefaultStatus'] = self.alert_default_status
        if self.bind_default_policy is not None:
            result['bindDefaultPolicy'] = self.bind_default_policy
        if self.bind_entity is not None:
            result['bindEntity'] = self.bind_entity.to_map()
        if self.default_install is not None:
            result['defaultInstall'] = self.default_install
        if self.enable_service_account is not None:
            result['enableServiceAccount'] = self.enable_service_account
        if self.metric_check_rule is not None:
            result['metricCheckRule'] = self.metric_check_rule.to_map()
        if self.need_restart_after_integration is not None:
            result['needRestartAfterIntegration'] = self.need_restart_after_integration
        result['protocols'] = []
        if self.protocols is not None:
            for k in self.protocols:
                result['protocols'].append(k.to_map() if k else None)
        if self.target_addon_name is not None:
            result['targetAddonName'] = self.target_addon_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertDefaultStatus') is not None:
            self.alert_default_status = m.get('alertDefaultStatus')
        if m.get('bindDefaultPolicy') is not None:
            self.bind_default_policy = m.get('bindDefaultPolicy')
        if m.get('bindEntity') is not None:
            temp_model = AddonMetaEnvironmentsPoliciesBindEntity()
            self.bind_entity = temp_model.from_map(m['bindEntity'])
        if m.get('defaultInstall') is not None:
            self.default_install = m.get('defaultInstall')
        if m.get('enableServiceAccount') is not None:
            self.enable_service_account = m.get('enableServiceAccount')
        if m.get('metricCheckRule') is not None:
            temp_model = AddonMetaEnvironmentsPoliciesMetricCheckRule()
            self.metric_check_rule = temp_model.from_map(m['metricCheckRule'])
        if m.get('needRestartAfterIntegration') is not None:
            self.need_restart_after_integration = m.get('needRestartAfterIntegration')
        self.protocols = []
        if m.get('protocols') is not None:
            for k in m.get('protocols'):
                temp_model = AddonMetaEnvironmentsPoliciesProtocols()
                self.protocols.append(temp_model.from_map(k))
        if m.get('targetAddonName') is not None:
            self.target_addon_name = m.get('targetAddonName')
        return self


class AddonMetaEnvironments(TeaModel):
    def __init__(
        self,
        common_schema_refs: List[AddonMetaEnvironmentsCommonSchemaRefs] = None,
        dependencies: AddonMetaEnvironmentsDependencies = None,
        description: str = None,
        enable: bool = None,
        label: str = None,
        name: str = None,
        policies: AddonMetaEnvironmentsPolicies = None,
        policy_type: str = None,
    ):
        self.common_schema_refs = common_schema_refs
        self.dependencies = dependencies
        self.description = description
        self.enable = enable
        self.label = label
        self.name = name
        self.policies = policies
        self.policy_type = policy_type

    def validate(self):
        if self.common_schema_refs:
            for k in self.common_schema_refs:
                if k:
                    k.validate()
        if self.dependencies:
            self.dependencies.validate()
        if self.policies:
            self.policies.validate()

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

        result = dict()
        result['commonSchemaRefs'] = []
        if self.common_schema_refs is not None:
            for k in self.common_schema_refs:
                result['commonSchemaRefs'].append(k.to_map() if k else None)
        if self.dependencies is not None:
            result['dependencies'] = self.dependencies.to_map()
        if self.description is not None:
            result['description'] = self.description
        if self.enable is not None:
            result['enable'] = self.enable
        if self.label is not None:
            result['label'] = self.label
        if self.name is not None:
            result['name'] = self.name
        if self.policies is not None:
            result['policies'] = self.policies.to_map()
        if self.policy_type is not None:
            result['policyType'] = self.policy_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.common_schema_refs = []
        if m.get('commonSchemaRefs') is not None:
            for k in m.get('commonSchemaRefs'):
                temp_model = AddonMetaEnvironmentsCommonSchemaRefs()
                self.common_schema_refs.append(temp_model.from_map(k))
        if m.get('dependencies') is not None:
            temp_model = AddonMetaEnvironmentsDependencies()
            self.dependencies = temp_model.from_map(m['dependencies'])
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('label') is not None:
            self.label = m.get('label')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('policies') is not None:
            temp_model = AddonMetaEnvironmentsPolicies()
            self.policies = temp_model.from_map(m['policies'])
        if m.get('policyType') is not None:
            self.policy_type = m.get('policyType')
        return self


class AddonMeta(TeaModel):
    def __init__(
        self,
        alias: str = None,
        categories: List[str] = None,
        dashboards: List[AddonMetaDashboards] = None,
        description: str = None,
        environments: List[AddonMetaEnvironments] = None,
        icon: str = None,
        keywords: List[str] = None,
        language: str = None,
        latest_release_create_time: str = None,
        name: str = None,
        once: bool = None,
        scene: str = None,
        version: str = None,
        weight: int = None,
    ):
        self.alias = alias
        self.categories = categories
        self.dashboards = dashboards
        self.description = description
        self.environments = environments
        self.icon = icon
        self.keywords = keywords
        self.language = language
        self.latest_release_create_time = latest_release_create_time
        self.name = name
        self.once = once
        self.scene = scene
        self.version = version
        self.weight = weight

    def validate(self):
        if self.dashboards:
            for k in self.dashboards:
                if k:
                    k.validate()
        if self.environments:
            for k in self.environments:
                if k:
                    k.validate()

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

        result = dict()
        if self.alias is not None:
            result['alias'] = self.alias
        if self.categories is not None:
            result['categories'] = self.categories
        result['dashboards'] = []
        if self.dashboards is not None:
            for k in self.dashboards:
                result['dashboards'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        result['environments'] = []
        if self.environments is not None:
            for k in self.environments:
                result['environments'].append(k.to_map() if k else None)
        if self.icon is not None:
            result['icon'] = self.icon
        if self.keywords is not None:
            result['keywords'] = self.keywords
        if self.language is not None:
            result['language'] = self.language
        if self.latest_release_create_time is not None:
            result['latestReleaseCreateTime'] = self.latest_release_create_time
        if self.name is not None:
            result['name'] = self.name
        if self.once is not None:
            result['once'] = self.once
        if self.scene is not None:
            result['scene'] = self.scene
        if self.version is not None:
            result['version'] = self.version
        if self.weight is not None:
            result['weight'] = self.weight
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alias') is not None:
            self.alias = m.get('alias')
        if m.get('categories') is not None:
            self.categories = m.get('categories')
        self.dashboards = []
        if m.get('dashboards') is not None:
            for k in m.get('dashboards'):
                temp_model = AddonMetaDashboards()
                self.dashboards.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        self.environments = []
        if m.get('environments') is not None:
            for k in m.get('environments'):
                temp_model = AddonMetaEnvironments()
                self.environments.append(temp_model.from_map(k))
        if m.get('icon') is not None:
            self.icon = m.get('icon')
        if m.get('keywords') is not None:
            self.keywords = m.get('keywords')
        if m.get('language') is not None:
            self.language = m.get('language')
        if m.get('latestReleaseCreateTime') is not None:
            self.latest_release_create_time = m.get('latestReleaseCreateTime')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('once') is not None:
            self.once = m.get('once')
        if m.get('scene') is not None:
            self.scene = m.get('scene')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class FilterSettingConditions(TeaModel):
    def __init__(
        self,
        field: str = None,
        op: str = None,
        value: str = None,
    ):
        self.field = field
        self.op = op
        self.value = value

    def validate(self):
        pass

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

        result = dict()
        if self.field is not None:
            result['field'] = self.field
        if self.op is not None:
            result['op'] = self.op
        if self.value is not None:
            result['value'] = self.value
        return result

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


class FilterSetting(TeaModel):
    def __init__(
        self,
        conditions: List[FilterSettingConditions] = None,
        expression: str = None,
        relation: str = None,
    ):
        self.conditions = conditions
        self.expression = expression
        self.relation = relation

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

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        self.conditions = []
        if m.get('conditions') is not None:
            for k in m.get('conditions'):
                temp_model = FilterSettingConditions()
                self.conditions.append(temp_model.from_map(k))
        if m.get('expression') is not None:
            self.expression = m.get('expression')
        if m.get('relation') is not None:
            self.relation = m.get('relation')
        return self


class TransformAction(TeaModel):
    def __init__(
        self,
        filter_setting: FilterSetting = None,
        label_key: str = None,
        mapping: Dict[str, str] = None,
        reg_exp: str = None,
        source: str = None,
        target: str = None,
        type: str = None,
        value: str = None,
        variable: str = None,
    ):
        self.filter_setting = filter_setting
        self.label_key = label_key
        self.mapping = mapping
        self.reg_exp = reg_exp
        self.source = source
        self.target = target
        self.type = type
        self.value = value
        self.variable = variable

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

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

        result = dict()
        if self.filter_setting is not None:
            result['filterSetting'] = self.filter_setting.to_map()
        if self.label_key is not None:
            result['labelKey'] = self.label_key
        if self.mapping is not None:
            result['mapping'] = self.mapping
        if self.reg_exp is not None:
            result['regExp'] = self.reg_exp
        if self.source is not None:
            result['source'] = self.source
        if self.target is not None:
            result['target'] = self.target
        if self.type is not None:
            result['type'] = self.type
        if self.value is not None:
            result['value'] = self.value
        if self.variable is not None:
            result['variable'] = self.variable
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('filterSetting') is not None:
            temp_model = FilterSetting()
            self.filter_setting = temp_model.from_map(m['filterSetting'])
        if m.get('labelKey') is not None:
            self.label_key = m.get('labelKey')
        if m.get('mapping') is not None:
            self.mapping = m.get('mapping')
        if m.get('regExp') is not None:
            self.reg_exp = m.get('regExp')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('target') is not None:
            self.target = m.get('target')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('value') is not None:
            self.value = m.get('value')
        if m.get('variable') is not None:
            self.variable = m.get('variable')
        return self


class AlertEventIntegrationPolicyForModify(TeaModel):
    def __init__(
        self,
        alert_event_integration_policy_name: str = None,
        description: str = None,
        filter_setting: FilterSetting = None,
        integration_setting: str = None,
        transformer_setting: List[TransformAction] = None,
        type: str = None,
    ):
        # This parameter is required.
        self.alert_event_integration_policy_name = alert_event_integration_policy_name
        self.description = description
        self.filter_setting = filter_setting
        self.integration_setting = integration_setting
        self.transformer_setting = transformer_setting
        self.type = type

    def validate(self):
        if self.filter_setting:
            self.filter_setting.validate()
        if self.transformer_setting:
            for k in self.transformer_setting:
                if k:
                    k.validate()

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

        result = dict()
        if self.alert_event_integration_policy_name is not None:
            result['alertEventIntegrationPolicyName'] = self.alert_event_integration_policy_name
        if self.description is not None:
            result['description'] = self.description
        if self.filter_setting is not None:
            result['filterSetting'] = self.filter_setting.to_map()
        if self.integration_setting is not None:
            result['integrationSetting'] = self.integration_setting
        result['transformerSetting'] = []
        if self.transformer_setting is not None:
            for k in self.transformer_setting:
                result['transformerSetting'].append(k.to_map() if k else None)
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertEventIntegrationPolicyName') is not None:
            self.alert_event_integration_policy_name = m.get('alertEventIntegrationPolicyName')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('filterSetting') is not None:
            temp_model = FilterSetting()
            self.filter_setting = temp_model.from_map(m['filterSetting'])
        if m.get('integrationSetting') is not None:
            self.integration_setting = m.get('integrationSetting')
        self.transformer_setting = []
        if m.get('transformerSetting') is not None:
            for k in m.get('transformerSetting'):
                temp_model = TransformAction()
                self.transformer_setting.append(temp_model.from_map(k))
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class AlertEventIntegrationPolicyForView(TeaModel):
    def __init__(
        self,
        alert_event_integration_policy_id: str = None,
        alert_event_integration_policy_name: str = None,
        create_time: str = None,
        description: str = None,
        enable: bool = None,
        filter_setting: FilterSetting = None,
        integration_setting: str = None,
        token: str = None,
        transformer_setting: List[TransformAction] = None,
        type: str = None,
        update_time: str = None,
        user_id: str = None,
        workspace: str = None,
    ):
        # UUID
        self.alert_event_integration_policy_id = alert_event_integration_policy_id
        # This parameter is required.
        self.alert_event_integration_policy_name = alert_event_integration_policy_name
        self.create_time = create_time
        self.description = description
        self.enable = enable
        self.filter_setting = filter_setting
        self.integration_setting = integration_setting
        self.token = token
        self.transformer_setting = transformer_setting
        self.type = type
        self.update_time = update_time
        self.user_id = user_id
        # workspace
        self.workspace = workspace

    def validate(self):
        if self.filter_setting:
            self.filter_setting.validate()
        if self.transformer_setting:
            for k in self.transformer_setting:
                if k:
                    k.validate()

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

        result = dict()
        if self.alert_event_integration_policy_id is not None:
            result['alertEventIntegrationPolicyId'] = self.alert_event_integration_policy_id
        if self.alert_event_integration_policy_name is not None:
            result['alertEventIntegrationPolicyName'] = self.alert_event_integration_policy_name
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.enable is not None:
            result['enable'] = self.enable
        if self.filter_setting is not None:
            result['filterSetting'] = self.filter_setting.to_map()
        if self.integration_setting is not None:
            result['integrationSetting'] = self.integration_setting
        if self.token is not None:
            result['token'] = self.token
        result['transformerSetting'] = []
        if self.transformer_setting is not None:
            for k in self.transformer_setting:
                result['transformerSetting'].append(k.to_map() if k else None)
        if self.type is not None:
            result['type'] = self.type
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertEventIntegrationPolicyId') is not None:
            self.alert_event_integration_policy_id = m.get('alertEventIntegrationPolicyId')
        if m.get('alertEventIntegrationPolicyName') is not None:
            self.alert_event_integration_policy_name = m.get('alertEventIntegrationPolicyName')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('filterSetting') is not None:
            temp_model = FilterSetting()
            self.filter_setting = temp_model.from_map(m['filterSetting'])
        if m.get('integrationSetting') is not None:
            self.integration_setting = m.get('integrationSetting')
        if m.get('token') is not None:
            self.token = m.get('token')
        self.transformer_setting = []
        if m.get('transformerSetting') is not None:
            for k in m.get('transformerSetting'):
                temp_model = TransformAction()
                self.transformer_setting.append(temp_model.from_map(k))
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class AlertRuleAction(TeaModel):
    def __init__(
        self,
        actions: List[str] = None,
    ):
        self.actions = actions

    def validate(self):
        pass

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

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

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


class AlertRuleAlertMetricFilterDefSupportedOpts(TeaModel):
    def __init__(
        self,
        display_name_cn: str = None,
        display_name_en: str = None,
        value: str = None,
    ):
        # Display Name (Chinese).
        self.display_name_cn = display_name_cn
        # Display Name (English).
        self.display_name_en = display_name_en
        # Matching value.
        self.value = value

    def validate(self):
        pass

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

        result = dict()
        if self.display_name_cn is not None:
            result['displayNameCn'] = self.display_name_cn
        if self.display_name_en is not None:
            result['displayNameEn'] = self.display_name_en
        if self.value is not None:
            result['value'] = self.value
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('displayNameCn') is not None:
            self.display_name_cn = m.get('displayNameCn')
        if m.get('displayNameEn') is not None:
            self.display_name_en = m.get('displayNameEn')
        if m.get('value') is not None:
            self.value = m.get('value')
        return self


class AlertRuleAlertMetricFilterDef(TeaModel):
    def __init__(
        self,
        dim: str = None,
        dim_disabled: bool = None,
        display_name_cn: str = None,
        display_name_en: str = None,
        hidden: bool = None,
        label_disabled: bool = None,
        opt: str = None,
        supported_opts: List[AlertRuleAlertMetricFilterDefSupportedOpts] = None,
    ):
        # Dimension in APM metrics.
        self.dim = dim
        # When true, the filter item will not appear in the GROUP BY clause of the PromQL.
        self.dim_disabled = dim_disabled
        # Display Name (Chinese).
        self.display_name_cn = display_name_cn
        # Display Name (English).
        self.display_name_en = display_name_en
        # Whether to hide. If hidden, it will not be displayed in the frontend UI, but its value can still be included when rendering the PromQL. A typical example is the "pid" filter condition in APM scenarios, which is generally not exposed through configurable UI elements but instead presented as a separate application search list in the frontend.
        self.hidden = hidden
        # When true, the filter item will not appear in the label filter of the PromQL.
        self.label_disabled = label_disabled
        # Filter Condition Operator.
        self.opt = opt
        # List of supported options.
        self.supported_opts = supported_opts

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

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

        result = dict()
        if self.dim is not None:
            result['dim'] = self.dim
        if self.dim_disabled is not None:
            result['dimDisabled'] = self.dim_disabled
        if self.display_name_cn is not None:
            result['displayNameCn'] = self.display_name_cn
        if self.display_name_en is not None:
            result['displayNameEn'] = self.display_name_en
        if self.hidden is not None:
            result['hidden'] = self.hidden
        if self.label_disabled is not None:
            result['labelDisabled'] = self.label_disabled
        if self.opt is not None:
            result['opt'] = self.opt
        result['supportedOpts'] = []
        if self.supported_opts is not None:
            for k in self.supported_opts:
                result['supportedOpts'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dim') is not None:
            self.dim = m.get('dim')
        if m.get('dimDisabled') is not None:
            self.dim_disabled = m.get('dimDisabled')
        if m.get('displayNameCn') is not None:
            self.display_name_cn = m.get('displayNameCn')
        if m.get('displayNameEn') is not None:
            self.display_name_en = m.get('displayNameEn')
        if m.get('hidden') is not None:
            self.hidden = m.get('hidden')
        if m.get('labelDisabled') is not None:
            self.label_disabled = m.get('labelDisabled')
        if m.get('opt') is not None:
            self.opt = m.get('opt')
        self.supported_opts = []
        if m.get('supportedOpts') is not None:
            for k in m.get('supportedOpts'):
                temp_model = AlertRuleAlertMetricFilterDefSupportedOpts()
                self.supported_opts.append(temp_model.from_map(k))
        return self


class AlertRuleAlertMetricInputFilterValue(TeaModel):
    def __init__(
        self,
        dim: str = None,
        opt: str = None,
        value: str = None,
    ):
        # Dimension of the filter condition.
        # 
        # This parameter is required.
        self.dim = dim
        # Filter Condition Operator.
        # 
        # This parameter is required.
        self.opt = opt
        # Filter Condition Value.
        self.value = value

    def validate(self):
        pass

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

        result = dict()
        if self.dim is not None:
            result['dim'] = self.dim
        if self.opt is not None:
            result['opt'] = self.opt
        if self.value is not None:
            result['value'] = self.value
        return result

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


class AlertRuleAlertMetricInputParamValue(TeaModel):
    def __init__(
        self,
        name: str = None,
        value: str = None,
    ):
        # This parameter is required.
        self.name = name
        # This parameter is required.
        self.value = value

    def validate(self):
        pass

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

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

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


class AlertRuleAlertMetricInput(TeaModel):
    def __init__(
        self,
        filter_values: List[AlertRuleAlertMetricInputFilterValue] = None,
        group_id: str = None,
        metric_id: str = None,
        param_values: List[AlertRuleAlertMetricInputParamValue] = None,
    ):
        # List of user-provided filter conditions. The supported parameters and filter conditions for the metric can be queried via ListAlertMetrics.
        self.filter_values = filter_values
        # Key of the metric group selected by the user.
        self.group_id = group_id
        # Key of the predefined metric selected by the user.
        self.metric_id = metric_id
        # List of input parameters. The metric\\"s supported parameters and filter conditions can be queried via ListAlertMetrics.
        self.param_values = param_values

    def validate(self):
        if self.filter_values:
            for k in self.filter_values:
                if k:
                    k.validate()
        if self.param_values:
            for k in self.param_values:
                if k:
                    k.validate()

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

        result = dict()
        result['filterValues'] = []
        if self.filter_values is not None:
            for k in self.filter_values:
                result['filterValues'].append(k.to_map() if k else None)
        if self.group_id is not None:
            result['groupId'] = self.group_id
        if self.metric_id is not None:
            result['metricId'] = self.metric_id
        result['paramValues'] = []
        if self.param_values is not None:
            for k in self.param_values:
                result['paramValues'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.filter_values = []
        if m.get('filterValues') is not None:
            for k in m.get('filterValues'):
                temp_model = AlertRuleAlertMetricInputFilterValue()
                self.filter_values.append(temp_model.from_map(k))
        if m.get('groupId') is not None:
            self.group_id = m.get('groupId')
        if m.get('metricId') is not None:
            self.metric_id = m.get('metricId')
        self.param_values = []
        if m.get('paramValues') is not None:
            for k in m.get('paramValues'):
                temp_model = AlertRuleAlertMetricInputParamValue()
                self.param_values.append(temp_model.from_map(k))
        return self


class AlertRuleAlertMetricParamDefValues(TeaModel):
    def __init__(
        self,
        label_cn: str = None,
        label_en: str = None,
        value: str = None,
    ):
        self.label_cn = label_cn
        self.label_en = label_en
        self.value = value

    def validate(self):
        pass

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

        result = dict()
        if self.label_cn is not None:
            result['labelCn'] = self.label_cn
        if self.label_en is not None:
            result['labelEn'] = self.label_en
        if self.value is not None:
            result['value'] = self.value
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('labelCn') is not None:
            self.label_cn = m.get('labelCn')
        if m.get('labelEn') is not None:
            self.label_en = m.get('labelEn')
        if m.get('value') is not None:
            self.value = m.get('value')
        return self


class AlertRuleAlertMetricParamDef(TeaModel):
    def __init__(
        self,
        max_width: int = None,
        min_width: int = None,
        name: str = None,
        placeholder_cn: str = None,
        placeholder_en: str = None,
        type: str = None,
        value: str = None,
        values: List[AlertRuleAlertMetricParamDefValues] = None,
    ):
        self.max_width = max_width
        self.min_width = min_width
        self.name = name
        self.placeholder_cn = placeholder_cn
        self.placeholder_en = placeholder_en
        self.type = type
        self.value = value
        self.values = values

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

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

        result = dict()
        if self.max_width is not None:
            result['maxWidth'] = self.max_width
        if self.min_width is not None:
            result['minWidth'] = self.min_width
        if self.name is not None:
            result['name'] = self.name
        if self.placeholder_cn is not None:
            result['placeholderCn'] = self.placeholder_cn
        if self.placeholder_en is not None:
            result['placeholderEn'] = self.placeholder_en
        if self.type is not None:
            result['type'] = self.type
        if self.value is not None:
            result['value'] = self.value
        result['values'] = []
        if self.values is not None:
            for k in self.values:
                result['values'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('maxWidth') is not None:
            self.max_width = m.get('maxWidth')
        if m.get('minWidth') is not None:
            self.min_width = m.get('minWidth')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('placeholderCn') is not None:
            self.placeholder_cn = m.get('placeholderCn')
        if m.get('placeholderEn') is not None:
            self.placeholder_en = m.get('placeholderEn')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('value') is not None:
            self.value = m.get('value')
        self.values = []
        if m.get('values') is not None:
            for k in m.get('values'):
                temp_model = AlertRuleAlertMetricParamDefValues()
                self.values.append(temp_model.from_map(k))
        return self


class AlertRuleConditionCaseList(TeaModel):
    def __init__(
        self,
        condition: str = None,
        count_condition: str = None,
        level: str = None,
        type: str = None,
    ):
        # Matching expression, example: logLevel: error.
        self.condition = condition
        # Count matching expression, examples: range combination: count >= 3 && count <= 10; single range: count >= 3.
        self.count_condition = count_condition
        # Alert severity level after condition is met.
        self.level = level
        # Matching type: Has data / Has a specific number of data entries / Has matching data / Has a specific number of matching entries.
        # 
        # Valid values:
        # 
        # - HasData: Has data.
        # - HasDataCount: Has a specific number of data entries.
        # - HasDataMatch: Has matching data.
        # - HasDataMatchCount: Has a specific number of matching entries.
        self.type = type

    def validate(self):
        pass

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

        result = dict()
        if self.condition is not None:
            result['condition'] = self.condition
        if self.count_condition is not None:
            result['countCondition'] = self.count_condition
        if self.level is not None:
            result['level'] = self.level
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('condition') is not None:
            self.condition = m.get('condition')
        if m.get('countCondition') is not None:
            self.count_condition = m.get('countCondition')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class AlertRuleConditionCompareListValueLevelList(TeaModel):
    def __init__(
        self,
        level: str = None,
        value: float = None,
    ):
        # Severity level corresponding to the threshold.
        self.level = level
        # Comparison threshold.
        self.value = value

    def validate(self):
        pass

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

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

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


class AlertRuleConditionCompareList(TeaModel):
    def __init__(
        self,
        aggregate: str = None,
        base_unit: str = None,
        display_unit: str = None,
        oper: str = None,
        value: float = None,
        value_level_list: List[AlertRuleConditionCompareListValueLevelList] = None,
        yoy_time_unit: str = None,
        yoy_time_value: int = None,
    ):
        # Time series post-aggregation functions:
        # - count
        # -  sum 
        # -  avg
        # -  min
        # -  max
        # -  p90
        # -  p95
        # -  p99
        self.aggregate = aggregate
        # Data unit.
        self.base_unit = base_unit
        # Display unit.
        self.display_unit = display_unit
        # Comparison operations to determine whether it is year-over-year (YoY) or month-over-month (MoM):
        # - Greater than (GT),
        # - Greater than or equal to (GTE),
        # - Less than (LT),
        # - Less than or equal to (LTE),
        # - Equal to (EQ),
        # - Not equal to (NE),
        # - Year-over-year increase (YOY_UP),
        # - Year-over-year decrease (YOY_DOWN).
        self.oper = oper
        # Comparison threshold.
        self.value = value
        # List of alert severity levels for different values.
        self.value_level_list = value_level_list
        # Year-over-year time unit (only applicable when oper=YOY_UP/YOY_DOWN): minute, hour, day, week, month.
        self.yoy_time_unit = yoy_time_unit
        # Year-over-year time value, used in conjunction with yoyTimeUnit.
        self.yoy_time_value = yoy_time_value

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

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

        result = dict()
        if self.aggregate is not None:
            result['aggregate'] = self.aggregate
        if self.base_unit is not None:
            result['baseUnit'] = self.base_unit
        if self.display_unit is not None:
            result['displayUnit'] = self.display_unit
        if self.oper is not None:
            result['oper'] = self.oper
        if self.value is not None:
            result['value'] = self.value
        result['valueLevelList'] = []
        if self.value_level_list is not None:
            for k in self.value_level_list:
                result['valueLevelList'].append(k.to_map() if k else None)
        if self.yoy_time_unit is not None:
            result['yoyTimeUnit'] = self.yoy_time_unit
        if self.yoy_time_value is not None:
            result['yoyTimeValue'] = self.yoy_time_value
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aggregate') is not None:
            self.aggregate = m.get('aggregate')
        if m.get('baseUnit') is not None:
            self.base_unit = m.get('baseUnit')
        if m.get('displayUnit') is not None:
            self.display_unit = m.get('displayUnit')
        if m.get('oper') is not None:
            self.oper = m.get('oper')
        if m.get('value') is not None:
            self.value = m.get('value')
        self.value_level_list = []
        if m.get('valueLevelList') is not None:
            for k in m.get('valueLevelList'):
                temp_model = AlertRuleConditionCompareListValueLevelList()
                self.value_level_list.append(temp_model.from_map(k))
        if m.get('yoyTimeUnit') is not None:
            self.yoy_time_unit = m.get('yoyTimeUnit')
        if m.get('yoyTimeValue') is not None:
            self.yoy_time_value = m.get('yoyTimeValue')
        return self


class AlertRuleConditionCompositeEscalationEscalations(TeaModel):
    def __init__(
        self,
        comparison_operator: str = None,
        metric_name: str = None,
        period: int = None,
        statistics: str = None,
        threshold: float = None,
    ):
        # Threshold comparison operator, valid values:
        # - GreaterThanOrEqualToThreshold: greater than or equal to.
        # - GreaterThanThreshold: greater than.
        # - LessThanOrEqualToThreshold: less than or equal to.
        # - LessThanThreshold: less than.
        # - NotEqualToThreshold: not equal to.
        # - EqualToThreshold: equal to.
        # - GreaterThanYesterday: increased compared to the same time yesterday.
        # - LessThanYesterday: decreased compared to the same time yesterday.
        # - GreaterThanLastWeek: increased compared to the same time last week.
        # - LessThanLastWeek: decreased compared to the same time last week.
        # - GreaterThanLastPeriod: increased compared to the previous period (MoM).
        # - LessThanLastPeriod: decreased compared to the previous period (MoM).
        self.comparison_operator = comparison_operator
        # Metric name.
        self.metric_name = metric_name
        # Metric time window.
        self.period = period
        # Statistical method; the value of this parameter is determined by the Statistics column corresponding to the specified cloud product\\"s MetricName. This represents the statistical method for the monitoring metric. Example values:
        # - $Maximum: maximum value.
        # - $Minimum: minimum value.
        # - $Average: average value.
        # - $Availability: availability (typically used for site monitoring).
        # Note: "$" is a unified prefix symbol for monitoring metrics.
        self.statistics = statistics
        # Alert threshold.
        self.threshold = threshold

    def validate(self):
        pass

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

        result = dict()
        if self.comparison_operator is not None:
            result['comparisonOperator'] = self.comparison_operator
        if self.metric_name is not None:
            result['metricName'] = self.metric_name
        if self.period is not None:
            result['period'] = self.period
        if self.statistics is not None:
            result['statistics'] = self.statistics
        if self.threshold is not None:
            result['threshold'] = self.threshold
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('comparisonOperator') is not None:
            self.comparison_operator = m.get('comparisonOperator')
        if m.get('metricName') is not None:
            self.metric_name = m.get('metricName')
        if m.get('period') is not None:
            self.period = m.get('period')
        if m.get('statistics') is not None:
            self.statistics = m.get('statistics')
        if m.get('threshold') is not None:
            self.threshold = m.get('threshold')
        return self


class AlertRuleConditionCompositeEscalation(TeaModel):
    def __init__(
        self,
        escalations: List[AlertRuleConditionCompositeEscalationEscalations] = None,
        level: str = None,
        relation: str = None,
        times: int = None,
    ):
        # List of multi-metric composite conditions.
        self.escalations = escalations
        # Alert severity level triggered when the condition is met (multi-metric composite alerts support only one level).
        self.level = level
        # Relationship between multiple metric conditions; valid values are "and" or "or".
        self.relation = relation
        # Number of times the condition must be met to trigger an alert.
        self.times = times

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

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

        result = dict()
        result['escalations'] = []
        if self.escalations is not None:
            for k in self.escalations:
                result['escalations'].append(k.to_map() if k else None)
        if self.level is not None:
            result['level'] = self.level
        if self.relation is not None:
            result['relation'] = self.relation
        if self.times is not None:
            result['times'] = self.times
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.escalations = []
        if m.get('escalations') is not None:
            for k in m.get('escalations'):
                temp_model = AlertRuleConditionCompositeEscalationEscalations()
                self.escalations.append(temp_model.from_map(k))
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('relation') is not None:
            self.relation = m.get('relation')
        if m.get('times') is not None:
            self.times = m.get('times')
        return self


class AlertRuleConditionExpressEscalation(TeaModel):
    def __init__(
        self,
        level: str = None,
        raw_expression: str = None,
        times: int = None,
    ):
        # Alert severity level triggered when the condition is met (expression-based alerts support only one level): 
        # 
        # - CRITICAL 
        # - WARNING 
        # - INFO
        self.level = level
        # Alert condition expression.
        self.raw_expression = raw_expression
        # Number of times the condition must be met to trigger an alert.
        self.times = times

    def validate(self):
        pass

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

        result = dict()
        if self.level is not None:
            result['level'] = self.level
        if self.raw_expression is not None:
            result['rawExpression'] = self.raw_expression
        if self.times is not None:
            result['times'] = self.times
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('rawExpression') is not None:
            self.raw_expression = m.get('rawExpression')
        if m.get('times') is not None:
            self.times = m.get('times')
        return self


class AlertRuleConditionSimpleEscalationEscalations(TeaModel):
    def __init__(
        self,
        comparison_operator: str = None,
        level: str = None,
        statistics: str = None,
        threshold: float = None,
        times: int = None,
    ):
        # Threshold comparison operator, valid values:
        # 
        # - GreaterThanOrEqualToThreshold: greater than or equal to.
        # - GreaterThanThreshold: greater than.
        # - LessThanOrEqualToThreshold: less than or equal to.
        # - LessThanThreshold: less than.
        # - NotEqualToThreshold: not equal to.
        # - EqualToThreshold: equal to.
        # - GreaterThanYesterday: increased compared to the same time yesterday.
        # - LessThanYesterday: decreased compared to the same time yesterday.
        # - GreaterThanLastWeek: increased compared to the same time last week.
        # - LessThanLastWeek: decreased compared to the same time last week.
        # - GreaterThanLastPeriod: increased compared to the previous period (MoM).
        # - LessThanLastPeriod: decreased compared to the previous period (MoM).
        self.comparison_operator = comparison_operator
        # Alert severity level triggered when the condition is met (expression-based alerts support only one level): 
        # - CRITICAL 
        # - WARNING 
        # - INFO
        self.level = level
        # Statistical method; the value of this parameter is determined by the Statistics column corresponding to the specified cloud product\\"s MetricName, for example: Maximum, Minimum, and Average.
        self.statistics = statistics
        # Alert threshold.
        self.threshold = threshold
        # Number of times the condition must be met to trigger an alert.
        self.times = times

    def validate(self):
        pass

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

        result = dict()
        if self.comparison_operator is not None:
            result['comparisonOperator'] = self.comparison_operator
        if self.level is not None:
            result['level'] = self.level
        if self.statistics is not None:
            result['statistics'] = self.statistics
        if self.threshold is not None:
            result['threshold'] = self.threshold
        if self.times is not None:
            result['times'] = self.times
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('comparisonOperator') is not None:
            self.comparison_operator = m.get('comparisonOperator')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('statistics') is not None:
            self.statistics = m.get('statistics')
        if m.get('threshold') is not None:
            self.threshold = m.get('threshold')
        if m.get('times') is not None:
            self.times = m.get('times')
        return self


class AlertRuleConditionSimpleEscalation(TeaModel):
    def __init__(
        self,
        escalations: List[AlertRuleConditionSimpleEscalationEscalations] = None,
        metric_name: str = None,
        period: int = None,
    ):
        # List of conditions; for an alert rule with multiple severity levels, each level corresponds to one condition object.
        self.escalations = escalations
        # Applicable condition type: CMS_BASIC_CONDITION.
        # Metric associated with the alert condition.
        self.metric_name = metric_name
        # Metric time window, in seconds.
        self.period = period

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

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

        result = dict()
        result['escalations'] = []
        if self.escalations is not None:
            for k in self.escalations:
                result['escalations'].append(k.to_map() if k else None)
        if self.metric_name is not None:
            result['metricName'] = self.metric_name
        if self.period is not None:
            result['period'] = self.period
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.escalations = []
        if m.get('escalations') is not None:
            for k in m.get('escalations'):
                temp_model = AlertRuleConditionSimpleEscalationEscalations()
                self.escalations.append(temp_model.from_map(k))
        if m.get('metricName') is not None:
            self.metric_name = m.get('metricName')
        if m.get('period') is not None:
            self.period = m.get('period')
        return self


class AlertRuleCondition(TeaModel):
    def __init__(
        self,
        alert_count: int = None,
        case_list: List[AlertRuleConditionCaseList] = None,
        compare_list: List[AlertRuleConditionCompareList] = None,
        composite_escalation: AlertRuleConditionCompositeEscalation = None,
        escalation_type: str = None,
        express_escalation: AlertRuleConditionExpressEscalation = None,
        no_data_alert_level: str = None,
        no_data_append_value: str = None,
        no_data_policy: str = None,
        oper: str = None,
        relation: str = None,
        simple_escalation: AlertRuleConditionSimpleEscalation = None,
        type: str = None,
        value: float = None,
    ):
        # Applicable condition type: SLS_CONDITION.
        # Number of times the condition must be met before triggering an alert, default is 1.
        self.alert_count = alert_count
        # Applicable condition type: SLS_CONDITION.
        # SLS alert condition list.
        self.case_list = case_list
        # Applicable condition type: APM_CONDITION.
        # APM alert comparison condition list.
        self.compare_list = compare_list
        # Applicable condition type: CMS_BASIC_CONDITION.
        # Valid only when escalationType=composite; composite metric alert condition.
        self.composite_escalation = composite_escalation
        # Applicable condition type: CMS_BASIC_CONDITION.
        # Valid values:
        # - simple: Simple metric condition,
        # - composite: Composite metric condition,
        # - express: Expression condition.
        self.escalation_type = escalation_type
        # Applicable condition type: CMS_BASIC_CONDITION.
        # Valid only when escalationType=composite; multi-metric composite alert condition.
        self.express_escalation = express_escalation
        # Applicable condition type: APM_CONDITION.
        # Alert severity level when no data is available; if not specified, no alert will be triggered for missing data.
        self.no_data_alert_level = no_data_alert_level
        # Applicable condition type: APM_CONDITION.
        # Fallback value when no data is available.
        self.no_data_append_value = no_data_append_value
        # Applicable condition type: CMS_BASIC_CONDITION.
        # Handling method when no monitoring data is available. Valid values:
        # 
        # - KEEP_LAST_STATE (default): No action is taken.
        # - INSUFFICIENT_DATA: Alert with "insufficient data" message.
        # - OK: Treat as normal.
        self.no_data_policy = no_data_policy
        # Comparison operations to determine whether it is year-over-year (YoY) or month-over-month (MoM):
        # 
        # - Greater than (GT),
        # - Greater than or equal to (GTE),
        # - Less than (LT),
        # - Less than or equal to (LTE),
        # - Equal to (EQ),
        # - Not equal to (NE),
        # - Year-over-year increase (YOY_UP),
        # - Year-over-year decrease (YOY_DOWN).
        self.oper = oper
        # Applicable condition type: APM_CONDITION.
        # Logical relationship between multiple conditions. Valid values: and, or.
        self.relation = relation
        # Applicable condition type: CMS_BASIC_CONDITION.
        # Only valid when escalationType=simple; specifies the alert condition for a single metric.
        self.simple_escalation = simple_escalation
        # Rule condition type, valid values:
        # 
        # SLS_CONDITION (SLS alert condition),
        # APM_CONDITION (APM alert condition),
        # CMS_BASIC_CONDITION (Basic Cloud Monitoring alert condition).
        # 
        # This parameter is required.
        self.type = type
        # Alert triggering threshold.
        self.value = value

    def validate(self):
        if self.case_list:
            for k in self.case_list:
                if k:
                    k.validate()
        if self.compare_list:
            for k in self.compare_list:
                if k:
                    k.validate()
        if self.composite_escalation:
            self.composite_escalation.validate()
        if self.express_escalation:
            self.express_escalation.validate()
        if self.simple_escalation:
            self.simple_escalation.validate()

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

        result = dict()
        if self.alert_count is not None:
            result['alertCount'] = self.alert_count
        result['caseList'] = []
        if self.case_list is not None:
            for k in self.case_list:
                result['caseList'].append(k.to_map() if k else None)
        result['compareList'] = []
        if self.compare_list is not None:
            for k in self.compare_list:
                result['compareList'].append(k.to_map() if k else None)
        if self.composite_escalation is not None:
            result['compositeEscalation'] = self.composite_escalation.to_map()
        if self.escalation_type is not None:
            result['escalationType'] = self.escalation_type
        if self.express_escalation is not None:
            result['expressEscalation'] = self.express_escalation.to_map()
        if self.no_data_alert_level is not None:
            result['noDataAlertLevel'] = self.no_data_alert_level
        if self.no_data_append_value is not None:
            result['noDataAppendValue'] = self.no_data_append_value
        if self.no_data_policy is not None:
            result['noDataPolicy'] = self.no_data_policy
        if self.oper is not None:
            result['oper'] = self.oper
        if self.relation is not None:
            result['relation'] = self.relation
        if self.simple_escalation is not None:
            result['simpleEscalation'] = self.simple_escalation.to_map()
        if self.type is not None:
            result['type'] = self.type
        if self.value is not None:
            result['value'] = self.value
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertCount') is not None:
            self.alert_count = m.get('alertCount')
        self.case_list = []
        if m.get('caseList') is not None:
            for k in m.get('caseList'):
                temp_model = AlertRuleConditionCaseList()
                self.case_list.append(temp_model.from_map(k))
        self.compare_list = []
        if m.get('compareList') is not None:
            for k in m.get('compareList'):
                temp_model = AlertRuleConditionCompareList()
                self.compare_list.append(temp_model.from_map(k))
        if m.get('compositeEscalation') is not None:
            temp_model = AlertRuleConditionCompositeEscalation()
            self.composite_escalation = temp_model.from_map(m['compositeEscalation'])
        if m.get('escalationType') is not None:
            self.escalation_type = m.get('escalationType')
        if m.get('expressEscalation') is not None:
            temp_model = AlertRuleConditionExpressEscalation()
            self.express_escalation = temp_model.from_map(m['expressEscalation'])
        if m.get('noDataAlertLevel') is not None:
            self.no_data_alert_level = m.get('noDataAlertLevel')
        if m.get('noDataAppendValue') is not None:
            self.no_data_append_value = m.get('noDataAppendValue')
        if m.get('noDataPolicy') is not None:
            self.no_data_policy = m.get('noDataPolicy')
        if m.get('oper') is not None:
            self.oper = m.get('oper')
        if m.get('relation') is not None:
            self.relation = m.get('relation')
        if m.get('simpleEscalation') is not None:
            temp_model = AlertRuleConditionSimpleEscalation()
            self.simple_escalation = temp_model.from_map(m['simpleEscalation'])
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('value') is not None:
            self.value = m.get('value')
        return self


class AlertRuleDataSourceDsList(TeaModel):
    def __init__(
        self,
        project: str = None,
        region_id: str = None,
        store: str = None,
        type: str = None,
    ):
        # SLS project
        self.project = project
        # The region where the SLS project is located.
        self.region_id = region_id
        # LogStore/MetricStore name.
        self.store = store
        # Type of SLS data sub-source:
        # 
        # - SLS_LOG_DS: LogStore data source.
        # - SLS_METRIC_DS: MetricStore data source.
        self.type = type

    def validate(self):
        pass

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

        result = dict()
        if self.project is not None:
            result['project'] = self.project
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.store is not None:
            result['store'] = self.store
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('project') is not None:
            self.project = m.get('project')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('store') is not None:
            self.store = m.get('store')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class AlertRuleDataSource(TeaModel):
    def __init__(
        self,
        app_type: str = None,
        ds_list: List[AlertRuleDataSourceDsList] = None,
        instance_id: str = None,
        namespace: str = None,
        region_id: str = None,
        type: str = None,
    ):
        # Applicable data source type: APM_DS.
        # Application type: 
        # 
        # - apm.
        self.app_type = app_type
        # Applicable data source type: SLS_MULTI_DS.
        # List of sub-data sources.
        self.ds_list = ds_list
        # Applicable data source type: PROMETHEUS_DS.
        # Prometheus instance ID.
        self.instance_id = instance_id
        # Applicable data source type: ENTERPRISE_DS.
        # Name of the enterprise cloud monitoring metric repository.
        self.namespace = namespace
        # Applicable data source types: APM_DS, PROMETHEUS_DS.
        # The regionId to which the data source belongs.
        self.region_id = region_id
        # Data source type.
        # Valid values:
        # - PROMETHEUS_DS: Prometheus data source.
        # - SLS_MULTI_DS: SLS data source.
        # - APM_DS: Application monitoring data source.
        # - CMS_BASIC_DS: Basic cloud monitoring data source.
        # - ENTERPRISE_DS: Enterprise cloud monitoring data source.
        # 
        # This parameter is required.
        self.type = type

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

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

        result = dict()
        if self.app_type is not None:
            result['appType'] = self.app_type
        result['dsList'] = []
        if self.ds_list is not None:
            for k in self.ds_list:
                result['dsList'].append(k.to_map() if k else None)
        if self.instance_id is not None:
            result['instanceId'] = self.instance_id
        if self.namespace is not None:
            result['namespace'] = self.namespace
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('appType') is not None:
            self.app_type = m.get('appType')
        self.ds_list = []
        if m.get('dsList') is not None:
            for k in m.get('dsList'):
                temp_model = AlertRuleDataSourceDsList()
                self.ds_list.append(temp_model.from_map(k))
        if m.get('instanceId') is not None:
            self.instance_id = m.get('instanceId')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class AlertRuleLabelFilter(TeaModel):
    def __init__(
        self,
        labels: Dict[str, str] = None,
        opt: str = None,
    ):
        self.labels = labels
        self.opt = opt

    def validate(self):
        pass

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

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

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


class AlertRuleTimeSpan(TeaModel):
    def __init__(
        self,
        day_of_week: List[int] = None,
        end_time: str = None,
        gmt_offset: str = None,
        start_time: str = None,
    ):
        # Day of the week.
        self.day_of_week = day_of_week
        # End time, in HH:mm format.
        self.end_time = end_time
        # Default time zone is Beijing Time: +0800.
        self.gmt_offset = gmt_offset
        # Start time, in HH:mm format.
        self.start_time = start_time

    def validate(self):
        pass

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

        result = dict()
        if self.day_of_week is not None:
            result['dayOfWeek'] = self.day_of_week
        if self.end_time is not None:
            result['endTime'] = self.end_time
        if self.gmt_offset is not None:
            result['gmtOffset'] = self.gmt_offset
        if self.start_time is not None:
            result['startTime'] = self.start_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dayOfWeek') is not None:
            self.day_of_week = m.get('dayOfWeek')
        if m.get('endTime') is not None:
            self.end_time = m.get('endTime')
        if m.get('gmtOffset') is not None:
            self.gmt_offset = m.get('gmtOffset')
        if m.get('startTime') is not None:
            self.start_time = m.get('startTime')
        return self


class AlertRuleNotification(TeaModel):
    def __init__(
        self,
        contacts: List[str] = None,
        custom_webhooks: List[str] = None,
        ding_cool_app_webhooks: List[str] = None,
        ding_webhooks: List[str] = None,
        fs_webhooks: List[str] = None,
        groups: List[str] = None,
        notify_time: AlertRuleTimeSpan = None,
        silence_time: int = None,
        slack_webhooks: List[str] = None,
        version: str = None,
        wx_webhooks: List[str] = None,
    ):
        # List of contact IDs.
        self.contacts = contacts
        # List of custom webhook notification object IDs.
        self.custom_webhooks = custom_webhooks
        self.ding_cool_app_webhooks = ding_cool_app_webhooks
        # List of DingTalk webhook notification object IDs.
        self.ding_webhooks = ding_webhooks
        # List of Feishu webhook notification object IDs.
        self.fs_webhooks = fs_webhooks
        # List of contact group IDs.
        self.groups = groups
        # Notification time window; notifications are sent only during this period.
        self.notify_time = notify_time
        # Notification silence duration, in seconds.
        self.silence_time = silence_time
        # List of Slack webhook notification object IDs.
        self.slack_webhooks = slack_webhooks
        # Version of the notification object; the default (empty) value corresponds to the 2.0 notification object. When version=cmsV1, notifications are sent via Cloud Monitor 1.0 notification objects. This is a non-public attribute.
        self.version = version
        # List of WeChat webhook notification object IDs.
        self.wx_webhooks = wx_webhooks

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

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

        result = dict()
        if self.contacts is not None:
            result['contacts'] = self.contacts
        if self.custom_webhooks is not None:
            result['customWebhooks'] = self.custom_webhooks
        if self.ding_cool_app_webhooks is not None:
            result['dingCoolAppWebhooks'] = self.ding_cool_app_webhooks
        if self.ding_webhooks is not None:
            result['dingWebhooks'] = self.ding_webhooks
        if self.fs_webhooks is not None:
            result['fsWebhooks'] = self.fs_webhooks
        if self.groups is not None:
            result['groups'] = self.groups
        if self.notify_time is not None:
            result['notifyTime'] = self.notify_time.to_map()
        if self.silence_time is not None:
            result['silenceTime'] = self.silence_time
        if self.slack_webhooks is not None:
            result['slackWebhooks'] = self.slack_webhooks
        if self.version is not None:
            result['version'] = self.version
        if self.wx_webhooks is not None:
            result['wxWebhooks'] = self.wx_webhooks
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contacts') is not None:
            self.contacts = m.get('contacts')
        if m.get('customWebhooks') is not None:
            self.custom_webhooks = m.get('customWebhooks')
        if m.get('dingCoolAppWebhooks') is not None:
            self.ding_cool_app_webhooks = m.get('dingCoolAppWebhooks')
        if m.get('dingWebhooks') is not None:
            self.ding_webhooks = m.get('dingWebhooks')
        if m.get('fsWebhooks') is not None:
            self.fs_webhooks = m.get('fsWebhooks')
        if m.get('groups') is not None:
            self.groups = m.get('groups')
        if m.get('notifyTime') is not None:
            temp_model = AlertRuleTimeSpan()
            self.notify_time = temp_model.from_map(m['notifyTime'])
        if m.get('silenceTime') is not None:
            self.silence_time = m.get('silenceTime')
        if m.get('slackWebhooks') is not None:
            self.slack_webhooks = m.get('slackWebhooks')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('wxWebhooks') is not None:
            self.wx_webhooks = m.get('wxWebhooks')
        return self


class AlertRuleNotificationFilter(TeaModel):
    def __init__(
        self,
        contacts: List[str] = None,
        custom_webhooks: List[str] = None,
        ding_webhooks: List[str] = None,
        fs_webhooks: List[str] = None,
        groups: List[str] = None,
        slack_webhooks: List[str] = None,
        wx_webhooks: List[str] = None,
    ):
        self.contacts = contacts
        self.custom_webhooks = custom_webhooks
        self.ding_webhooks = ding_webhooks
        self.fs_webhooks = fs_webhooks
        self.groups = groups
        self.slack_webhooks = slack_webhooks
        self.wx_webhooks = wx_webhooks

    def validate(self):
        pass

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

        result = dict()
        if self.contacts is not None:
            result['contacts'] = self.contacts
        if self.custom_webhooks is not None:
            result['customWebhooks'] = self.custom_webhooks
        if self.ding_webhooks is not None:
            result['dingWebhooks'] = self.ding_webhooks
        if self.fs_webhooks is not None:
            result['fsWebhooks'] = self.fs_webhooks
        if self.groups is not None:
            result['groups'] = self.groups
        if self.slack_webhooks is not None:
            result['slackWebhooks'] = self.slack_webhooks
        if self.wx_webhooks is not None:
            result['wxWebhooks'] = self.wx_webhooks
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contacts') is not None:
            self.contacts = m.get('contacts')
        if m.get('customWebhooks') is not None:
            self.custom_webhooks = m.get('customWebhooks')
        if m.get('dingWebhooks') is not None:
            self.ding_webhooks = m.get('dingWebhooks')
        if m.get('fsWebhooks') is not None:
            self.fs_webhooks = m.get('fsWebhooks')
        if m.get('groups') is not None:
            self.groups = m.get('groups')
        if m.get('slackWebhooks') is not None:
            self.slack_webhooks = m.get('slackWebhooks')
        if m.get('wxWebhooks') is not None:
            self.wx_webhooks = m.get('wxWebhooks')
        return self


class AlertRuleQueryEntityFields(TeaModel):
    def __init__(
        self,
        field: str = None,
        value: str = None,
    ):
        self.field = field
        self.value = value

    def validate(self):
        pass

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

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

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


class AlertRuleQueryEntityFilterFilters(TeaModel):
    def __init__(
        self,
        field: str = None,
        operator: str = None,
        value: str = None,
    ):
        # 字段
        self.field = field
        # 比较运算符。
        self.operator = operator
        # 匹配的值。
        self.value = value

    def validate(self):
        pass

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

        result = dict()
        if self.field is not None:
            result['field'] = self.field
        if self.operator is not None:
            result['operator'] = self.operator
        if self.value is not None:
            result['value'] = self.value
        return result

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


class AlertRuleQueryEntityFilter(TeaModel):
    def __init__(
        self,
        domain: str = None,
        filters: List[AlertRuleQueryEntityFilterFilters] = None,
        type: str = None,
    ):
        # 资源类型域。
        self.domain = domain
        # 过滤条件列表，用于进一步筛选资源。
        self.filters = filters
        # 资源类型。
        self.type = type

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

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('domain') is not None:
            self.domain = m.get('domain')
        self.filters = []
        if m.get('filters') is not None:
            for k in m.get('filters'):
                temp_model = AlertRuleQueryEntityFilterFilters()
                self.filters.append(temp_model.from_map(k))
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class AlertRuleQueryLabelFilters(TeaModel):
    def __init__(
        self,
        name: str = None,
        operator: str = None,
        value: str = None,
    ):
        self.name = name
        self.operator = operator
        self.value = value

    def validate(self):
        pass

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

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

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


class AlertRuleQueryQueriesApmFilters(TeaModel):
    def __init__(
        self,
        dim: str = None,
        type: str = None,
        value: str = None,
    ):
        # Dimension in APM metrics.
        self.dim = dim
        # Filter operation types:
        # 
        # - eq: equals.
        # - neq: not equals.
        # - match: regular expression match.
        # - nmatch: regular expression not match.
        self.type = type
        # The corresponding value for the filter operation.
        self.value = value

    def validate(self):
        pass

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

        result = dict()
        if self.dim is not None:
            result['dim'] = self.dim
        if self.type is not None:
            result['type'] = self.type
        if self.value is not None:
            result['value'] = self.value
        return result

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


class AlertRuleQueryQueries(TeaModel):
    def __init__(
        self,
        apm_alert_metric_id: str = None,
        apm_filters: List[AlertRuleQueryQueriesApmFilters] = None,
        apm_group_by: List[str] = None,
        duration: int = None,
        end: int = None,
        expr: str = None,
        start: int = None,
        time_unit: str = None,
        window: int = None,
    ):
        # Applicable query type: APM_MULTI_QUERY.
        # ID of the APM predefined metric.
        self.apm_alert_metric_id = apm_alert_metric_id
        # Applicable query type: ARMS_MULTI_QUERY.
        # Dimension filter configuration for APM metrics. Must be used in conjunction with apmAlertMetricId.
        self.apm_filters = apm_filters
        # Applicable query type: ARMS_MULTI_QUERY.
        # List of aggregation dimensions for the query, i.e., the dimensions by which the metric is aggregated.
        self.apm_group_by = apm_group_by
        # Applicable query type: ARMS_MULTI_QUERY.
        # Alert (data) duration.
        self.duration = duration
        # Applicable query type: SLS_MULTI_QUERY.
        # Time offset end time (relative).
        # If start and end are specified, do not specify window.
        self.end = end
        # Applicable query types: APM_MULTI_QUERY, SLS_MULTI_QUERY.
        # Query expression.
        # 
        # - For APM_MULTI_QUERY, this field is optional and contains the PromQL generated for predefined metrics (used for data preview).
        # - For SLS_MULTI_QUERY, this field contains the SQL query statement.
        self.expr = expr
        # Applicable query type: SLS_MULTI_QUERY.
        # SLS query time offset start time (relative).
        # If start and end are specified, do not specify window. For example: start=15, timeUnit=minute, which means 15 minutes ago.
        self.start = start
        # Applicable query type: SLS_MULTI_QUERY.
        # Time units for the start, end, and window parameters: day/hour/minute/second.
        self.time_unit = time_unit
        # Applicable query type: SLS_MULTI_QUERY.
        # Exact-hour time query interval. If window is specified, start and end should not be specified.
        self.window = window

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

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

        result = dict()
        if self.apm_alert_metric_id is not None:
            result['apmAlertMetricId'] = self.apm_alert_metric_id
        result['apmFilters'] = []
        if self.apm_filters is not None:
            for k in self.apm_filters:
                result['apmFilters'].append(k.to_map() if k else None)
        if self.apm_group_by is not None:
            result['apmGroupBy'] = self.apm_group_by
        if self.duration is not None:
            result['duration'] = self.duration
        if self.end is not None:
            result['end'] = self.end
        if self.expr is not None:
            result['expr'] = self.expr
        if self.start is not None:
            result['start'] = self.start
        if self.time_unit is not None:
            result['timeUnit'] = self.time_unit
        if self.window is not None:
            result['window'] = self.window
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('apmAlertMetricId') is not None:
            self.apm_alert_metric_id = m.get('apmAlertMetricId')
        self.apm_filters = []
        if m.get('apmFilters') is not None:
            for k in m.get('apmFilters'):
                temp_model = AlertRuleQueryQueriesApmFilters()
                self.apm_filters.append(temp_model.from_map(k))
        if m.get('apmGroupBy') is not None:
            self.apm_group_by = m.get('apmGroupBy')
        if m.get('duration') is not None:
            self.duration = m.get('duration')
        if m.get('end') is not None:
            self.end = m.get('end')
        if m.get('expr') is not None:
            self.expr = m.get('expr')
        if m.get('start') is not None:
            self.start = m.get('start')
        if m.get('timeUnit') is not None:
            self.time_unit = m.get('timeUnit')
        if m.get('window') is not None:
            self.window = m.get('window')
        return self


class AlertRuleSlsQueryJoinConditions(TeaModel):
    def __init__(
        self,
        first_field: str = None,
        oper: str = None,
        second_field: str = None,
    ):
        # Left-hand operand of the condition, formatted as $<query_idx>.<result_set_field_name>.
        self.first_field = first_field
        # Comparison operator; valid values: <, >, ==, !=, <=, >=.
        self.oper = oper
        # Right-hand operand of the condition, formatted as $<query_idx>.<result_set_field_name>.
        self.second_field = second_field

    def validate(self):
        pass

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

        result = dict()
        if self.first_field is not None:
            result['firstField'] = self.first_field
        if self.oper is not None:
            result['oper'] = self.oper
        if self.second_field is not None:
            result['secondField'] = self.second_field
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('firstField') is not None:
            self.first_field = m.get('firstField')
        if m.get('oper') is not None:
            self.oper = m.get('oper')
        if m.get('secondField') is not None:
            self.second_field = m.get('secondField')
        return self


class AlertRuleSlsQueryJoin(TeaModel):
    def __init__(
        self,
        conditions: List[AlertRuleSlsQueryJoinConditions] = None,
        type: str = None,
    ):
        # List of connection conditions.
        self.conditions = conditions
        # Set operation type.
        # CrossJoin: Cartesian product
        # FullJoin: Full outer join
        # InnerJoin: Inner join
        # LeftExclude: Left anti join
        # RightExclude: Right anti join
        # LeftJoin: Left outer join
        # RightJoin: Right outer join
        # NoJoin: No merge
        # Concat: Concatenation
        # 
        # See also: https://help.aliyun.com/zh/sls/user-guide/set-query-statistics-statement
        # 
        # This parameter is required.
        self.type = type

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

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

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

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


class AlertRuleQuery(TeaModel):
    def __init__(
        self,
        check_after_data_complete: bool = None,
        dimensions: List[Dict[str, str]] = None,
        domain: str = None,
        duration: int = None,
        entity_fields: List[AlertRuleQueryEntityFields] = None,
        entity_filter: AlertRuleQueryEntityFilter = None,
        expr: str = None,
        first_join: AlertRuleSlsQueryJoin = None,
        group_field_list: List[str] = None,
        group_id: str = None,
        group_type: str = None,
        label_filters: List[AlertRuleQueryLabelFilters] = None,
        metric: str = None,
        metric_set: str = None,
        namespace: str = None,
        queries: List[AlertRuleQueryQueries] = None,
        relation_type: str = None,
        second_join: AlertRuleSlsQueryJoin = None,
        service_ids: List[str] = None,
        type: str = None,
    ):
        # Applicable query type: PROMQL_QUERY.
        # Whether to perform alert evaluation only after data completeness is ensured.
        self.check_after_data_complete = check_after_data_complete
        # Applicable query type: CMS_BASIC_QUERY.
        # List of filtering dimensions for the resource.
        self.dimensions = dimensions
        # 资源所属的领域。
        self.domain = domain
        # Applicable query type: PROMQL_QUERY.
        # Duration of alert data, in seconds.
        self.duration = duration
        self.entity_fields = entity_fields
        # 资源过滤器，用于筛选目标资源。
        self.entity_filter = entity_filter
        # Applicable query type: PROMQL_QUERY.
        # Query expression (PromQL).
        self.expr = expr
        # Applicable query type: SLS_MULTI_QUERY.
        # Configuration for the set join operation between the results of subquery 1 (queries[0]) and subquery 2 (queries[1]).
        self.first_join = first_join
        # Applicable query type: SLS_MULTI_QUERY.
        # List of grouping field names.
        self.group_field_list = group_field_list
        # Applicable query type: CMS_BASIC_QUERY.
        # Associated application group ID, valid only when relationType = GROUP.
        self.group_id = group_id
        # Applicable query type: SLS_MULTI_QUERY.
        # Grouping type, with the following possible values:
        # 
        # - none: No grouping.
        # - label: Automatic label grouping.
        # - custom: Custom label grouping.
        self.group_type = group_type
        self.label_filters = label_filters
        # 指标名。
        self.metric = metric
        # 监控指标集合。
        self.metric_set = metric_set
        # Applicable query type: CMS_BASIC_QUERY.
        # Namespace of the metric.
        self.namespace = namespace
        # Applicable query types: SLS_MULTI_QUERY, APM_MULTI_QUERY.
        # List of subqueries.
        # 
        # For the SLS_MULTI_QUERY type, the list can contain up to three subqueries, and the number and order of subqueries must match the sub-datasource configurations in datasource.dsList.
        self.queries = queries
        # Applicable query type: CMS_BASIC_QUERY.
        # Resource scope for the rule query, with the following allowed values:
        # - USER: All resources under the user\\"s UID.
        # - GROUP: Application group.
        # - INSTANCE: Specified list of instances.
        self.relation_type = relation_type
        # Applicable query type: SLS_MULTI_QUERY.
        # Configuration for the set join operation between the results of subquery 2 (queries[2]) and subquery 3 (queries[3]).
        self.second_join = second_join
        # Service ID list.
        self.service_ids = service_ids
        # Query type.
        # 
        # Valid values:
        # 
        # - PROMQL_QUERY: PromQL query
        # - SLS_MULTI_QUERY: SLS query
        # - APM_MULTI_QUERY: APM query
        # - CMS_BASIC_QUERY: Basic CloudMonitor query
        # 
        # The valid fields within the query object vary depending on the query type. Refer to the "Applicable query type" description in each field\\"s documentation for details.
        # 
        # The query type must match the data source type, with the following correspondences:
        # 
        # - Prometheus data source (PROMETHEUS_DS): PROMQL_QUERY
        # - APM data source (APM_DS): APM_MULTI_QUERY
        # - SLS data source (SLS_MULTI_DS): SLS_MULTI_QUERY
        # - Basic CloudMonitor data source (CMS_BASIC_DS): CMS_BASIC_QUERY.
        # 
        # This parameter is required.
        self.type = type

    def validate(self):
        if self.entity_fields:
            for k in self.entity_fields:
                if k:
                    k.validate()
        if self.entity_filter:
            self.entity_filter.validate()
        if self.first_join:
            self.first_join.validate()
        if self.label_filters:
            for k in self.label_filters:
                if k:
                    k.validate()
        if self.queries:
            for k in self.queries:
                if k:
                    k.validate()
        if self.second_join:
            self.second_join.validate()

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

        result = dict()
        if self.check_after_data_complete is not None:
            result['checkAfterDataComplete'] = self.check_after_data_complete
        if self.dimensions is not None:
            result['dimensions'] = self.dimensions
        if self.domain is not None:
            result['domain'] = self.domain
        if self.duration is not None:
            result['duration'] = self.duration
        result['entityFields'] = []
        if self.entity_fields is not None:
            for k in self.entity_fields:
                result['entityFields'].append(k.to_map() if k else None)
        if self.entity_filter is not None:
            result['entityFilter'] = self.entity_filter.to_map()
        if self.expr is not None:
            result['expr'] = self.expr
        if self.first_join is not None:
            result['firstJoin'] = self.first_join.to_map()
        if self.group_field_list is not None:
            result['groupFieldList'] = self.group_field_list
        if self.group_id is not None:
            result['groupId'] = self.group_id
        if self.group_type is not None:
            result['groupType'] = self.group_type
        result['labelFilters'] = []
        if self.label_filters is not None:
            for k in self.label_filters:
                result['labelFilters'].append(k.to_map() if k else None)
        if self.metric is not None:
            result['metric'] = self.metric
        if self.metric_set is not None:
            result['metricSet'] = self.metric_set
        if self.namespace is not None:
            result['namespace'] = self.namespace
        result['queries'] = []
        if self.queries is not None:
            for k in self.queries:
                result['queries'].append(k.to_map() if k else None)
        if self.relation_type is not None:
            result['relationType'] = self.relation_type
        if self.second_join is not None:
            result['secondJoin'] = self.second_join.to_map()
        if self.service_ids is not None:
            result['serviceIds'] = self.service_ids
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('checkAfterDataComplete') is not None:
            self.check_after_data_complete = m.get('checkAfterDataComplete')
        if m.get('dimensions') is not None:
            self.dimensions = m.get('dimensions')
        if m.get('domain') is not None:
            self.domain = m.get('domain')
        if m.get('duration') is not None:
            self.duration = m.get('duration')
        self.entity_fields = []
        if m.get('entityFields') is not None:
            for k in m.get('entityFields'):
                temp_model = AlertRuleQueryEntityFields()
                self.entity_fields.append(temp_model.from_map(k))
        if m.get('entityFilter') is not None:
            temp_model = AlertRuleQueryEntityFilter()
            self.entity_filter = temp_model.from_map(m['entityFilter'])
        if m.get('expr') is not None:
            self.expr = m.get('expr')
        if m.get('firstJoin') is not None:
            temp_model = AlertRuleSlsQueryJoin()
            self.first_join = temp_model.from_map(m['firstJoin'])
        if m.get('groupFieldList') is not None:
            self.group_field_list = m.get('groupFieldList')
        if m.get('groupId') is not None:
            self.group_id = m.get('groupId')
        if m.get('groupType') is not None:
            self.group_type = m.get('groupType')
        self.label_filters = []
        if m.get('labelFilters') is not None:
            for k in m.get('labelFilters'):
                temp_model = AlertRuleQueryLabelFilters()
                self.label_filters.append(temp_model.from_map(k))
        if m.get('metric') is not None:
            self.metric = m.get('metric')
        if m.get('metricSet') is not None:
            self.metric_set = m.get('metricSet')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        self.queries = []
        if m.get('queries') is not None:
            for k in m.get('queries'):
                temp_model = AlertRuleQueryQueries()
                self.queries.append(temp_model.from_map(k))
        if m.get('relationType') is not None:
            self.relation_type = m.get('relationType')
        if m.get('secondJoin') is not None:
            temp_model = AlertRuleSlsQueryJoin()
            self.second_join = temp_model.from_map(m['secondJoin'])
        if m.get('serviceIds') is not None:
            self.service_ids = m.get('serviceIds')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class AlertRuleRcaConfig(TeaModel):
    def __init__(
        self,
        digital_employee_name: str = None,
        enable_rca: bool = None,
    ):
        self.digital_employee_name = digital_employee_name
        self.enable_rca = enable_rca

    def validate(self):
        pass

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

        result = dict()
        if self.digital_employee_name is not None:
            result['digitalEmployeeName'] = self.digital_employee_name
        if self.enable_rca is not None:
            result['enableRca'] = self.enable_rca
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('digitalEmployeeName') is not None:
            self.digital_employee_name = m.get('digitalEmployeeName')
        if m.get('enableRca') is not None:
            self.enable_rca = m.get('enableRca')
        return self


class AlertRuleSend(TeaModel):
    def __init__(
        self,
        action: AlertRuleAction = None,
        notification: AlertRuleNotification = None,
        notify_strategies: List[str] = None,
        rca_config: AlertRuleRcaConfig = None,
        send_to_arms: bool = None,
    ):
        # Alert Action Integration Configuration.
        self.action = action
        # Alert Notification Configuration.
        self.notification = notification
        self.notify_strategies = notify_strategies
        self.rca_config = rca_config
        # Whether to deliver alert events to ARMS Alert Management.
        self.send_to_arms = send_to_arms

    def validate(self):
        if self.action:
            self.action.validate()
        if self.notification:
            self.notification.validate()
        if self.rca_config:
            self.rca_config.validate()

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

        result = dict()
        if self.action is not None:
            result['action'] = self.action.to_map()
        if self.notification is not None:
            result['notification'] = self.notification.to_map()
        if self.notify_strategies is not None:
            result['notifyStrategies'] = self.notify_strategies
        if self.rca_config is not None:
            result['rcaConfig'] = self.rca_config.to_map()
        if self.send_to_arms is not None:
            result['sendToArms'] = self.send_to_arms
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('action') is not None:
            temp_model = AlertRuleAction()
            self.action = temp_model.from_map(m['action'])
        if m.get('notification') is not None:
            temp_model = AlertRuleNotification()
            self.notification = temp_model.from_map(m['notification'])
        if m.get('notifyStrategies') is not None:
            self.notify_strategies = m.get('notifyStrategies')
        if m.get('rcaConfig') is not None:
            temp_model = AlertRuleRcaConfig()
            self.rca_config = temp_model.from_map(m['rcaConfig'])
        if m.get('sendToArms') is not None:
            self.send_to_arms = m.get('sendToArms')
        return self


class BizTraceConfig(TeaModel):
    def __init__(
        self,
        advanced_config: str = None,
        biz_trace_code: str = None,
        biz_trace_id: str = None,
        biz_trace_name: str = None,
        create_time: str = None,
        region_id: str = None,
        rule_config: str = None,
        workspace: str = None,
    ):
        self.advanced_config = advanced_config
        self.biz_trace_code = biz_trace_code
        self.biz_trace_id = biz_trace_id
        self.biz_trace_name = biz_trace_name
        self.create_time = create_time
        self.region_id = region_id
        self.rule_config = rule_config
        self.workspace = workspace

    def validate(self):
        pass

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

        result = dict()
        if self.advanced_config is not None:
            result['advancedConfig'] = self.advanced_config
        if self.biz_trace_code is not None:
            result['bizTraceCode'] = self.biz_trace_code
        if self.biz_trace_id is not None:
            result['bizTraceId'] = self.biz_trace_id
        if self.biz_trace_name is not None:
            result['bizTraceName'] = self.biz_trace_name
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.rule_config is not None:
            result['ruleConfig'] = self.rule_config
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('advancedConfig') is not None:
            self.advanced_config = m.get('advancedConfig')
        if m.get('bizTraceCode') is not None:
            self.biz_trace_code = m.get('bizTraceCode')
        if m.get('bizTraceId') is not None:
            self.biz_trace_id = m.get('bizTraceId')
        if m.get('bizTraceName') is not None:
            self.biz_trace_name = m.get('bizTraceName')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('ruleConfig') is not None:
            self.rule_config = m.get('ruleConfig')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class EventResourceForEventViewEntity(TeaModel):
    def __init__(
        self,
        domain: str = None,
        entity_id: str = None,
        entity_type: str = None,
        prop: Dict[str, Any] = None,
    ):
        self.domain = domain
        self.entity_id = entity_id
        self.entity_type = entity_type
        self.prop = prop

    def validate(self):
        pass

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

        result = dict()
        if self.domain is not None:
            result['domain'] = self.domain
        if self.entity_id is not None:
            result['entityId'] = self.entity_id
        if self.entity_type is not None:
            result['entityType'] = self.entity_type
        if self.prop is not None:
            result['prop'] = self.prop
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('domain') is not None:
            self.domain = m.get('domain')
        if m.get('entityId') is not None:
            self.entity_id = m.get('entityId')
        if m.get('entityType') is not None:
            self.entity_type = m.get('entityType')
        if m.get('prop') is not None:
            self.prop = m.get('prop')
        return self


class EventResourceForEventView(TeaModel):
    def __init__(
        self,
        entity: EventResourceForEventViewEntity = None,
        tags: Dict[str, Any] = None,
    ):
        self.entity = entity
        self.tags = tags

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

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('entity') is not None:
            temp_model = EventResourceForEventViewEntity()
            self.entity = temp_model.from_map(m['entity'])
        if m.get('tags') is not None:
            self.tags = m.get('tags')
        return self


class CmsEventForView(TeaModel):
    def __init__(
        self,
        annotations: Dict[str, Any] = None,
        data: Any = None,
        datacontenttype: str = None,
        dataschema: str = None,
        dedup_id: str = None,
        id: str = None,
        integration_uuid: str = None,
        labels: Dict[str, Any] = None,
        receive_time: int = None,
        resource: EventResourceForEventView = None,
        severity: str = None,
        source: str = None,
        sourcetype: str = None,
        status: str = None,
        subject: str = None,
        subtype: str = None,
        sys_id: str = None,
        time: str = None,
        timestamp: int = None,
        type: str = None,
        workspace: str = None,
        workspace_tags: Dict[str, Any] = None,
    ):
        self.annotations = annotations
        self.data = data
        self.datacontenttype = datacontenttype
        self.dataschema = dataschema
        self.dedup_id = dedup_id
        self.id = id
        self.integration_uuid = integration_uuid
        self.labels = labels
        self.receive_time = receive_time
        self.resource = resource
        self.severity = severity
        self.source = source
        self.sourcetype = sourcetype
        self.status = status
        self.subject = subject
        self.subtype = subtype
        self.sys_id = sys_id
        self.time = time
        self.timestamp = timestamp
        self.type = type
        self.workspace = workspace
        self.workspace_tags = workspace_tags

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

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

        result = dict()
        if self.annotations is not None:
            result['annotations'] = self.annotations
        if self.data is not None:
            result['data'] = self.data
        if self.datacontenttype is not None:
            result['datacontenttype'] = self.datacontenttype
        if self.dataschema is not None:
            result['dataschema'] = self.dataschema
        if self.dedup_id is not None:
            result['dedupId'] = self.dedup_id
        if self.id is not None:
            result['id'] = self.id
        if self.integration_uuid is not None:
            result['integrationUuid'] = self.integration_uuid
        if self.labels is not None:
            result['labels'] = self.labels
        if self.receive_time is not None:
            result['receiveTime'] = self.receive_time
        if self.resource is not None:
            result['resource'] = self.resource.to_map()
        if self.severity is not None:
            result['severity'] = self.severity
        if self.source is not None:
            result['source'] = self.source
        if self.sourcetype is not None:
            result['sourcetype'] = self.sourcetype
        if self.status is not None:
            result['status'] = self.status
        if self.subject is not None:
            result['subject'] = self.subject
        if self.subtype is not None:
            result['subtype'] = self.subtype
        if self.sys_id is not None:
            result['sysId'] = self.sys_id
        if self.time is not None:
            result['time'] = self.time
        if self.timestamp is not None:
            result['timestamp'] = self.timestamp
        if self.type is not None:
            result['type'] = self.type
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.workspace_tags is not None:
            result['workspaceTags'] = self.workspace_tags
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('annotations') is not None:
            self.annotations = m.get('annotations')
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('datacontenttype') is not None:
            self.datacontenttype = m.get('datacontenttype')
        if m.get('dataschema') is not None:
            self.dataschema = m.get('dataschema')
        if m.get('dedupId') is not None:
            self.dedup_id = m.get('dedupId')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('integrationUuid') is not None:
            self.integration_uuid = m.get('integrationUuid')
        if m.get('labels') is not None:
            self.labels = m.get('labels')
        if m.get('receiveTime') is not None:
            self.receive_time = m.get('receiveTime')
        if m.get('resource') is not None:
            temp_model = EventResourceForEventView()
            self.resource = temp_model.from_map(m['resource'])
        if m.get('severity') is not None:
            self.severity = m.get('severity')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('sourcetype') is not None:
            self.sourcetype = m.get('sourcetype')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('subject') is not None:
            self.subject = m.get('subject')
        if m.get('subtype') is not None:
            self.subtype = m.get('subtype')
        if m.get('sysId') is not None:
            self.sys_id = m.get('sysId')
        if m.get('time') is not None:
            self.time = m.get('time')
        if m.get('timestamp') is not None:
            self.timestamp = m.get('timestamp')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        if m.get('workspaceTags') is not None:
            self.workspace_tags = m.get('workspaceTags')
        return self


class ContactForIncidentView(TeaModel):
    def __init__(
        self,
        contact_id: str = None,
        name: str = None,
    ):
        self.contact_id = contact_id
        self.name = name

    def validate(self):
        pass

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

        result = dict()
        if self.contact_id is not None:
            result['contactId'] = self.contact_id
        if self.name is not None:
            result['name'] = self.name
        return result

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


class CustomExtractionStrategy(TeaModel):
    def __init__(
        self,
        description: str = None,
        extraction_prompt: str = None,
        strategy_name: str = None,
        strategy_type: str = None,
        update_prompt: str = None,
    ):
        self.description = description
        self.extraction_prompt = extraction_prompt
        self.strategy_name = strategy_name
        self.strategy_type = strategy_type
        self.update_prompt = update_prompt

    def validate(self):
        pass

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.extraction_prompt is not None:
            result['extractionPrompt'] = self.extraction_prompt
        if self.strategy_name is not None:
            result['strategyName'] = self.strategy_name
        if self.strategy_type is not None:
            result['strategyType'] = self.strategy_type
        if self.update_prompt is not None:
            result['updatePrompt'] = self.update_prompt
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('extractionPrompt') is not None:
            self.extraction_prompt = m.get('extractionPrompt')
        if m.get('strategyName') is not None:
            self.strategy_name = m.get('strategyName')
        if m.get('strategyType') is not None:
            self.strategy_type = m.get('strategyType')
        if m.get('updatePrompt') is not None:
            self.update_prompt = m.get('updatePrompt')
        return self


class DataStorageItem(TeaModel):
    def __init__(
        self,
        data_type: str = None,
        project: str = None,
        region_id: str = None,
        store_name: str = None,
        store_type: str = None,
    ):
        self.data_type = data_type
        self.project = project
        self.region_id = region_id
        self.store_name = store_name
        self.store_type = store_type

    def validate(self):
        pass

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

        result = dict()
        if self.data_type is not None:
            result['dataType'] = self.data_type
        if self.project is not None:
            result['project'] = self.project
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.store_name is not None:
            result['storeName'] = self.store_name
        if self.store_type is not None:
            result['storeType'] = self.store_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dataType') is not None:
            self.data_type = m.get('dataType')
        if m.get('project') is not None:
            self.project = m.get('project')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('storeName') is not None:
            self.store_name = m.get('storeName')
        if m.get('storeType') is not None:
            self.store_type = m.get('storeType')
        return self


class EffectTimeRange(TeaModel):
    def __init__(
        self,
        day_in_week: List[int] = None,
        end_time_in_minute: int = None,
        start_time_in_minute: int = None,
        time_zone: str = None,
    ):
        self.day_in_week = day_in_week
        self.end_time_in_minute = end_time_in_minute
        self.start_time_in_minute = start_time_in_minute
        self.time_zone = time_zone

    def validate(self):
        pass

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

        result = dict()
        if self.day_in_week is not None:
            result['dayInWeek'] = self.day_in_week
        if self.end_time_in_minute is not None:
            result['endTimeInMinute'] = self.end_time_in_minute
        if self.start_time_in_minute is not None:
            result['startTimeInMinute'] = self.start_time_in_minute
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dayInWeek') is not None:
            self.day_in_week = m.get('dayInWeek')
        if m.get('endTimeInMinute') is not None:
            self.end_time_in_minute = m.get('endTimeInMinute')
        if m.get('startTimeInMinute') is not None:
            self.start_time_in_minute = m.get('startTimeInMinute')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        return self


class EntityDiscoverRuleAnnotations(TeaModel):
    def __init__(
        self,
        op: str = None,
        tag_key: str = None,
        tag_values: List[str] = None,
    ):
        self.op = op
        self.tag_key = tag_key
        self.tag_values = tag_values

    def validate(self):
        pass

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

        result = dict()
        if self.op is not None:
            result['op'] = self.op
        if self.tag_key is not None:
            result['tagKey'] = self.tag_key
        if self.tag_values is not None:
            result['tagValues'] = self.tag_values
        return result

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


class EntityDiscoverRuleFieldRules(TeaModel):
    def __init__(
        self,
        field_key: str = None,
        field_values: List[str] = None,
        op: str = None,
    ):
        self.field_key = field_key
        self.field_values = field_values
        self.op = op

    def validate(self):
        pass

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

        result = dict()
        if self.field_key is not None:
            result['fieldKey'] = self.field_key
        if self.field_values is not None:
            result['fieldValues'] = self.field_values
        if self.op is not None:
            result['op'] = self.op
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('fieldKey') is not None:
            self.field_key = m.get('fieldKey')
        if m.get('fieldValues') is not None:
            self.field_values = m.get('fieldValues')
        if m.get('op') is not None:
            self.op = m.get('op')
        return self


class EntityDiscoverRuleIpMatchRule(TeaModel):
    def __init__(
        self,
        ip_cidr: str = None,
        ip_field_key: str = None,
    ):
        self.ip_cidr = ip_cidr
        self.ip_field_key = ip_field_key

    def validate(self):
        pass

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

        result = dict()
        if self.ip_cidr is not None:
            result['ipCIDR'] = self.ip_cidr
        if self.ip_field_key is not None:
            result['ipFieldKey'] = self.ip_field_key
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ipCIDR') is not None:
            self.ip_cidr = m.get('ipCIDR')
        if m.get('ipFieldKey') is not None:
            self.ip_field_key = m.get('ipFieldKey')
        return self


class EntityDiscoverRuleLabels(TeaModel):
    def __init__(
        self,
        op: str = None,
        tag_key: str = None,
        tag_values: List[str] = None,
    ):
        self.op = op
        self.tag_key = tag_key
        self.tag_values = tag_values

    def validate(self):
        pass

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

        result = dict()
        if self.op is not None:
            result['op'] = self.op
        if self.tag_key is not None:
            result['tagKey'] = self.tag_key
        if self.tag_values is not None:
            result['tagValues'] = self.tag_values
        return result

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


class EntityDiscoverRuleTags(TeaModel):
    def __init__(
        self,
        op: str = None,
        tag_key: str = None,
        tag_values: List[str] = None,
    ):
        self.op = op
        self.tag_key = tag_key
        self.tag_values = tag_values

    def validate(self):
        pass

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

        result = dict()
        if self.op is not None:
            result['op'] = self.op
        if self.tag_key is not None:
            result['tagKey'] = self.tag_key
        if self.tag_values is not None:
            result['tagValues'] = self.tag_values
        return result

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


class EntityDiscoverRule(TeaModel):
    def __init__(
        self,
        annotations: List[EntityDiscoverRuleAnnotations] = None,
        entity_types: List[str] = None,
        field_rules: List[EntityDiscoverRuleFieldRules] = None,
        instance_ids: List[str] = None,
        ip_match_rule: List[EntityDiscoverRuleIpMatchRule] = None,
        labels: List[EntityDiscoverRuleLabels] = None,
        region_ids: List[str] = None,
        resource_group_id: str = None,
        tags: List[EntityDiscoverRuleTags] = None,
    ):
        self.annotations = annotations
        self.entity_types = entity_types
        self.field_rules = field_rules
        self.instance_ids = instance_ids
        self.ip_match_rule = ip_match_rule
        self.labels = labels
        self.region_ids = region_ids
        self.resource_group_id = resource_group_id
        self.tags = tags

    def validate(self):
        if self.annotations:
            for k in self.annotations:
                if k:
                    k.validate()
        if self.field_rules:
            for k in self.field_rules:
                if k:
                    k.validate()
        if self.ip_match_rule:
            for k in self.ip_match_rule:
                if k:
                    k.validate()
        if self.labels:
            for k in self.labels:
                if k:
                    k.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

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

        result = dict()
        result['annotations'] = []
        if self.annotations is not None:
            for k in self.annotations:
                result['annotations'].append(k.to_map() if k else None)
        if self.entity_types is not None:
            result['entityTypes'] = self.entity_types
        result['fieldRules'] = []
        if self.field_rules is not None:
            for k in self.field_rules:
                result['fieldRules'].append(k.to_map() if k else None)
        if self.instance_ids is not None:
            result['instanceIds'] = self.instance_ids
        result['ipMatchRule'] = []
        if self.ip_match_rule is not None:
            for k in self.ip_match_rule:
                result['ipMatchRule'].append(k.to_map() if k else None)
        result['labels'] = []
        if self.labels is not None:
            for k in self.labels:
                result['labels'].append(k.to_map() if k else None)
        if self.region_ids is not None:
            result['regionIds'] = self.region_ids
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        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: dict = None):
        m = m or dict()
        self.annotations = []
        if m.get('annotations') is not None:
            for k in m.get('annotations'):
                temp_model = EntityDiscoverRuleAnnotations()
                self.annotations.append(temp_model.from_map(k))
        if m.get('entityTypes') is not None:
            self.entity_types = m.get('entityTypes')
        self.field_rules = []
        if m.get('fieldRules') is not None:
            for k in m.get('fieldRules'):
                temp_model = EntityDiscoverRuleFieldRules()
                self.field_rules.append(temp_model.from_map(k))
        if m.get('instanceIds') is not None:
            self.instance_ids = m.get('instanceIds')
        self.ip_match_rule = []
        if m.get('ipMatchRule') is not None:
            for k in m.get('ipMatchRule'):
                temp_model = EntityDiscoverRuleIpMatchRule()
                self.ip_match_rule.append(temp_model.from_map(k))
        self.labels = []
        if m.get('labels') is not None:
            for k in m.get('labels'):
                temp_model = EntityDiscoverRuleLabels()
                self.labels.append(temp_model.from_map(k))
        if m.get('regionIds') is not None:
            self.region_ids = m.get('regionIds')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = EntityDiscoverRuleTags()
                self.tags.append(temp_model.from_map(k))
        return self


class EntityGroupBaseEntityQueries(TeaModel):
    def __init__(
        self,
        entity_type: str = None,
        spl: str = None,
    ):
        self.entity_type = entity_type
        self.spl = spl

    def validate(self):
        pass

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

        result = dict()
        if self.entity_type is not None:
            result['entityType'] = self.entity_type
        if self.spl is not None:
            result['spl'] = self.spl
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('entityType') is not None:
            self.entity_type = m.get('entityType')
        if m.get('spl') is not None:
            self.spl = m.get('spl')
        return self


class EntityGroupBase(TeaModel):
    def __init__(
        self,
        description: str = None,
        entity_group_id: str = None,
        entity_group_name: str = None,
        entity_queries: List[EntityGroupBaseEntityQueries] = None,
        entity_rules: EntityDiscoverRule = None,
        region_id: str = None,
        user_id: str = None,
        workspace: str = None,
    ):
        self.description = description
        self.entity_group_id = entity_group_id
        self.entity_group_name = entity_group_name
        self.entity_queries = entity_queries
        self.entity_rules = entity_rules
        self.region_id = region_id
        self.user_id = user_id
        self.workspace = workspace

    def validate(self):
        if self.entity_queries:
            for k in self.entity_queries:
                if k:
                    k.validate()
        if self.entity_rules:
            self.entity_rules.validate()

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.entity_group_id is not None:
            result['entityGroupId'] = self.entity_group_id
        if self.entity_group_name is not None:
            result['entityGroupName'] = self.entity_group_name
        result['entityQueries'] = []
        if self.entity_queries is not None:
            for k in self.entity_queries:
                result['entityQueries'].append(k.to_map() if k else None)
        if self.entity_rules is not None:
            result['entityRules'] = self.entity_rules.to_map()
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('entityGroupId') is not None:
            self.entity_group_id = m.get('entityGroupId')
        if m.get('entityGroupName') is not None:
            self.entity_group_name = m.get('entityGroupName')
        self.entity_queries = []
        if m.get('entityQueries') is not None:
            for k in m.get('entityQueries'):
                temp_model = EntityGroupBaseEntityQueries()
                self.entity_queries.append(temp_model.from_map(k))
        if m.get('entityRules') is not None:
            temp_model = EntityDiscoverRule()
            self.entity_rules = temp_model.from_map(m['entityRules'])
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class Evaluator(TeaModel):
    def __init__(
        self,
        config: Dict[str, Any] = None,
        data_scope: str = None,
        filters: Dict[str, str] = None,
        name: str = None,
        result_name: str = None,
        result_type: str = None,
        variable_mapping: Dict[str, str] = None,
    ):
        self.config = config
        self.data_scope = data_scope
        self.filters = filters
        self.name = name
        self.result_name = result_name
        self.result_type = result_type
        self.variable_mapping = variable_mapping

    def validate(self):
        pass

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

        result = dict()
        if self.config is not None:
            result['config'] = self.config
        if self.data_scope is not None:
            result['dataScope'] = self.data_scope
        if self.filters is not None:
            result['filters'] = self.filters
        if self.name is not None:
            result['name'] = self.name
        if self.result_name is not None:
            result['resultName'] = self.result_name
        if self.result_type is not None:
            result['resultType'] = self.result_type
        if self.variable_mapping is not None:
            result['variableMapping'] = self.variable_mapping
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('config') is not None:
            self.config = m.get('config')
        if m.get('dataScope') is not None:
            self.data_scope = m.get('dataScope')
        if m.get('filters') is not None:
            self.filters = m.get('filters')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('resultName') is not None:
            self.result_name = m.get('resultName')
        if m.get('resultType') is not None:
            self.result_type = m.get('resultType')
        if m.get('variableMapping') is not None:
            self.variable_mapping = m.get('variableMapping')
        return self


class EventResourceForIncidentView(TeaModel):
    def __init__(
        self,
        domain: str = None,
        entity_id: str = None,
        entity_type: str = None,
        probs: str = None,
        tags: str = None,
    ):
        self.domain = domain
        self.entity_id = entity_id
        self.entity_type = entity_type
        self.probs = probs
        self.tags = tags

    def validate(self):
        pass

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

        result = dict()
        if self.domain is not None:
            result['domain'] = self.domain
        if self.entity_id is not None:
            result['entityId'] = self.entity_id
        if self.entity_type is not None:
            result['entityType'] = self.entity_type
        if self.probs is not None:
            result['probs'] = self.probs
        if self.tags is not None:
            result['tags'] = self.tags
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('domain') is not None:
            self.domain = m.get('domain')
        if m.get('entityId') is not None:
            self.entity_id = m.get('entityId')
        if m.get('entityType') is not None:
            self.entity_type = m.get('entityType')
        if m.get('probs') is not None:
            self.probs = m.get('probs')
        if m.get('tags') is not None:
            self.tags = m.get('tags')
        return self


class ModelParameters(TeaModel):
    def __init__(
        self,
        frequency_penalty: float = None,
        max_tokens: int = None,
        presence_penalty: float = None,
        stop_sequences: List[str] = None,
        temperature: float = None,
        top_k: int = None,
        top_p: float = None,
    ):
        self.frequency_penalty = frequency_penalty
        self.max_tokens = max_tokens
        self.presence_penalty = presence_penalty
        self.stop_sequences = stop_sequences
        self.temperature = temperature
        self.top_k = top_k
        self.top_p = top_p

    def validate(self):
        pass

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

        result = dict()
        if self.frequency_penalty is not None:
            result['frequencyPenalty'] = self.frequency_penalty
        if self.max_tokens is not None:
            result['maxTokens'] = self.max_tokens
        if self.presence_penalty is not None:
            result['presencePenalty'] = self.presence_penalty
        if self.stop_sequences is not None:
            result['stopSequences'] = self.stop_sequences
        if self.temperature is not None:
            result['temperature'] = self.temperature
        if self.top_k is not None:
            result['topK'] = self.top_k
        if self.top_p is not None:
            result['topP'] = self.top_p
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('frequencyPenalty') is not None:
            self.frequency_penalty = m.get('frequencyPenalty')
        if m.get('maxTokens') is not None:
            self.max_tokens = m.get('maxTokens')
        if m.get('presencePenalty') is not None:
            self.presence_penalty = m.get('presencePenalty')
        if m.get('stopSequences') is not None:
            self.stop_sequences = m.get('stopSequences')
        if m.get('temperature') is not None:
            self.temperature = m.get('temperature')
        if m.get('topK') is not None:
            self.top_k = m.get('topK')
        if m.get('topP') is not None:
            self.top_p = m.get('topP')
        return self


class PromptTemplateItem(TeaModel):
    def __init__(
        self,
        content: str = None,
        role: str = None,
    ):
        self.content = content
        self.role = role

    def validate(self):
        pass

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

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

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


class ExperimentConfig(TeaModel):
    def __init__(
        self,
        label: str = None,
        model_name: str = None,
        model_parameters: ModelParameters = None,
        model_provider: str = None,
        name: str = None,
        prompt_template: List[PromptTemplateItem] = None,
    ):
        self.label = label
        self.model_name = model_name
        self.model_parameters = model_parameters
        self.model_provider = model_provider
        self.name = name
        self.prompt_template = prompt_template

    def validate(self):
        if self.model_parameters:
            self.model_parameters.validate()
        if self.prompt_template:
            for k in self.prompt_template:
                if k:
                    k.validate()

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

        result = dict()
        if self.label is not None:
            result['label'] = self.label
        if self.model_name is not None:
            result['modelName'] = self.model_name
        if self.model_parameters is not None:
            result['modelParameters'] = self.model_parameters.to_map()
        if self.model_provider is not None:
            result['modelProvider'] = self.model_provider
        if self.name is not None:
            result['name'] = self.name
        result['promptTemplate'] = []
        if self.prompt_template is not None:
            for k in self.prompt_template:
                result['promptTemplate'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('label') is not None:
            self.label = m.get('label')
        if m.get('modelName') is not None:
            self.model_name = m.get('modelName')
        if m.get('modelParameters') is not None:
            temp_model = ModelParameters()
            self.model_parameters = temp_model.from_map(m['modelParameters'])
        if m.get('modelProvider') is not None:
            self.model_provider = m.get('modelProvider')
        if m.get('name') is not None:
            self.name = m.get('name')
        self.prompt_template = []
        if m.get('promptTemplate') is not None:
            for k in m.get('promptTemplate'):
                temp_model = PromptTemplateItem()
                self.prompt_template.append(temp_model.from_map(k))
        return self


class ExperimentPlanData(TeaModel):
    def __init__(
        self,
        created_at: int = None,
        dataset_id: str = None,
        description: str = None,
        experiment_count: int = None,
        plan_id: str = None,
        plan_name: str = None,
        status: str = None,
        updated_at: int = None,
    ):
        self.created_at = created_at
        self.dataset_id = dataset_id
        self.description = description
        self.experiment_count = experiment_count
        self.plan_id = plan_id
        self.plan_name = plan_name
        self.status = status
        self.updated_at = updated_at

    def validate(self):
        pass

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

        result = dict()
        if self.created_at is not None:
            result['createdAt'] = self.created_at
        if self.dataset_id is not None:
            result['datasetId'] = self.dataset_id
        if self.description is not None:
            result['description'] = self.description
        if self.experiment_count is not None:
            result['experimentCount'] = self.experiment_count
        if self.plan_id is not None:
            result['planId'] = self.plan_id
        if self.plan_name is not None:
            result['planName'] = self.plan_name
        if self.status is not None:
            result['status'] = self.status
        if self.updated_at is not None:
            result['updatedAt'] = self.updated_at
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createdAt') is not None:
            self.created_at = m.get('createdAt')
        if m.get('datasetId') is not None:
            self.dataset_id = m.get('datasetId')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('experimentCount') is not None:
            self.experiment_count = m.get('experimentCount')
        if m.get('planId') is not None:
            self.plan_id = m.get('planId')
        if m.get('planName') is not None:
            self.plan_name = m.get('planName')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('updatedAt') is not None:
            self.updated_at = m.get('updatedAt')
        return self


class ExperimentRecord(TeaModel):
    def __init__(
        self,
        completed_at: int = None,
        completed_tasks: int = None,
        data_source_type: str = None,
        dataset_id: str = None,
        dataset_project: str = None,
        error_message: str = None,
        executed_at: int = None,
        experiment_config: ExperimentConfig = None,
        experiment_name: str = None,
        failed_tasks: int = None,
        input: Dict[str, Any] = None,
        model_name: str = None,
        plan_id: str = None,
        plan_name: str = None,
        progress: float = None,
        record_id: str = None,
        status: str = None,
        total_tasks: int = None,
    ):
        self.completed_at = completed_at
        self.completed_tasks = completed_tasks
        self.data_source_type = data_source_type
        self.dataset_id = dataset_id
        self.dataset_project = dataset_project
        self.error_message = error_message
        self.executed_at = executed_at
        self.experiment_config = experiment_config
        self.experiment_name = experiment_name
        self.failed_tasks = failed_tasks
        self.input = input
        self.model_name = model_name
        self.plan_id = plan_id
        self.plan_name = plan_name
        self.progress = progress
        self.record_id = record_id
        self.status = status
        self.total_tasks = total_tasks

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

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

        result = dict()
        if self.completed_at is not None:
            result['completedAt'] = self.completed_at
        if self.completed_tasks is not None:
            result['completedTasks'] = self.completed_tasks
        if self.data_source_type is not None:
            result['dataSourceType'] = self.data_source_type
        if self.dataset_id is not None:
            result['datasetId'] = self.dataset_id
        if self.dataset_project is not None:
            result['datasetProject'] = self.dataset_project
        if self.error_message is not None:
            result['errorMessage'] = self.error_message
        if self.executed_at is not None:
            result['executedAt'] = self.executed_at
        if self.experiment_config is not None:
            result['experimentConfig'] = self.experiment_config.to_map()
        if self.experiment_name is not None:
            result['experimentName'] = self.experiment_name
        if self.failed_tasks is not None:
            result['failedTasks'] = self.failed_tasks
        if self.input is not None:
            result['input'] = self.input
        if self.model_name is not None:
            result['modelName'] = self.model_name
        if self.plan_id is not None:
            result['planId'] = self.plan_id
        if self.plan_name is not None:
            result['planName'] = self.plan_name
        if self.progress is not None:
            result['progress'] = self.progress
        if self.record_id is not None:
            result['recordId'] = self.record_id
        if self.status is not None:
            result['status'] = self.status
        if self.total_tasks is not None:
            result['totalTasks'] = self.total_tasks
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('completedAt') is not None:
            self.completed_at = m.get('completedAt')
        if m.get('completedTasks') is not None:
            self.completed_tasks = m.get('completedTasks')
        if m.get('dataSourceType') is not None:
            self.data_source_type = m.get('dataSourceType')
        if m.get('datasetId') is not None:
            self.dataset_id = m.get('datasetId')
        if m.get('datasetProject') is not None:
            self.dataset_project = m.get('datasetProject')
        if m.get('errorMessage') is not None:
            self.error_message = m.get('errorMessage')
        if m.get('executedAt') is not None:
            self.executed_at = m.get('executedAt')
        if m.get('experimentConfig') is not None:
            temp_model = ExperimentConfig()
            self.experiment_config = temp_model.from_map(m['experimentConfig'])
        if m.get('experimentName') is not None:
            self.experiment_name = m.get('experimentName')
        if m.get('failedTasks') is not None:
            self.failed_tasks = m.get('failedTasks')
        if m.get('input') is not None:
            self.input = m.get('input')
        if m.get('modelName') is not None:
            self.model_name = m.get('modelName')
        if m.get('planId') is not None:
            self.plan_id = m.get('planId')
        if m.get('planName') is not None:
            self.plan_name = m.get('planName')
        if m.get('progress') is not None:
            self.progress = m.get('progress')
        if m.get('recordId') is not None:
            self.record_id = m.get('recordId')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('totalTasks') is not None:
            self.total_tasks = m.get('totalTasks')
        return self


class IncidentContactStruct(TeaModel):
    def __init__(
        self,
        channel: List[str] = None,
        contact_id: str = None,
        contact_type: str = None,
    ):
        # Channel list.
        self.channel = channel
        # Contact ID.
        self.contact_id = contact_id
        # Contact type.
        self.contact_type = contact_type

    def validate(self):
        pass

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

        result = dict()
        if self.channel is not None:
            result['channel'] = self.channel
        if self.contact_id is not None:
            result['contactId'] = self.contact_id
        if self.contact_type is not None:
            result['contactType'] = self.contact_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('channel') is not None:
            self.channel = m.get('channel')
        if m.get('contactId') is not None:
            self.contact_id = m.get('contactId')
        if m.get('contactType') is not None:
            self.contact_type = m.get('contactType')
        return self


class NotifyChannel(TeaModel):
    def __init__(
        self,
        channel_type: str = None,
        enabled_sub_channels: List[str] = None,
        receivers: List[str] = None,
    ):
        self.channel_type = channel_type
        self.enabled_sub_channels = enabled_sub_channels
        self.receivers = receivers

    def validate(self):
        pass

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

        result = dict()
        if self.channel_type is not None:
            result['channelType'] = self.channel_type
        if self.enabled_sub_channels is not None:
            result['enabledSubChannels'] = self.enabled_sub_channels
        if self.receivers is not None:
            result['receivers'] = self.receivers
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('channelType') is not None:
            self.channel_type = m.get('channelType')
        if m.get('enabledSubChannels') is not None:
            self.enabled_sub_channels = m.get('enabledSubChannels')
        if m.get('receivers') is not None:
            self.receivers = m.get('receivers')
        return self


class IncidentEscalationStageForView(TeaModel):
    def __init__(
        self,
        cycle_notify_count: int = None,
        cycle_notify_interval: int = None,
        effect_time_range: EffectTimeRange = None,
        index: int = None,
        notify_channels: List[NotifyChannel] = None,
        target_incident_state: str = None,
        trigger_delay: int = None,
    ):
        self.cycle_notify_count = cycle_notify_count
        self.cycle_notify_interval = cycle_notify_interval
        self.effect_time_range = effect_time_range
        # This parameter is required.
        self.index = index
        self.notify_channels = notify_channels
        self.target_incident_state = target_incident_state
        self.trigger_delay = trigger_delay

    def validate(self):
        if self.effect_time_range:
            self.effect_time_range.validate()
        if self.notify_channels:
            for k in self.notify_channels:
                if k:
                    k.validate()

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

        result = dict()
        if self.cycle_notify_count is not None:
            result['cycleNotifyCount'] = self.cycle_notify_count
        if self.cycle_notify_interval is not None:
            result['cycleNotifyInterval'] = self.cycle_notify_interval
        if self.effect_time_range is not None:
            result['effectTimeRange'] = self.effect_time_range.to_map()
        if self.index is not None:
            result['index'] = self.index
        result['notifyChannels'] = []
        if self.notify_channels is not None:
            for k in self.notify_channels:
                result['notifyChannels'].append(k.to_map() if k else None)
        if self.target_incident_state is not None:
            result['targetIncidentState'] = self.target_incident_state
        if self.trigger_delay is not None:
            result['triggerDelay'] = self.trigger_delay
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('cycleNotifyCount') is not None:
            self.cycle_notify_count = m.get('cycleNotifyCount')
        if m.get('cycleNotifyInterval') is not None:
            self.cycle_notify_interval = m.get('cycleNotifyInterval')
        if m.get('effectTimeRange') is not None:
            temp_model = EffectTimeRange()
            self.effect_time_range = temp_model.from_map(m['effectTimeRange'])
        if m.get('index') is not None:
            self.index = m.get('index')
        self.notify_channels = []
        if m.get('notifyChannels') is not None:
            for k in m.get('notifyChannels'):
                temp_model = NotifyChannel()
                self.notify_channels.append(temp_model.from_map(k))
        if m.get('targetIncidentState') is not None:
            self.target_incident_state = m.get('targetIncidentState')
        if m.get('triggerDelay') is not None:
            self.trigger_delay = m.get('triggerDelay')
        return self


class IncidentEscalationPolicyForModify(TeaModel):
    def __init__(
        self,
        description: str = None,
        enable: bool = None,
        escalation_stage_list: List[IncidentEscalationStageForView] = None,
        name: str = None,
    ):
        self.description = description
        self.enable = enable
        self.escalation_stage_list = escalation_stage_list
        # This parameter is required.
        self.name = name

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

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.enable is not None:
            result['enable'] = self.enable
        result['escalationStageList'] = []
        if self.escalation_stage_list is not None:
            for k in self.escalation_stage_list:
                result['escalationStageList'].append(k.to_map() if k else None)
        if self.name is not None:
            result['name'] = self.name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        self.escalation_stage_list = []
        if m.get('escalationStageList') is not None:
            for k in m.get('escalationStageList'):
                temp_model = IncidentEscalationStageForView()
                self.escalation_stage_list.append(temp_model.from_map(k))
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class IncidentEscalationPolicyForView(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        description: str = None,
        enable: bool = None,
        escalation_stage_list: List[IncidentEscalationStageForView] = None,
        name: str = None,
        owner_type: str = None,
        region_id: str = None,
        source: str = None,
        sync_from_type: str = None,
        update_time: str = None,
        user_id: str = None,
        uuid: str = None,
        workspace: str = None,
    ):
        self.create_time = create_time
        self.description = description
        self.enable = enable
        self.escalation_stage_list = escalation_stage_list
        # This parameter is required.
        self.name = name
        self.owner_type = owner_type
        self.region_id = region_id
        self.source = source
        self.sync_from_type = sync_from_type
        self.update_time = update_time
        self.user_id = user_id
        self.uuid = uuid
        self.workspace = workspace

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

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

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.enable is not None:
            result['enable'] = self.enable
        result['escalationStageList'] = []
        if self.escalation_stage_list is not None:
            for k in self.escalation_stage_list:
                result['escalationStageList'].append(k.to_map() if k else None)
        if self.name is not None:
            result['name'] = self.name
        if self.owner_type is not None:
            result['ownerType'] = self.owner_type
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.source is not None:
            result['source'] = self.source
        if self.sync_from_type is not None:
            result['syncFromType'] = self.sync_from_type
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.uuid is not None:
            result['uuid'] = self.uuid
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        self.escalation_stage_list = []
        if m.get('escalationStageList') is not None:
            for k in m.get('escalationStageList'):
                temp_model = IncidentEscalationStageForView()
                self.escalation_stage_list.append(temp_model.from_map(k))
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('ownerType') is not None:
            self.owner_type = m.get('ownerType')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('syncFromType') is not None:
            self.sync_from_type = m.get('syncFromType')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('uuid') is not None:
            self.uuid = m.get('uuid')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class IncidentEscalationStageStruct(TeaModel):
    def __init__(
        self,
        contact: List[IncidentContactStruct] = None,
        cycle_notify_count: int = None,
        cycle_notify_time: int = None,
        description: str = None,
        effect_time: str = None,
        name: str = None,
        stage_index: int = None,
        time_zone: str = None,
        wait_to_next_stage_time: int = None,
    ):
        # Contact list.
        self.contact = contact
        # Number of recurring notification attempts.
        self.cycle_notify_count = cycle_notify_count
        # Recurring notification interval.
        self.cycle_notify_time = cycle_notify_time
        # Description.
        self.description = description
        # Effective time period.
        self.effect_time = effect_time
        # Name.
        self.name = name
        # Phase index.
        self.stage_index = stage_index
        # Time zone.
        self.time_zone = time_zone
        # Time to wait before proceeding to the next phase.
        self.wait_to_next_stage_time = wait_to_next_stage_time

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

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

        result = dict()
        result['contact'] = []
        if self.contact is not None:
            for k in self.contact:
                result['contact'].append(k.to_map() if k else None)
        if self.cycle_notify_count is not None:
            result['cycleNotifyCount'] = self.cycle_notify_count
        if self.cycle_notify_time is not None:
            result['cycleNotifyTime'] = self.cycle_notify_time
        if self.description is not None:
            result['description'] = self.description
        if self.effect_time is not None:
            result['effectTime'] = self.effect_time
        if self.name is not None:
            result['name'] = self.name
        if self.stage_index is not None:
            result['stageIndex'] = self.stage_index
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        if self.wait_to_next_stage_time is not None:
            result['waitToNextStageTime'] = self.wait_to_next_stage_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.contact = []
        if m.get('contact') is not None:
            for k in m.get('contact'):
                temp_model = IncidentContactStruct()
                self.contact.append(temp_model.from_map(k))
        if m.get('cycleNotifyCount') is not None:
            self.cycle_notify_count = m.get('cycleNotifyCount')
        if m.get('cycleNotifyTime') is not None:
            self.cycle_notify_time = m.get('cycleNotifyTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('effectTime') is not None:
            self.effect_time = m.get('effectTime')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('stageIndex') is not None:
            self.stage_index = m.get('stageIndex')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        if m.get('waitToNextStageTime') is not None:
            self.wait_to_next_stage_time = m.get('waitToNextStageTime')
        return self


class IncidentEscalationStruct(TeaModel):
    def __init__(
        self,
        create_time: int = None,
        description: str = None,
        incident_escalation_id: str = None,
        modify_time: int = None,
        name: str = None,
        region_id: str = None,
        stage: List[IncidentEscalationStageStruct] = None,
        workspace: str = None,
    ):
        # Creation time.
        self.create_time = create_time
        # Description.
        self.description = description
        # Event Escalation ID.
        self.incident_escalation_id = incident_escalation_id
        # Modification time.
        self.modify_time = modify_time
        # Name.
        self.name = name
        # Region ID.
        self.region_id = region_id
        # Phase.
        self.stage = stage
        # Workspace.
        self.workspace = workspace

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

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

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.incident_escalation_id is not None:
            result['incidentEscalationId'] = self.incident_escalation_id
        if self.modify_time is not None:
            result['modifyTime'] = self.modify_time
        if self.name is not None:
            result['name'] = self.name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        result['stage'] = []
        if self.stage is not None:
            for k in self.stage:
                result['stage'].append(k.to_map() if k else None)
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('incidentEscalationId') is not None:
            self.incident_escalation_id = m.get('incidentEscalationId')
        if m.get('modifyTime') is not None:
            self.modify_time = m.get('modifyTime')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        self.stage = []
        if m.get('stage') is not None:
            for k in m.get('stage'):
                temp_model = IncidentEscalationStageStruct()
                self.stage.append(temp_model.from_map(k))
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class IncidentEventForView(TeaModel):
    def __init__(
        self,
        auto_recover_time: int = None,
        content: CmsEventForView = None,
        count: int = None,
        dimension: Dict[str, Any] = None,
        event_resource: EventResourceForIncidentView = None,
        group_by: Dict[str, Any] = None,
        incident_event_uuid: str = None,
        incident_uuid: str = None,
        labels: Dict[str, Any] = None,
        last_time: int = None,
        recover_time: int = None,
        search_index: List[str] = None,
        severity: str = None,
        severity_count_map: Dict[str, Any] = None,
        state: int = None,
        text_index: str = None,
        time: int = None,
        title: str = None,
        user_id: str = None,
        workspace: str = None,
    ):
        self.auto_recover_time = auto_recover_time
        self.content = content
        self.count = count
        self.dimension = dimension
        self.event_resource = event_resource
        self.group_by = group_by
        self.incident_event_uuid = incident_event_uuid
        self.incident_uuid = incident_uuid
        self.labels = labels
        self.last_time = last_time
        self.recover_time = recover_time
        self.search_index = search_index
        self.severity = severity
        self.severity_count_map = severity_count_map
        self.state = state
        self.text_index = text_index
        self.time = time
        self.title = title
        self.user_id = user_id
        self.workspace = workspace

    def validate(self):
        if self.content:
            self.content.validate()
        if self.event_resource:
            self.event_resource.validate()

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

        result = dict()
        if self.auto_recover_time is not None:
            result['autoRecoverTime'] = self.auto_recover_time
        if self.content is not None:
            result['content'] = self.content.to_map()
        if self.count is not None:
            result['count'] = self.count
        if self.dimension is not None:
            result['dimension'] = self.dimension
        if self.event_resource is not None:
            result['eventResource'] = self.event_resource.to_map()
        if self.group_by is not None:
            result['groupBy'] = self.group_by
        if self.incident_event_uuid is not None:
            result['incidentEventUuid'] = self.incident_event_uuid
        if self.incident_uuid is not None:
            result['incidentUuid'] = self.incident_uuid
        if self.labels is not None:
            result['labels'] = self.labels
        if self.last_time is not None:
            result['lastTime'] = self.last_time
        if self.recover_time is not None:
            result['recoverTime'] = self.recover_time
        if self.search_index is not None:
            result['searchIndex'] = self.search_index
        if self.severity is not None:
            result['severity'] = self.severity
        if self.severity_count_map is not None:
            result['severityCountMap'] = self.severity_count_map
        if self.state is not None:
            result['state'] = self.state
        if self.text_index is not None:
            result['textIndex'] = self.text_index
        if self.time is not None:
            result['time'] = self.time
        if self.title is not None:
            result['title'] = self.title
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('autoRecoverTime') is not None:
            self.auto_recover_time = m.get('autoRecoverTime')
        if m.get('content') is not None:
            temp_model = CmsEventForView()
            self.content = temp_model.from_map(m['content'])
        if m.get('count') is not None:
            self.count = m.get('count')
        if m.get('dimension') is not None:
            self.dimension = m.get('dimension')
        if m.get('eventResource') is not None:
            temp_model = EventResourceForIncidentView()
            self.event_resource = temp_model.from_map(m['eventResource'])
        if m.get('groupBy') is not None:
            self.group_by = m.get('groupBy')
        if m.get('incidentEventUuid') is not None:
            self.incident_event_uuid = m.get('incidentEventUuid')
        if m.get('incidentUuid') is not None:
            self.incident_uuid = m.get('incidentUuid')
        if m.get('labels') is not None:
            self.labels = m.get('labels')
        if m.get('lastTime') is not None:
            self.last_time = m.get('lastTime')
        if m.get('recoverTime') is not None:
            self.recover_time = m.get('recoverTime')
        if m.get('searchIndex') is not None:
            self.search_index = m.get('searchIndex')
        if m.get('severity') is not None:
            self.severity = m.get('severity')
        if m.get('severityCountMap') is not None:
            self.severity_count_map = m.get('severityCountMap')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('textIndex') is not None:
            self.text_index = m.get('textIndex')
        if m.get('time') is not None:
            self.time = m.get('time')
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class IncidentEventStruct(TeaModel):
    def __init__(
        self,
        auto_recover_time: int = None,
        content: str = None,
        count: int = None,
        dimension: Dict[str, str] = None,
        group_by: Dict[str, str] = None,
        incident_event_id: str = None,
        incident_id: str = None,
        last_time: int = None,
        recover_time: int = None,
        resource: Dict[str, str] = None,
        status: int = None,
        time: str = None,
        title: str = None,
        user_id: str = None,
    ):
        # Automatic recovery time.
        self.auto_recover_time = auto_recover_time
        # Content.
        self.content = content
        # Count.
        self.count = count
        # Dimension.
        self.dimension = dimension
        # Used for grouping dimensions.
        self.group_by = group_by
        # Incident Event Id.
        self.incident_event_id = incident_event_id
        # Incident Id.
        self.incident_id = incident_id
        # Last time.
        self.last_time = last_time
        # Manual recovery time.
        self.recover_time = recover_time
        # Describes the resource information associated with the event.
        self.resource = resource
        # Status.
        self.status = status
        # Time.
        self.time = time
        # Title.
        self.title = title
        # User ID.
        self.user_id = user_id

    def validate(self):
        pass

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

        result = dict()
        if self.auto_recover_time is not None:
            result['autoRecoverTime'] = self.auto_recover_time
        if self.content is not None:
            result['content'] = self.content
        if self.count is not None:
            result['count'] = self.count
        if self.dimension is not None:
            result['dimension'] = self.dimension
        if self.group_by is not None:
            result['groupBy'] = self.group_by
        if self.incident_event_id is not None:
            result['incidentEventId'] = self.incident_event_id
        if self.incident_id is not None:
            result['incidentId'] = self.incident_id
        if self.last_time is not None:
            result['lastTime'] = self.last_time
        if self.recover_time is not None:
            result['recoverTime'] = self.recover_time
        if self.resource is not None:
            result['resource'] = self.resource
        if self.status is not None:
            result['status'] = self.status
        if self.time is not None:
            result['time'] = self.time
        if self.title is not None:
            result['title'] = self.title
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('autoRecoverTime') is not None:
            self.auto_recover_time = m.get('autoRecoverTime')
        if m.get('content') is not None:
            self.content = m.get('content')
        if m.get('count') is not None:
            self.count = m.get('count')
        if m.get('dimension') is not None:
            self.dimension = m.get('dimension')
        if m.get('groupBy') is not None:
            self.group_by = m.get('groupBy')
        if m.get('incidentEventId') is not None:
            self.incident_event_id = m.get('incidentEventId')
        if m.get('incidentId') is not None:
            self.incident_id = m.get('incidentId')
        if m.get('lastTime') is not None:
            self.last_time = m.get('lastTime')
        if m.get('recoverTime') is not None:
            self.recover_time = m.get('recoverTime')
        if m.get('resource') is not None:
            self.resource = m.get('resource')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('time') is not None:
            self.time = m.get('time')
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class PushingSetting(TeaModel):
    def __init__(
        self,
        alert_action_ids: List[str] = None,
        restore_action_ids: List[str] = None,
        template_uuid: str = None,
    ):
        self.alert_action_ids = alert_action_ids
        self.restore_action_ids = restore_action_ids
        self.template_uuid = template_uuid

    def validate(self):
        pass

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

        result = dict()
        if self.alert_action_ids is not None:
            result['alertActionIds'] = self.alert_action_ids
        if self.restore_action_ids is not None:
            result['restoreActionIds'] = self.restore_action_ids
        if self.template_uuid is not None:
            result['templateUuid'] = self.template_uuid
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionIds') is not None:
            self.alert_action_ids = m.get('alertActionIds')
        if m.get('restoreActionIds') is not None:
            self.restore_action_ids = m.get('restoreActionIds')
        if m.get('templateUuid') is not None:
            self.template_uuid = m.get('templateUuid')
        return self


class RepeatNotifySetting(TeaModel):
    def __init__(
        self,
        end_incident_state: str = None,
        repeat_interval: str = None,
    ):
        self.end_incident_state = end_incident_state
        self.repeat_interval = repeat_interval

    def validate(self):
        pass

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

        result = dict()
        if self.end_incident_state is not None:
            result['endIncidentState'] = self.end_incident_state
        if self.repeat_interval is not None:
            result['repeatInterval'] = self.repeat_interval
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('endIncidentState') is not None:
            self.end_incident_state = m.get('endIncidentState')
        if m.get('repeatInterval') is not None:
            self.repeat_interval = m.get('repeatInterval')
        return self


class IncidentResponsePlanForView(TeaModel):
    def __init__(
        self,
        auto_recover_seconds: int = None,
        create_time: str = None,
        description: str = None,
        enabled: bool = None,
        escalation_id: List[str] = None,
        mode: str = None,
        name: str = None,
        pushing_setting: PushingSetting = None,
        repeat_notify_setting: RepeatNotifySetting = None,
        source: str = None,
        sync_from_type: str = None,
        type: str = None,
        update_time: str = None,
        uuid: str = None,
        workspace: str = None,
    ):
        self.auto_recover_seconds = auto_recover_seconds
        self.create_time = create_time
        self.description = description
        self.enabled = enabled
        self.escalation_id = escalation_id
        self.mode = mode
        self.name = name
        self.pushing_setting = pushing_setting
        self.repeat_notify_setting = repeat_notify_setting
        self.source = source
        self.sync_from_type = sync_from_type
        self.type = type
        self.update_time = update_time
        self.uuid = uuid
        self.workspace = workspace

    def validate(self):
        if self.pushing_setting:
            self.pushing_setting.validate()
        if self.repeat_notify_setting:
            self.repeat_notify_setting.validate()

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

        result = dict()
        if self.auto_recover_seconds is not None:
            result['autoRecoverSeconds'] = self.auto_recover_seconds
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.escalation_id is not None:
            result['escalationId'] = self.escalation_id
        if self.mode is not None:
            result['mode'] = self.mode
        if self.name is not None:
            result['name'] = self.name
        if self.pushing_setting is not None:
            result['pushingSetting'] = self.pushing_setting.to_map()
        if self.repeat_notify_setting is not None:
            result['repeatNotifySetting'] = self.repeat_notify_setting.to_map()
        if self.source is not None:
            result['source'] = self.source
        if self.sync_from_type is not None:
            result['syncFromType'] = self.sync_from_type
        if self.type is not None:
            result['type'] = self.type
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.uuid is not None:
            result['uuid'] = self.uuid
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('autoRecoverSeconds') is not None:
            self.auto_recover_seconds = m.get('autoRecoverSeconds')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('escalationId') is not None:
            self.escalation_id = m.get('escalationId')
        if m.get('mode') is not None:
            self.mode = m.get('mode')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('pushingSetting') is not None:
            temp_model = PushingSetting()
            self.pushing_setting = temp_model.from_map(m['pushingSetting'])
        if m.get('repeatNotifySetting') is not None:
            temp_model = RepeatNotifySetting()
            self.repeat_notify_setting = temp_model.from_map(m['repeatNotifySetting'])
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('syncFromType') is not None:
            self.sync_from_type = m.get('syncFromType')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('uuid') is not None:
            self.uuid = m.get('uuid')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class IncidentForView(TeaModel):
    def __init__(
        self,
        content: str = None,
        escalations: List[IncidentEscalationPolicyForView] = None,
        group_uuid: str = None,
        grouping_keys: Dict[str, str] = None,
        incident_id: str = None,
        notify_strategy_name: str = None,
        notify_strategy_uuid: str = None,
        operator: ContactForIncidentView = None,
        owners: List[ContactForIncidentView] = None,
        participants: List[ContactForIncidentView] = None,
        plan: IncidentResponsePlanForView = None,
        related_resources: List[EventResourceForIncidentView] = None,
        root_cause_category: str = None,
        severity: str = None,
        solution: str = None,
        state: str = None,
        subscription_name: str = None,
        subscription_uuid: str = None,
        time: int = None,
        title: str = None,
        user_id: str = None,
        workspace: str = None,
    ):
        self.content = content
        self.escalations = escalations
        self.group_uuid = group_uuid
        self.grouping_keys = grouping_keys
        self.incident_id = incident_id
        self.notify_strategy_name = notify_strategy_name
        self.notify_strategy_uuid = notify_strategy_uuid
        self.operator = operator
        self.owners = owners
        self.participants = participants
        self.plan = plan
        self.related_resources = related_resources
        self.root_cause_category = root_cause_category
        self.severity = severity
        self.solution = solution
        self.state = state
        self.subscription_name = subscription_name
        self.subscription_uuid = subscription_uuid
        self.time = time
        self.title = title
        self.user_id = user_id
        self.workspace = workspace

    def validate(self):
        if self.escalations:
            for k in self.escalations:
                if k:
                    k.validate()
        if self.operator:
            self.operator.validate()
        if self.owners:
            for k in self.owners:
                if k:
                    k.validate()
        if self.participants:
            for k in self.participants:
                if k:
                    k.validate()
        if self.plan:
            self.plan.validate()
        if self.related_resources:
            for k in self.related_resources:
                if k:
                    k.validate()

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

        result = dict()
        if self.content is not None:
            result['content'] = self.content
        result['escalations'] = []
        if self.escalations is not None:
            for k in self.escalations:
                result['escalations'].append(k.to_map() if k else None)
        if self.group_uuid is not None:
            result['groupUuid'] = self.group_uuid
        if self.grouping_keys is not None:
            result['groupingKeys'] = self.grouping_keys
        if self.incident_id is not None:
            result['incidentId'] = self.incident_id
        if self.notify_strategy_name is not None:
            result['notifyStrategyName'] = self.notify_strategy_name
        if self.notify_strategy_uuid is not None:
            result['notifyStrategyUuid'] = self.notify_strategy_uuid
        if self.operator is not None:
            result['operator'] = self.operator.to_map()
        result['owners'] = []
        if self.owners is not None:
            for k in self.owners:
                result['owners'].append(k.to_map() if k else None)
        result['participants'] = []
        if self.participants is not None:
            for k in self.participants:
                result['participants'].append(k.to_map() if k else None)
        if self.plan is not None:
            result['plan'] = self.plan.to_map()
        result['relatedResources'] = []
        if self.related_resources is not None:
            for k in self.related_resources:
                result['relatedResources'].append(k.to_map() if k else None)
        if self.root_cause_category is not None:
            result['rootCauseCategory'] = self.root_cause_category
        if self.severity is not None:
            result['severity'] = self.severity
        if self.solution is not None:
            result['solution'] = self.solution
        if self.state is not None:
            result['state'] = self.state
        if self.subscription_name is not None:
            result['subscriptionName'] = self.subscription_name
        if self.subscription_uuid is not None:
            result['subscriptionUuid'] = self.subscription_uuid
        if self.time is not None:
            result['time'] = self.time
        if self.title is not None:
            result['title'] = self.title
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('content') is not None:
            self.content = m.get('content')
        self.escalations = []
        if m.get('escalations') is not None:
            for k in m.get('escalations'):
                temp_model = IncidentEscalationPolicyForView()
                self.escalations.append(temp_model.from_map(k))
        if m.get('groupUuid') is not None:
            self.group_uuid = m.get('groupUuid')
        if m.get('groupingKeys') is not None:
            self.grouping_keys = m.get('groupingKeys')
        if m.get('incidentId') is not None:
            self.incident_id = m.get('incidentId')
        if m.get('notifyStrategyName') is not None:
            self.notify_strategy_name = m.get('notifyStrategyName')
        if m.get('notifyStrategyUuid') is not None:
            self.notify_strategy_uuid = m.get('notifyStrategyUuid')
        if m.get('operator') is not None:
            temp_model = ContactForIncidentView()
            self.operator = temp_model.from_map(m['operator'])
        self.owners = []
        if m.get('owners') is not None:
            for k in m.get('owners'):
                temp_model = ContactForIncidentView()
                self.owners.append(temp_model.from_map(k))
        self.participants = []
        if m.get('participants') is not None:
            for k in m.get('participants'):
                temp_model = ContactForIncidentView()
                self.participants.append(temp_model.from_map(k))
        if m.get('plan') is not None:
            temp_model = IncidentResponsePlanForView()
            self.plan = temp_model.from_map(m['plan'])
        self.related_resources = []
        if m.get('relatedResources') is not None:
            for k in m.get('relatedResources'):
                temp_model = EventResourceForIncidentView()
                self.related_resources.append(temp_model.from_map(k))
        if m.get('rootCauseCategory') is not None:
            self.root_cause_category = m.get('rootCauseCategory')
        if m.get('severity') is not None:
            self.severity = m.get('severity')
        if m.get('solution') is not None:
            self.solution = m.get('solution')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('subscriptionName') is not None:
            self.subscription_name = m.get('subscriptionName')
        if m.get('subscriptionUuid') is not None:
            self.subscription_uuid = m.get('subscriptionUuid')
        if m.get('time') is not None:
            self.time = m.get('time')
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class IncidentMemberStructAcknowledge(TeaModel):
    def __init__(
        self,
        break_level: str = None,
        verify_time: int = None,
    ):
        # Acknowledgement level.
        self.break_level = break_level
        # Verification time.
        self.verify_time = verify_time

    def validate(self):
        pass

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

        result = dict()
        if self.break_level is not None:
            result['breakLevel'] = self.break_level
        if self.verify_time is not None:
            result['verifyTime'] = self.verify_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('breakLevel') is not None:
            self.break_level = m.get('breakLevel')
        if m.get('verifyTime') is not None:
            self.verify_time = m.get('verifyTime')
        return self


class IncidentMemberStructContacts(TeaModel):
    def __init__(
        self,
        channel: str = None,
        contact_mask: str = None,
    ):
        # Channel.
        self.channel = channel
        # Contact ID (masked).
        self.contact_mask = contact_mask

    def validate(self):
        pass

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

        result = dict()
        if self.channel is not None:
            result['channel'] = self.channel
        if self.contact_mask is not None:
            result['contactMask'] = self.contact_mask
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('channel') is not None:
            self.channel = m.get('channel')
        if m.get('contactMask') is not None:
            self.contact_mask = m.get('contactMask')
        return self


class IncidentMemberStructEscalation(TeaModel):
    def __init__(
        self,
        description: str = None,
        incident_escalation_id: str = None,
        name: str = None,
        stage_index: str = None,
        title: str = None,
    ):
        # Description.
        self.description = description
        # Event Escalation ID.
        self.incident_escalation_id = incident_escalation_id
        # Name.
        self.name = name
        # Escalation phase index.
        self.stage_index = stage_index
        # Title.
        self.title = title

    def validate(self):
        pass

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.incident_escalation_id is not None:
            result['incidentEscalationId'] = self.incident_escalation_id
        if self.name is not None:
            result['name'] = self.name
        if self.stage_index is not None:
            result['stageIndex'] = self.stage_index
        if self.title is not None:
            result['title'] = self.title
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('incidentEscalationId') is not None:
            self.incident_escalation_id = m.get('incidentEscalationId')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('stageIndex') is not None:
            self.stage_index = m.get('stageIndex')
        if m.get('title') is not None:
            self.title = m.get('title')
        return self


class IncidentMemberStructScheduleGroup(TeaModel):
    def __init__(
        self,
        contact_id: str = None,
        name: str = None,
    ):
        # Contact ID.
        self.contact_id = contact_id
        # Name.
        self.name = name

    def validate(self):
        pass

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

        result = dict()
        if self.contact_id is not None:
            result['contactId'] = self.contact_id
        if self.name is not None:
            result['name'] = self.name
        return result

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


class IncidentMemberStruct(TeaModel):
    def __init__(
        self,
        acknowledge: IncidentMemberStructAcknowledge = None,
        contact_id: str = None,
        contacts: List[IncidentMemberStructContacts] = None,
        escalation: IncidentMemberStructEscalation = None,
        incident_id: str = None,
        incident_member_id: str = None,
        schedule_group: IncidentMemberStructScheduleGroup = None,
        time: int = None,
        user_id: int = None,
    ):
        # Acknowledgement Information Structure.
        self.acknowledge = acknowledge
        # Contact ID.
        self.contact_id = contact_id
        # Contact list.
        self.contacts = contacts
        # Escalation phase information.
        self.escalation = escalation
        # Incident ID.
        self.incident_id = incident_id
        # Event Member ID.
        self.incident_member_id = incident_member_id
        # Schedule group.
        self.schedule_group = schedule_group
        # Time.
        self.time = time
        # User ID.
        self.user_id = user_id

    def validate(self):
        if self.acknowledge:
            self.acknowledge.validate()
        if self.contacts:
            for k in self.contacts:
                if k:
                    k.validate()
        if self.escalation:
            self.escalation.validate()
        if self.schedule_group:
            self.schedule_group.validate()

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

        result = dict()
        if self.acknowledge is not None:
            result['acknowledge'] = self.acknowledge.to_map()
        if self.contact_id is not None:
            result['contactId'] = self.contact_id
        result['contacts'] = []
        if self.contacts is not None:
            for k in self.contacts:
                result['contacts'].append(k.to_map() if k else None)
        if self.escalation is not None:
            result['escalation'] = self.escalation.to_map()
        if self.incident_id is not None:
            result['incidentId'] = self.incident_id
        if self.incident_member_id is not None:
            result['incidentMemberId'] = self.incident_member_id
        if self.schedule_group is not None:
            result['scheduleGroup'] = self.schedule_group.to_map()
        if self.time is not None:
            result['time'] = self.time
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('acknowledge') is not None:
            temp_model = IncidentMemberStructAcknowledge()
            self.acknowledge = temp_model.from_map(m['acknowledge'])
        if m.get('contactId') is not None:
            self.contact_id = m.get('contactId')
        self.contacts = []
        if m.get('contacts') is not None:
            for k in m.get('contacts'):
                temp_model = IncidentMemberStructContacts()
                self.contacts.append(temp_model.from_map(k))
        if m.get('escalation') is not None:
            temp_model = IncidentMemberStructEscalation()
            self.escalation = temp_model.from_map(m['escalation'])
        if m.get('incidentId') is not None:
            self.incident_id = m.get('incidentId')
        if m.get('incidentMemberId') is not None:
            self.incident_member_id = m.get('incidentMemberId')
        if m.get('scheduleGroup') is not None:
            temp_model = IncidentMemberStructScheduleGroup()
            self.schedule_group = temp_model.from_map(m['scheduleGroup'])
        if m.get('time') is not None:
            self.time = m.get('time')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class IncidentNoteStructOperator(TeaModel):
    def __init__(
        self,
        contact: str = None,
        contact_id: str = None,
        name: str = None,
        user_id: int = None,
    ):
        # Contact.
        self.contact = contact
        # Contact ID.
        self.contact_id = contact_id
        # Name.
        self.name = name
        # User ID.
        self.user_id = user_id

    def validate(self):
        pass

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

        result = dict()
        if self.contact is not None:
            result['contact'] = self.contact
        if self.contact_id is not None:
            result['contactId'] = self.contact_id
        if self.name is not None:
            result['name'] = self.name
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contact') is not None:
            self.contact = m.get('contact')
        if m.get('contactId') is not None:
            self.contact_id = m.get('contactId')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class IncidentNoteStruct(TeaModel):
    def __init__(
        self,
        content: str = None,
        format: str = None,
        incident_id: str = None,
        note_id: str = None,
        operator: IncidentNoteStructOperator = None,
        time: int = None,
        type: str = None,
    ):
        # Content.
        self.content = content
        # Content format.
        self.format = format
        # Incident ID.
        self.incident_id = incident_id
        # Note ID.
        self.note_id = note_id
        # Operator.
        self.operator = operator
        # Time.
        self.time = time
        # Type.
        self.type = type

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

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

        result = dict()
        if self.content is not None:
            result['content'] = self.content
        if self.format is not None:
            result['format'] = self.format
        if self.incident_id is not None:
            result['incidentId'] = self.incident_id
        if self.note_id is not None:
            result['noteId'] = self.note_id
        if self.operator is not None:
            result['operator'] = self.operator.to_map()
        if self.time is not None:
            result['time'] = self.time
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('content') is not None:
            self.content = m.get('content')
        if m.get('format') is not None:
            self.format = m.get('format')
        if m.get('incidentId') is not None:
            self.incident_id = m.get('incidentId')
        if m.get('noteId') is not None:
            self.note_id = m.get('noteId')
        if m.get('operator') is not None:
            temp_model = IncidentNoteStructOperator()
            self.operator = temp_model.from_map(m['operator'])
        if m.get('time') is not None:
            self.time = m.get('time')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class IncidentPlanCorporationStruct(TeaModel):
    def __init__(
        self,
        channel: str = None,
        robot_id: str = None,
    ):
        # Channel name.
        self.channel = channel
        # Robot ID.
        self.robot_id = robot_id

    def validate(self):
        pass

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

        result = dict()
        if self.channel is not None:
            result['channel'] = self.channel
        if self.robot_id is not None:
            result['robotId'] = self.robot_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('channel') is not None:
            self.channel = m.get('channel')
        if m.get('robotId') is not None:
            self.robot_id = m.get('robotId')
        return self


class IncidentPlanFieldPath(TeaModel):
    def __init__(
        self,
        field_alias: str = None,
        field_path: List[str] = None,
    ):
        # Field alias.
        self.field_alias = field_alias
        # List of field paths.
        self.field_path = field_path

    def validate(self):
        pass

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

        result = dict()
        if self.field_alias is not None:
            result['fieldAlias'] = self.field_alias
        if self.field_path is not None:
            result['fieldPath'] = self.field_path
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('fieldAlias') is not None:
            self.field_alias = m.get('fieldAlias')
        if m.get('fieldPath') is not None:
            self.field_path = m.get('fieldPath')
        return self


class IncidentPlanStruct(TeaModel):
    def __init__(
        self,
        auto_recover_seconds: int = None,
        close_expire: int = None,
        corporation: List[IncidentPlanCorporationStruct] = None,
        description: str = None,
        escalation_id: List[str] = None,
        gmt_create: int = None,
        gmt_modified: int = None,
        group_by: List[IncidentPlanFieldPath] = None,
        incident_plan_id: str = None,
        name: str = None,
        resource_filed: List[IncidentPlanFieldPath] = None,
        status: str = None,
        user_id: int = None,
        workspace: str = None,
    ):
        # Automatic recovery wait time.
        self.auto_recover_seconds = auto_recover_seconds
        # Event closure timeout.
        self.close_expire = close_expire
        # List of teams or roles involved in collaboration.
        self.corporation = corporation
        # Contingency plan description.
        self.description = description
        # List of escalation policy IDs.
        self.escalation_id = escalation_id
        # Creation time.
        self.gmt_create = gmt_create
        # Last modification time.
        self.gmt_modified = gmt_modified
        # Grouping field path.
        self.group_by = group_by
        # Event contingency plan ID.
        self.incident_plan_id = incident_plan_id
        # Contingency plan name.
        self.name = name
        # List of resource field mapping paths.
        self.resource_filed = resource_filed
        # Status.
        self.status = status
        # User ID.
        self.user_id = user_id
        # Workspace name.
        self.workspace = workspace

    def validate(self):
        if self.corporation:
            for k in self.corporation:
                if k:
                    k.validate()
        if self.group_by:
            for k in self.group_by:
                if k:
                    k.validate()
        if self.resource_filed:
            for k in self.resource_filed:
                if k:
                    k.validate()

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

        result = dict()
        if self.auto_recover_seconds is not None:
            result['autoRecoverSeconds'] = self.auto_recover_seconds
        if self.close_expire is not None:
            result['closeExpire'] = self.close_expire
        result['corporation'] = []
        if self.corporation is not None:
            for k in self.corporation:
                result['corporation'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.escalation_id is not None:
            result['escalationId'] = self.escalation_id
        if self.gmt_create is not None:
            result['gmtCreate'] = self.gmt_create
        if self.gmt_modified is not None:
            result['gmtModified'] = self.gmt_modified
        result['groupBy'] = []
        if self.group_by is not None:
            for k in self.group_by:
                result['groupBy'].append(k.to_map() if k else None)
        if self.incident_plan_id is not None:
            result['incidentPlanId'] = self.incident_plan_id
        if self.name is not None:
            result['name'] = self.name
        result['resourceFiled'] = []
        if self.resource_filed is not None:
            for k in self.resource_filed:
                result['resourceFiled'].append(k.to_map() if k else None)
        if self.status is not None:
            result['status'] = self.status
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('autoRecoverSeconds') is not None:
            self.auto_recover_seconds = m.get('autoRecoverSeconds')
        if m.get('closeExpire') is not None:
            self.close_expire = m.get('closeExpire')
        self.corporation = []
        if m.get('corporation') is not None:
            for k in m.get('corporation'):
                temp_model = IncidentPlanCorporationStruct()
                self.corporation.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('escalationId') is not None:
            self.escalation_id = m.get('escalationId')
        if m.get('gmtCreate') is not None:
            self.gmt_create = m.get('gmtCreate')
        if m.get('gmtModified') is not None:
            self.gmt_modified = m.get('gmtModified')
        self.group_by = []
        if m.get('groupBy') is not None:
            for k in m.get('groupBy'):
                temp_model = IncidentPlanFieldPath()
                self.group_by.append(temp_model.from_map(k))
        if m.get('incidentPlanId') is not None:
            self.incident_plan_id = m.get('incidentPlanId')
        if m.get('name') is not None:
            self.name = m.get('name')
        self.resource_filed = []
        if m.get('resourceFiled') is not None:
            for k in m.get('resourceFiled'):
                temp_model = IncidentPlanFieldPath()
                self.resource_filed.append(temp_model.from_map(k))
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class IncidentResourceDetail(TeaModel):
    def __init__(
        self,
        extra_id: str = None,
        resource_id: Dict[str, Any] = None,
        type: str = None,
    ):
        # Additional resource identifier.
        self.extra_id = extra_id
        # Resource ID object.
        self.resource_id = resource_id
        # Resource type, indicating which cloud product the resource belongs to.
        self.type = type

    def validate(self):
        pass

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

        result = dict()
        if self.extra_id is not None:
            result['extraId'] = self.extra_id
        if self.resource_id is not None:
            result['resourceId'] = self.resource_id
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('extraId') is not None:
            self.extra_id = m.get('extraId')
        if m.get('resourceId') is not None:
            self.resource_id = m.get('resourceId')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class IncidentResourceStruct(TeaModel):
    def __init__(
        self,
        description: str = None,
        incident_id: str = None,
        incident_resource_id: str = None,
        resource: IncidentResourceDetail = None,
        source: str = None,
        time: int = None,
        user_id: int = None,
    ):
        # Description information.
        self.description = description
        # Incident ID.
        self.incident_id = incident_id
        # The unique ID of this resource in the event.
        self.incident_resource_id = incident_resource_id
        # Event resource details object.
        self.resource = resource
        # Source.
        self.source = source
        # Time.
        self.time = time
        # User ID.
        self.user_id = user_id

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

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.incident_id is not None:
            result['incidentId'] = self.incident_id
        if self.incident_resource_id is not None:
            result['incidentResourceId'] = self.incident_resource_id
        if self.resource is not None:
            result['resource'] = self.resource.to_map()
        if self.source is not None:
            result['source'] = self.source
        if self.time is not None:
            result['time'] = self.time
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('incidentId') is not None:
            self.incident_id = m.get('incidentId')
        if m.get('incidentResourceId') is not None:
            self.incident_resource_id = m.get('incidentResourceId')
        if m.get('resource') is not None:
            temp_model = IncidentResourceDetail()
            self.resource = temp_model.from_map(m['resource'])
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('time') is not None:
            self.time = m.get('time')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class IncidentStruct(TeaModel):
    def __init__(
        self,
        content: str = None,
        escalations: List[IncidentEscalationStruct] = None,
        incident_id: str = None,
        incident_plan: IncidentPlanStruct = None,
        resource: IncidentResourceDetail = None,
        severity: str = None,
        status: str = None,
        time: int = None,
        title: str = None,
        user_id: str = None,
    ):
        # Content.
        self.content = content
        # List of escalation policies.
        self.escalations = escalations
        # Incident ID.
        self.incident_id = incident_id
        # Associated incident contingency plan.
        self.incident_plan = incident_plan
        # Associated resource details.
        self.resource = resource
        # Incident severity level.
        self.severity = severity
        # Status.
        self.status = status
        # Time.
        self.time = time
        # Title.
        self.title = title
        # User ID.
        self.user_id = user_id

    def validate(self):
        if self.escalations:
            for k in self.escalations:
                if k:
                    k.validate()
        if self.incident_plan:
            self.incident_plan.validate()
        if self.resource:
            self.resource.validate()

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

        result = dict()
        if self.content is not None:
            result['content'] = self.content
        result['escalations'] = []
        if self.escalations is not None:
            for k in self.escalations:
                result['escalations'].append(k.to_map() if k else None)
        if self.incident_id is not None:
            result['incidentId'] = self.incident_id
        if self.incident_plan is not None:
            result['incidentPlan'] = self.incident_plan.to_map()
        if self.resource is not None:
            result['resource'] = self.resource.to_map()
        if self.severity is not None:
            result['severity'] = self.severity
        if self.status is not None:
            result['status'] = self.status
        if self.time is not None:
            result['time'] = self.time
        if self.title is not None:
            result['title'] = self.title
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('content') is not None:
            self.content = m.get('content')
        self.escalations = []
        if m.get('escalations') is not None:
            for k in m.get('escalations'):
                temp_model = IncidentEscalationStruct()
                self.escalations.append(temp_model.from_map(k))
        if m.get('incidentId') is not None:
            self.incident_id = m.get('incidentId')
        if m.get('incidentPlan') is not None:
            temp_model = IncidentPlanStruct()
            self.incident_plan = temp_model.from_map(m['incidentPlan'])
        if m.get('resource') is not None:
            temp_model = IncidentResourceDetail()
            self.resource = temp_model.from_map(m['resource'])
        if m.get('severity') is not None:
            self.severity = m.get('severity')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('time') is not None:
            self.time = m.get('time')
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class IncidentTimeline(TeaModel):
    def __init__(
        self,
        child_type: str = None,
        content: str = None,
        incident_id: str = None,
        incident_timeline_id: str = None,
        time: int = None,
        timeline_id: str = None,
        title: str = None,
        type: str = None,
        user_id: str = None,
    ):
        # Subtype.
        self.child_type = child_type
        # Content.
        self.content = content
        # Incident ID.
        self.incident_id = incident_id
        # Timeline node unique ID.
        self.incident_timeline_id = incident_timeline_id
        # Time.
        self.time = time
        # Parent timeline ID.
        self.timeline_id = timeline_id
        # Title.
        self.title = title
        # Type.
        self.type = type
        # User ID.
        self.user_id = user_id

    def validate(self):
        pass

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

        result = dict()
        if self.child_type is not None:
            result['childType'] = self.child_type
        if self.content is not None:
            result['content'] = self.content
        if self.incident_id is not None:
            result['incidentId'] = self.incident_id
        if self.incident_timeline_id is not None:
            result['incidentTimelineId'] = self.incident_timeline_id
        if self.time is not None:
            result['time'] = self.time
        if self.timeline_id is not None:
            result['timelineId'] = self.timeline_id
        if self.title is not None:
            result['title'] = self.title
        if self.type is not None:
            result['type'] = self.type
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('childType') is not None:
            self.child_type = m.get('childType')
        if m.get('content') is not None:
            self.content = m.get('content')
        if m.get('incidentId') is not None:
            self.incident_id = m.get('incidentId')
        if m.get('incidentTimelineId') is not None:
            self.incident_timeline_id = m.get('incidentTimelineId')
        if m.get('time') is not None:
            self.time = m.get('time')
        if m.get('timelineId') is not None:
            self.timeline_id = m.get('timelineId')
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class IncidentTimelineForView(TeaModel):
    def __init__(
        self,
        change_type: str = None,
        content: Any = None,
        incident_uuid: str = None,
        operator: ContactForIncidentView = None,
        time: int = None,
        timeline_uuid: str = None,
        title: str = None,
        type: str = None,
        user_id: str = None,
        workspace: str = None,
    ):
        self.change_type = change_type
        self.content = content
        self.incident_uuid = incident_uuid
        self.operator = operator
        self.time = time
        self.timeline_uuid = timeline_uuid
        self.title = title
        self.type = type
        self.user_id = user_id
        self.workspace = workspace

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

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

        result = dict()
        if self.change_type is not None:
            result['changeType'] = self.change_type
        if self.content is not None:
            result['content'] = self.content
        if self.incident_uuid is not None:
            result['incidentUuid'] = self.incident_uuid
        if self.operator is not None:
            result['operator'] = self.operator.to_map()
        if self.time is not None:
            result['time'] = self.time
        if self.timeline_uuid is not None:
            result['timelineUuid'] = self.timeline_uuid
        if self.title is not None:
            result['title'] = self.title
        if self.type is not None:
            result['type'] = self.type
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('changeType') is not None:
            self.change_type = m.get('changeType')
        if m.get('content') is not None:
            self.content = m.get('content')
        if m.get('incidentUuid') is not None:
            self.incident_uuid = m.get('incidentUuid')
        if m.get('operator') is not None:
            temp_model = ContactForIncidentView()
            self.operator = temp_model.from_map(m['operator'])
        if m.get('time') is not None:
            self.time = m.get('time')
        if m.get('timelineUuid') is not None:
            self.timeline_uuid = m.get('timelineUuid')
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class IndexJsonKey(TeaModel):
    def __init__(
        self,
        chn: bool = None,
        type: str = None,
    ):
        self.chn = chn
        self.type = type

    def validate(self):
        pass

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

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

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


class IndexKey(TeaModel):
    def __init__(
        self,
        chn: bool = None,
        embedding: str = None,
        json_keys: Dict[str, IndexJsonKey] = None,
        type: str = None,
    ):
        self.chn = chn
        self.embedding = embedding
        self.json_keys = json_keys
        self.type = type

    def validate(self):
        if self.json_keys:
            for v in self.json_keys.values():
                if v:
                    v.validate()

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

        result = dict()
        if self.chn is not None:
            result['chn'] = self.chn
        if self.embedding is not None:
            result['embedding'] = self.embedding
        result['jsonKeys'] = {}
        if self.json_keys is not None:
            for k, v in self.json_keys.items():
                result['jsonKeys'][k] = v.to_map()
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('chn') is not None:
            self.chn = m.get('chn')
        if m.get('embedding') is not None:
            self.embedding = m.get('embedding')
        self.json_keys = {}
        if m.get('jsonKeys') is not None:
            for k, v in m.get('jsonKeys').items():
                temp_model = IndexJsonKey()
                self.json_keys[k] = temp_model.from_map(v)
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class MaintainWindowForModifyEffectTimeRange(TeaModel):
    def __init__(
        self,
        day_in_week: List[int] = None,
        end_time_in_minute: int = None,
        start_time_in_minute: int = None,
        time_zone: str = None,
    ):
        # Effective days (Monday to Sunday).
        self.day_in_week = day_in_week
        # End time (in minutes).
        self.end_time_in_minute = end_time_in_minute
        # Start time (in minutes).
        self.start_time_in_minute = start_time_in_minute
        # Time zone.
        self.time_zone = time_zone

    def validate(self):
        pass

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

        result = dict()
        if self.day_in_week is not None:
            result['dayInWeek'] = self.day_in_week
        if self.end_time_in_minute is not None:
            result['endTimeInMinute'] = self.end_time_in_minute
        if self.start_time_in_minute is not None:
            result['startTimeInMinute'] = self.start_time_in_minute
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dayInWeek') is not None:
            self.day_in_week = m.get('dayInWeek')
        if m.get('endTimeInMinute') is not None:
            self.end_time_in_minute = m.get('endTimeInMinute')
        if m.get('startTimeInMinute') is not None:
            self.start_time_in_minute = m.get('startTimeInMinute')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        return self


class MaintainWindowForModify(TeaModel):
    def __init__(
        self,
        description: str = None,
        effect_time_range: MaintainWindowForModifyEffectTimeRange = None,
        effective: str = None,
        end_time: str = None,
        filter_setting: FilterSetting = None,
        maintain_window_name: str = None,
        start_time: str = None,
    ):
        # Description.
        self.description = description
        # Effective time range.
        self.effect_time_range = effect_time_range
        # Crontab expression.
        self.effective = effective
        # Effective end time.
        self.end_time = end_time
        # Filtering conditions.
        self.filter_setting = filter_setting
        # Name.
        # 
        # This parameter is required.
        self.maintain_window_name = maintain_window_name
        # Effective start time.
        self.start_time = start_time

    def validate(self):
        if self.effect_time_range:
            self.effect_time_range.validate()
        if self.filter_setting:
            self.filter_setting.validate()

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.effect_time_range is not None:
            result['effectTimeRange'] = self.effect_time_range.to_map()
        if self.effective is not None:
            result['effective'] = self.effective
        if self.end_time is not None:
            result['endTime'] = self.end_time
        if self.filter_setting is not None:
            result['filterSetting'] = self.filter_setting.to_map()
        if self.maintain_window_name is not None:
            result['maintainWindowName'] = self.maintain_window_name
        if self.start_time is not None:
            result['startTime'] = self.start_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('effectTimeRange') is not None:
            temp_model = MaintainWindowForModifyEffectTimeRange()
            self.effect_time_range = temp_model.from_map(m['effectTimeRange'])
        if m.get('effective') is not None:
            self.effective = m.get('effective')
        if m.get('endTime') is not None:
            self.end_time = m.get('endTime')
        if m.get('filterSetting') is not None:
            temp_model = FilterSetting()
            self.filter_setting = temp_model.from_map(m['filterSetting'])
        if m.get('maintainWindowName') is not None:
            self.maintain_window_name = m.get('maintainWindowName')
        if m.get('startTime') is not None:
            self.start_time = m.get('startTime')
        return self


class MaintainWindowForViewEffectTimeRange(TeaModel):
    def __init__(
        self,
        day_in_week: List[int] = None,
        end_time_in_minute: int = None,
        start_time_in_minute: int = None,
        time_zone: str = None,
    ):
        # Effective days (Monday to Sunday).
        self.day_in_week = day_in_week
        # End time (in minutes).
        self.end_time_in_minute = end_time_in_minute
        # Start time (in minutes).
        self.start_time_in_minute = start_time_in_minute
        # Time Zone.
        self.time_zone = time_zone

    def validate(self):
        pass

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

        result = dict()
        if self.day_in_week is not None:
            result['dayInWeek'] = self.day_in_week
        if self.end_time_in_minute is not None:
            result['endTimeInMinute'] = self.end_time_in_minute
        if self.start_time_in_minute is not None:
            result['startTimeInMinute'] = self.start_time_in_minute
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dayInWeek') is not None:
            self.day_in_week = m.get('dayInWeek')
        if m.get('endTimeInMinute') is not None:
            self.end_time_in_minute = m.get('endTimeInMinute')
        if m.get('startTimeInMinute') is not None:
            self.start_time_in_minute = m.get('startTimeInMinute')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        return self


class MaintainWindowForView(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        description: str = None,
        effect_time_range: MaintainWindowForViewEffectTimeRange = None,
        effective: str = None,
        enable: bool = None,
        end_time: str = None,
        filter_setting: FilterSetting = None,
        maintain_window_id: str = None,
        maintain_window_name: str = None,
        start_time: str = None,
        update_time: str = None,
        user_id: str = None,
        workspace: str = None,
    ):
        # Creation time.
        self.create_time = create_time
        # Description.
        self.description = description
        # Effective time range.
        self.effect_time_range = effect_time_range
        # Crontab expression.
        self.effective = effective
        # Whether enabled.
        self.enable = enable
        # Effective end time.
        self.end_time = end_time
        # Filtering conditions.
        self.filter_setting = filter_setting
        # UUID
        self.maintain_window_id = maintain_window_id
        # Name.
        # 
        # This parameter is required.
        self.maintain_window_name = maintain_window_name
        # Effective start time.
        self.start_time = start_time
        # Update time.
        self.update_time = update_time
        # User ID.
        self.user_id = user_id
        # workspace
        self.workspace = workspace

    def validate(self):
        if self.effect_time_range:
            self.effect_time_range.validate()
        if self.filter_setting:
            self.filter_setting.validate()

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

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.effect_time_range is not None:
            result['effectTimeRange'] = self.effect_time_range.to_map()
        if self.effective is not None:
            result['effective'] = self.effective
        if self.enable is not None:
            result['enable'] = self.enable
        if self.end_time is not None:
            result['endTime'] = self.end_time
        if self.filter_setting is not None:
            result['filterSetting'] = self.filter_setting.to_map()
        if self.maintain_window_id is not None:
            result['maintainWindowId'] = self.maintain_window_id
        if self.maintain_window_name is not None:
            result['maintainWindowName'] = self.maintain_window_name
        if self.start_time is not None:
            result['startTime'] = self.start_time
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('effectTimeRange') is not None:
            temp_model = MaintainWindowForViewEffectTimeRange()
            self.effect_time_range = temp_model.from_map(m['effectTimeRange'])
        if m.get('effective') is not None:
            self.effective = m.get('effective')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('endTime') is not None:
            self.end_time = m.get('endTime')
        if m.get('filterSetting') is not None:
            temp_model = FilterSetting()
            self.filter_setting = temp_model.from_map(m['filterSetting'])
        if m.get('maintainWindowId') is not None:
            self.maintain_window_id = m.get('maintainWindowId')
        if m.get('maintainWindowName') is not None:
            self.maintain_window_name = m.get('maintainWindowName')
        if m.get('startTime') is not None:
            self.start_time = m.get('startTime')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class MergeContact(TeaModel):
    def __init__(
        self,
        email: str = None,
        email_verify: bool = None,
        extend: Dict[str, Any] = None,
        gmt_create: str = None,
        gmt_modified: str = None,
        identifier: str = None,
        lang: str = None,
        name: str = None,
        phone: str = None,
        phone_code: str = None,
        phone_verify: bool = None,
        source: str = None,
    ):
        self.email = email
        self.email_verify = email_verify
        self.extend = extend
        self.gmt_create = gmt_create
        self.gmt_modified = gmt_modified
        self.identifier = identifier
        self.lang = lang
        self.name = name
        self.phone = phone
        self.phone_code = phone_code
        self.phone_verify = phone_verify
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.email is not None:
            result['email'] = self.email
        if self.email_verify is not None:
            result['emailVerify'] = self.email_verify
        if self.extend is not None:
            result['extend'] = self.extend
        if self.gmt_create is not None:
            result['gmtCreate'] = self.gmt_create
        if self.gmt_modified is not None:
            result['gmtModified'] = self.gmt_modified
        if self.identifier is not None:
            result['identifier'] = self.identifier
        if self.lang is not None:
            result['lang'] = self.lang
        if self.name is not None:
            result['name'] = self.name
        if self.phone is not None:
            result['phone'] = self.phone
        if self.phone_code is not None:
            result['phoneCode'] = self.phone_code
        if self.phone_verify is not None:
            result['phoneVerify'] = self.phone_verify
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('email') is not None:
            self.email = m.get('email')
        if m.get('emailVerify') is not None:
            self.email_verify = m.get('emailVerify')
        if m.get('extend') is not None:
            self.extend = m.get('extend')
        if m.get('gmtCreate') is not None:
            self.gmt_create = m.get('gmtCreate')
        if m.get('gmtModified') is not None:
            self.gmt_modified = m.get('gmtModified')
        if m.get('identifier') is not None:
            self.identifier = m.get('identifier')
        if m.get('lang') is not None:
            self.lang = m.get('lang')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('phone') is not None:
            self.phone = m.get('phone')
        if m.get('phoneCode') is not None:
            self.phone_code = m.get('phoneCode')
        if m.get('phoneVerify') is not None:
            self.phone_verify = m.get('phoneVerify')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class MergeContactGroup(TeaModel):
    def __init__(
        self,
        contacts: List[str] = None,
        extend: Dict[str, Any] = None,
        gmt_create: str = None,
        gmt_modified: str = None,
        identifier: str = None,
        name: str = None,
        source: str = None,
    ):
        self.contacts = contacts
        self.extend = extend
        self.gmt_create = gmt_create
        self.gmt_modified = gmt_modified
        self.identifier = identifier
        self.name = name
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.contacts is not None:
            result['contacts'] = self.contacts
        if self.extend is not None:
            result['extend'] = self.extend
        if self.gmt_create is not None:
            result['gmtCreate'] = self.gmt_create
        if self.gmt_modified is not None:
            result['gmtModified'] = self.gmt_modified
        if self.identifier is not None:
            result['identifier'] = self.identifier
        if self.name is not None:
            result['name'] = self.name
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contacts') is not None:
            self.contacts = m.get('contacts')
        if m.get('extend') is not None:
            self.extend = m.get('extend')
        if m.get('gmtCreate') is not None:
            self.gmt_create = m.get('gmtCreate')
        if m.get('gmtModified') is not None:
            self.gmt_modified = m.get('gmtModified')
        if m.get('identifier') is not None:
            self.identifier = m.get('identifier')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class MergeRobotExtend(TeaModel):
    def __init__(
        self,
        card_template: str = None,
        daily_noc: bool = None,
        daily_noc_time: str = None,
        ding_sign_key: str = None,
        enable_outgoing: bool = None,
        token: str = None,
    ):
        self.card_template = card_template
        self.daily_noc = daily_noc
        self.daily_noc_time = daily_noc_time
        self.ding_sign_key = ding_sign_key
        self.enable_outgoing = enable_outgoing
        self.token = token

    def validate(self):
        pass

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

        result = dict()
        if self.card_template is not None:
            result['cardTemplate'] = self.card_template
        if self.daily_noc is not None:
            result['dailyNoc'] = self.daily_noc
        if self.daily_noc_time is not None:
            result['dailyNocTime'] = self.daily_noc_time
        if self.ding_sign_key is not None:
            result['dingSignKey'] = self.ding_sign_key
        if self.enable_outgoing is not None:
            result['enableOutgoing'] = self.enable_outgoing
        if self.token is not None:
            result['token'] = self.token
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('cardTemplate') is not None:
            self.card_template = m.get('cardTemplate')
        if m.get('dailyNoc') is not None:
            self.daily_noc = m.get('dailyNoc')
        if m.get('dailyNocTime') is not None:
            self.daily_noc_time = m.get('dailyNocTime')
        if m.get('dingSignKey') is not None:
            self.ding_sign_key = m.get('dingSignKey')
        if m.get('enableOutgoing') is not None:
            self.enable_outgoing = m.get('enableOutgoing')
        if m.get('token') is not None:
            self.token = m.get('token')
        return self


class MergeRobot(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        extend: MergeRobotExtend = None,
        gmt_modified: str = None,
        identifier: str = None,
        lang: str = None,
        name: str = None,
        source: str = None,
        type: str = None,
        webhook: str = None,
    ):
        self.create_time = create_time
        self.extend = extend
        self.gmt_modified = gmt_modified
        self.identifier = identifier
        self.lang = lang
        self.name = name
        self.source = source
        self.type = type
        self.webhook = webhook

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

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

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.extend is not None:
            result['extend'] = self.extend.to_map()
        if self.gmt_modified is not None:
            result['gmtModified'] = self.gmt_modified
        if self.identifier is not None:
            result['identifier'] = self.identifier
        if self.lang is not None:
            result['lang'] = self.lang
        if self.name is not None:
            result['name'] = self.name
        if self.source is not None:
            result['source'] = self.source
        if self.type is not None:
            result['type'] = self.type
        if self.webhook is not None:
            result['webhook'] = self.webhook
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('extend') is not None:
            temp_model = MergeRobotExtend()
            self.extend = temp_model.from_map(m['extend'])
        if m.get('gmtModified') is not None:
            self.gmt_modified = m.get('gmtModified')
        if m.get('identifier') is not None:
            self.identifier = m.get('identifier')
        if m.get('lang') is not None:
            self.lang = m.get('lang')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('webhook') is not None:
            self.webhook = m.get('webhook')
        return self


class MergeWebhook(TeaModel):
    def __init__(
        self,
        content_type: str = None,
        extend: str = None,
        gmt_create: str = None,
        gmt_modified: Dict[str, Any] = None,
        headers: str = None,
        identifier: str = None,
        lang: str = None,
        method: str = None,
        name: str = None,
        source: str = None,
        type: str = None,
        webhook: str = None,
    ):
        self.content_type = content_type
        self.extend = extend
        self.gmt_create = gmt_create
        self.gmt_modified = gmt_modified
        self.headers = headers
        self.identifier = identifier
        self.lang = lang
        self.method = method
        self.name = name
        self.source = source
        self.type = type
        self.webhook = webhook

    def validate(self):
        pass

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

        result = dict()
        if self.content_type is not None:
            result['contentType'] = self.content_type
        if self.extend is not None:
            result['extend'] = self.extend
        if self.gmt_create is not None:
            result['gmtCreate'] = self.gmt_create
        if self.gmt_modified is not None:
            result['gmtModified'] = self.gmt_modified
        if self.headers is not None:
            result['headers'] = self.headers
        if self.identifier is not None:
            result['identifier'] = self.identifier
        if self.lang is not None:
            result['lang'] = self.lang
        if self.method is not None:
            result['method'] = self.method
        if self.name is not None:
            result['name'] = self.name
        if self.source is not None:
            result['source'] = self.source
        if self.type is not None:
            result['type'] = self.type
        if self.webhook is not None:
            result['webhook'] = self.webhook
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contentType') is not None:
            self.content_type = m.get('contentType')
        if m.get('extend') is not None:
            self.extend = m.get('extend')
        if m.get('gmtCreate') is not None:
            self.gmt_create = m.get('gmtCreate')
        if m.get('gmtModified') is not None:
            self.gmt_modified = m.get('gmtModified')
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('identifier') is not None:
            self.identifier = m.get('identifier')
        if m.get('lang') is not None:
            self.lang = m.get('lang')
        if m.get('method') is not None:
            self.method = m.get('method')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('webhook') is not None:
            self.webhook = m.get('webhook')
        return self


class NotifyStrategyForModifyCustomTemplateEntries(TeaModel):
    def __init__(
        self,
        target_type: str = None,
        template_uuid: str = None,
    ):
        # Notification type.
        # 
        # This parameter is required.
        self.target_type = target_type
        # Template UUID.
        # 
        # This parameter is required.
        self.template_uuid = template_uuid

    def validate(self):
        pass

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

        result = dict()
        if self.target_type is not None:
            result['targetType'] = self.target_type
        if self.template_uuid is not None:
            result['templateUuid'] = self.template_uuid
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('targetType') is not None:
            self.target_type = m.get('targetType')
        if m.get('templateUuid') is not None:
            self.template_uuid = m.get('templateUuid')
        return self


class NotifyStrategyForModifyGroupingSetting(TeaModel):
    def __init__(
        self,
        grouping_keys: List[str] = None,
        period_min: int = None,
        silence_sec: int = None,
        times: int = None,
    ):
        # Grouping keys.
        self.grouping_keys = grouping_keys
        # Check interval in minutes.
        self.period_min = period_min
        # Silence duration in seconds.
        self.silence_sec = silence_sec
        # Trigger count.
        self.times = times

    def validate(self):
        pass

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

        result = dict()
        if self.grouping_keys is not None:
            result['groupingKeys'] = self.grouping_keys
        if self.period_min is not None:
            result['periodMin'] = self.period_min
        if self.silence_sec is not None:
            result['silenceSec'] = self.silence_sec
        if self.times is not None:
            result['times'] = self.times
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('groupingKeys') is not None:
            self.grouping_keys = m.get('groupingKeys')
        if m.get('periodMin') is not None:
            self.period_min = m.get('periodMin')
        if m.get('silenceSec') is not None:
            self.silence_sec = m.get('silenceSec')
        if m.get('times') is not None:
            self.times = m.get('times')
        return self


class NotifyStrategyForModifyPushingSetting(TeaModel):
    def __init__(
        self,
        alert_action_ids: List[str] = None,
        restore_action_ids: List[str] = None,
        template_uuid: str = None,
    ):
        self.alert_action_ids = alert_action_ids
        self.restore_action_ids = restore_action_ids
        self.template_uuid = template_uuid

    def validate(self):
        pass

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

        result = dict()
        if self.alert_action_ids is not None:
            result['alertActionIds'] = self.alert_action_ids
        if self.restore_action_ids is not None:
            result['restoreActionIds'] = self.restore_action_ids
        if self.template_uuid is not None:
            result['templateUuid'] = self.template_uuid
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionIds') is not None:
            self.alert_action_ids = m.get('alertActionIds')
        if m.get('restoreActionIds') is not None:
            self.restore_action_ids = m.get('restoreActionIds')
        if m.get('templateUuid') is not None:
            self.template_uuid = m.get('templateUuid')
        return self


class NotifyStrategyForModifyRepeatNotifySetting(TeaModel):
    def __init__(
        self,
        end_incident_state: str = None,
        repeat_interval: int = None,
    ):
        self.end_incident_state = end_incident_state
        self.repeat_interval = repeat_interval

    def validate(self):
        pass

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

        result = dict()
        if self.end_incident_state is not None:
            result['endIncidentState'] = self.end_incident_state
        if self.repeat_interval is not None:
            result['repeatInterval'] = self.repeat_interval
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('endIncidentState') is not None:
            self.end_incident_state = m.get('endIncidentState')
        if m.get('repeatInterval') is not None:
            self.repeat_interval = m.get('repeatInterval')
        return self


class NotifyStrategyForModifyRoutesChannels(TeaModel):
    def __init__(
        self,
        channel_type: str = None,
        enabled_sub_channels: List[str] = None,
        receivers: List[str] = None,
    ):
        # Channel type.
        # 
        # This parameter is required.
        self.channel_type = channel_type
        # Enabled notification types.
        self.enabled_sub_channels = enabled_sub_channels
        # Channel recipient.
        # 
        # This parameter is required.
        self.receivers = receivers

    def validate(self):
        pass

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

        result = dict()
        if self.channel_type is not None:
            result['channelType'] = self.channel_type
        if self.enabled_sub_channels is not None:
            result['enabledSubChannels'] = self.enabled_sub_channels
        if self.receivers is not None:
            result['receivers'] = self.receivers
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('channelType') is not None:
            self.channel_type = m.get('channelType')
        if m.get('enabledSubChannels') is not None:
            self.enabled_sub_channels = m.get('enabledSubChannels')
        if m.get('receivers') is not None:
            self.receivers = m.get('receivers')
        return self


class NotifyStrategyForModifyRoutesEffectTimeRange(TeaModel):
    def __init__(
        self,
        day_in_week: List[int] = None,
        end_time_in_minute: int = None,
        start_time_in_minute: int = None,
        time_zone: str = None,
    ):
        # Effective days (Monday to Sunday).
        self.day_in_week = day_in_week
        # End time (in minutes).
        self.end_time_in_minute = end_time_in_minute
        # Start time (in minutes).
        self.start_time_in_minute = start_time_in_minute
        # Time Zone.
        self.time_zone = time_zone

    def validate(self):
        pass

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

        result = dict()
        if self.day_in_week is not None:
            result['dayInWeek'] = self.day_in_week
        if self.end_time_in_minute is not None:
            result['endTimeInMinute'] = self.end_time_in_minute
        if self.start_time_in_minute is not None:
            result['startTimeInMinute'] = self.start_time_in_minute
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dayInWeek') is not None:
            self.day_in_week = m.get('dayInWeek')
        if m.get('endTimeInMinute') is not None:
            self.end_time_in_minute = m.get('endTimeInMinute')
        if m.get('startTimeInMinute') is not None:
            self.start_time_in_minute = m.get('startTimeInMinute')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        return self


class NotifyStrategyForModifyRoutes(TeaModel):
    def __init__(
        self,
        channels: List[NotifyStrategyForModifyRoutesChannels] = None,
        digital_employee_name: str = None,
        effect_time_range: NotifyStrategyForModifyRoutesEffectTimeRange = None,
        enable_rca: bool = None,
        filter_setting: FilterSetting = None,
        severities: List[str] = None,
    ):
        # Notification channel.
        self.channels = channels
        self.digital_employee_name = digital_employee_name
        # Valid time range.
        self.effect_time_range = effect_time_range
        self.enable_rca = enable_rca
        # Routing conditions.
        self.filter_setting = filter_setting
        # Severity level list.
        self.severities = severities

    def validate(self):
        if self.channels:
            for k in self.channels:
                if k:
                    k.validate()
        if self.effect_time_range:
            self.effect_time_range.validate()
        if self.filter_setting:
            self.filter_setting.validate()

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

        result = dict()
        result['channels'] = []
        if self.channels is not None:
            for k in self.channels:
                result['channels'].append(k.to_map() if k else None)
        if self.digital_employee_name is not None:
            result['digitalEmployeeName'] = self.digital_employee_name
        if self.effect_time_range is not None:
            result['effectTimeRange'] = self.effect_time_range.to_map()
        if self.enable_rca is not None:
            result['enableRca'] = self.enable_rca
        if self.filter_setting is not None:
            result['filterSetting'] = self.filter_setting.to_map()
        if self.severities is not None:
            result['severities'] = self.severities
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.channels = []
        if m.get('channels') is not None:
            for k in m.get('channels'):
                temp_model = NotifyStrategyForModifyRoutesChannels()
                self.channels.append(temp_model.from_map(k))
        if m.get('digitalEmployeeName') is not None:
            self.digital_employee_name = m.get('digitalEmployeeName')
        if m.get('effectTimeRange') is not None:
            temp_model = NotifyStrategyForModifyRoutesEffectTimeRange()
            self.effect_time_range = temp_model.from_map(m['effectTimeRange'])
        if m.get('enableRca') is not None:
            self.enable_rca = m.get('enableRca')
        if m.get('filterSetting') is not None:
            temp_model = FilterSetting()
            self.filter_setting = temp_model.from_map(m['filterSetting'])
        if m.get('severities') is not None:
            self.severities = m.get('severities')
        return self


class WorkspaceFilterSetting(TeaModel):
    def __init__(
        self,
        tag_selector: FilterSetting = None,
        workspace_uuids: List[str] = None,
    ):
        self.tag_selector = tag_selector
        self.workspace_uuids = workspace_uuids

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

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

        result = dict()
        if self.tag_selector is not None:
            result['tagSelector'] = self.tag_selector.to_map()
        if self.workspace_uuids is not None:
            result['workspaceUuids'] = self.workspace_uuids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('tagSelector') is not None:
            temp_model = FilterSetting()
            self.tag_selector = temp_model.from_map(m['tagSelector'])
        if m.get('workspaceUuids') is not None:
            self.workspace_uuids = m.get('workspaceUuids')
        return self


class NotifyStrategyForModify(TeaModel):
    def __init__(
        self,
        auto_recover_seconds: int = None,
        custom_template_entries: List[NotifyStrategyForModifyCustomTemplateEntries] = None,
        description: str = None,
        enable_incident_management: bool = None,
        escalation_id: List[str] = None,
        filter_setting: FilterSetting = None,
        grouping_setting: NotifyStrategyForModifyGroupingSetting = None,
        ignore_restored_notification: bool = None,
        notify_strategy_name: str = None,
        pushing_setting: NotifyStrategyForModifyPushingSetting = None,
        repeat_notify_setting: NotifyStrategyForModifyRepeatNotifySetting = None,
        routes: List[NotifyStrategyForModifyRoutes] = None,
        workspace_filter_setting: WorkspaceFilterSetting = None,
    ):
        self.auto_recover_seconds = auto_recover_seconds
        # Notification channel template.
        self.custom_template_entries = custom_template_entries
        # Description.
        self.description = description
        self.enable_incident_management = enable_incident_management
        self.escalation_id = escalation_id
        self.filter_setting = filter_setting
        # Grouping settings.
        # 
        # This parameter is required.
        self.grouping_setting = grouping_setting
        # Whether to notify on recovery.
        self.ignore_restored_notification = ignore_restored_notification
        # Name.
        # 
        # This parameter is required.
        self.notify_strategy_name = notify_strategy_name
        self.pushing_setting = pushing_setting
        self.repeat_notify_setting = repeat_notify_setting
        # Notification channel routing configuration.
        # 
        # This parameter is required.
        self.routes = routes
        self.workspace_filter_setting = workspace_filter_setting

    def validate(self):
        if self.custom_template_entries:
            for k in self.custom_template_entries:
                if k:
                    k.validate()
        if self.filter_setting:
            self.filter_setting.validate()
        if self.grouping_setting:
            self.grouping_setting.validate()
        if self.pushing_setting:
            self.pushing_setting.validate()
        if self.repeat_notify_setting:
            self.repeat_notify_setting.validate()
        if self.routes:
            for k in self.routes:
                if k:
                    k.validate()
        if self.workspace_filter_setting:
            self.workspace_filter_setting.validate()

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

        result = dict()
        if self.auto_recover_seconds is not None:
            result['autoRecoverSeconds'] = self.auto_recover_seconds
        result['customTemplateEntries'] = []
        if self.custom_template_entries is not None:
            for k in self.custom_template_entries:
                result['customTemplateEntries'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.enable_incident_management is not None:
            result['enableIncidentManagement'] = self.enable_incident_management
        if self.escalation_id is not None:
            result['escalationId'] = self.escalation_id
        if self.filter_setting is not None:
            result['filterSetting'] = self.filter_setting.to_map()
        if self.grouping_setting is not None:
            result['groupingSetting'] = self.grouping_setting.to_map()
        if self.ignore_restored_notification is not None:
            result['ignoreRestoredNotification'] = self.ignore_restored_notification
        if self.notify_strategy_name is not None:
            result['notifyStrategyName'] = self.notify_strategy_name
        if self.pushing_setting is not None:
            result['pushingSetting'] = self.pushing_setting.to_map()
        if self.repeat_notify_setting is not None:
            result['repeatNotifySetting'] = self.repeat_notify_setting.to_map()
        result['routes'] = []
        if self.routes is not None:
            for k in self.routes:
                result['routes'].append(k.to_map() if k else None)
        if self.workspace_filter_setting is not None:
            result['workspaceFilterSetting'] = self.workspace_filter_setting.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('autoRecoverSeconds') is not None:
            self.auto_recover_seconds = m.get('autoRecoverSeconds')
        self.custom_template_entries = []
        if m.get('customTemplateEntries') is not None:
            for k in m.get('customTemplateEntries'):
                temp_model = NotifyStrategyForModifyCustomTemplateEntries()
                self.custom_template_entries.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enableIncidentManagement') is not None:
            self.enable_incident_management = m.get('enableIncidentManagement')
        if m.get('escalationId') is not None:
            self.escalation_id = m.get('escalationId')
        if m.get('filterSetting') is not None:
            temp_model = FilterSetting()
            self.filter_setting = temp_model.from_map(m['filterSetting'])
        if m.get('groupingSetting') is not None:
            temp_model = NotifyStrategyForModifyGroupingSetting()
            self.grouping_setting = temp_model.from_map(m['groupingSetting'])
        if m.get('ignoreRestoredNotification') is not None:
            self.ignore_restored_notification = m.get('ignoreRestoredNotification')
        if m.get('notifyStrategyName') is not None:
            self.notify_strategy_name = m.get('notifyStrategyName')
        if m.get('pushingSetting') is not None:
            temp_model = NotifyStrategyForModifyPushingSetting()
            self.pushing_setting = temp_model.from_map(m['pushingSetting'])
        if m.get('repeatNotifySetting') is not None:
            temp_model = NotifyStrategyForModifyRepeatNotifySetting()
            self.repeat_notify_setting = temp_model.from_map(m['repeatNotifySetting'])
        self.routes = []
        if m.get('routes') is not None:
            for k in m.get('routes'):
                temp_model = NotifyStrategyForModifyRoutes()
                self.routes.append(temp_model.from_map(k))
        if m.get('workspaceFilterSetting') is not None:
            temp_model = WorkspaceFilterSetting()
            self.workspace_filter_setting = temp_model.from_map(m['workspaceFilterSetting'])
        return self


class NotifyStrategyForViewCustomTemplateEntries(TeaModel):
    def __init__(
        self,
        target_type: str = None,
        template_uuid: str = None,
    ):
        # Notification type.
        # 
        # This parameter is required.
        self.target_type = target_type
        # Template UUID.
        # 
        # This parameter is required.
        self.template_uuid = template_uuid

    def validate(self):
        pass

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

        result = dict()
        if self.target_type is not None:
            result['targetType'] = self.target_type
        if self.template_uuid is not None:
            result['templateUuid'] = self.template_uuid
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('targetType') is not None:
            self.target_type = m.get('targetType')
        if m.get('templateUuid') is not None:
            self.template_uuid = m.get('templateUuid')
        return self


class NotifyStrategyForViewGroupingSetting(TeaModel):
    def __init__(
        self,
        grouping_keys: List[str] = None,
        period_min: int = None,
        silence_sec: int = None,
        times: int = None,
    ):
        # Grouping Keys
        self.grouping_keys = grouping_keys
        # Check interval in minutes.
        self.period_min = period_min
        # Silence duration in seconds.
        self.silence_sec = silence_sec
        # Trigger count.
        self.times = times

    def validate(self):
        pass

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

        result = dict()
        if self.grouping_keys is not None:
            result['groupingKeys'] = self.grouping_keys
        if self.period_min is not None:
            result['periodMin'] = self.period_min
        if self.silence_sec is not None:
            result['silenceSec'] = self.silence_sec
        if self.times is not None:
            result['times'] = self.times
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('groupingKeys') is not None:
            self.grouping_keys = m.get('groupingKeys')
        if m.get('periodMin') is not None:
            self.period_min = m.get('periodMin')
        if m.get('silenceSec') is not None:
            self.silence_sec = m.get('silenceSec')
        if m.get('times') is not None:
            self.times = m.get('times')
        return self


class NotifyStrategyForViewPushingSetting(TeaModel):
    def __init__(
        self,
        alert_action_ids: List[str] = None,
        restore_action_ids: List[str] = None,
        template_uuid: str = None,
    ):
        self.alert_action_ids = alert_action_ids
        self.restore_action_ids = restore_action_ids
        self.template_uuid = template_uuid

    def validate(self):
        pass

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

        result = dict()
        if self.alert_action_ids is not None:
            result['alertActionIds'] = self.alert_action_ids
        if self.restore_action_ids is not None:
            result['restoreActionIds'] = self.restore_action_ids
        if self.template_uuid is not None:
            result['templateUuid'] = self.template_uuid
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionIds') is not None:
            self.alert_action_ids = m.get('alertActionIds')
        if m.get('restoreActionIds') is not None:
            self.restore_action_ids = m.get('restoreActionIds')
        if m.get('templateUuid') is not None:
            self.template_uuid = m.get('templateUuid')
        return self


class NotifyStrategyForViewRepeatNotifySetting(TeaModel):
    def __init__(
        self,
        end_incident_state: str = None,
        repeat_interval: int = None,
    ):
        self.end_incident_state = end_incident_state
        self.repeat_interval = repeat_interval

    def validate(self):
        pass

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

        result = dict()
        if self.end_incident_state is not None:
            result['endIncidentState'] = self.end_incident_state
        if self.repeat_interval is not None:
            result['repeatInterval'] = self.repeat_interval
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('endIncidentState') is not None:
            self.end_incident_state = m.get('endIncidentState')
        if m.get('repeatInterval') is not None:
            self.repeat_interval = m.get('repeatInterval')
        return self


class NotifyStrategyForViewRoutesChannels(TeaModel):
    def __init__(
        self,
        channel_type: str = None,
        enabled_sub_channels: List[str] = None,
        receivers: List[str] = None,
    ):
        # Channel type.
        # 
        # This parameter is required.
        self.channel_type = channel_type
        # Enabled notification types.
        self.enabled_sub_channels = enabled_sub_channels
        # Channel recipient.
        # 
        # This parameter is required.
        self.receivers = receivers

    def validate(self):
        pass

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

        result = dict()
        if self.channel_type is not None:
            result['channelType'] = self.channel_type
        if self.enabled_sub_channels is not None:
            result['enabledSubChannels'] = self.enabled_sub_channels
        if self.receivers is not None:
            result['receivers'] = self.receivers
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('channelType') is not None:
            self.channel_type = m.get('channelType')
        if m.get('enabledSubChannels') is not None:
            self.enabled_sub_channels = m.get('enabledSubChannels')
        if m.get('receivers') is not None:
            self.receivers = m.get('receivers')
        return self


class NotifyStrategyForViewRoutesEffectTimeRange(TeaModel):
    def __init__(
        self,
        day_in_week: List[int] = None,
        end_time_in_minute: int = None,
        start_time_in_minute: int = None,
        time_zone: str = None,
    ):
        # Effective days (Monday to Sunday).
        self.day_in_week = day_in_week
        # End time (in minutes).
        self.end_time_in_minute = end_time_in_minute
        # Start time (in minutes).
        self.start_time_in_minute = start_time_in_minute
        # Time Zone.
        self.time_zone = time_zone

    def validate(self):
        pass

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

        result = dict()
        if self.day_in_week is not None:
            result['dayInWeek'] = self.day_in_week
        if self.end_time_in_minute is not None:
            result['endTimeInMinute'] = self.end_time_in_minute
        if self.start_time_in_minute is not None:
            result['startTimeInMinute'] = self.start_time_in_minute
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dayInWeek') is not None:
            self.day_in_week = m.get('dayInWeek')
        if m.get('endTimeInMinute') is not None:
            self.end_time_in_minute = m.get('endTimeInMinute')
        if m.get('startTimeInMinute') is not None:
            self.start_time_in_minute = m.get('startTimeInMinute')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        return self


class NotifyStrategyForViewRoutes(TeaModel):
    def __init__(
        self,
        channels: List[NotifyStrategyForViewRoutesChannels] = None,
        digital_employee_name: str = None,
        effect_time_range: NotifyStrategyForViewRoutesEffectTimeRange = None,
        enable_rca: bool = None,
        filter_setting: FilterSetting = None,
        severities: List[str] = None,
    ):
        # Notification channel.
        self.channels = channels
        self.digital_employee_name = digital_employee_name
        # Field.
        self.effect_time_range = effect_time_range
        self.enable_rca = enable_rca
        # Routing settings.
        self.filter_setting = filter_setting
        # Severity level list.
        self.severities = severities

    def validate(self):
        if self.channels:
            for k in self.channels:
                if k:
                    k.validate()
        if self.effect_time_range:
            self.effect_time_range.validate()
        if self.filter_setting:
            self.filter_setting.validate()

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

        result = dict()
        result['channels'] = []
        if self.channels is not None:
            for k in self.channels:
                result['channels'].append(k.to_map() if k else None)
        if self.digital_employee_name is not None:
            result['digitalEmployeeName'] = self.digital_employee_name
        if self.effect_time_range is not None:
            result['effectTimeRange'] = self.effect_time_range.to_map()
        if self.enable_rca is not None:
            result['enableRca'] = self.enable_rca
        if self.filter_setting is not None:
            result['filterSetting'] = self.filter_setting.to_map()
        if self.severities is not None:
            result['severities'] = self.severities
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.channels = []
        if m.get('channels') is not None:
            for k in m.get('channels'):
                temp_model = NotifyStrategyForViewRoutesChannels()
                self.channels.append(temp_model.from_map(k))
        if m.get('digitalEmployeeName') is not None:
            self.digital_employee_name = m.get('digitalEmployeeName')
        if m.get('effectTimeRange') is not None:
            temp_model = NotifyStrategyForViewRoutesEffectTimeRange()
            self.effect_time_range = temp_model.from_map(m['effectTimeRange'])
        if m.get('enableRca') is not None:
            self.enable_rca = m.get('enableRca')
        if m.get('filterSetting') is not None:
            temp_model = FilterSetting()
            self.filter_setting = temp_model.from_map(m['filterSetting'])
        if m.get('severities') is not None:
            self.severities = m.get('severities')
        return self


class NotifyStrategyForView(TeaModel):
    def __init__(
        self,
        auto_recover_seconds: int = None,
        create_time: str = None,
        custom_template_entries: List[NotifyStrategyForViewCustomTemplateEntries] = None,
        description: str = None,
        enable: bool = None,
        filter_setting: FilterSetting = None,
        grouping_setting: NotifyStrategyForViewGroupingSetting = None,
        ignore_restored_notification: bool = None,
        incident_escalation_policies: List[Any] = None,
        notify_strategy_id: str = None,
        notify_strategy_name: str = None,
        pushing_setting: NotifyStrategyForViewPushingSetting = None,
        receiver_names: List[str] = None,
        repeat_notify_setting: NotifyStrategyForViewRepeatNotifySetting = None,
        routes: List[NotifyStrategyForViewRoutes] = None,
        sync_from_type: str = None,
        update_time: str = None,
        user_id: str = None,
        workspace: str = None,
        workspace_filter_setting: WorkspaceFilterSetting = None,
    ):
        self.auto_recover_seconds = auto_recover_seconds
        # Create Time.
        self.create_time = create_time
        # Notification channel template.
        self.custom_template_entries = custom_template_entries
        # Description.
        self.description = description
        # Whether enabled.
        self.enable = enable
        self.filter_setting = filter_setting
        # Grouping Setting.
        # 
        # This parameter is required.
        self.grouping_setting = grouping_setting
        # Whether to notify on recovery.
        self.ignore_restored_notification = ignore_restored_notification
        self.incident_escalation_policies = incident_escalation_policies
        # UUID
        self.notify_strategy_id = notify_strategy_id
        # Name.
        # 
        # This parameter is required.
        self.notify_strategy_name = notify_strategy_name
        self.pushing_setting = pushing_setting
        self.receiver_names = receiver_names
        self.repeat_notify_setting = repeat_notify_setting
        # Notification channel routing configuration.
        # 
        # This parameter is required.
        self.routes = routes
        self.sync_from_type = sync_from_type
        # Update Time.
        self.update_time = update_time
        # User ID.
        self.user_id = user_id
        # workspace
        self.workspace = workspace
        self.workspace_filter_setting = workspace_filter_setting

    def validate(self):
        if self.custom_template_entries:
            for k in self.custom_template_entries:
                if k:
                    k.validate()
        if self.filter_setting:
            self.filter_setting.validate()
        if self.grouping_setting:
            self.grouping_setting.validate()
        if self.pushing_setting:
            self.pushing_setting.validate()
        if self.repeat_notify_setting:
            self.repeat_notify_setting.validate()
        if self.routes:
            for k in self.routes:
                if k:
                    k.validate()
        if self.workspace_filter_setting:
            self.workspace_filter_setting.validate()

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

        result = dict()
        if self.auto_recover_seconds is not None:
            result['autoRecoverSeconds'] = self.auto_recover_seconds
        if self.create_time is not None:
            result['createTime'] = self.create_time
        result['customTemplateEntries'] = []
        if self.custom_template_entries is not None:
            for k in self.custom_template_entries:
                result['customTemplateEntries'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.enable is not None:
            result['enable'] = self.enable
        if self.filter_setting is not None:
            result['filterSetting'] = self.filter_setting.to_map()
        if self.grouping_setting is not None:
            result['groupingSetting'] = self.grouping_setting.to_map()
        if self.ignore_restored_notification is not None:
            result['ignoreRestoredNotification'] = self.ignore_restored_notification
        if self.incident_escalation_policies is not None:
            result['incidentEscalationPolicies'] = self.incident_escalation_policies
        if self.notify_strategy_id is not None:
            result['notifyStrategyId'] = self.notify_strategy_id
        if self.notify_strategy_name is not None:
            result['notifyStrategyName'] = self.notify_strategy_name
        if self.pushing_setting is not None:
            result['pushingSetting'] = self.pushing_setting.to_map()
        if self.receiver_names is not None:
            result['receiverNames'] = self.receiver_names
        if self.repeat_notify_setting is not None:
            result['repeatNotifySetting'] = self.repeat_notify_setting.to_map()
        result['routes'] = []
        if self.routes is not None:
            for k in self.routes:
                result['routes'].append(k.to_map() if k else None)
        if self.sync_from_type is not None:
            result['syncFromType'] = self.sync_from_type
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.workspace_filter_setting is not None:
            result['workspaceFilterSetting'] = self.workspace_filter_setting.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('autoRecoverSeconds') is not None:
            self.auto_recover_seconds = m.get('autoRecoverSeconds')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        self.custom_template_entries = []
        if m.get('customTemplateEntries') is not None:
            for k in m.get('customTemplateEntries'):
                temp_model = NotifyStrategyForViewCustomTemplateEntries()
                self.custom_template_entries.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('filterSetting') is not None:
            temp_model = FilterSetting()
            self.filter_setting = temp_model.from_map(m['filterSetting'])
        if m.get('groupingSetting') is not None:
            temp_model = NotifyStrategyForViewGroupingSetting()
            self.grouping_setting = temp_model.from_map(m['groupingSetting'])
        if m.get('ignoreRestoredNotification') is not None:
            self.ignore_restored_notification = m.get('ignoreRestoredNotification')
        if m.get('incidentEscalationPolicies') is not None:
            self.incident_escalation_policies = m.get('incidentEscalationPolicies')
        if m.get('notifyStrategyId') is not None:
            self.notify_strategy_id = m.get('notifyStrategyId')
        if m.get('notifyStrategyName') is not None:
            self.notify_strategy_name = m.get('notifyStrategyName')
        if m.get('pushingSetting') is not None:
            temp_model = NotifyStrategyForViewPushingSetting()
            self.pushing_setting = temp_model.from_map(m['pushingSetting'])
        if m.get('receiverNames') is not None:
            self.receiver_names = m.get('receiverNames')
        if m.get('repeatNotifySetting') is not None:
            temp_model = NotifyStrategyForViewRepeatNotifySetting()
            self.repeat_notify_setting = temp_model.from_map(m['repeatNotifySetting'])
        self.routes = []
        if m.get('routes') is not None:
            for k in m.get('routes'):
                temp_model = NotifyStrategyForViewRoutes()
                self.routes.append(temp_model.from_map(k))
        if m.get('syncFromType') is not None:
            self.sync_from_type = m.get('syncFromType')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        if m.get('workspaceFilterSetting') is not None:
            temp_model = WorkspaceFilterSetting()
            self.workspace_filter_setting = temp_model.from_map(m['workspaceFilterSetting'])
        return self


class PrometheusManagedInstance(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        instance_type: str = None,
        prometheus_instance_id: str = None,
        prometheus_instance_name: str = None,
        region_id: str = None,
        status: str = None,
        workspace: str = None,
    ):
        self.create_time = create_time
        self.instance_type = instance_type
        self.prometheus_instance_id = prometheus_instance_id
        self.prometheus_instance_name = prometheus_instance_name
        self.region_id = region_id
        self.status = status
        self.workspace = workspace

    def validate(self):
        pass

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

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.instance_type is not None:
            result['instanceType'] = self.instance_type
        if self.prometheus_instance_id is not None:
            result['prometheusInstanceId'] = self.prometheus_instance_id
        if self.prometheus_instance_name is not None:
            result['prometheusInstanceName'] = self.prometheus_instance_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.status is not None:
            result['status'] = self.status
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('instanceType') is not None:
            self.instance_type = m.get('instanceType')
        if m.get('prometheusInstanceId') is not None:
            self.prometheus_instance_id = m.get('prometheusInstanceId')
        if m.get('prometheusInstanceName') is not None:
            self.prometheus_instance_name = m.get('prometheusInstanceName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RumDnsResponse(TeaModel):
    def __init__(
        self,
        domain: str = None,
        message: str = None,
        result: bool = None,
    ):
        self.domain = domain
        self.message = message
        self.result = result

    def validate(self):
        pass

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('domain') is not None:
            self.domain = m.get('domain')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('result') is not None:
            self.result = m.get('result')
        return self


class SubscriptionForModifyPushingSetting(TeaModel):
    def __init__(
        self,
        alert_action_ids: List[str] = None,
        response_plan_id: str = None,
        restore_action_ids: List[str] = None,
        template_uuid: str = None,
    ):
        # Alert push action plan ID list.
        self.alert_action_ids = alert_action_ids
        # Action plan ID.
        self.response_plan_id = response_plan_id
        # Action integration plan ID list.
        self.restore_action_ids = restore_action_ids
        # Template UUID.
        self.template_uuid = template_uuid

    def validate(self):
        pass

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

        result = dict()
        if self.alert_action_ids is not None:
            result['alertActionIds'] = self.alert_action_ids
        if self.response_plan_id is not None:
            result['responsePlanId'] = self.response_plan_id
        if self.restore_action_ids is not None:
            result['restoreActionIds'] = self.restore_action_ids
        if self.template_uuid is not None:
            result['templateUuid'] = self.template_uuid
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionIds') is not None:
            self.alert_action_ids = m.get('alertActionIds')
        if m.get('responsePlanId') is not None:
            self.response_plan_id = m.get('responsePlanId')
        if m.get('restoreActionIds') is not None:
            self.restore_action_ids = m.get('restoreActionIds')
        if m.get('templateUuid') is not None:
            self.template_uuid = m.get('templateUuid')
        return self


class SubscriptionForModify(TeaModel):
    def __init__(
        self,
        description: str = None,
        filter_setting: FilterSetting = None,
        notify_strategy_id: str = None,
        pushing_setting: SubscriptionForModifyPushingSetting = None,
        subscription_name: str = None,
        workspace_filter_setting: WorkspaceFilterSetting = None,
    ):
        # Description.
        self.description = description
        # Filtering settings.
        self.filter_setting = filter_setting
        # Notification policy UUID.
        self.notify_strategy_id = notify_strategy_id
        # Push settings.
        self.pushing_setting = pushing_setting
        # Name.
        # 
        # This parameter is required.
        self.subscription_name = subscription_name
        self.workspace_filter_setting = workspace_filter_setting

    def validate(self):
        if self.filter_setting:
            self.filter_setting.validate()
        if self.pushing_setting:
            self.pushing_setting.validate()
        if self.workspace_filter_setting:
            self.workspace_filter_setting.validate()

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.filter_setting is not None:
            result['filterSetting'] = self.filter_setting.to_map()
        if self.notify_strategy_id is not None:
            result['notifyStrategyId'] = self.notify_strategy_id
        if self.pushing_setting is not None:
            result['pushingSetting'] = self.pushing_setting.to_map()
        if self.subscription_name is not None:
            result['subscriptionName'] = self.subscription_name
        if self.workspace_filter_setting is not None:
            result['workspaceFilterSetting'] = self.workspace_filter_setting.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('filterSetting') is not None:
            temp_model = FilterSetting()
            self.filter_setting = temp_model.from_map(m['filterSetting'])
        if m.get('notifyStrategyId') is not None:
            self.notify_strategy_id = m.get('notifyStrategyId')
        if m.get('pushingSetting') is not None:
            temp_model = SubscriptionForModifyPushingSetting()
            self.pushing_setting = temp_model.from_map(m['pushingSetting'])
        if m.get('subscriptionName') is not None:
            self.subscription_name = m.get('subscriptionName')
        if m.get('workspaceFilterSetting') is not None:
            temp_model = WorkspaceFilterSetting()
            self.workspace_filter_setting = temp_model.from_map(m['workspaceFilterSetting'])
        return self


class SubscriptionForViewPushingSetting(TeaModel):
    def __init__(
        self,
        alert_action_ids: List[str] = None,
        response_plan_id: str = None,
        restore_action_ids: List[str] = None,
        template_uuid: str = None,
    ):
        # Alert push action integration ID list.
        self.alert_action_ids = alert_action_ids
        # Action plan ID.
        self.response_plan_id = response_plan_id
        # Recovery push action integration ID list.
        self.restore_action_ids = restore_action_ids
        # Template UUID.
        self.template_uuid = template_uuid

    def validate(self):
        pass

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

        result = dict()
        if self.alert_action_ids is not None:
            result['alertActionIds'] = self.alert_action_ids
        if self.response_plan_id is not None:
            result['responsePlanId'] = self.response_plan_id
        if self.restore_action_ids is not None:
            result['restoreActionIds'] = self.restore_action_ids
        if self.template_uuid is not None:
            result['templateUuid'] = self.template_uuid
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionIds') is not None:
            self.alert_action_ids = m.get('alertActionIds')
        if m.get('responsePlanId') is not None:
            self.response_plan_id = m.get('responsePlanId')
        if m.get('restoreActionIds') is not None:
            self.restore_action_ids = m.get('restoreActionIds')
        if m.get('templateUuid') is not None:
            self.template_uuid = m.get('templateUuid')
        return self


class SubscriptionForView(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        description: str = None,
        enable: bool = None,
        filter_setting: FilterSetting = None,
        notify_strategy_id: str = None,
        pushing_setting: SubscriptionForViewPushingSetting = None,
        subscription_id: str = None,
        subscription_name: str = None,
        sync_from_type: str = None,
        update_time: str = None,
        user_id: str = None,
        workspace: str = None,
        workspace_filter_setting: WorkspaceFilterSetting = None,
    ):
        # Create Time.
        self.create_time = create_time
        # Description.
        self.description = description
        # Whether enabled.
        self.enable = enable
        # Filtering settings.
        self.filter_setting = filter_setting
        # Notification policy UUID.
        self.notify_strategy_id = notify_strategy_id
        # Push settings.
        self.pushing_setting = pushing_setting
        # UUID
        self.subscription_id = subscription_id
        # Name.
        # 
        # This parameter is required.
        self.subscription_name = subscription_name
        self.sync_from_type = sync_from_type
        # Update Time.
        self.update_time = update_time
        # User ID.
        self.user_id = user_id
        # workspace
        self.workspace = workspace
        self.workspace_filter_setting = workspace_filter_setting

    def validate(self):
        if self.filter_setting:
            self.filter_setting.validate()
        if self.pushing_setting:
            self.pushing_setting.validate()
        if self.workspace_filter_setting:
            self.workspace_filter_setting.validate()

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

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.enable is not None:
            result['enable'] = self.enable
        if self.filter_setting is not None:
            result['filterSetting'] = self.filter_setting.to_map()
        if self.notify_strategy_id is not None:
            result['notifyStrategyId'] = self.notify_strategy_id
        if self.pushing_setting is not None:
            result['pushingSetting'] = self.pushing_setting.to_map()
        if self.subscription_id is not None:
            result['subscriptionId'] = self.subscription_id
        if self.subscription_name is not None:
            result['subscriptionName'] = self.subscription_name
        if self.sync_from_type is not None:
            result['syncFromType'] = self.sync_from_type
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.workspace_filter_setting is not None:
            result['workspaceFilterSetting'] = self.workspace_filter_setting.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('filterSetting') is not None:
            temp_model = FilterSetting()
            self.filter_setting = temp_model.from_map(m['filterSetting'])
        if m.get('notifyStrategyId') is not None:
            self.notify_strategy_id = m.get('notifyStrategyId')
        if m.get('pushingSetting') is not None:
            temp_model = SubscriptionForViewPushingSetting()
            self.pushing_setting = temp_model.from_map(m['pushingSetting'])
        if m.get('subscriptionId') is not None:
            self.subscription_id = m.get('subscriptionId')
        if m.get('subscriptionName') is not None:
            self.subscription_name = m.get('subscriptionName')
        if m.get('syncFromType') is not None:
            self.sync_from_type = m.get('syncFromType')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        if m.get('workspaceFilterSetting') is not None:
            temp_model = WorkspaceFilterSetting()
            self.workspace_filter_setting = temp_model.from_map(m['workspaceFilterSetting'])
        return self


class Tag(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        self.key = key
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 TransformerForModify(TeaModel):
    def __init__(
        self,
        actions: List[TransformAction] = None,
        description: str = None,
        filter_setting: FilterSetting = None,
        quit_after_match: bool = None,
        sort_id: int = None,
        transformer_name: str = None,
    ):
        # Transformation operation.
        self.actions = actions
        # Description.
        self.description = description
        # Filter Setting.
        self.filter_setting = filter_setting
        # Exit after matching processing.
        self.quit_after_match = quit_after_match
        # Sort order.
        self.sort_id = sort_id
        # Name.
        # 
        # This parameter is required.
        self.transformer_name = transformer_name

    def validate(self):
        if self.actions:
            for k in self.actions:
                if k:
                    k.validate()
        if self.filter_setting:
            self.filter_setting.validate()

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

        result = dict()
        result['actions'] = []
        if self.actions is not None:
            for k in self.actions:
                result['actions'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.filter_setting is not None:
            result['filterSetting'] = self.filter_setting.to_map()
        if self.quit_after_match is not None:
            result['quitAfterMatch'] = self.quit_after_match
        if self.sort_id is not None:
            result['sortId'] = self.sort_id
        if self.transformer_name is not None:
            result['transformerName'] = self.transformer_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.actions = []
        if m.get('actions') is not None:
            for k in m.get('actions'):
                temp_model = TransformAction()
                self.actions.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('filterSetting') is not None:
            temp_model = FilterSetting()
            self.filter_setting = temp_model.from_map(m['filterSetting'])
        if m.get('quitAfterMatch') is not None:
            self.quit_after_match = m.get('quitAfterMatch')
        if m.get('sortId') is not None:
            self.sort_id = m.get('sortId')
        if m.get('transformerName') is not None:
            self.transformer_name = m.get('transformerName')
        return self


class TransformerForView(TeaModel):
    def __init__(
        self,
        actions: List[TransformAction] = None,
        create_time: str = None,
        description: str = None,
        enable: bool = None,
        filter_setting: FilterSetting = None,
        quit_after_match: bool = None,
        sort_id: int = None,
        transformer_id: str = None,
        transformer_name: str = None,
        update_time: str = None,
        user_id: str = None,
        workspace: str = None,
    ):
        # Transformation operation.
        self.actions = actions
        # Create Time.
        self.create_time = create_time
        # Description.
        self.description = description
        # Whether enabled.
        self.enable = enable
        # Filter Setting.
        self.filter_setting = filter_setting
        # Exit after matching processing.
        self.quit_after_match = quit_after_match
        # Sort order.
        self.sort_id = sort_id
        # transformer Id
        self.transformer_id = transformer_id
        # Name.
        # 
        # This parameter is required.
        self.transformer_name = transformer_name
        # Update Time.
        self.update_time = update_time
        # User ID.
        self.user_id = user_id
        # workspace
        self.workspace = workspace

    def validate(self):
        if self.actions:
            for k in self.actions:
                if k:
                    k.validate()
        if self.filter_setting:
            self.filter_setting.validate()

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

        result = dict()
        result['actions'] = []
        if self.actions is not None:
            for k in self.actions:
                result['actions'].append(k.to_map() if k else None)
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.enable is not None:
            result['enable'] = self.enable
        if self.filter_setting is not None:
            result['filterSetting'] = self.filter_setting.to_map()
        if self.quit_after_match is not None:
            result['quitAfterMatch'] = self.quit_after_match
        if self.sort_id is not None:
            result['sortId'] = self.sort_id
        if self.transformer_id is not None:
            result['transformerId'] = self.transformer_id
        if self.transformer_name is not None:
            result['transformerName'] = self.transformer_name
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.actions = []
        if m.get('actions') is not None:
            for k in m.get('actions'):
                temp_model = TransformAction()
                self.actions.append(temp_model.from_map(k))
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('filterSetting') is not None:
            temp_model = FilterSetting()
            self.filter_setting = temp_model.from_map(m['filterSetting'])
        if m.get('quitAfterMatch') is not None:
            self.quit_after_match = m.get('quitAfterMatch')
        if m.get('sortId') is not None:
            self.sort_id = m.get('sortId')
        if m.get('transformerId') is not None:
            self.transformer_id = m.get('transformerId')
        if m.get('transformerName') is not None:
            self.transformer_name = m.get('transformerName')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ScheduleValue(TeaModel):
    def __init__(
        self,
        contact_id: str = None,
        end: str = None,
        start: str = None,
        contact_name: str = None,
    ):
        self.contact_id = contact_id
        self.end = end
        self.start = start
        self.contact_name = contact_name

    def validate(self):
        pass

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

        result = dict()
        if self.contact_id is not None:
            result['contactId'] = self.contact_id
        if self.end is not None:
            result['end'] = self.end
        if self.start is not None:
            result['start'] = self.start
        if self.contact_name is not None:
            result['contactName'] = self.contact_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactId') is not None:
            self.contact_id = m.get('contactId')
        if m.get('end') is not None:
            self.end = m.get('end')
        if m.get('start') is not None:
            self.start = m.get('start')
        if m.get('contactName') is not None:
            self.contact_name = m.get('contactName')
        return self


class ActiveContactChannelRequest(TeaModel):
    def __init__(
        self,
        code: str = None,
        site: str = None,
    ):
        self.code = code
        self.site = site

    def validate(self):
        pass

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

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

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


class ActiveContactChannelResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ActiveContactChannelResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ActiveContactChannelResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class AddMemoriesRequestMessages(TeaModel):
    def __init__(
        self,
        content: str = None,
        role: str = None,
    ):
        self.content = content
        self.role = role

    def validate(self):
        pass

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

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

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


class AddMemoriesRequest(TeaModel):
    def __init__(
        self,
        agent_id: str = None,
        app_id: str = None,
        async_mode: bool = None,
        custom_instructions: str = None,
        infer: bool = None,
        messages: List[AddMemoriesRequestMessages] = None,
        metadata: Dict[str, Any] = None,
        run_id: str = None,
        user_id: str = None,
    ):
        self.agent_id = agent_id
        self.app_id = app_id
        self.async_mode = async_mode
        self.custom_instructions = custom_instructions
        self.infer = infer
        self.messages = messages
        self.metadata = metadata
        self.run_id = run_id
        self.user_id = user_id

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

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

        result = dict()
        if self.agent_id is not None:
            result['agentId'] = self.agent_id
        if self.app_id is not None:
            result['appId'] = self.app_id
        if self.async_mode is not None:
            result['asyncMode'] = self.async_mode
        if self.custom_instructions is not None:
            result['customInstructions'] = self.custom_instructions
        if self.infer is not None:
            result['infer'] = self.infer
        result['messages'] = []
        if self.messages is not None:
            for k in self.messages:
                result['messages'].append(k.to_map() if k else None)
        if self.metadata is not None:
            result['metadata'] = self.metadata
        if self.run_id is not None:
            result['runId'] = self.run_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('agentId') is not None:
            self.agent_id = m.get('agentId')
        if m.get('appId') is not None:
            self.app_id = m.get('appId')
        if m.get('asyncMode') is not None:
            self.async_mode = m.get('asyncMode')
        if m.get('customInstructions') is not None:
            self.custom_instructions = m.get('customInstructions')
        if m.get('infer') is not None:
            self.infer = m.get('infer')
        self.messages = []
        if m.get('messages') is not None:
            for k in m.get('messages'):
                temp_model = AddMemoriesRequestMessages()
                self.messages.append(temp_model.from_map(k))
        if m.get('metadata') is not None:
            self.metadata = m.get('metadata')
        if m.get('runId') is not None:
            self.run_id = m.get('runId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class AddMemoriesResponseBodyResults(TeaModel):
    def __init__(
        self,
        event_id: str = None,
        message: str = None,
        status: str = None,
    ):
        self.event_id = event_id
        self.message = message
        self.status = status

    def validate(self):
        pass

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

        result = dict()
        if self.event_id is not None:
            result['eventId'] = self.event_id
        if self.message is not None:
            result['message'] = self.message
        if self.status is not None:
            result['status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('eventId') is not None:
            self.event_id = m.get('eventId')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class AddMemoriesResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        results: List[AddMemoriesResponseBodyResults] = None,
    ):
        self.request_id = request_id
        self.results = results

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

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        self.results = []
        if m.get('results') is not None:
            for k in m.get('results'):
                temp_model = AddMemoriesResponseBodyResults()
                self.results.append(temp_model.from_map(k))
        return self


class AddMemoriesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: AddMemoriesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class ChangeResourceGroupRequest(TeaModel):
    def __init__(
        self,
        resource_group_id: str = None,
        resource_id: str = None,
        resource_type: str = None,
    ):
        self.resource_group_id = resource_group_id
        self.resource_id = resource_id
        self.resource_type = resource_type

    def validate(self):
        pass

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

        result = dict()
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_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: dict = None):
        m = m or dict()
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        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 ChangeResourceGroupResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ChangeResourceGroupResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ChangeResourceGroupResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CheckDispatchRoleResponseBody(TeaModel):
    def __init__(
        self,
        has_auth: bool = None,
        request_id: str = None,
    ):
        self.has_auth = has_auth
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.has_auth is not None:
            result['hasAuth'] = self.has_auth
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('hasAuth') is not None:
            self.has_auth = m.get('hasAuth')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CheckDispatchRoleResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CheckDispatchRoleResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CountAlertHistoriesByFieldsRequest(TeaModel):
    def __init__(
        self,
        alert_rule_id: str = None,
        biz_source: str = None,
        display_name_key_word: str = None,
        field_list: List[str] = None,
        instance_key: str = None,
        label_filter: AlertRuleLabelFilter = None,
        latest_level: str = None,
        max_level: str = None,
        notification_filter: AlertRuleNotificationFilter = None,
        start_time_from: int = None,
        start_time_to: int = None,
        status: str = None,
        workspace: str = None,
    ):
        self.alert_rule_id = alert_rule_id
        self.biz_source = biz_source
        self.display_name_key_word = display_name_key_word
        self.field_list = field_list
        self.instance_key = instance_key
        self.label_filter = label_filter
        self.latest_level = latest_level
        self.max_level = max_level
        self.notification_filter = notification_filter
        self.start_time_from = start_time_from
        self.start_time_to = start_time_to
        self.status = status
        self.workspace = workspace

    def validate(self):
        if self.label_filter:
            self.label_filter.validate()
        if self.notification_filter:
            self.notification_filter.validate()

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

        result = dict()
        if self.alert_rule_id is not None:
            result['alertRuleId'] = self.alert_rule_id
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.display_name_key_word is not None:
            result['displayNameKeyWord'] = self.display_name_key_word
        if self.field_list is not None:
            result['fieldList'] = self.field_list
        if self.instance_key is not None:
            result['instanceKey'] = self.instance_key
        if self.label_filter is not None:
            result['labelFilter'] = self.label_filter.to_map()
        if self.latest_level is not None:
            result['latestLevel'] = self.latest_level
        if self.max_level is not None:
            result['maxLevel'] = self.max_level
        if self.notification_filter is not None:
            result['notificationFilter'] = self.notification_filter.to_map()
        if self.start_time_from is not None:
            result['startTimeFrom'] = self.start_time_from
        if self.start_time_to is not None:
            result['startTimeTo'] = self.start_time_to
        if self.status is not None:
            result['status'] = self.status
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleId') is not None:
            self.alert_rule_id = m.get('alertRuleId')
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('displayNameKeyWord') is not None:
            self.display_name_key_word = m.get('displayNameKeyWord')
        if m.get('fieldList') is not None:
            self.field_list = m.get('fieldList')
        if m.get('instanceKey') is not None:
            self.instance_key = m.get('instanceKey')
        if m.get('labelFilter') is not None:
            temp_model = AlertRuleLabelFilter()
            self.label_filter = temp_model.from_map(m['labelFilter'])
        if m.get('latestLevel') is not None:
            self.latest_level = m.get('latestLevel')
        if m.get('maxLevel') is not None:
            self.max_level = m.get('maxLevel')
        if m.get('notificationFilter') is not None:
            temp_model = AlertRuleNotificationFilter()
            self.notification_filter = temp_model.from_map(m['notificationFilter'])
        if m.get('startTimeFrom') is not None:
            self.start_time_from = m.get('startTimeFrom')
        if m.get('startTimeTo') is not None:
            self.start_time_to = m.get('startTimeTo')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CountAlertHistoriesByFieldsShrinkRequest(TeaModel):
    def __init__(
        self,
        alert_rule_id: str = None,
        biz_source: str = None,
        display_name_key_word: str = None,
        field_list_shrink: str = None,
        instance_key: str = None,
        label_filter_shrink: str = None,
        latest_level: str = None,
        max_level: str = None,
        notification_filter_shrink: str = None,
        start_time_from: int = None,
        start_time_to: int = None,
        status: str = None,
        workspace: str = None,
    ):
        self.alert_rule_id = alert_rule_id
        self.biz_source = biz_source
        self.display_name_key_word = display_name_key_word
        self.field_list_shrink = field_list_shrink
        self.instance_key = instance_key
        self.label_filter_shrink = label_filter_shrink
        self.latest_level = latest_level
        self.max_level = max_level
        self.notification_filter_shrink = notification_filter_shrink
        self.start_time_from = start_time_from
        self.start_time_to = start_time_to
        self.status = status
        self.workspace = workspace

    def validate(self):
        pass

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

        result = dict()
        if self.alert_rule_id is not None:
            result['alertRuleId'] = self.alert_rule_id
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.display_name_key_word is not None:
            result['displayNameKeyWord'] = self.display_name_key_word
        if self.field_list_shrink is not None:
            result['fieldList'] = self.field_list_shrink
        if self.instance_key is not None:
            result['instanceKey'] = self.instance_key
        if self.label_filter_shrink is not None:
            result['labelFilter'] = self.label_filter_shrink
        if self.latest_level is not None:
            result['latestLevel'] = self.latest_level
        if self.max_level is not None:
            result['maxLevel'] = self.max_level
        if self.notification_filter_shrink is not None:
            result['notificationFilter'] = self.notification_filter_shrink
        if self.start_time_from is not None:
            result['startTimeFrom'] = self.start_time_from
        if self.start_time_to is not None:
            result['startTimeTo'] = self.start_time_to
        if self.status is not None:
            result['status'] = self.status
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleId') is not None:
            self.alert_rule_id = m.get('alertRuleId')
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('displayNameKeyWord') is not None:
            self.display_name_key_word = m.get('displayNameKeyWord')
        if m.get('fieldList') is not None:
            self.field_list_shrink = m.get('fieldList')
        if m.get('instanceKey') is not None:
            self.instance_key = m.get('instanceKey')
        if m.get('labelFilter') is not None:
            self.label_filter_shrink = m.get('labelFilter')
        if m.get('latestLevel') is not None:
            self.latest_level = m.get('latestLevel')
        if m.get('maxLevel') is not None:
            self.max_level = m.get('maxLevel')
        if m.get('notificationFilter') is not None:
            self.notification_filter_shrink = m.get('notificationFilter')
        if m.get('startTimeFrom') is not None:
            self.start_time_from = m.get('startTimeFrom')
        if m.get('startTimeTo') is not None:
            self.start_time_to = m.get('startTimeTo')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CountAlertHistoriesByFieldsResponseBody(TeaModel):
    def __init__(
        self,
        data: Dict[str, dict] = None,
        request_id: str = None,
        total_count: int = None,
    ):
        self.data = data
        self.request_id = request_id
        self.total_count = total_count

    def validate(self):
        pass

    def to_map(self):
        _map = super().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
        if self.total_count is not None:
            result['totalCount'] = self.total_count
        return result

    def from_map(self, m: dict = 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')
        if m.get('totalCount') is not None:
            self.total_count = m.get('totalCount')
        return self


class CountAlertHistoriesByFieldsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CountAlertHistoriesByFieldsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CountAlertHistoriesByTimeRequest(TeaModel):
    def __init__(
        self,
        alert_rule_id: str = None,
        biz_source: str = None,
        display_name_key_word: str = None,
        instance_key: str = None,
        interval: int = None,
        label_filter: AlertRuleLabelFilter = None,
        latest_level: str = None,
        max_level: str = None,
        notification_filter: AlertRuleNotificationFilter = None,
        start_time_from: int = None,
        start_time_to: int = None,
        status: str = None,
        sub_group_by_field: str = None,
        workspace: str = None,
    ):
        self.alert_rule_id = alert_rule_id
        self.biz_source = biz_source
        self.display_name_key_word = display_name_key_word
        self.instance_key = instance_key
        self.interval = interval
        self.label_filter = label_filter
        self.latest_level = latest_level
        self.max_level = max_level
        self.notification_filter = notification_filter
        self.start_time_from = start_time_from
        self.start_time_to = start_time_to
        self.status = status
        self.sub_group_by_field = sub_group_by_field
        self.workspace = workspace

    def validate(self):
        if self.label_filter:
            self.label_filter.validate()
        if self.notification_filter:
            self.notification_filter.validate()

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

        result = dict()
        if self.alert_rule_id is not None:
            result['alertRuleId'] = self.alert_rule_id
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.display_name_key_word is not None:
            result['displayNameKeyWord'] = self.display_name_key_word
        if self.instance_key is not None:
            result['instanceKey'] = self.instance_key
        if self.interval is not None:
            result['interval'] = self.interval
        if self.label_filter is not None:
            result['labelFilter'] = self.label_filter.to_map()
        if self.latest_level is not None:
            result['latestLevel'] = self.latest_level
        if self.max_level is not None:
            result['maxLevel'] = self.max_level
        if self.notification_filter is not None:
            result['notificationFilter'] = self.notification_filter.to_map()
        if self.start_time_from is not None:
            result['startTimeFrom'] = self.start_time_from
        if self.start_time_to is not None:
            result['startTimeTo'] = self.start_time_to
        if self.status is not None:
            result['status'] = self.status
        if self.sub_group_by_field is not None:
            result['subGroupByField'] = self.sub_group_by_field
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleId') is not None:
            self.alert_rule_id = m.get('alertRuleId')
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('displayNameKeyWord') is not None:
            self.display_name_key_word = m.get('displayNameKeyWord')
        if m.get('instanceKey') is not None:
            self.instance_key = m.get('instanceKey')
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('labelFilter') is not None:
            temp_model = AlertRuleLabelFilter()
            self.label_filter = temp_model.from_map(m['labelFilter'])
        if m.get('latestLevel') is not None:
            self.latest_level = m.get('latestLevel')
        if m.get('maxLevel') is not None:
            self.max_level = m.get('maxLevel')
        if m.get('notificationFilter') is not None:
            temp_model = AlertRuleNotificationFilter()
            self.notification_filter = temp_model.from_map(m['notificationFilter'])
        if m.get('startTimeFrom') is not None:
            self.start_time_from = m.get('startTimeFrom')
        if m.get('startTimeTo') is not None:
            self.start_time_to = m.get('startTimeTo')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('subGroupByField') is not None:
            self.sub_group_by_field = m.get('subGroupByField')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CountAlertHistoriesByTimeShrinkRequest(TeaModel):
    def __init__(
        self,
        alert_rule_id: str = None,
        biz_source: str = None,
        display_name_key_word: str = None,
        instance_key: str = None,
        interval: int = None,
        label_filter_shrink: str = None,
        latest_level: str = None,
        max_level: str = None,
        notification_filter_shrink: str = None,
        start_time_from: int = None,
        start_time_to: int = None,
        status: str = None,
        sub_group_by_field: str = None,
        workspace: str = None,
    ):
        self.alert_rule_id = alert_rule_id
        self.biz_source = biz_source
        self.display_name_key_word = display_name_key_word
        self.instance_key = instance_key
        self.interval = interval
        self.label_filter_shrink = label_filter_shrink
        self.latest_level = latest_level
        self.max_level = max_level
        self.notification_filter_shrink = notification_filter_shrink
        self.start_time_from = start_time_from
        self.start_time_to = start_time_to
        self.status = status
        self.sub_group_by_field = sub_group_by_field
        self.workspace = workspace

    def validate(self):
        pass

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

        result = dict()
        if self.alert_rule_id is not None:
            result['alertRuleId'] = self.alert_rule_id
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.display_name_key_word is not None:
            result['displayNameKeyWord'] = self.display_name_key_word
        if self.instance_key is not None:
            result['instanceKey'] = self.instance_key
        if self.interval is not None:
            result['interval'] = self.interval
        if self.label_filter_shrink is not None:
            result['labelFilter'] = self.label_filter_shrink
        if self.latest_level is not None:
            result['latestLevel'] = self.latest_level
        if self.max_level is not None:
            result['maxLevel'] = self.max_level
        if self.notification_filter_shrink is not None:
            result['notificationFilter'] = self.notification_filter_shrink
        if self.start_time_from is not None:
            result['startTimeFrom'] = self.start_time_from
        if self.start_time_to is not None:
            result['startTimeTo'] = self.start_time_to
        if self.status is not None:
            result['status'] = self.status
        if self.sub_group_by_field is not None:
            result['subGroupByField'] = self.sub_group_by_field
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleId') is not None:
            self.alert_rule_id = m.get('alertRuleId')
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('displayNameKeyWord') is not None:
            self.display_name_key_word = m.get('displayNameKeyWord')
        if m.get('instanceKey') is not None:
            self.instance_key = m.get('instanceKey')
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('labelFilter') is not None:
            self.label_filter_shrink = m.get('labelFilter')
        if m.get('latestLevel') is not None:
            self.latest_level = m.get('latestLevel')
        if m.get('maxLevel') is not None:
            self.max_level = m.get('maxLevel')
        if m.get('notificationFilter') is not None:
            self.notification_filter_shrink = m.get('notificationFilter')
        if m.get('startTimeFrom') is not None:
            self.start_time_from = m.get('startTimeFrom')
        if m.get('startTimeTo') is not None:
            self.start_time_to = m.get('startTimeTo')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('subGroupByField') is not None:
            self.sub_group_by_field = m.get('subGroupByField')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CountAlertHistoriesByTimeResponseBodyData(TeaModel):
    def __init__(
        self,
        sub_group_field_value: str = None,
        ts: int = None,
        value: int = None,
    ):
        self.sub_group_field_value = sub_group_field_value
        self.ts = ts
        self.value = value

    def validate(self):
        pass

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

        result = dict()
        if self.sub_group_field_value is not None:
            result['subGroupFieldValue'] = self.sub_group_field_value
        if self.ts is not None:
            result['ts'] = self.ts
        if self.value is not None:
            result['value'] = self.value
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('subGroupFieldValue') is not None:
            self.sub_group_field_value = m.get('subGroupFieldValue')
        if m.get('ts') is not None:
            self.ts = m.get('ts')
        if m.get('value') is not None:
            self.value = m.get('value')
        return self


class CountAlertHistoriesByTimeResponseBody(TeaModel):
    def __init__(
        self,
        data: List[CountAlertHistoriesByTimeResponseBodyData] = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

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

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = CountAlertHistoriesByTimeResponseBodyData()
                self.data.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CountAlertHistoriesByTimeResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CountAlertHistoriesByTimeResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CountAlertRulesByFieldsRequest(TeaModel):
    def __init__(
        self,
        biz_source: str = None,
        display_name_key_word: str = None,
        enabled: bool = None,
        field_list: List[str] = None,
        label_filter: AlertRuleLabelFilter = None,
        notification_filter: AlertRuleNotificationFilter = None,
        status: str = None,
        workspace: str = None,
    ):
        self.biz_source = biz_source
        self.display_name_key_word = display_name_key_word
        self.enabled = enabled
        self.field_list = field_list
        self.label_filter = label_filter
        self.notification_filter = notification_filter
        self.status = status
        self.workspace = workspace

    def validate(self):
        if self.label_filter:
            self.label_filter.validate()
        if self.notification_filter:
            self.notification_filter.validate()

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

        result = dict()
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.display_name_key_word is not None:
            result['displayNameKeyWord'] = self.display_name_key_word
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.field_list is not None:
            result['fieldList'] = self.field_list
        if self.label_filter is not None:
            result['labelFilter'] = self.label_filter.to_map()
        if self.notification_filter is not None:
            result['notificationFilter'] = self.notification_filter.to_map()
        if self.status is not None:
            result['status'] = self.status
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('displayNameKeyWord') is not None:
            self.display_name_key_word = m.get('displayNameKeyWord')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('fieldList') is not None:
            self.field_list = m.get('fieldList')
        if m.get('labelFilter') is not None:
            temp_model = AlertRuleLabelFilter()
            self.label_filter = temp_model.from_map(m['labelFilter'])
        if m.get('notificationFilter') is not None:
            temp_model = AlertRuleNotificationFilter()
            self.notification_filter = temp_model.from_map(m['notificationFilter'])
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CountAlertRulesByFieldsShrinkRequest(TeaModel):
    def __init__(
        self,
        biz_source: str = None,
        display_name_key_word: str = None,
        enabled: bool = None,
        field_list_shrink: str = None,
        label_filter_shrink: str = None,
        notification_filter_shrink: str = None,
        status: str = None,
        workspace: str = None,
    ):
        self.biz_source = biz_source
        self.display_name_key_word = display_name_key_word
        self.enabled = enabled
        self.field_list_shrink = field_list_shrink
        self.label_filter_shrink = label_filter_shrink
        self.notification_filter_shrink = notification_filter_shrink
        self.status = status
        self.workspace = workspace

    def validate(self):
        pass

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

        result = dict()
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.display_name_key_word is not None:
            result['displayNameKeyWord'] = self.display_name_key_word
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.field_list_shrink is not None:
            result['fieldList'] = self.field_list_shrink
        if self.label_filter_shrink is not None:
            result['labelFilter'] = self.label_filter_shrink
        if self.notification_filter_shrink is not None:
            result['notificationFilter'] = self.notification_filter_shrink
        if self.status is not None:
            result['status'] = self.status
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('displayNameKeyWord') is not None:
            self.display_name_key_word = m.get('displayNameKeyWord')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('fieldList') is not None:
            self.field_list_shrink = m.get('fieldList')
        if m.get('labelFilter') is not None:
            self.label_filter_shrink = m.get('labelFilter')
        if m.get('notificationFilter') is not None:
            self.notification_filter_shrink = m.get('notificationFilter')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CountAlertRulesByFieldsResponseBody(TeaModel):
    def __init__(
        self,
        data: Dict[str, dict] = None,
        request_id: str = None,
        total_count: str = None,
    ):
        self.data = data
        self.request_id = request_id
        self.total_count = total_count

    def validate(self):
        pass

    def to_map(self):
        _map = super().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
        if self.total_count is not None:
            result['totalCount'] = self.total_count
        return result

    def from_map(self, m: dict = 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')
        if m.get('totalCount') is not None:
            self.total_count = m.get('totalCount')
        return self


class CountAlertRulesByFieldsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CountAlertRulesByFieldsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CountIntegrationEventRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class CountIntegrationEventResponseBody(TeaModel):
    def __init__(
        self,
        data: int = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 CountIntegrationEventResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CountIntegrationEventResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateAddonReleaseRequest(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        aliyun_lang: str = None,
        dry_run: bool = None,
        entity_rules: EntityDiscoverRule = None,
        env_type: str = None,
        parent_addon_release_id: str = None,
        release_name: str = None,
        values: str = None,
        version: str = None,
        workspace: str = None,
    ):
        # The Addon name of the component that needs to be monitored.
        # 
        # This parameter is required.
        self.addon_name = addon_name
        # The language type of the component.
        self.aliyun_lang = aliyun_lang
        # Whether it is a dry run, default is false.
        self.dry_run = dry_run
        # Field rules
        self.entity_rules = entity_rules
        # Environment type. If the Policy type is CS and ECS, use accordingly; otherwise, it is unified as Cloud.
        self.env_type = env_type
        # Parent AddonReleaseId.
        self.parent_addon_release_id = parent_addon_release_id
        # The plugin name after access. If not specified, a default rule name will be generated.
        self.release_name = release_name
        # Input metadata.
        self.values = values
        # The version of the Addon component that needs to be monitored.
        # 
        # This parameter is required.
        self.version = version
        # The workspace name for installing the component resources.
        self.workspace = workspace

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

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

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.aliyun_lang is not None:
            result['aliyunLang'] = self.aliyun_lang
        if self.dry_run is not None:
            result['dryRun'] = self.dry_run
        if self.entity_rules is not None:
            result['entityRules'] = self.entity_rules.to_map()
        if self.env_type is not None:
            result['envType'] = self.env_type
        if self.parent_addon_release_id is not None:
            result['parentAddonReleaseId'] = self.parent_addon_release_id
        if self.release_name is not None:
            result['releaseName'] = self.release_name
        if self.values is not None:
            result['values'] = self.values
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('aliyunLang') is not None:
            self.aliyun_lang = m.get('aliyunLang')
        if m.get('dryRun') is not None:
            self.dry_run = m.get('dryRun')
        if m.get('entityRules') is not None:
            temp_model = EntityDiscoverRule()
            self.entity_rules = temp_model.from_map(m['entityRules'])
        if m.get('envType') is not None:
            self.env_type = m.get('envType')
        if m.get('parentAddonReleaseId') is not None:
            self.parent_addon_release_id = m.get('parentAddonReleaseId')
        if m.get('releaseName') is not None:
            self.release_name = m.get('releaseName')
        if m.get('values') is not None:
            self.values = m.get('values')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateAddonReleaseResponseBodyReleaseConditions(TeaModel):
    def __init__(
        self,
        first_transition_time: str = None,
        last_transition_time: str = None,
        message: str = None,
        status: str = None,
        type: str = None,
    ):
        # First transition time.
        self.first_transition_time = first_transition_time
        # Last transition time.
        self.last_transition_time = last_transition_time
        # Detailed information.
        self.message = message
        # Phase status.
        self.status = status
        # Phase type.
        self.type = type

    def validate(self):
        pass

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

        result = dict()
        if self.first_transition_time is not None:
            result['firstTransitionTime'] = self.first_transition_time
        if self.last_transition_time is not None:
            result['lastTransitionTime'] = self.last_transition_time
        if self.message is not None:
            result['message'] = self.message
        if self.status is not None:
            result['status'] = self.status
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('firstTransitionTime') is not None:
            self.first_transition_time = m.get('firstTransitionTime')
        if m.get('lastTransitionTime') is not None:
            self.last_transition_time = m.get('lastTransitionTime')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class CreateAddonReleaseResponseBodyRelease(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        alert_rule_count: int = None,
        conditions: List[CreateAddonReleaseResponseBodyReleaseConditions] = None,
        config: str = None,
        create_time: str = None,
        dashboard_count: int = None,
        entity_rules: EntityGroupBase = None,
        env_type: str = None,
        environment_id: str = None,
        exporter_count: int = None,
        have_config: bool = None,
        install_user_id: str = None,
        language: str = None,
        managed: bool = None,
        parent_addon_release_id: str = None,
        policy_id: str = None,
        region_id: str = None,
        release_id: str = None,
        release_name: str = None,
        scene: str = None,
        status: str = None,
        update_time: str = None,
        user_id: str = None,
        version: str = None,
        workspace: str = None,
    ):
        # The Addon name of the component being monitored.
        self.addon_name = addon_name
        # Number of alert groups.
        self.alert_rule_count = alert_rule_count
        # Component installation phase information.
        self.conditions = conditions
        # Component configuration.
        self.config = config
        # Connection time.
        self.create_time = create_time
        # Number of dashboards.
        self.dashboard_count = dashboard_count
        # Entity details.
        self.entity_rules = entity_rules
        # Environment type.
        self.env_type = env_type
        # Environment ID.
        self.environment_id = environment_id
        # Number of plugins.
        self.exporter_count = exporter_count
        # Whether it has configuration.
        self.have_config = have_config
        # ID of the user who installed it.
        self.install_user_id = install_user_id
        # Language.
        self.language = language
        # Whether it is a managed component.
        self.managed = managed
        # Parent AddonReleaseId.
        self.parent_addon_release_id = parent_addon_release_id
        # Policy environment ID.
        self.policy_id = policy_id
        # Region ID.
        self.region_id = region_id
        # ReleaseID after installation.
        self.release_id = release_id
        # Name of the Release.
        self.release_name = release_name
        # Component scenario.
        self.scene = scene
        # Component status.
        self.status = status
        # Update time.
        self.update_time = update_time
        # ID of the owner user.
        self.user_id = user_id
        # Component version.
        self.version = version
        # Workspace.
        self.workspace = workspace

    def validate(self):
        if self.conditions:
            for k in self.conditions:
                if k:
                    k.validate()
        if self.entity_rules:
            self.entity_rules.validate()

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

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.alert_rule_count is not None:
            result['alertRuleCount'] = self.alert_rule_count
        result['conditions'] = []
        if self.conditions is not None:
            for k in self.conditions:
                result['conditions'].append(k.to_map() if k else None)
        if self.config is not None:
            result['config'] = self.config
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.dashboard_count is not None:
            result['dashboardCount'] = self.dashboard_count
        if self.entity_rules is not None:
            result['entityRules'] = self.entity_rules.to_map()
        if self.env_type is not None:
            result['envType'] = self.env_type
        if self.environment_id is not None:
            result['environmentId'] = self.environment_id
        if self.exporter_count is not None:
            result['exporterCount'] = self.exporter_count
        if self.have_config is not None:
            result['haveConfig'] = self.have_config
        if self.install_user_id is not None:
            result['installUserId'] = self.install_user_id
        if self.language is not None:
            result['language'] = self.language
        if self.managed is not None:
            result['managed'] = self.managed
        if self.parent_addon_release_id is not None:
            result['parentAddonReleaseId'] = self.parent_addon_release_id
        if self.policy_id is not None:
            result['policyId'] = self.policy_id
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.release_id is not None:
            result['releaseId'] = self.release_id
        if self.release_name is not None:
            result['releaseName'] = self.release_name
        if self.scene is not None:
            result['scene'] = self.scene
        if self.status is not None:
            result['status'] = self.status
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('alertRuleCount') is not None:
            self.alert_rule_count = m.get('alertRuleCount')
        self.conditions = []
        if m.get('conditions') is not None:
            for k in m.get('conditions'):
                temp_model = CreateAddonReleaseResponseBodyReleaseConditions()
                self.conditions.append(temp_model.from_map(k))
        if m.get('config') is not None:
            self.config = m.get('config')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('dashboardCount') is not None:
            self.dashboard_count = m.get('dashboardCount')
        if m.get('entityRules') is not None:
            temp_model = EntityGroupBase()
            self.entity_rules = temp_model.from_map(m['entityRules'])
        if m.get('envType') is not None:
            self.env_type = m.get('envType')
        if m.get('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('exporterCount') is not None:
            self.exporter_count = m.get('exporterCount')
        if m.get('haveConfig') is not None:
            self.have_config = m.get('haveConfig')
        if m.get('installUserId') is not None:
            self.install_user_id = m.get('installUserId')
        if m.get('language') is not None:
            self.language = m.get('language')
        if m.get('managed') is not None:
            self.managed = m.get('managed')
        if m.get('parentAddonReleaseId') is not None:
            self.parent_addon_release_id = m.get('parentAddonReleaseId')
        if m.get('policyId') is not None:
            self.policy_id = m.get('policyId')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('releaseId') is not None:
            self.release_id = m.get('releaseId')
        if m.get('releaseName') is not None:
            self.release_name = m.get('releaseName')
        if m.get('scene') is not None:
            self.scene = m.get('scene')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateAddonReleaseResponseBody(TeaModel):
    def __init__(
        self,
        release: CreateAddonReleaseResponseBodyRelease = None,
        request_id: str = None,
    ):
        # Accessed component information.
        self.release = release
        # Request ID.
        self.request_id = request_id

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

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

        result = dict()
        if self.release is not None:
            result['release'] = self.release.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('release') is not None:
            temp_model = CreateAddonReleaseResponseBodyRelease()
            self.release = temp_model.from_map(m['release'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateAddonReleaseResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateAddonReleaseResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateAggTaskGroupRequestTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # Key of the resource group tag.
        self.key = key
        # Value of the resource group tag.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 CreateAggTaskGroupRequest(TeaModel):
    def __init__(
        self,
        agg_task_group_config: str = None,
        agg_task_group_config_type: str = None,
        agg_task_group_name: str = None,
        cron_expr: str = None,
        delay: int = None,
        description: str = None,
        from_time: int = None,
        max_retries: int = None,
        max_run_time_in_seconds: int = None,
        precheck_string: str = None,
        schedule_mode: str = None,
        schedule_time_expr: str = None,
        status: str = None,
        tags: List[CreateAggTaskGroupRequestTags] = None,
        target_prometheus_id: str = None,
        to_time: int = None,
        override_if_exists: bool = None,
    ):
        # Aggregation task group configuration.
        # Currently, only the “RecordingRuleYaml” format is supported, which must comply with the format requirements of open-source Prometheus RecordingRules.
        # 
        # This parameter is required.
        self.agg_task_group_config = agg_task_group_config
        # Aggregation task group configuration type, default is “RecordingRuleYaml” (open-source Prometheus RecordingRule format).
        self.agg_task_group_config_type = agg_task_group_config_type
        # Aggregation task group name.
        # 
        # This parameter is required.
        self.agg_task_group_name = agg_task_group_name
        # When the scheduling mode is selected as “Cron”, this is the specific scheduling expression. For example, “0/1 * * * *” means starting from 0 minutes and scheduling every 1 minute.
        self.cron_expr = cron_expr
        # Fixed delay time for scheduling, in seconds, default is 30.
        self.delay = delay
        # Description of the aggregation task group.
        self.description = description
        # The second-level timestamp corresponding to the start time of the schedule.
        self.from_time = from_time
        # Maximum number of retries for executing the aggregation task, default is 20.
        self.max_retries = max_retries
        # Maximum retry time for executing the aggregation task, in seconds, default is 600.
        self.max_run_time_in_seconds = max_run_time_in_seconds
        # Pre-check configuration, no configuration by default. The input string needs to be correctly parsed as JSON.
        self.precheck_string = precheck_string
        # Scheduling mode, either “Cron” or “FixedRate”, default is “FixedRate”.
        self.schedule_mode = schedule_mode
        # Scheduling time expression, recommended “@s” or “@m”, indicating the alignment granularity of the scheduling time window, default is “@m”.
        self.schedule_time_expr = schedule_time_expr
        # Status of the aggregation task group, either “Running” or “Stopped”. Default is Running.
        self.status = status
        # Resource group tags.
        self.tags = tags
        # The target Prometheus instance ID of the aggregation task group.
        # 
        # This parameter is required.
        self.target_prometheus_id = target_prometheus_id
        # The second-level timestamp corresponding to the end time of the schedule, 0 indicates that the scheduling does not stop.
        self.to_time = to_time
        # Whether to overwrite and update if a resource with the same name exists when creating an aggregation task group.
        self.override_if_exists = override_if_exists

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

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

        result = dict()
        if self.agg_task_group_config is not None:
            result['aggTaskGroupConfig'] = self.agg_task_group_config
        if self.agg_task_group_config_type is not None:
            result['aggTaskGroupConfigType'] = self.agg_task_group_config_type
        if self.agg_task_group_name is not None:
            result['aggTaskGroupName'] = self.agg_task_group_name
        if self.cron_expr is not None:
            result['cronExpr'] = self.cron_expr
        if self.delay is not None:
            result['delay'] = self.delay
        if self.description is not None:
            result['description'] = self.description
        if self.from_time is not None:
            result['fromTime'] = self.from_time
        if self.max_retries is not None:
            result['maxRetries'] = self.max_retries
        if self.max_run_time_in_seconds is not None:
            result['maxRunTimeInSeconds'] = self.max_run_time_in_seconds
        if self.precheck_string is not None:
            result['precheckString'] = self.precheck_string
        if self.schedule_mode is not None:
            result['scheduleMode'] = self.schedule_mode
        if self.schedule_time_expr is not None:
            result['scheduleTimeExpr'] = self.schedule_time_expr
        if self.status is not None:
            result['status'] = self.status
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.target_prometheus_id is not None:
            result['targetPrometheusId'] = self.target_prometheus_id
        if self.to_time is not None:
            result['toTime'] = self.to_time
        if self.override_if_exists is not None:
            result['overrideIfExists'] = self.override_if_exists
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aggTaskGroupConfig') is not None:
            self.agg_task_group_config = m.get('aggTaskGroupConfig')
        if m.get('aggTaskGroupConfigType') is not None:
            self.agg_task_group_config_type = m.get('aggTaskGroupConfigType')
        if m.get('aggTaskGroupName') is not None:
            self.agg_task_group_name = m.get('aggTaskGroupName')
        if m.get('cronExpr') is not None:
            self.cron_expr = m.get('cronExpr')
        if m.get('delay') is not None:
            self.delay = m.get('delay')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('fromTime') is not None:
            self.from_time = m.get('fromTime')
        if m.get('maxRetries') is not None:
            self.max_retries = m.get('maxRetries')
        if m.get('maxRunTimeInSeconds') is not None:
            self.max_run_time_in_seconds = m.get('maxRunTimeInSeconds')
        if m.get('precheckString') is not None:
            self.precheck_string = m.get('precheckString')
        if m.get('scheduleMode') is not None:
            self.schedule_mode = m.get('scheduleMode')
        if m.get('scheduleTimeExpr') is not None:
            self.schedule_time_expr = m.get('scheduleTimeExpr')
        if m.get('status') is not None:
            self.status = m.get('status')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = CreateAggTaskGroupRequestTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('targetPrometheusId') is not None:
            self.target_prometheus_id = m.get('targetPrometheusId')
        if m.get('toTime') is not None:
            self.to_time = m.get('toTime')
        if m.get('overrideIfExists') is not None:
            self.override_if_exists = m.get('overrideIfExists')
        return self


class CreateAggTaskGroupResponseBody(TeaModel):
    def __init__(
        self,
        agg_task_group_config_hash: str = None,
        agg_task_group_id: str = None,
        agg_task_group_name: str = None,
        request_id: str = None,
        source_prometheus_id: str = None,
        status: str = None,
    ):
        # Summary of the aggregation task group configuration.
        self.agg_task_group_config_hash = agg_task_group_config_hash
        # Aggregation task group ID.
        self.agg_task_group_id = agg_task_group_id
        # Aggregation task group name.
        self.agg_task_group_name = agg_task_group_name
        # Request ID.
        self.request_id = request_id
        # Source Prometheus instance ID of the aggregation task group.
        self.source_prometheus_id = source_prometheus_id
        # Current status of the aggregation task group.
        self.status = status

    def validate(self):
        pass

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

        result = dict()
        if self.agg_task_group_config_hash is not None:
            result['aggTaskGroupConfigHash'] = self.agg_task_group_config_hash
        if self.agg_task_group_id is not None:
            result['aggTaskGroupId'] = self.agg_task_group_id
        if self.agg_task_group_name is not None:
            result['aggTaskGroupName'] = self.agg_task_group_name
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.source_prometheus_id is not None:
            result['sourcePrometheusId'] = self.source_prometheus_id
        if self.status is not None:
            result['status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aggTaskGroupConfigHash') is not None:
            self.agg_task_group_config_hash = m.get('aggTaskGroupConfigHash')
        if m.get('aggTaskGroupId') is not None:
            self.agg_task_group_id = m.get('aggTaskGroupId')
        if m.get('aggTaskGroupName') is not None:
            self.agg_task_group_name = m.get('aggTaskGroupName')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('sourcePrometheusId') is not None:
            self.source_prometheus_id = m.get('sourcePrometheusId')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class CreateAggTaskGroupResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateAggTaskGroupResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateAlertActionRequestEbParam(TeaModel):
    def __init__(
        self,
        eb_source: str = None,
        event_bus_name: str = None,
        region_id: str = None,
        subject: str = None,
    ):
        self.eb_source = eb_source
        self.event_bus_name = event_bus_name
        self.region_id = region_id
        self.subject = subject

    def validate(self):
        pass

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

        result = dict()
        if self.eb_source is not None:
            result['ebSource'] = self.eb_source
        if self.event_bus_name is not None:
            result['eventBusName'] = self.event_bus_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.subject is not None:
            result['subject'] = self.subject
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ebSource') is not None:
            self.eb_source = m.get('ebSource')
        if m.get('eventBusName') is not None:
            self.event_bus_name = m.get('eventBusName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('subject') is not None:
            self.subject = m.get('subject')
        return self


class CreateAlertActionRequestEssParam(TeaModel):
    def __init__(
        self,
        ess_group_id: str = None,
        ess_rule_id: str = None,
        region_id: str = None,
    ):
        self.ess_group_id = ess_group_id
        self.ess_rule_id = ess_rule_id
        self.region_id = region_id

    def validate(self):
        pass

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

        result = dict()
        if self.ess_group_id is not None:
            result['essGroupId'] = self.ess_group_id
        if self.ess_rule_id is not None:
            result['essRuleId'] = self.ess_rule_id
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('essGroupId') is not None:
            self.ess_group_id = m.get('essGroupId')
        if m.get('essRuleId') is not None:
            self.ess_rule_id = m.get('essRuleId')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class CreateAlertActionRequestFc3Param(TeaModel):
    def __init__(
        self,
        function: str = None,
        qualifier: str = None,
        region_id: str = None,
    ):
        self.function = function
        self.qualifier = qualifier
        self.region_id = region_id

    def validate(self):
        pass

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

        result = dict()
        if self.function is not None:
            result['function'] = self.function
        if self.qualifier is not None:
            result['qualifier'] = self.qualifier
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('function') is not None:
            self.function = m.get('function')
        if m.get('qualifier') is not None:
            self.qualifier = m.get('qualifier')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class CreateAlertActionRequestFcParam(TeaModel):
    def __init__(
        self,
        function: str = None,
        region_id: str = None,
        service: str = None,
    ):
        self.function = function
        self.region_id = region_id
        self.service = service

    def validate(self):
        pass

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

        result = dict()
        if self.function is not None:
            result['function'] = self.function
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.service is not None:
            result['service'] = self.service
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('function') is not None:
            self.function = m.get('function')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class CreateAlertActionRequestMnsParam(TeaModel):
    def __init__(
        self,
        mns_type: str = None,
        name: str = None,
        region_id: str = None,
    ):
        self.mns_type = mns_type
        self.name = name
        self.region_id = region_id

    def validate(self):
        pass

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

        result = dict()
        if self.mns_type is not None:
            result['mnsType'] = self.mns_type
        if self.name is not None:
            result['name'] = self.name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('mnsType') is not None:
            self.mns_type = m.get('mnsType')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class CreateAlertActionRequestPagerDutyParam(TeaModel):
    def __init__(
        self,
        key: str = None,
        url: str = None,
    ):
        self.key = key
        self.url = url

    def validate(self):
        pass

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

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

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


class CreateAlertActionRequestSlsParam(TeaModel):
    def __init__(
        self,
        logstore: str = None,
        project: str = None,
        region_id: str = None,
    ):
        self.logstore = logstore
        self.project = project
        self.region_id = region_id

    def validate(self):
        pass

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

        result = dict()
        if self.logstore is not None:
            result['logstore'] = self.logstore
        if self.project is not None:
            result['project'] = self.project
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('logstore') is not None:
            self.logstore = m.get('logstore')
        if m.get('project') is not None:
            self.project = m.get('project')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class CreateAlertActionRequestWebhookParam(TeaModel):
    def __init__(
        self,
        content_type: str = None,
        headers: Dict[str, str] = None,
        method: str = None,
        url: str = None,
    ):
        self.content_type = content_type
        self.headers = headers
        self.method = method
        self.url = url

    def validate(self):
        pass

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

        result = dict()
        if self.content_type is not None:
            result['contentType'] = self.content_type
        if self.headers is not None:
            result['headers'] = self.headers
        if self.method is not None:
            result['method'] = self.method
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contentType') is not None:
            self.content_type = m.get('contentType')
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('method') is not None:
            self.method = m.get('method')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class CreateAlertActionRequest(TeaModel):
    def __init__(
        self,
        alert_action_id: str = None,
        alert_action_name: str = None,
        eb_param: CreateAlertActionRequestEbParam = None,
        ess_param: CreateAlertActionRequestEssParam = None,
        fc_3param: CreateAlertActionRequestFc3Param = None,
        fc_param: CreateAlertActionRequestFcParam = None,
        mns_param: CreateAlertActionRequestMnsParam = None,
        pager_duty_param: CreateAlertActionRequestPagerDutyParam = None,
        sls_param: CreateAlertActionRequestSlsParam = None,
        source: str = None,
        type: str = None,
        webhook_param: CreateAlertActionRequestWebhookParam = None,
    ):
        self.alert_action_id = alert_action_id
        # This parameter is required.
        self.alert_action_name = alert_action_name
        self.eb_param = eb_param
        self.ess_param = ess_param
        self.fc_3param = fc_3param
        self.fc_param = fc_param
        self.mns_param = mns_param
        self.pager_duty_param = pager_duty_param
        self.sls_param = sls_param
        self.source = source
        # This parameter is required.
        self.type = type
        self.webhook_param = webhook_param

    def validate(self):
        if self.eb_param:
            self.eb_param.validate()
        if self.ess_param:
            self.ess_param.validate()
        if self.fc_3param:
            self.fc_3param.validate()
        if self.fc_param:
            self.fc_param.validate()
        if self.mns_param:
            self.mns_param.validate()
        if self.pager_duty_param:
            self.pager_duty_param.validate()
        if self.sls_param:
            self.sls_param.validate()
        if self.webhook_param:
            self.webhook_param.validate()

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

        result = dict()
        if self.alert_action_id is not None:
            result['alertActionId'] = self.alert_action_id
        if self.alert_action_name is not None:
            result['alertActionName'] = self.alert_action_name
        if self.eb_param is not None:
            result['ebParam'] = self.eb_param.to_map()
        if self.ess_param is not None:
            result['essParam'] = self.ess_param.to_map()
        if self.fc_3param is not None:
            result['fc3Param'] = self.fc_3param.to_map()
        if self.fc_param is not None:
            result['fcParam'] = self.fc_param.to_map()
        if self.mns_param is not None:
            result['mnsParam'] = self.mns_param.to_map()
        if self.pager_duty_param is not None:
            result['pagerDutyParam'] = self.pager_duty_param.to_map()
        if self.sls_param is not None:
            result['slsParam'] = self.sls_param.to_map()
        if self.source is not None:
            result['source'] = self.source
        if self.type is not None:
            result['type'] = self.type
        if self.webhook_param is not None:
            result['webhookParam'] = self.webhook_param.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionId') is not None:
            self.alert_action_id = m.get('alertActionId')
        if m.get('alertActionName') is not None:
            self.alert_action_name = m.get('alertActionName')
        if m.get('ebParam') is not None:
            temp_model = CreateAlertActionRequestEbParam()
            self.eb_param = temp_model.from_map(m['ebParam'])
        if m.get('essParam') is not None:
            temp_model = CreateAlertActionRequestEssParam()
            self.ess_param = temp_model.from_map(m['essParam'])
        if m.get('fc3Param') is not None:
            temp_model = CreateAlertActionRequestFc3Param()
            self.fc_3param = temp_model.from_map(m['fc3Param'])
        if m.get('fcParam') is not None:
            temp_model = CreateAlertActionRequestFcParam()
            self.fc_param = temp_model.from_map(m['fcParam'])
        if m.get('mnsParam') is not None:
            temp_model = CreateAlertActionRequestMnsParam()
            self.mns_param = temp_model.from_map(m['mnsParam'])
        if m.get('pagerDutyParam') is not None:
            temp_model = CreateAlertActionRequestPagerDutyParam()
            self.pager_duty_param = temp_model.from_map(m['pagerDutyParam'])
        if m.get('slsParam') is not None:
            temp_model = CreateAlertActionRequestSlsParam()
            self.sls_param = temp_model.from_map(m['slsParam'])
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('webhookParam') is not None:
            temp_model = CreateAlertActionRequestWebhookParam()
            self.webhook_param = temp_model.from_map(m['webhookParam'])
        return self


class CreateAlertActionResponseBody(TeaModel):
    def __init__(
        self,
        alert_action_id: str = None,
        request_id: str = None,
    ):
        self.alert_action_id = alert_action_id
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.alert_action_id is not None:
            result['alertActionId'] = self.alert_action_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionId') is not None:
            self.alert_action_id = m.get('alertActionId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateAlertActionResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateAlertActionResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateAlertEventIntegrationPolicyRequest(TeaModel):
    def __init__(
        self,
        body: AlertEventIntegrationPolicyForModify = None,
        client_token: str = None,
        workspace: str = None,
    ):
        self.body = body
        self.client_token = client_token
        # This parameter is required.
        self.workspace = workspace

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

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

        result = dict()
        if self.body is not None:
            result['body'] = self.body.to_map()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            temp_model = AlertEventIntegrationPolicyForModify()
            self.body = temp_model.from_map(m['body'])
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateAlertEventIntegrationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        alert_event_integration_policy_id: str = None,
        request_id: str = None,
    ):
        self.alert_event_integration_policy_id = alert_event_integration_policy_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.alert_event_integration_policy_id is not None:
            result['alertEventIntegrationPolicyId'] = self.alert_event_integration_policy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertEventIntegrationPolicyId') is not None:
            self.alert_event_integration_policy_id = m.get('alertEventIntegrationPolicyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateAlertEventIntegrationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateAlertEventIntegrationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateAlertNotifyTemplateRequest(TeaModel):
    def __init__(
        self,
        alert_notify_template_id: str = None,
        alert_notify_template_name: str = None,
        program_lang: str = None,
        templates: Dict[str, dict] = None,
        type: str = None,
    ):
        # This parameter is required.
        self.alert_notify_template_id = alert_notify_template_id
        self.alert_notify_template_name = alert_notify_template_name
        self.program_lang = program_lang
        self.templates = templates
        self.type = type

    def validate(self):
        pass

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

        result = dict()
        if self.alert_notify_template_id is not None:
            result['alertNotifyTemplateId'] = self.alert_notify_template_id
        if self.alert_notify_template_name is not None:
            result['alertNotifyTemplateName'] = self.alert_notify_template_name
        if self.program_lang is not None:
            result['programLang'] = self.program_lang
        if self.templates is not None:
            result['templates'] = self.templates
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertNotifyTemplateId') is not None:
            self.alert_notify_template_id = m.get('alertNotifyTemplateId')
        if m.get('alertNotifyTemplateName') is not None:
            self.alert_notify_template_name = m.get('alertNotifyTemplateName')
        if m.get('programLang') is not None:
            self.program_lang = m.get('programLang')
        if m.get('templates') is not None:
            self.templates = m.get('templates')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class CreateAlertNotifyTemplateResponseBody(TeaModel):
    def __init__(
        self,
        alert_notify_template_id: str = None,
        request_id: str = None,
    ):
        self.alert_notify_template_id = alert_notify_template_id
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.alert_notify_template_id is not None:
            result['alertNotifyTemplateId'] = self.alert_notify_template_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertNotifyTemplateId') is not None:
            self.alert_notify_template_id = m.get('alertNotifyTemplateId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateAlertNotifyTemplateResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateAlertNotifyTemplateResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateAlertRobotRequest(TeaModel):
    def __init__(
        self,
        is_custom: str = None,
        lang: str = None,
        name: str = None,
        robot_id: str = None,
        source: str = None,
        type: str = None,
        url: str = None,
    ):
        self.is_custom = is_custom
        self.lang = lang
        self.name = name
        self.robot_id = robot_id
        self.source = source
        # This parameter is required.
        self.type = type
        self.url = url

    def validate(self):
        pass

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

        result = dict()
        if self.is_custom is not None:
            result['isCustom'] = self.is_custom
        if self.lang is not None:
            result['lang'] = self.lang
        if self.name is not None:
            result['name'] = self.name
        if self.robot_id is not None:
            result['robotId'] = self.robot_id
        if self.source is not None:
            result['source'] = self.source
        if self.type is not None:
            result['type'] = self.type
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('isCustom') is not None:
            self.is_custom = m.get('isCustom')
        if m.get('lang') is not None:
            self.lang = m.get('lang')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('robotId') is not None:
            self.robot_id = m.get('robotId')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class CreateAlertRobotResponseBody(TeaModel):
    def __init__(
        self,
        alert_robot_id: str = None,
        request_id: str = None,
    ):
        self.alert_robot_id = alert_robot_id
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.alert_robot_id is not None:
            result['alertRobotId'] = self.alert_robot_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRobotId') is not None:
            self.alert_robot_id = m.get('alertRobotId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateAlertRobotResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateAlertRobotResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateAlertRuleRequest(TeaModel):
    def __init__(
        self,
        alert_metric_input: AlertRuleAlertMetricInput = None,
        annotations: Dict[str, str] = None,
        biz_source: str = None,
        condition: AlertRuleCondition = None,
        datasource: AlertRuleDataSource = None,
        display_name: str = None,
        enabled: bool = None,
        interval: int = None,
        labels: Dict[str, str] = None,
        level: str = None,
        message: str = None,
        query: AlertRuleQuery = None,
        send: AlertRuleSend = None,
        workspace: str = None,
        call_source: str = None,
    ):
        self.alert_metric_input = alert_metric_input
        # 规则注解，允许设置长文本
        self.annotations = annotations
        # This parameter is required.
        self.biz_source = biz_source
        self.condition = condition
        # This parameter is required.
        self.datasource = datasource
        # 代表资源名称的资源属性字段
        # 
        # This parameter is required.
        self.display_name = display_name
        # 是否启用
        self.enabled = enabled
        # 告警检查周期（单位：秒），默认60
        self.interval = interval
        self.labels = labels
        # 告警级别，CRITICAL,ERROR,WARNING,INFO，默认INFO，
        self.level = level
        # 告警规则的通知消息内容
        self.message = message
        # This parameter is required.
        self.query = query
        self.send = send
        # 工作空间
        self.workspace = workspace
        self.call_source = call_source

    def validate(self):
        if self.alert_metric_input:
            self.alert_metric_input.validate()
        if self.condition:
            self.condition.validate()
        if self.datasource:
            self.datasource.validate()
        if self.query:
            self.query.validate()
        if self.send:
            self.send.validate()

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

        result = dict()
        if self.alert_metric_input is not None:
            result['alertMetricInput'] = self.alert_metric_input.to_map()
        if self.annotations is not None:
            result['annotations'] = self.annotations
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.condition is not None:
            result['condition'] = self.condition.to_map()
        if self.datasource is not None:
            result['datasource'] = self.datasource.to_map()
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.interval is not None:
            result['interval'] = self.interval
        if self.labels is not None:
            result['labels'] = self.labels
        if self.level is not None:
            result['level'] = self.level
        if self.message is not None:
            result['message'] = self.message
        if self.query is not None:
            result['query'] = self.query.to_map()
        if self.send is not None:
            result['send'] = self.send.to_map()
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.call_source is not None:
            result['callSource'] = self.call_source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertMetricInput') is not None:
            temp_model = AlertRuleAlertMetricInput()
            self.alert_metric_input = temp_model.from_map(m['alertMetricInput'])
        if m.get('annotations') is not None:
            self.annotations = m.get('annotations')
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('condition') is not None:
            temp_model = AlertRuleCondition()
            self.condition = temp_model.from_map(m['condition'])
        if m.get('datasource') is not None:
            temp_model = AlertRuleDataSource()
            self.datasource = temp_model.from_map(m['datasource'])
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('labels') is not None:
            self.labels = m.get('labels')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('query') is not None:
            temp_model = AlertRuleQuery()
            self.query = temp_model.from_map(m['query'])
        if m.get('send') is not None:
            temp_model = AlertRuleSend()
            self.send = temp_model.from_map(m['send'])
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        if m.get('callSource') is not None:
            self.call_source = m.get('callSource')
        return self


class CreateAlertRuleResponseBody(TeaModel):
    def __init__(
        self,
        alert_rule_id: str = None,
        request_id: str = None,
    ):
        self.alert_rule_id = alert_rule_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.alert_rule_id is not None:
            result['alertRuleId'] = self.alert_rule_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleId') is not None:
            self.alert_rule_id = m.get('alertRuleId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateAlertRuleResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateAlertRuleResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateAlertWebhookRequest(TeaModel):
    def __init__(
        self,
        content_type: str = None,
        headers: Dict[str, str] = None,
        is_custom: str = None,
        lang: str = None,
        method: str = None,
        name: str = None,
        source: str = None,
        url: str = None,
        webhook_id: str = None,
    ):
        self.content_type = content_type
        # headers
        self.headers = headers
        self.is_custom = is_custom
        self.lang = lang
        self.method = method
        # This parameter is required.
        self.name = name
        self.source = source
        # This parameter is required.
        self.url = url
        self.webhook_id = webhook_id

    def validate(self):
        pass

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

        result = dict()
        if self.content_type is not None:
            result['contentType'] = self.content_type
        if self.headers is not None:
            result['headers'] = self.headers
        if self.is_custom is not None:
            result['isCustom'] = self.is_custom
        if self.lang is not None:
            result['lang'] = self.lang
        if self.method is not None:
            result['method'] = self.method
        if self.name is not None:
            result['name'] = self.name
        if self.source is not None:
            result['source'] = self.source
        if self.url is not None:
            result['url'] = self.url
        if self.webhook_id is not None:
            result['webhookId'] = self.webhook_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contentType') is not None:
            self.content_type = m.get('contentType')
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('isCustom') is not None:
            self.is_custom = m.get('isCustom')
        if m.get('lang') is not None:
            self.lang = m.get('lang')
        if m.get('method') is not None:
            self.method = m.get('method')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('url') is not None:
            self.url = m.get('url')
        if m.get('webhookId') is not None:
            self.webhook_id = m.get('webhookId')
        return self


class CreateAlertWebhookResponseBody(TeaModel):
    def __init__(
        self,
        alert_webhook_id: str = None,
        request_id: str = None,
    ):
        self.alert_webhook_id = alert_webhook_id
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.alert_webhook_id is not None:
            result['alertWebhookId'] = self.alert_webhook_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertWebhookId') is not None:
            self.alert_webhook_id = m.get('alertWebhookId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateAlertWebhookResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateAlertWebhookResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateBizTraceRequest(TeaModel):
    def __init__(
        self,
        advanced_config: str = None,
        biz_trace_code: str = None,
        biz_trace_name: str = None,
        rule_config: str = None,
        workspace: str = None,
    ):
        self.advanced_config = advanced_config
        self.biz_trace_code = biz_trace_code
        self.biz_trace_name = biz_trace_name
        self.rule_config = rule_config
        self.workspace = workspace

    def validate(self):
        pass

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

        result = dict()
        if self.advanced_config is not None:
            result['advancedConfig'] = self.advanced_config
        if self.biz_trace_code is not None:
            result['bizTraceCode'] = self.biz_trace_code
        if self.biz_trace_name is not None:
            result['bizTraceName'] = self.biz_trace_name
        if self.rule_config is not None:
            result['ruleConfig'] = self.rule_config
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('advancedConfig') is not None:
            self.advanced_config = m.get('advancedConfig')
        if m.get('bizTraceCode') is not None:
            self.biz_trace_code = m.get('bizTraceCode')
        if m.get('bizTraceName') is not None:
            self.biz_trace_name = m.get('bizTraceName')
        if m.get('ruleConfig') is not None:
            self.rule_config = m.get('ruleConfig')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateBizTraceResponseBody(TeaModel):
    def __init__(
        self,
        biz_trace_id: str = None,
        request_id: str = None,
    ):
        self.biz_trace_id = biz_trace_id
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.biz_trace_id is not None:
            result['bizTraceId'] = self.biz_trace_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('bizTraceId') is not None:
            self.biz_trace_id = m.get('bizTraceId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateBizTraceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateBizTraceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateChatRequestMessagesContents(TeaModel):
    def __init__(
        self,
        type: str = None,
        value: str = None,
    ):
        self.type = type
        self.value = value

    def validate(self):
        pass

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

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

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


class CreateChatRequestMessages(TeaModel):
    def __init__(
        self,
        contents: List[CreateChatRequestMessagesContents] = None,
        message_id: str = None,
        role: str = None,
        tools: List[Dict[str, Any]] = None,
    ):
        self.contents = contents
        self.message_id = message_id
        self.role = role
        self.tools = tools

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

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

        result = dict()
        result['contents'] = []
        if self.contents is not None:
            for k in self.contents:
                result['contents'].append(k.to_map() if k else None)
        if self.message_id is not None:
            result['messageId'] = self.message_id
        if self.role is not None:
            result['role'] = self.role
        if self.tools is not None:
            result['tools'] = self.tools
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.contents = []
        if m.get('contents') is not None:
            for k in m.get('contents'):
                temp_model = CreateChatRequestMessagesContents()
                self.contents.append(temp_model.from_map(k))
        if m.get('messageId') is not None:
            self.message_id = m.get('messageId')
        if m.get('role') is not None:
            self.role = m.get('role')
        if m.get('tools') is not None:
            self.tools = m.get('tools')
        return self


class CreateChatRequest(TeaModel):
    def __init__(
        self,
        action: str = None,
        digital_employee_name: str = None,
        messages: List[CreateChatRequestMessages] = None,
        thread_id: str = None,
        variables: Dict[str, Any] = None,
    ):
        self.action = action
        self.digital_employee_name = digital_employee_name
        self.messages = messages
        self.thread_id = thread_id
        self.variables = variables

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

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

        result = dict()
        if self.action is not None:
            result['action'] = self.action
        if self.digital_employee_name is not None:
            result['digitalEmployeeName'] = self.digital_employee_name
        result['messages'] = []
        if self.messages is not None:
            for k in self.messages:
                result['messages'].append(k.to_map() if k else None)
        if self.thread_id is not None:
            result['threadId'] = self.thread_id
        if self.variables is not None:
            result['variables'] = self.variables
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('action') is not None:
            self.action = m.get('action')
        if m.get('digitalEmployeeName') is not None:
            self.digital_employee_name = m.get('digitalEmployeeName')
        self.messages = []
        if m.get('messages') is not None:
            for k in m.get('messages'):
                temp_model = CreateChatRequestMessages()
                self.messages.append(temp_model.from_map(k))
        if m.get('threadId') is not None:
            self.thread_id = m.get('threadId')
        if m.get('variables') is not None:
            self.variables = m.get('variables')
        return self


class CreateChatResponseBodyMessages(TeaModel):
    def __init__(
        self,
        agents: List[Dict[str, Any]] = None,
        artifacts: List[Dict[str, Any]] = None,
        call_id: str = None,
        contents: List[Dict[str, Any]] = None,
        detail: str = None,
        events: List[Dict[str, Any]] = None,
        parent_call_id: str = None,
        role: str = None,
        seq: int = None,
        timestamp: str = None,
        tools: List[Dict[str, Any]] = None,
        type: str = None,
        version: str = None,
    ):
        self.agents = agents
        self.artifacts = artifacts
        self.call_id = call_id
        self.contents = contents
        self.detail = detail
        self.events = events
        self.parent_call_id = parent_call_id
        self.role = role
        self.seq = seq
        self.timestamp = timestamp
        self.tools = tools
        self.type = type
        self.version = version

    def validate(self):
        pass

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

        result = dict()
        if self.agents is not None:
            result['agents'] = self.agents
        if self.artifacts is not None:
            result['artifacts'] = self.artifacts
        if self.call_id is not None:
            result['callId'] = self.call_id
        if self.contents is not None:
            result['contents'] = self.contents
        if self.detail is not None:
            result['detail'] = self.detail
        if self.events is not None:
            result['events'] = self.events
        if self.parent_call_id is not None:
            result['parentCallId'] = self.parent_call_id
        if self.role is not None:
            result['role'] = self.role
        if self.seq is not None:
            result['seq'] = self.seq
        if self.timestamp is not None:
            result['timestamp'] = self.timestamp
        if self.tools is not None:
            result['tools'] = self.tools
        if self.type is not None:
            result['type'] = self.type
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('agents') is not None:
            self.agents = m.get('agents')
        if m.get('artifacts') is not None:
            self.artifacts = m.get('artifacts')
        if m.get('callId') is not None:
            self.call_id = m.get('callId')
        if m.get('contents') is not None:
            self.contents = m.get('contents')
        if m.get('detail') is not None:
            self.detail = m.get('detail')
        if m.get('events') is not None:
            self.events = m.get('events')
        if m.get('parentCallId') is not None:
            self.parent_call_id = m.get('parentCallId')
        if m.get('role') is not None:
            self.role = m.get('role')
        if m.get('seq') is not None:
            self.seq = m.get('seq')
        if m.get('timestamp') is not None:
            self.timestamp = m.get('timestamp')
        if m.get('tools') is not None:
            self.tools = m.get('tools')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class CreateChatResponseBody(TeaModel):
    def __init__(
        self,
        messages: List[CreateChatResponseBodyMessages] = None,
        request_id: str = None,
        trace_id: str = None,
    ):
        self.messages = messages
        self.request_id = request_id
        self.trace_id = trace_id

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

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

        result = dict()
        result['messages'] = []
        if self.messages is not None:
            for k in self.messages:
                result['messages'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.trace_id is not None:
            result['traceId'] = self.trace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.messages = []
        if m.get('messages') is not None:
            for k in m.get('messages'):
                temp_model = CreateChatResponseBodyMessages()
                self.messages.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('traceId') is not None:
            self.trace_id = m.get('traceId')
        return self


class CreateChatResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateChatResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateCloudResourceResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateCloudResourceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateCloudResourceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateContactRequest(TeaModel):
    def __init__(
        self,
        contact_id: str = None,
        email: str = None,
        im_user_ids: Dict[str, str] = None,
        is_inner_call: bool = None,
        lang: str = None,
        name: str = None,
        phone: str = None,
        phone_code: str = None,
        source: str = None,
    ):
        self.contact_id = contact_id
        self.email = email
        self.im_user_ids = im_user_ids
        self.is_inner_call = is_inner_call
        self.lang = lang
        self.name = name
        self.phone = phone
        self.phone_code = phone_code
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.contact_id is not None:
            result['contactId'] = self.contact_id
        if self.email is not None:
            result['email'] = self.email
        if self.im_user_ids is not None:
            result['imUserIds'] = self.im_user_ids
        if self.is_inner_call is not None:
            result['isInnerCall'] = self.is_inner_call
        if self.lang is not None:
            result['lang'] = self.lang
        if self.name is not None:
            result['name'] = self.name
        if self.phone is not None:
            result['phone'] = self.phone
        if self.phone_code is not None:
            result['phoneCode'] = self.phone_code
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactId') is not None:
            self.contact_id = m.get('contactId')
        if m.get('email') is not None:
            self.email = m.get('email')
        if m.get('imUserIds') is not None:
            self.im_user_ids = m.get('imUserIds')
        if m.get('isInnerCall') is not None:
            self.is_inner_call = m.get('isInnerCall')
        if m.get('lang') is not None:
            self.lang = m.get('lang')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('phone') is not None:
            self.phone = m.get('phone')
        if m.get('phoneCode') is not None:
            self.phone_code = m.get('phoneCode')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class CreateContactResponseBody(TeaModel):
    def __init__(
        self,
        contact_id: str = None,
        request_id: str = None,
    ):
        self.contact_id = contact_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.contact_id is not None:
            result['contactId'] = self.contact_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactId') is not None:
            self.contact_id = m.get('contactId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateContactResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateContactResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateContactGroupRequest(TeaModel):
    def __init__(
        self,
        contact_group_id: str = None,
        contacts: List[str] = None,
        name: str = None,
        source: str = None,
    ):
        self.contact_group_id = contact_group_id
        self.contacts = contacts
        self.name = name
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.contact_group_id is not None:
            result['contactGroupId'] = self.contact_group_id
        if self.contacts is not None:
            result['contacts'] = self.contacts
        if self.name is not None:
            result['name'] = self.name
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactGroupId') is not None:
            self.contact_group_id = m.get('contactGroupId')
        if m.get('contacts') is not None:
            self.contacts = m.get('contacts')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class CreateContactGroupResponseBody(TeaModel):
    def __init__(
        self,
        contact_group_id: str = None,
        request_id: str = None,
    ):
        self.contact_group_id = contact_group_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.contact_group_id is not None:
            result['contactGroupId'] = self.contact_group_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactGroupId') is not None:
            self.contact_group_id = m.get('contactGroupId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateContactGroupResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateContactGroupResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateDatasetRequest(TeaModel):
    def __init__(
        self,
        dataset_name: str = None,
        description: str = None,
        schema: Dict[str, IndexKey] = None,
    ):
        # This parameter is required.
        self.dataset_name = dataset_name
        self.description = description
        # This parameter is required.
        self.schema = schema

    def validate(self):
        if self.schema:
            for v in self.schema.values():
                if v:
                    v.validate()

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

        result = dict()
        if self.dataset_name is not None:
            result['datasetName'] = self.dataset_name
        if self.description is not None:
            result['description'] = self.description
        result['schema'] = {}
        if self.schema is not None:
            for k, v in self.schema.items():
                result['schema'][k] = v.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('datasetName') is not None:
            self.dataset_name = m.get('datasetName')
        if m.get('description') is not None:
            self.description = m.get('description')
        self.schema = {}
        if m.get('schema') is not None:
            for k, v in m.get('schema').items():
                temp_model = IndexKey()
                self.schema[k] = temp_model.from_map(v)
        return self


class CreateDatasetResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateDatasetResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateDatasetResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateDeliveryTaskRequestSinkList(TeaModel):
    def __init__(
        self,
        sink_configs: Dict[str, str] = None,
        sink_type: str = None,
    ):
        self.sink_configs = sink_configs
        # This parameter is required.
        self.sink_type = sink_type

    def validate(self):
        pass

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

        result = dict()
        if self.sink_configs is not None:
            result['sinkConfigs'] = self.sink_configs
        if self.sink_type is not None:
            result['sinkType'] = self.sink_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('sinkConfigs') is not None:
            self.sink_configs = m.get('sinkConfigs')
        if m.get('sinkType') is not None:
            self.sink_type = m.get('sinkType')
        return self


class CreateDeliveryTaskRequestTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        self.key = key
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 CreateDeliveryTaskRequest(TeaModel):
    def __init__(
        self,
        data_source_id: str = None,
        external_labels: Dict[str, str] = None,
        label_filters: Dict[str, str] = None,
        label_filters_type: str = None,
        resource_group_id: str = None,
        sink_list: List[CreateDeliveryTaskRequestSinkList] = None,
        tags: List[CreateDeliveryTaskRequestTags] = None,
        task_description: str = None,
        task_name: str = None,
    ):
        # This parameter is required.
        self.data_source_id = data_source_id
        self.external_labels = external_labels
        self.label_filters = label_filters
        self.label_filters_type = label_filters_type
        self.resource_group_id = resource_group_id
        # This parameter is required.
        self.sink_list = sink_list
        self.tags = tags
        self.task_description = task_description
        # This parameter is required.
        self.task_name = task_name

    def validate(self):
        if self.sink_list:
            for k in self.sink_list:
                if k:
                    k.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

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

        result = dict()
        if self.data_source_id is not None:
            result['dataSourceId'] = self.data_source_id
        if self.external_labels is not None:
            result['externalLabels'] = self.external_labels
        if self.label_filters is not None:
            result['labelFilters'] = self.label_filters
        if self.label_filters_type is not None:
            result['labelFiltersType'] = self.label_filters_type
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        result['sinkList'] = []
        if self.sink_list is not None:
            for k in self.sink_list:
                result['sinkList'].append(k.to_map() if k else None)
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.task_description is not None:
            result['taskDescription'] = self.task_description
        if self.task_name is not None:
            result['taskName'] = self.task_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dataSourceId') is not None:
            self.data_source_id = m.get('dataSourceId')
        if m.get('externalLabels') is not None:
            self.external_labels = m.get('externalLabels')
        if m.get('labelFilters') is not None:
            self.label_filters = m.get('labelFilters')
        if m.get('labelFiltersType') is not None:
            self.label_filters_type = m.get('labelFiltersType')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.sink_list = []
        if m.get('sinkList') is not None:
            for k in m.get('sinkList'):
                temp_model = CreateDeliveryTaskRequestSinkList()
                self.sink_list.append(temp_model.from_map(k))
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = CreateDeliveryTaskRequestTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('taskDescription') is not None:
            self.task_description = m.get('taskDescription')
        if m.get('taskName') is not None:
            self.task_name = m.get('taskName')
        return self


class CreateDeliveryTaskResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        task_id: str = None,
    ):
        self.request_id = request_id
        self.task_id = task_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.task_id is not None:
            result['taskId'] = self.task_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('taskId') is not None:
            self.task_id = m.get('taskId')
        return self


class CreateDeliveryTaskResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateDeliveryTaskResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateDigitalEmployeeRequestKnowledgesBailian(TeaModel):
    def __init__(
        self,
        attributes: str = None,
        index_id: str = None,
        region: str = None,
        workspace_id: str = None,
    ):
        self.attributes = attributes
        self.index_id = index_id
        self.region = region
        self.workspace_id = workspace_id

    def validate(self):
        pass

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

        result = dict()
        if self.attributes is not None:
            result['attributes'] = self.attributes
        if self.index_id is not None:
            result['indexId'] = self.index_id
        if self.region is not None:
            result['region'] = self.region
        if self.workspace_id is not None:
            result['workspaceId'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('attributes') is not None:
            self.attributes = m.get('attributes')
        if m.get('indexId') is not None:
            self.index_id = m.get('indexId')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('workspaceId') is not None:
            self.workspace_id = m.get('workspaceId')
        return self


class CreateDigitalEmployeeRequestKnowledges(TeaModel):
    def __init__(
        self,
        bailian: List[CreateDigitalEmployeeRequestKnowledgesBailian] = None,
        sop: List[Dict[str, Any]] = None,
    ):
        self.bailian = bailian
        self.sop = sop

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

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

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

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


class CreateDigitalEmployeeRequest(TeaModel):
    def __init__(
        self,
        default_rule: str = None,
        description: str = None,
        display_name: str = None,
        knowledges: CreateDigitalEmployeeRequestKnowledges = None,
        name: str = None,
        resource_group_id: str = None,
        role_arn: str = None,
        tags: List[Tag] = None,
    ):
        self.default_rule = default_rule
        self.description = description
        self.display_name = display_name
        self.knowledges = knowledges
        # This parameter is required.
        self.name = name
        self.resource_group_id = resource_group_id
        # This parameter is required.
        self.role_arn = role_arn
        self.tags = tags

    def validate(self):
        if self.knowledges:
            self.knowledges.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

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

        result = dict()
        if self.default_rule is not None:
            result['defaultRule'] = self.default_rule
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.knowledges is not None:
            result['knowledges'] = self.knowledges.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.role_arn is not None:
            result['roleArn'] = self.role_arn
        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: dict = None):
        m = m or dict()
        if m.get('defaultRule') is not None:
            self.default_rule = m.get('defaultRule')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('knowledges') is not None:
            temp_model = CreateDigitalEmployeeRequestKnowledges()
            self.knowledges = temp_model.from_map(m['knowledges'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('roleArn') is not None:
            self.role_arn = m.get('roleArn')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = Tag()
                self.tags.append(temp_model.from_map(k))
        return self


class CreateDigitalEmployeeResponseBody(TeaModel):
    def __init__(
        self,
        name: str = None,
        request_id: str = None,
    ):
        self.name = name
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

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


class CreateDigitalEmployeeResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateDigitalEmployeeResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateDigitalEmployeeSkillRequestFiles(TeaModel):
    def __init__(
        self,
        content: str = None,
        name: str = None,
    ):
        self.content = content
        self.name = name

    def validate(self):
        pass

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

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

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


class CreateDigitalEmployeeSkillRequest(TeaModel):
    def __init__(
        self,
        description: str = None,
        display_name: str = None,
        enable: bool = None,
        files: List[CreateDigitalEmployeeSkillRequestFiles] = None,
        remark: str = None,
        skill_name: str = None,
    ):
        self.description = description
        self.display_name = display_name
        self.enable = enable
        # This parameter is required.
        self.files = files
        self.remark = remark
        # This parameter is required.
        self.skill_name = skill_name

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

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.enable is not None:
            result['enable'] = self.enable
        result['files'] = []
        if self.files is not None:
            for k in self.files:
                result['files'].append(k.to_map() if k else None)
        if self.remark is not None:
            result['remark'] = self.remark
        if self.skill_name is not None:
            result['skillName'] = self.skill_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        self.files = []
        if m.get('files') is not None:
            for k in m.get('files'):
                temp_model = CreateDigitalEmployeeSkillRequestFiles()
                self.files.append(temp_model.from_map(k))
        if m.get('remark') is not None:
            self.remark = m.get('remark')
        if m.get('skillName') is not None:
            self.skill_name = m.get('skillName')
        return self


class CreateDigitalEmployeeSkillResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        skill_name: str = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.skill_name = skill_name

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.skill_name is not None:
            result['skillName'] = self.skill_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('skillName') is not None:
            self.skill_name = m.get('skillName')
        return self


class CreateDigitalEmployeeSkillResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateDigitalEmployeeSkillResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateEntityStoreResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        workspace_name: str = None,
    ):
        # request ID
        self.request_id = request_id
        # workspace name
        self.workspace_name = workspace_name

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.workspace_name is not None:
            result['workspaceName'] = self.workspace_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('workspaceName') is not None:
            self.workspace_name = m.get('workspaceName')
        return self


class CreateEntityStoreResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateEntityStoreResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateEscalationPolicyRequest(TeaModel):
    def __init__(
        self,
        body: IncidentEscalationPolicyForModify = None,
        client_token: str = None,
        workspace: str = None,
    ):
        self.body = body
        self.client_token = client_token
        # This parameter is required.
        self.workspace = workspace

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

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

        result = dict()
        if self.body is not None:
            result['body'] = self.body.to_map()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            temp_model = IncidentEscalationPolicyForModify()
            self.body = temp_model.from_map(m['body'])
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateEscalationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        uuid: str = None,
    ):
        self.request_id = request_id
        self.uuid = uuid

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.uuid is not None:
            result['uuid'] = self.uuid
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('uuid') is not None:
            self.uuid = m.get('uuid')
        return self


class CreateEscalationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateEscalationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateEvaluationTaskRequest(TeaModel):
    def __init__(
        self,
        channel: str = None,
        config: Dict[str, str] = None,
        data_filter: str = None,
        data_type: str = None,
        evaluators: List[Evaluator] = None,
        tags: Dict[str, str] = None,
        task_mode: str = None,
        task_name: str = None,
    ):
        self.channel = channel
        self.config = config
        self.data_filter = data_filter
        self.data_type = data_type
        self.evaluators = evaluators
        self.tags = tags
        self.task_mode = task_mode
        self.task_name = task_name

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

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

        result = dict()
        if self.channel is not None:
            result['channel'] = self.channel
        if self.config is not None:
            result['config'] = self.config
        if self.data_filter is not None:
            result['dataFilter'] = self.data_filter
        if self.data_type is not None:
            result['dataType'] = self.data_type
        result['evaluators'] = []
        if self.evaluators is not None:
            for k in self.evaluators:
                result['evaluators'].append(k.to_map() if k else None)
        if self.tags is not None:
            result['tags'] = self.tags
        if self.task_mode is not None:
            result['taskMode'] = self.task_mode
        if self.task_name is not None:
            result['taskName'] = self.task_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('channel') is not None:
            self.channel = m.get('channel')
        if m.get('config') is not None:
            self.config = m.get('config')
        if m.get('dataFilter') is not None:
            self.data_filter = m.get('dataFilter')
        if m.get('dataType') is not None:
            self.data_type = m.get('dataType')
        self.evaluators = []
        if m.get('evaluators') is not None:
            for k in m.get('evaluators'):
                temp_model = Evaluator()
                self.evaluators.append(temp_model.from_map(k))
        if m.get('tags') is not None:
            self.tags = m.get('tags')
        if m.get('taskMode') is not None:
            self.task_mode = m.get('taskMode')
        if m.get('taskName') is not None:
            self.task_name = m.get('taskName')
        return self


class CreateEvaluationTaskResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        status: str = None,
        task_id: str = None,
    ):
        self.request_id = request_id
        self.status = status
        self.task_id = task_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.status is not None:
            result['status'] = self.status
        if self.task_id is not None:
            result['taskId'] = self.task_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('taskId') is not None:
            self.task_id = m.get('taskId')
        return self


class CreateEvaluationTaskResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateEvaluationTaskResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateExperimentPlanRequest(TeaModel):
    def __init__(
        self,
        dataset_id: str = None,
        dataset_project: str = None,
        description: str = None,
        experiments: List[ExperimentConfig] = None,
        plan_name: str = None,
    ):
        self.dataset_id = dataset_id
        self.dataset_project = dataset_project
        self.description = description
        self.experiments = experiments
        self.plan_name = plan_name

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

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

        result = dict()
        if self.dataset_id is not None:
            result['datasetId'] = self.dataset_id
        if self.dataset_project is not None:
            result['datasetProject'] = self.dataset_project
        if self.description is not None:
            result['description'] = self.description
        result['experiments'] = []
        if self.experiments is not None:
            for k in self.experiments:
                result['experiments'].append(k.to_map() if k else None)
        if self.plan_name is not None:
            result['planName'] = self.plan_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('datasetId') is not None:
            self.dataset_id = m.get('datasetId')
        if m.get('datasetProject') is not None:
            self.dataset_project = m.get('datasetProject')
        if m.get('description') is not None:
            self.description = m.get('description')
        self.experiments = []
        if m.get('experiments') is not None:
            for k in m.get('experiments'):
                temp_model = ExperimentConfig()
                self.experiments.append(temp_model.from_map(k))
        if m.get('planName') is not None:
            self.plan_name = m.get('planName')
        return self


class CreateExperimentPlanResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
    ):
        self.headers = headers
        self.status_code = status_code

    def validate(self):
        pass

    def to_map(self):
        _map = super().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
        return result

    def from_map(self, m: dict = 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')
        return self


class CreateExperimentTaskRequestDataSource(TeaModel):
    def __init__(
        self,
        dataset_id: str = None,
        dataset_project: str = None,
        input: Dict[str, Any] = None,
        selected_item_ids: List[str] = None,
        type: str = None,
    ):
        self.dataset_id = dataset_id
        self.dataset_project = dataset_project
        self.input = input
        self.selected_item_ids = selected_item_ids
        self.type = type

    def validate(self):
        pass

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

        result = dict()
        if self.dataset_id is not None:
            result['datasetId'] = self.dataset_id
        if self.dataset_project is not None:
            result['datasetProject'] = self.dataset_project
        if self.input is not None:
            result['input'] = self.input
        if self.selected_item_ids is not None:
            result['selectedItemIds'] = self.selected_item_ids
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('datasetId') is not None:
            self.dataset_id = m.get('datasetId')
        if m.get('datasetProject') is not None:
            self.dataset_project = m.get('datasetProject')
        if m.get('input') is not None:
            self.input = m.get('input')
        if m.get('selectedItemIds') is not None:
            self.selected_item_ids = m.get('selectedItemIds')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class CreateExperimentTaskRequest(TeaModel):
    def __init__(
        self,
        data_source: CreateExperimentTaskRequestDataSource = None,
        experiment_plan_id: str = None,
        experiments: List[ExperimentConfig] = None,
    ):
        self.data_source = data_source
        self.experiment_plan_id = experiment_plan_id
        self.experiments = experiments

    def validate(self):
        if self.data_source:
            self.data_source.validate()
        if self.experiments:
            for k in self.experiments:
                if k:
                    k.validate()

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

        result = dict()
        if self.data_source is not None:
            result['dataSource'] = self.data_source.to_map()
        if self.experiment_plan_id is not None:
            result['experimentPlanId'] = self.experiment_plan_id
        result['experiments'] = []
        if self.experiments is not None:
            for k in self.experiments:
                result['experiments'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dataSource') is not None:
            temp_model = CreateExperimentTaskRequestDataSource()
            self.data_source = temp_model.from_map(m['dataSource'])
        if m.get('experimentPlanId') is not None:
            self.experiment_plan_id = m.get('experimentPlanId')
        self.experiments = []
        if m.get('experiments') is not None:
            for k in m.get('experiments'):
                temp_model = ExperimentConfig()
                self.experiments.append(temp_model.from_map(k))
        return self


class CreateExperimentTaskResponseBody(TeaModel):
    def __init__(
        self,
        message: str = None,
        record_ids: List[str] = None,
        request_id: str = None,
        status: str = None,
    ):
        self.message = message
        self.record_ids = record_ids
        self.request_id = request_id
        self.status = status

    def validate(self):
        pass

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

        result = dict()
        if self.message is not None:
            result['message'] = self.message
        if self.record_ids is not None:
            result['recordIds'] = self.record_ids
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.status is not None:
            result['status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('recordIds') is not None:
            self.record_ids = m.get('recordIds')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class CreateExperimentTaskResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateExperimentTaskResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateIntegrationPolicyRequestEntityGroup(TeaModel):
    def __init__(
        self,
        cluster_entity_type: str = None,
        cluster_id: str = None,
        cluster_namespace: str = None,
        disable_policy_share: bool = None,
        entity_group_id: str = None,
        entity_user_id: str = None,
        vpc_id: str = None,
    ):
        # Cluster entity type, such as acs.ack.cluster/acs.one.cluster/acs.asi.cluster or others.
        self.cluster_entity_type = cluster_entity_type
        # Cluster ID.
        self.cluster_id = cluster_id
        self.cluster_namespace = cluster_namespace
        # Whether to disable the unique binding of the Policy. If enabled, multiple Policies can be created for a single container cluster.
        self.disable_policy_share = disable_policy_share
        # Entity group ID.
        self.entity_group_id = entity_group_id
        # User ID to which the cluster belongs.
        self.entity_user_id = entity_user_id
        # VPC ID.
        self.vpc_id = vpc_id

    def validate(self):
        pass

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

        result = dict()
        if self.cluster_entity_type is not None:
            result['clusterEntityType'] = self.cluster_entity_type
        if self.cluster_id is not None:
            result['clusterId'] = self.cluster_id
        if self.cluster_namespace is not None:
            result['clusterNamespace'] = self.cluster_namespace
        if self.disable_policy_share is not None:
            result['disablePolicyShare'] = self.disable_policy_share
        if self.entity_group_id is not None:
            result['entityGroupId'] = self.entity_group_id
        if self.entity_user_id is not None:
            result['entityUserId'] = self.entity_user_id
        if self.vpc_id is not None:
            result['vpcId'] = self.vpc_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clusterEntityType') is not None:
            self.cluster_entity_type = m.get('clusterEntityType')
        if m.get('clusterId') is not None:
            self.cluster_id = m.get('clusterId')
        if m.get('clusterNamespace') is not None:
            self.cluster_namespace = m.get('clusterNamespace')
        if m.get('disablePolicyShare') is not None:
            self.disable_policy_share = m.get('disablePolicyShare')
        if m.get('entityGroupId') is not None:
            self.entity_group_id = m.get('entityGroupId')
        if m.get('entityUserId') is not None:
            self.entity_user_id = m.get('entityUserId')
        if m.get('vpcId') is not None:
            self.vpc_id = m.get('vpcId')
        return self


class CreateIntegrationPolicyRequestTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # Tag `key` value.
        self.key = key
        # Tag `value` value.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 CreateIntegrationPolicyRequest(TeaModel):
    def __init__(
        self,
        entity_group: CreateIntegrationPolicyRequestEntityGroup = None,
        policy_name: str = None,
        policy_type: str = None,
        resource_group_id: str = None,
        tags: List[CreateIntegrationPolicyRequestTags] = None,
        workspace: str = None,
    ):
        # Entity group for creating the policy. Policies can be quickly created using the entity group, and `clusterId` and `vpcId` are independent of each other.
        self.entity_group = entity_group
        # Policy name
        self.policy_name = policy_name
        # Policy type: CS/ECS/Cloud
        # 
        # This parameter is required.
        self.policy_type = policy_type
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Resource tags.
        self.tags = tags
        # Workspace.
        self.workspace = workspace

    def validate(self):
        if self.entity_group:
            self.entity_group.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

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

        result = dict()
        if self.entity_group is not None:
            result['entityGroup'] = self.entity_group.to_map()
        if self.policy_name is not None:
            result['policyName'] = self.policy_name
        if self.policy_type is not None:
            result['policyType'] = self.policy_type
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('entityGroup') is not None:
            temp_model = CreateIntegrationPolicyRequestEntityGroup()
            self.entity_group = temp_model.from_map(m['entityGroup'])
        if m.get('policyName') is not None:
            self.policy_name = m.get('policyName')
        if m.get('policyType') is not None:
            self.policy_type = m.get('policyType')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = CreateIntegrationPolicyRequestTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateIntegrationPolicyResponseBodyPolicy(TeaModel):
    def __init__(
        self,
        entity_group_id: str = None,
        policy_id: str = None,
        policy_name: str = None,
        policy_type: str = None,
        region_id: str = None,
        user_id: str = None,
        workspace: str = None,
    ):
        # Entity group ID.
        self.entity_group_id = entity_group_id
        # Policy ID.
        self.policy_id = policy_id
        # Policy name.
        self.policy_name = policy_name
        # Policy type.
        self.policy_type = policy_type
        # Region ID.
        self.region_id = region_id
        # User ID.
        self.user_id = user_id
        # The workspace where the Policy resides.
        self.workspace = workspace

    def validate(self):
        pass

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

        result = dict()
        if self.entity_group_id is not None:
            result['entityGroupId'] = self.entity_group_id
        if self.policy_id is not None:
            result['policyId'] = self.policy_id
        if self.policy_name is not None:
            result['policyName'] = self.policy_name
        if self.policy_type is not None:
            result['policyType'] = self.policy_type
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('entityGroupId') is not None:
            self.entity_group_id = m.get('entityGroupId')
        if m.get('policyId') is not None:
            self.policy_id = m.get('policyId')
        if m.get('policyName') is not None:
            self.policy_name = m.get('policyName')
        if m.get('policyType') is not None:
            self.policy_type = m.get('policyType')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateIntegrationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        created: bool = None,
        policy: CreateIntegrationPolicyResponseBodyPolicy = None,
        request_id: str = None,
    ):
        # Whether it is created.
        self.created = created
        # Uploaded policy.
        self.policy = policy
        # Request ID.
        self.request_id = request_id

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

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

        result = dict()
        if self.created is not None:
            result['created'] = self.created
        if self.policy is not None:
            result['policy'] = self.policy.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('created') is not None:
            self.created = m.get('created')
        if m.get('policy') is not None:
            temp_model = CreateIntegrationPolicyResponseBodyPolicy()
            self.policy = temp_model.from_map(m['policy'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateIntegrationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateIntegrationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateMaintainWindowRequest(TeaModel):
    def __init__(
        self,
        body: MaintainWindowForModify = None,
        client_token: str = None,
        workspace: str = None,
    ):
        self.body = body
        self.client_token = client_token
        self.workspace = workspace

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

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

        result = dict()
        if self.body is not None:
            result['body'] = self.body.to_map()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            temp_model = MaintainWindowForModify()
            self.body = temp_model.from_map(m['body'])
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateMaintainWindowResponseBody(TeaModel):
    def __init__(
        self,
        maintain_window_id: str = None,
        request_id: str = None,
    ):
        self.maintain_window_id = maintain_window_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.maintain_window_id is not None:
            result['maintainWindowId'] = self.maintain_window_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('maintainWindowId') is not None:
            self.maintain_window_id = m.get('maintainWindowId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateMaintainWindowResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateMaintainWindowResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateMemoryStoreRequest(TeaModel):
    def __init__(
        self,
        custom_extraction_strategies: List[CustomExtractionStrategy] = None,
        description: str = None,
        enable_graph: bool = None,
        extraction_strategies: List[str] = None,
        memory_store_name: str = None,
        short_term_ttl: int = None,
    ):
        self.custom_extraction_strategies = custom_extraction_strategies
        self.description = description
        self.enable_graph = enable_graph
        self.extraction_strategies = extraction_strategies
        # This parameter is required.
        self.memory_store_name = memory_store_name
        self.short_term_ttl = short_term_ttl

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

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

        result = dict()
        result['customExtractionStrategies'] = []
        if self.custom_extraction_strategies is not None:
            for k in self.custom_extraction_strategies:
                result['customExtractionStrategies'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.enable_graph is not None:
            result['enableGraph'] = self.enable_graph
        if self.extraction_strategies is not None:
            result['extractionStrategies'] = self.extraction_strategies
        if self.memory_store_name is not None:
            result['memoryStoreName'] = self.memory_store_name
        if self.short_term_ttl is not None:
            result['shortTermTtl'] = self.short_term_ttl
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.custom_extraction_strategies = []
        if m.get('customExtractionStrategies') is not None:
            for k in m.get('customExtractionStrategies'):
                temp_model = CustomExtractionStrategy()
                self.custom_extraction_strategies.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enableGraph') is not None:
            self.enable_graph = m.get('enableGraph')
        if m.get('extractionStrategies') is not None:
            self.extraction_strategies = m.get('extractionStrategies')
        if m.get('memoryStoreName') is not None:
            self.memory_store_name = m.get('memoryStoreName')
        if m.get('shortTermTtl') is not None:
            self.short_term_ttl = m.get('shortTermTtl')
        return self


class CreateMemoryStoreResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateMemoryStoreResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateMemoryStoreResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateNotifyStrategyRequest(TeaModel):
    def __init__(
        self,
        body: NotifyStrategyForModify = None,
        client_token: str = None,
        workspace: str = None,
    ):
        self.body = body
        self.client_token = client_token
        self.workspace = workspace

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

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

        result = dict()
        if self.body is not None:
            result['body'] = self.body.to_map()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            temp_model = NotifyStrategyForModify()
            self.body = temp_model.from_map(m['body'])
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateNotifyStrategyResponseBody(TeaModel):
    def __init__(
        self,
        notify_strategy_id: str = None,
        request_id: str = None,
    ):
        self.notify_strategy_id = notify_strategy_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.notify_strategy_id is not None:
            result['notifyStrategyId'] = self.notify_strategy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('notifyStrategyId') is not None:
            self.notify_strategy_id = m.get('notifyStrategyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateNotifyStrategyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateNotifyStrategyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateOncallScheduleRequestRotations(TeaModel):
    def __init__(
        self,
        active_days: List[int] = None,
        contacts: List[str] = None,
        rotation_end_time: str = None,
        rotation_name: str = None,
        rotation_start_time: str = None,
        shift_length: int = None,
        shift_recurrence_frequency: str = None,
        start_date: str = None,
        time_zone: str = None,
    ):
        # This parameter is required.
        self.active_days = active_days
        # This parameter is required.
        self.contacts = contacts
        # This parameter is required.
        self.rotation_end_time = rotation_end_time
        # This parameter is required.
        self.rotation_name = rotation_name
        # This parameter is required.
        self.rotation_start_time = rotation_start_time
        self.shift_length = shift_length
        # This parameter is required.
        self.shift_recurrence_frequency = shift_recurrence_frequency
        # This parameter is required.
        self.start_date = start_date
        # This parameter is required.
        self.time_zone = time_zone

    def validate(self):
        pass

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

        result = dict()
        if self.active_days is not None:
            result['activeDays'] = self.active_days
        if self.contacts is not None:
            result['contacts'] = self.contacts
        if self.rotation_end_time is not None:
            result['rotationEndTime'] = self.rotation_end_time
        if self.rotation_name is not None:
            result['rotationName'] = self.rotation_name
        if self.rotation_start_time is not None:
            result['rotationStartTime'] = self.rotation_start_time
        if self.shift_length is not None:
            result['shiftLength'] = self.shift_length
        if self.shift_recurrence_frequency is not None:
            result['shiftRecurrenceFrequency'] = self.shift_recurrence_frequency
        if self.start_date is not None:
            result['startDate'] = self.start_date
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('activeDays') is not None:
            self.active_days = m.get('activeDays')
        if m.get('contacts') is not None:
            self.contacts = m.get('contacts')
        if m.get('rotationEndTime') is not None:
            self.rotation_end_time = m.get('rotationEndTime')
        if m.get('rotationName') is not None:
            self.rotation_name = m.get('rotationName')
        if m.get('rotationStartTime') is not None:
            self.rotation_start_time = m.get('rotationStartTime')
        if m.get('shiftLength') is not None:
            self.shift_length = m.get('shiftLength')
        if m.get('shiftRecurrenceFrequency') is not None:
            self.shift_recurrence_frequency = m.get('shiftRecurrenceFrequency')
        if m.get('startDate') is not None:
            self.start_date = m.get('startDate')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        return self


class CreateOncallScheduleRequest(TeaModel):
    def __init__(
        self,
        oncall_schedule_id: str = None,
        oncall_schedule_name: str = None,
        rotations: List[CreateOncallScheduleRequestRotations] = None,
        shift_robot_id: str = None,
        source: str = None,
    ):
        self.oncall_schedule_id = oncall_schedule_id
        self.oncall_schedule_name = oncall_schedule_name
        self.rotations = rotations
        self.shift_robot_id = shift_robot_id
        self.source = source

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

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

        result = dict()
        if self.oncall_schedule_id is not None:
            result['oncallScheduleId'] = self.oncall_schedule_id
        if self.oncall_schedule_name is not None:
            result['oncallScheduleName'] = self.oncall_schedule_name
        result['rotations'] = []
        if self.rotations is not None:
            for k in self.rotations:
                result['rotations'].append(k.to_map() if k else None)
        if self.shift_robot_id is not None:
            result['shiftRobotId'] = self.shift_robot_id
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('oncallScheduleId') is not None:
            self.oncall_schedule_id = m.get('oncallScheduleId')
        if m.get('oncallScheduleName') is not None:
            self.oncall_schedule_name = m.get('oncallScheduleName')
        self.rotations = []
        if m.get('rotations') is not None:
            for k in m.get('rotations'):
                temp_model = CreateOncallScheduleRequestRotations()
                self.rotations.append(temp_model.from_map(k))
        if m.get('shiftRobotId') is not None:
            self.shift_robot_id = m.get('shiftRobotId')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class CreateOncallScheduleResponseBody(TeaModel):
    def __init__(
        self,
        oncall_schedule_id: str = None,
        request_id: str = None,
    ):
        self.oncall_schedule_id = oncall_schedule_id
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.oncall_schedule_id is not None:
            result['oncallScheduleId'] = self.oncall_schedule_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('oncallScheduleId') is not None:
            self.oncall_schedule_id = m.get('oncallScheduleId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateOncallScheduleResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateOncallScheduleResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreatePipelineRequestExecutePolicyRunOnce(TeaModel):
    def __init__(
        self,
        from_time: int = None,
        to_time: int = None,
    ):
        self.from_time = from_time
        self.to_time = to_time

    def validate(self):
        pass

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

        result = dict()
        if self.from_time is not None:
            result['fromTime'] = self.from_time
        if self.to_time is not None:
            result['toTime'] = self.to_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('fromTime') is not None:
            self.from_time = m.get('fromTime')
        if m.get('toTime') is not None:
            self.to_time = m.get('toTime')
        return self


class CreatePipelineRequestExecutePolicyScheduled(TeaModel):
    def __init__(
        self,
        interval: str = None,
    ):
        self.interval = interval

    def validate(self):
        pass

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

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

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


class CreatePipelineRequestExecutePolicy(TeaModel):
    def __init__(
        self,
        mode: str = None,
        run_once: CreatePipelineRequestExecutePolicyRunOnce = None,
        scheduled: CreatePipelineRequestExecutePolicyScheduled = None,
    ):
        self.mode = mode
        self.run_once = run_once
        self.scheduled = scheduled

    def validate(self):
        if self.run_once:
            self.run_once.validate()
        if self.scheduled:
            self.scheduled.validate()

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

        result = dict()
        if self.mode is not None:
            result['mode'] = self.mode
        if self.run_once is not None:
            result['runOnce'] = self.run_once.to_map()
        if self.scheduled is not None:
            result['scheduled'] = self.scheduled.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('mode') is not None:
            self.mode = m.get('mode')
        if m.get('runOnce') is not None:
            temp_model = CreatePipelineRequestExecutePolicyRunOnce()
            self.run_once = temp_model.from_map(m['runOnce'])
        if m.get('scheduled') is not None:
            temp_model = CreatePipelineRequestExecutePolicyScheduled()
            self.scheduled = temp_model.from_map(m['scheduled'])
        return self


class CreatePipelineRequestPipelineNodes(TeaModel):
    def __init__(
        self,
        id: str = None,
        parameters: Dict[str, Any] = None,
        type: str = None,
    ):
        self.id = id
        self.parameters = parameters
        self.type = type

    def validate(self):
        pass

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

        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.parameters is not None:
            result['parameters'] = self.parameters
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('parameters') is not None:
            self.parameters = m.get('parameters')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class CreatePipelineRequestPipeline(TeaModel):
    def __init__(
        self,
        nodes: List[CreatePipelineRequestPipelineNodes] = None,
    ):
        self.nodes = nodes

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

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

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

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


class CreatePipelineRequestSinkDataset(TeaModel):
    def __init__(
        self,
        dataset: str = None,
        workspace: str = None,
    ):
        self.dataset = dataset
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class CreatePipelineRequestSink(TeaModel):
    def __init__(
        self,
        dataset: CreatePipelineRequestSinkDataset = None,
        type: str = None,
    ):
        self.dataset = dataset
        self.type = type

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

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dataset') is not None:
            temp_model = CreatePipelineRequestSinkDataset()
            self.dataset = temp_model.from_map(m['dataset'])
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class CreatePipelineRequestSourceLogstore(TeaModel):
    def __init__(
        self,
        logstore: str = None,
        project: str = None,
    ):
        self.logstore = logstore
        self.project = project

    def validate(self):
        pass

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

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

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


class CreatePipelineRequestSource(TeaModel):
    def __init__(
        self,
        logstore: CreatePipelineRequestSourceLogstore = None,
        type: str = None,
    ):
        self.logstore = logstore
        self.type = type

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

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('logstore') is not None:
            temp_model = CreatePipelineRequestSourceLogstore()
            self.logstore = temp_model.from_map(m['logstore'])
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class CreatePipelineRequest(TeaModel):
    def __init__(
        self,
        description: str = None,
        execute_policy: CreatePipelineRequestExecutePolicy = None,
        pipeline: CreatePipelineRequestPipeline = None,
        pipeline_name: str = None,
        sink: CreatePipelineRequestSink = None,
        source: CreatePipelineRequestSource = None,
    ):
        self.description = description
        self.execute_policy = execute_policy
        self.pipeline = pipeline
        self.pipeline_name = pipeline_name
        self.sink = sink
        self.source = source

    def validate(self):
        if self.execute_policy:
            self.execute_policy.validate()
        if self.pipeline:
            self.pipeline.validate()
        if self.sink:
            self.sink.validate()
        if self.source:
            self.source.validate()

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.execute_policy is not None:
            result['executePolicy'] = self.execute_policy.to_map()
        if self.pipeline is not None:
            result['pipeline'] = self.pipeline.to_map()
        if self.pipeline_name is not None:
            result['pipelineName'] = self.pipeline_name
        if self.sink is not None:
            result['sink'] = self.sink.to_map()
        if self.source is not None:
            result['source'] = self.source.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('executePolicy') is not None:
            temp_model = CreatePipelineRequestExecutePolicy()
            self.execute_policy = temp_model.from_map(m['executePolicy'])
        if m.get('pipeline') is not None:
            temp_model = CreatePipelineRequestPipeline()
            self.pipeline = temp_model.from_map(m['pipeline'])
        if m.get('pipelineName') is not None:
            self.pipeline_name = m.get('pipelineName')
        if m.get('sink') is not None:
            temp_model = CreatePipelineRequestSink()
            self.sink = temp_model.from_map(m['sink'])
        if m.get('source') is not None:
            temp_model = CreatePipelineRequestSource()
            self.source = temp_model.from_map(m['source'])
        return self


class CreatePipelineResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreatePipelineResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreatePipelineResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreatePrometheusClusterRequestTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        self.key = key
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 CreatePrometheusClusterRequest(TeaModel):
    def __init__(
        self,
        auth_free_write_policy: str = None,
        enable_auth_free_write: bool = None,
        hash_label_key: str = None,
        payment_type: str = None,
        prometheus_cluster_name: str = None,
        replicas: int = None,
        resource_group_id: str = None,
        storage_duration: int = None,
        tags: List[CreatePrometheusClusterRequestTags] = None,
    ):
        self.auth_free_write_policy = auth_free_write_policy
        self.enable_auth_free_write = enable_auth_free_write
        # This parameter is required.
        self.hash_label_key = hash_label_key
        self.payment_type = payment_type
        # This parameter is required.
        self.prometheus_cluster_name = prometheus_cluster_name
        # This parameter is required.
        self.replicas = replicas
        self.resource_group_id = resource_group_id
        self.storage_duration = storage_duration
        self.tags = tags

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

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

        result = dict()
        if self.auth_free_write_policy is not None:
            result['authFreeWritePolicy'] = self.auth_free_write_policy
        if self.enable_auth_free_write is not None:
            result['enableAuthFreeWrite'] = self.enable_auth_free_write
        if self.hash_label_key is not None:
            result['hashLabelKey'] = self.hash_label_key
        if self.payment_type is not None:
            result['paymentType'] = self.payment_type
        if self.prometheus_cluster_name is not None:
            result['prometheusClusterName'] = self.prometheus_cluster_name
        if self.replicas is not None:
            result['replicas'] = self.replicas
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.storage_duration is not None:
            result['storageDuration'] = self.storage_duration
        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: dict = None):
        m = m or dict()
        if m.get('authFreeWritePolicy') is not None:
            self.auth_free_write_policy = m.get('authFreeWritePolicy')
        if m.get('enableAuthFreeWrite') is not None:
            self.enable_auth_free_write = m.get('enableAuthFreeWrite')
        if m.get('hashLabelKey') is not None:
            self.hash_label_key = m.get('hashLabelKey')
        if m.get('paymentType') is not None:
            self.payment_type = m.get('paymentType')
        if m.get('prometheusClusterName') is not None:
            self.prometheus_cluster_name = m.get('prometheusClusterName')
        if m.get('replicas') is not None:
            self.replicas = m.get('replicas')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('storageDuration') is not None:
            self.storage_duration = m.get('storageDuration')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = CreatePrometheusClusterRequestTags()
                self.tags.append(temp_model.from_map(k))
        return self


class CreatePrometheusClusterResponseBody(TeaModel):
    def __init__(
        self,
        prometheus_cluster_name: str = None,
        request_id: str = None,
    ):
        self.prometheus_cluster_name = prometheus_cluster_name
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.prometheus_cluster_name is not None:
            result['prometheusClusterName'] = self.prometheus_cluster_name
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusClusterName') is not None:
            self.prometheus_cluster_name = m.get('prometheusClusterName')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreatePrometheusClusterResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreatePrometheusClusterResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreatePrometheusInstanceRequestTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # Tag key.
        self.key = key
        # Tag value.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 CreatePrometheusInstanceRequest(TeaModel):
    def __init__(
        self,
        archive_duration: int = None,
        auth_free_read_policy: str = None,
        auth_free_write_policy: str = None,
        basic_metric_query_limit: bool = None,
        enable_auth_free_read: bool = None,
        enable_auth_free_write: bool = None,
        enable_auth_token: bool = None,
        payment_type: str = None,
        prometheus_instance_name: str = None,
        resource_group_id: str = None,
        status: str = None,
        storage_duration: int = None,
        tags: List[CreatePrometheusInstanceRequestTags] = None,
        workspace: str = None,
    ):
        # The number of days to automatically archive and save after the storage expires, 0 means no archiving. The range of archiving days is as follows:
        # * V1: 60~365 days.
        # * V2: 60~3650 days (3650 indicates permanent storage).
        self.archive_duration = archive_duration
        # Password-free read policy (supports IP segments and VpcId).
        self.auth_free_read_policy = auth_free_read_policy
        # Password-free write policy.
        self.auth_free_write_policy = auth_free_write_policy
        self.basic_metric_query_limit = basic_metric_query_limit
        # Whether to enable password-free read (only supported in V2 version).
        self.enable_auth_free_read = enable_auth_free_read
        # Whether to enable password-free write (only supported in V2 version).
        self.enable_auth_free_write = enable_auth_free_write
        # Whether to enable authorization Token (only supported in V1 version).
        self.enable_auth_token = enable_auth_token
        # Billing method:
        # * POSTPAY: Postpaid by metric reporting volume.
        # * POSTPAY_GB: Postpaid by metric write volume.
        # Note, if left blank, the user\\"s default billing method configuration will be used. If the user has not configured a default, the system defaults to billing by metric reporting volume.
        self.payment_type = payment_type
        # Instance name.
        # 
        # This parameter is required.
        self.prometheus_instance_name = prometheus_instance_name
        self.resource_group_id = resource_group_id
        # Instance status.
        self.status = status
        # Storage duration (days):
        # * By write volume: 90, 180.
        # * By metric reporting volume: 15, 30, 60, 90, 180.
        self.storage_duration = storage_duration
        # Tag values.
        self.tags = tags
        # Belonging workspace, default value: default-cms-{userId}-{regionId}.
        self.workspace = workspace

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

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

        result = dict()
        if self.archive_duration is not None:
            result['archiveDuration'] = self.archive_duration
        if self.auth_free_read_policy is not None:
            result['authFreeReadPolicy'] = self.auth_free_read_policy
        if self.auth_free_write_policy is not None:
            result['authFreeWritePolicy'] = self.auth_free_write_policy
        if self.basic_metric_query_limit is not None:
            result['basicMetricQueryLimit'] = self.basic_metric_query_limit
        if self.enable_auth_free_read is not None:
            result['enableAuthFreeRead'] = self.enable_auth_free_read
        if self.enable_auth_free_write is not None:
            result['enableAuthFreeWrite'] = self.enable_auth_free_write
        if self.enable_auth_token is not None:
            result['enableAuthToken'] = self.enable_auth_token
        if self.payment_type is not None:
            result['paymentType'] = self.payment_type
        if self.prometheus_instance_name is not None:
            result['prometheusInstanceName'] = self.prometheus_instance_name
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.status is not None:
            result['status'] = self.status
        if self.storage_duration is not None:
            result['storageDuration'] = self.storage_duration
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('archiveDuration') is not None:
            self.archive_duration = m.get('archiveDuration')
        if m.get('authFreeReadPolicy') is not None:
            self.auth_free_read_policy = m.get('authFreeReadPolicy')
        if m.get('authFreeWritePolicy') is not None:
            self.auth_free_write_policy = m.get('authFreeWritePolicy')
        if m.get('basicMetricQueryLimit') is not None:
            self.basic_metric_query_limit = m.get('basicMetricQueryLimit')
        if m.get('enableAuthFreeRead') is not None:
            self.enable_auth_free_read = m.get('enableAuthFreeRead')
        if m.get('enableAuthFreeWrite') is not None:
            self.enable_auth_free_write = m.get('enableAuthFreeWrite')
        if m.get('enableAuthToken') is not None:
            self.enable_auth_token = m.get('enableAuthToken')
        if m.get('paymentType') is not None:
            self.payment_type = m.get('paymentType')
        if m.get('prometheusInstanceName') is not None:
            self.prometheus_instance_name = m.get('prometheusInstanceName')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('storageDuration') is not None:
            self.storage_duration = m.get('storageDuration')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = CreatePrometheusInstanceRequestTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreatePrometheusInstanceResponseBody(TeaModel):
    def __init__(
        self,
        prometheus_instance_id: str = None,
        request_id: str = None,
    ):
        # Instance ID.
        self.prometheus_instance_id = prometheus_instance_id
        # ID of the request.
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.prometheus_instance_id is not None:
            result['prometheusInstanceId'] = self.prometheus_instance_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusInstanceId') is not None:
            self.prometheus_instance_id = m.get('prometheusInstanceId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreatePrometheusInstanceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreatePrometheusInstanceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreatePrometheusViewRequestPrometheusInstances(TeaModel):
    def __init__(
        self,
        prometheus_instance_id: str = None,
        region_id: str = None,
        user_id: str = None,
    ):
        # Instance ID.
        self.prometheus_instance_id = prometheus_instance_id
        # Region ID.
        self.region_id = region_id
        # User ID.
        self.user_id = user_id

    def validate(self):
        pass

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

        result = dict()
        if self.prometheus_instance_id is not None:
            result['prometheusInstanceId'] = self.prometheus_instance_id
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusInstanceId') is not None:
            self.prometheus_instance_id = m.get('prometheusInstanceId')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class CreatePrometheusViewRequestTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # Tag key.
        self.key = key
        # Tag value.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 CreatePrometheusViewRequest(TeaModel):
    def __init__(
        self,
        auth_free_read_policy: str = None,
        enable_auth_free_read: bool = None,
        enable_auth_token: bool = None,
        prometheus_instances: List[CreatePrometheusViewRequestPrometheusInstances] = None,
        prometheus_view_name: str = None,
        resource_group_id: str = None,
        status: str = None,
        tags: List[CreatePrometheusViewRequestTags] = None,
        version: str = None,
        workspace: str = None,
    ):
        # Not enabled yet
        self.auth_free_read_policy = auth_free_read_policy
        # Whether to support password-free read
        self.enable_auth_free_read = enable_auth_free_read
        # Whether to support authToken
        self.enable_auth_token = enable_auth_token
        # List of Prometheus instances.
        # 
        # This parameter is required.
        self.prometheus_instances = prometheus_instances
        # Prometheus view name.
        # 
        # This parameter is required.
        self.prometheus_view_name = prometheus_view_name
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Not enabled yet.
        self.status = status
        # The operation to be performed.
        self.tags = tags
        # - V1: Old version
        # - V2: New version
        # 
        # This parameter is required.
        self.version = version
        # Default value: default-cms-{userId}-{regionId}
        self.workspace = workspace

    def validate(self):
        if self.prometheus_instances:
            for k in self.prometheus_instances:
                if k:
                    k.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

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

        result = dict()
        if self.auth_free_read_policy is not None:
            result['authFreeReadPolicy'] = self.auth_free_read_policy
        if self.enable_auth_free_read is not None:
            result['enableAuthFreeRead'] = self.enable_auth_free_read
        if self.enable_auth_token is not None:
            result['enableAuthToken'] = self.enable_auth_token
        result['prometheusInstances'] = []
        if self.prometheus_instances is not None:
            for k in self.prometheus_instances:
                result['prometheusInstances'].append(k.to_map() if k else None)
        if self.prometheus_view_name is not None:
            result['prometheusViewName'] = self.prometheus_view_name
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.status is not None:
            result['status'] = self.status
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('authFreeReadPolicy') is not None:
            self.auth_free_read_policy = m.get('authFreeReadPolicy')
        if m.get('enableAuthFreeRead') is not None:
            self.enable_auth_free_read = m.get('enableAuthFreeRead')
        if m.get('enableAuthToken') is not None:
            self.enable_auth_token = m.get('enableAuthToken')
        self.prometheus_instances = []
        if m.get('prometheusInstances') is not None:
            for k in m.get('prometheusInstances'):
                temp_model = CreatePrometheusViewRequestPrometheusInstances()
                self.prometheus_instances.append(temp_model.from_map(k))
        if m.get('prometheusViewName') is not None:
            self.prometheus_view_name = m.get('prometheusViewName')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('status') is not None:
            self.status = m.get('status')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = CreatePrometheusViewRequestTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreatePrometheusViewResponseBody(TeaModel):
    def __init__(
        self,
        prometheus_view_id: str = None,
        request_id: str = None,
    ):
        # Prometheus view ID.
        self.prometheus_view_id = prometheus_view_id
        # ID of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.prometheus_view_id is not None:
            result['prometheusViewId'] = self.prometheus_view_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusViewId') is not None:
            self.prometheus_view_id = m.get('prometheusViewId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreatePrometheusViewResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreatePrometheusViewResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreatePrometheusVirtualInstanceRequest(TeaModel):
    def __init__(
        self,
        namespace: str = None,
    ):
        # Each cloud product can only create one virtual instance in each region.
        # 
        # This parameter is required.
        self.namespace = namespace

    def validate(self):
        pass

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

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

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


class CreatePrometheusVirtualInstanceResponseBodyInstance(TeaModel):
    def __init__(
        self,
        created_at: str = None,
        http_api_url: str = None,
        instance_id: str = None,
        namespace: str = None,
        region_id: str = None,
        user_id: str = None,
    ):
        # Creation time
        self.created_at = created_at
        # HTTP API query address
        self.http_api_url = http_api_url
        # Region ID
        self.instance_id = instance_id
        # Cloud product
        self.namespace = namespace
        # User ID
        self.region_id = region_id
        # User ID
        self.user_id = user_id

    def validate(self):
        pass

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

        result = dict()
        if self.created_at is not None:
            result['createdAt'] = self.created_at
        if self.http_api_url is not None:
            result['httpApiUrl'] = self.http_api_url
        if self.instance_id is not None:
            result['instanceId'] = self.instance_id
        if self.namespace is not None:
            result['namespace'] = self.namespace
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createdAt') is not None:
            self.created_at = m.get('createdAt')
        if m.get('httpApiUrl') is not None:
            self.http_api_url = m.get('httpApiUrl')
        if m.get('instanceId') is not None:
            self.instance_id = m.get('instanceId')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class CreatePrometheusVirtualInstanceResponseBody(TeaModel):
    def __init__(
        self,
        instance: CreatePrometheusVirtualInstanceResponseBodyInstance = None,
        request_id: str = None,
    ):
        # Instance ID
        self.instance = instance
        # ID of the request
        self.request_id = request_id

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

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

        result = dict()
        if self.instance is not None:
            result['instance'] = self.instance.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('instance') is not None:
            temp_model = CreatePrometheusVirtualInstanceResponseBodyInstance()
            self.instance = temp_model.from_map(m['instance'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreatePrometheusVirtualInstanceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreatePrometheusVirtualInstanceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateServiceRequestTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        self.key = key
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 CreateServiceRequest(TeaModel):
    def __init__(
        self,
        attributes: str = None,
        description: str = None,
        display_name: str = None,
        pid: str = None,
        resource_group_id: str = None,
        service_name: str = None,
        service_status: str = None,
        service_type: str = None,
        tags: List[CreateServiceRequestTags] = None,
    ):
        # Extended attributes.
        self.attributes = attributes
        # Service description, only valid when `serviceType=RUM`.
        self.description = description
        # Display name, only valid when `serviceType=RUM`.
        self.display_name = display_name
        # Application ID, generally not required to be specified.
        self.pid = pid
        self.resource_group_id = resource_group_id
        # Service name
        # 
        # This parameter is required.
        self.service_name = service_name
        # Service status, not required for service creation.
        self.service_status = service_status
        # Service type
        # 
        # This parameter is required.
        self.service_type = service_type
        self.tags = tags

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

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

        result = dict()
        if self.attributes is not None:
            result['attributes'] = self.attributes
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.pid is not None:
            result['pid'] = self.pid
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.service_name is not None:
            result['serviceName'] = self.service_name
        if self.service_status is not None:
            result['serviceStatus'] = self.service_status
        if self.service_type is not None:
            result['serviceType'] = self.service_type
        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: dict = None):
        m = m or dict()
        if m.get('attributes') is not None:
            self.attributes = m.get('attributes')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('pid') is not None:
            self.pid = m.get('pid')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('serviceName') is not None:
            self.service_name = m.get('serviceName')
        if m.get('serviceStatus') is not None:
            self.service_status = m.get('serviceStatus')
        if m.get('serviceType') is not None:
            self.service_type = m.get('serviceType')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = CreateServiceRequestTags()
                self.tags.append(temp_model.from_map(k))
        return self


class CreateServiceResponseBody(TeaModel):
    def __init__(
        self,
        pid: str = None,
        request_id: str = None,
        service_id: str = None,
    ):
        # Historical compatible ARMS application ID
        self.pid = pid
        # Request ID.
        self.request_id = request_id
        # Service ID
        self.service_id = service_id

    def validate(self):
        pass

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

        result = dict()
        if self.pid is not None:
            result['pid'] = self.pid
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.service_id is not None:
            result['serviceId'] = self.service_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('pid') is not None:
            self.pid = m.get('pid')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('serviceId') is not None:
            self.service_id = m.get('serviceId')
        return self


class CreateServiceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateServiceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateServiceObservabilityResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class CreateServiceObservabilityResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateServiceObservabilityResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateServiceTaskRequest(TeaModel):
    def __init__(
        self,
        ip: str = None,
        type: str = None,
    ):
        # This parameter is required.
        self.ip = ip
        self.type = type

    def validate(self):
        pass

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

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

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


class CreateServiceTaskResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        task_id: str = None,
    ):
        self.request_id = request_id
        self.task_id = task_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.task_id is not None:
            result['taskId'] = self.task_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('taskId') is not None:
            self.task_id = m.get('taskId')
        return self


class CreateServiceTaskResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateServiceTaskResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateSiteMonitorRequestCustomSchedule(TeaModel):
    def __init__(
        self,
        days: List[int] = None,
        end_hour: int = None,
        start_hour: int = None,
        time_zone: str = None,
    ):
        self.days = days
        self.end_hour = end_hour
        self.start_hour = start_hour
        self.time_zone = time_zone

    def validate(self):
        pass

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

        result = dict()
        if self.days is not None:
            result['days'] = self.days
        if self.end_hour is not None:
            result['endHour'] = self.end_hour
        if self.start_hour is not None:
            result['startHour'] = self.start_hour
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('days') is not None:
            self.days = m.get('days')
        if m.get('endHour') is not None:
            self.end_hour = m.get('endHour')
        if m.get('startHour') is not None:
            self.start_hour = m.get('startHour')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        return self


class CreateSiteMonitorRequestIspCities(TeaModel):
    def __init__(
        self,
        city: str = None,
        isp: str = None,
        type: str = None,
    ):
        self.city = city
        self.isp = isp
        self.type = type

    def validate(self):
        pass

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

        result = dict()
        if self.city is not None:
            result['city'] = self.city
        if self.isp is not None:
            result['isp'] = self.isp
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('city') is not None:
            self.city = m.get('city')
        if m.get('isp') is not None:
            self.isp = m.get('isp')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class CreateSiteMonitorRequestVpcConfig(TeaModel):
    def __init__(
        self,
        region: str = None,
        security_group_id: str = None,
        vpc_id: str = None,
        vswitch_id: str = None,
    ):
        self.region = region
        self.security_group_id = security_group_id
        self.vpc_id = vpc_id
        self.vswitch_id = vswitch_id

    def validate(self):
        pass

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

        result = dict()
        if self.region is not None:
            result['region'] = self.region
        if self.security_group_id is not None:
            result['securityGroupId'] = self.security_group_id
        if self.vpc_id is not None:
            result['vpcId'] = self.vpc_id
        if self.vswitch_id is not None:
            result['vswitchId'] = self.vswitch_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('securityGroupId') is not None:
            self.security_group_id = m.get('securityGroupId')
        if m.get('vpcId') is not None:
            self.vpc_id = m.get('vpcId')
        if m.get('vswitchId') is not None:
            self.vswitch_id = m.get('vswitchId')
        return self


class CreateSiteMonitorRequest(TeaModel):
    def __init__(
        self,
        address: str = None,
        agent_group: str = None,
        custom_schedule: CreateSiteMonitorRequestCustomSchedule = None,
        interval: int = None,
        interval_unit: str = None,
        isp_cities: List[CreateSiteMonitorRequestIspCities] = None,
        option: str = None,
        task_labels: str = None,
        task_name: str = None,
        task_type: str = None,
        vpc_config: CreateSiteMonitorRequestVpcConfig = None,
        client_token: str = None,
    ):
        # This parameter is required.
        self.address = address
        self.agent_group = agent_group
        self.custom_schedule = custom_schedule
        self.interval = interval
        self.interval_unit = interval_unit
        self.isp_cities = isp_cities
        self.option = option
        self.task_labels = task_labels
        # This parameter is required.
        self.task_name = task_name
        # This parameter is required.
        self.task_type = task_type
        self.vpc_config = vpc_config
        self.client_token = client_token

    def validate(self):
        if self.custom_schedule:
            self.custom_schedule.validate()
        if self.isp_cities:
            for k in self.isp_cities:
                if k:
                    k.validate()
        if self.vpc_config:
            self.vpc_config.validate()

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

        result = dict()
        if self.address is not None:
            result['address'] = self.address
        if self.agent_group is not None:
            result['agentGroup'] = self.agent_group
        if self.custom_schedule is not None:
            result['customSchedule'] = self.custom_schedule.to_map()
        if self.interval is not None:
            result['interval'] = self.interval
        if self.interval_unit is not None:
            result['intervalUnit'] = self.interval_unit
        result['ispCities'] = []
        if self.isp_cities is not None:
            for k in self.isp_cities:
                result['ispCities'].append(k.to_map() if k else None)
        if self.option is not None:
            result['option'] = self.option
        if self.task_labels is not None:
            result['taskLabels'] = self.task_labels
        if self.task_name is not None:
            result['taskName'] = self.task_name
        if self.task_type is not None:
            result['taskType'] = self.task_type
        if self.vpc_config is not None:
            result['vpcConfig'] = self.vpc_config.to_map()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('address') is not None:
            self.address = m.get('address')
        if m.get('agentGroup') is not None:
            self.agent_group = m.get('agentGroup')
        if m.get('customSchedule') is not None:
            temp_model = CreateSiteMonitorRequestCustomSchedule()
            self.custom_schedule = temp_model.from_map(m['customSchedule'])
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('intervalUnit') is not None:
            self.interval_unit = m.get('intervalUnit')
        self.isp_cities = []
        if m.get('ispCities') is not None:
            for k in m.get('ispCities'):
                temp_model = CreateSiteMonitorRequestIspCities()
                self.isp_cities.append(temp_model.from_map(k))
        if m.get('option') is not None:
            self.option = m.get('option')
        if m.get('taskLabels') is not None:
            self.task_labels = m.get('taskLabels')
        if m.get('taskName') is not None:
            self.task_name = m.get('taskName')
        if m.get('taskType') is not None:
            self.task_type = m.get('taskType')
        if m.get('vpcConfig') is not None:
            temp_model = CreateSiteMonitorRequestVpcConfig()
            self.vpc_config = temp_model.from_map(m['vpcConfig'])
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        return self


class CreateSiteMonitorResponseBodyTaskInfo(TeaModel):
    def __init__(
        self,
        task_id: str = None,
        task_name: str = None,
    ):
        self.task_id = task_id
        self.task_name = task_name

    def validate(self):
        pass

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

        result = dict()
        if self.task_id is not None:
            result['taskId'] = self.task_id
        if self.task_name is not None:
            result['taskName'] = self.task_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('taskId') is not None:
            self.task_id = m.get('taskId')
        if m.get('taskName') is not None:
            self.task_name = m.get('taskName')
        return self


class CreateSiteMonitorResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        task_info: CreateSiteMonitorResponseBodyTaskInfo = None,
    ):
        self.request_id = request_id
        self.task_info = task_info

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

    def to_map(self):
        _map = super().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.task_info is not None:
            result['taskInfo'] = self.task_info.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('taskInfo') is not None:
            temp_model = CreateSiteMonitorResponseBodyTaskInfo()
            self.task_info = temp_model.from_map(m['taskInfo'])
        return self


class CreateSiteMonitorResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateSiteMonitorResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateSubscriptionRequest(TeaModel):
    def __init__(
        self,
        body: SubscriptionForModify = None,
        client_token: str = None,
        workspace: str = None,
    ):
        self.body = body
        self.client_token = client_token
        self.workspace = workspace

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

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

        result = dict()
        if self.body is not None:
            result['body'] = self.body.to_map()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            temp_model = SubscriptionForModify()
            self.body = temp_model.from_map(m['body'])
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateSubscriptionResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        subscription_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.subscription_id = subscription_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.subscription_id is not None:
            result['subscriptionId'] = self.subscription_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('subscriptionId') is not None:
            self.subscription_id = m.get('subscriptionId')
        return self


class CreateSubscriptionResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateSubscriptionResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateThreadRequestVariables(TeaModel):
    def __init__(
        self,
        project: str = None,
        workspace: str = None,
    ):
        self.project = project
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class CreateThreadRequest(TeaModel):
    def __init__(
        self,
        title: str = None,
        variables: CreateThreadRequestVariables = None,
    ):
        self.title = title
        self.variables = variables

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

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('variables') is not None:
            temp_model = CreateThreadRequestVariables()
            self.variables = temp_model.from_map(m['variables'])
        return self


class CreateThreadResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        thread_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.thread_id = thread_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.thread_id is not None:
            result['threadId'] = self.thread_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('threadId') is not None:
            self.thread_id = m.get('threadId')
        return self


class CreateThreadResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateThreadResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateTicketRequest(TeaModel):
    def __init__(
        self,
        access_token_expiration_time: int = None,
        expiration_time: int = None,
    ):
        # - Access token expiration time (in seconds), which is the expiration time for the user to access the page interface. The default value is 86400 seconds (one day), and the range of values is from 0 to 86400 seconds (one day).
        # - The access token expiration time is the minimum value between `accessTokenExpirationTime` and `expirationTime`.
        # - If called through STS, the access token expiration time (i.e., the time during which the user can access the page interface) is the minimum value among `accessTokenExpirationTime`, `expirationTime`, and the STS expiration time.
        self.access_token_expiration_time = access_token_expiration_time
        # - Expiration time (in seconds), which is the expiration time for the embedded page URL. The default value is 86400 seconds (one day), and the range of values is from 0 to 2592000 seconds (30 days).
        self.expiration_time = expiration_time

    def validate(self):
        pass

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

        result = dict()
        if self.access_token_expiration_time is not None:
            result['accessTokenExpirationTime'] = self.access_token_expiration_time
        if self.expiration_time is not None:
            result['expirationTime'] = self.expiration_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('accessTokenExpirationTime') is not None:
            self.access_token_expiration_time = m.get('accessTokenExpirationTime')
        if m.get('expirationTime') is not None:
            self.expiration_time = m.get('expirationTime')
        return self


class CreateTicketResponseBody(TeaModel):
    def __init__(
        self,
        ticket: str = None,
    ):
        # 免登录票据。
        self.ticket = ticket

    def validate(self):
        pass

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

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

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


class CreateTicketResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateTicketResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateTransformerRequest(TeaModel):
    def __init__(
        self,
        body: TransformerForModify = None,
        client_token: str = None,
        workspace: str = None,
    ):
        self.body = body
        self.client_token = client_token
        self.workspace = workspace

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

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

        result = dict()
        if self.body is not None:
            result['body'] = self.body.to_map()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            temp_model = TransformerForModify()
            self.body = temp_model.from_map(m['body'])
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateTransformerResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        transformer_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.transformer_id = transformer_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.transformer_id is not None:
            result['transformerId'] = self.transformer_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('transformerId') is not None:
            self.transformer_id = m.get('transformerId')
        return self


class CreateTransformerResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateTransformerResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class CreateUmodelHeaders(TeaModel):
    def __init__(
        self,
        common_headers: Dict[str, str] = None,
        log_version: str = None,
    ):
        self.common_headers = common_headers
        self.log_version = log_version

    def validate(self):
        pass

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

        result = dict()
        if self.common_headers is not None:
            result['commonHeaders'] = self.common_headers
        if self.log_version is not None:
            result['logVersion'] = self.log_version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('commonHeaders') is not None:
            self.common_headers = m.get('commonHeaders')
        if m.get('logVersion') is not None:
            self.log_version = m.get('logVersion')
        return self


class CreateUmodelRequest(TeaModel):
    def __init__(
        self,
        description: str = None,
    ):
        # Umodel description
        self.description = description

    def validate(self):
        pass

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

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

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


class CreateUmodelResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        workspace: str = None,
    ):
        # Request ID
        self.request_id = request_id
        # Workspace name
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateUmodelResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: CreateUmodelResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteAddonReleaseRequest(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        force: bool = None,
        release_name: str = None,
    ):
        # Addon name. When AddonName is provided, it will ignore the ReleaseName parameter and batch uninstall all AddonReleases belonging to the same Addon.
        self.addon_name = addon_name
        # Whether to force deletion, default is false.
        self.force = force
        # The name of the AddonRelease.
        self.release_name = release_name

    def validate(self):
        pass

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

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.force is not None:
            result['force'] = self.force
        if self.release_name is not None:
            result['releaseName'] = self.release_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('force') is not None:
            self.force = m.get('force')
        if m.get('releaseName') is not None:
            self.release_name = m.get('releaseName')
        return self


class DeleteAddonReleaseResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Request ID.
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteAddonReleaseResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteAddonReleaseResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteAggTaskGroupResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Request ID.
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteAggTaskGroupResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteAggTaskGroupResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteAlertActionsRequest(TeaModel):
    def __init__(
        self,
        alert_action_ids: List[str] = None,
        source: str = None,
    ):
        # This parameter is required.
        self.alert_action_ids = alert_action_ids
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.alert_action_ids is not None:
            result['alertActionIds'] = self.alert_action_ids
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionIds') is not None:
            self.alert_action_ids = m.get('alertActionIds')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class DeleteAlertActionsShrinkRequest(TeaModel):
    def __init__(
        self,
        alert_action_ids_shrink: str = None,
        source: str = None,
    ):
        # This parameter is required.
        self.alert_action_ids_shrink = alert_action_ids_shrink
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.alert_action_ids_shrink is not None:
            result['alertActionIds'] = self.alert_action_ids_shrink
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionIds') is not None:
            self.alert_action_ids_shrink = m.get('alertActionIds')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class DeleteAlertActionsResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteAlertActionsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteAlertActionsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteAlertEventIntegrationPolicyRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class DeleteAlertEventIntegrationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        alert_event_integration_policy_id: str = None,
        request_id: str = None,
    ):
        self.alert_event_integration_policy_id = alert_event_integration_policy_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.alert_event_integration_policy_id is not None:
            result['alertEventIntegrationPolicyId'] = self.alert_event_integration_policy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertEventIntegrationPolicyId') is not None:
            self.alert_event_integration_policy_id = m.get('alertEventIntegrationPolicyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteAlertEventIntegrationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteAlertEventIntegrationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteAlertNotifyTemplatesRequest(TeaModel):
    def __init__(
        self,
        alert_notify_template_ids: List[str] = None,
    ):
        # This parameter is required.
        self.alert_notify_template_ids = alert_notify_template_ids

    def validate(self):
        pass

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

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

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


class DeleteAlertNotifyTemplatesShrinkRequest(TeaModel):
    def __init__(
        self,
        alert_notify_template_ids_shrink: str = None,
    ):
        # This parameter is required.
        self.alert_notify_template_ids_shrink = alert_notify_template_ids_shrink

    def validate(self):
        pass

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

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

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


class DeleteAlertNotifyTemplatesResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteAlertNotifyTemplatesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteAlertNotifyTemplatesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteAlertRobotsRequest(TeaModel):
    def __init__(
        self,
        is_custom: str = None,
        robot_ids: List[str] = None,
        source: str = None,
        type: str = None,
    ):
        self.is_custom = is_custom
        # This parameter is required.
        self.robot_ids = robot_ids
        self.source = source
        self.type = type

    def validate(self):
        pass

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

        result = dict()
        if self.is_custom is not None:
            result['isCustom'] = self.is_custom
        if self.robot_ids is not None:
            result['robotIds'] = self.robot_ids
        if self.source is not None:
            result['source'] = self.source
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('isCustom') is not None:
            self.is_custom = m.get('isCustom')
        if m.get('robotIds') is not None:
            self.robot_ids = m.get('robotIds')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class DeleteAlertRobotsShrinkRequest(TeaModel):
    def __init__(
        self,
        is_custom: str = None,
        robot_ids_shrink: str = None,
        source: str = None,
        type: str = None,
    ):
        self.is_custom = is_custom
        # This parameter is required.
        self.robot_ids_shrink = robot_ids_shrink
        self.source = source
        self.type = type

    def validate(self):
        pass

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

        result = dict()
        if self.is_custom is not None:
            result['isCustom'] = self.is_custom
        if self.robot_ids_shrink is not None:
            result['robotIds'] = self.robot_ids_shrink
        if self.source is not None:
            result['source'] = self.source
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('isCustom') is not None:
            self.is_custom = m.get('isCustom')
        if m.get('robotIds') is not None:
            self.robot_ids_shrink = m.get('robotIds')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class DeleteAlertRobotsResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteAlertRobotsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteAlertRobotsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteAlertRulesRequest(TeaModel):
    def __init__(
        self,
        alert_rule_ids: List[str] = None,
        call_source: str = None,
    ):
        # This parameter is required.
        self.alert_rule_ids = alert_rule_ids
        self.call_source = call_source

    def validate(self):
        pass

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

        result = dict()
        if self.alert_rule_ids is not None:
            result['alertRuleIds'] = self.alert_rule_ids
        if self.call_source is not None:
            result['callSource'] = self.call_source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleIds') is not None:
            self.alert_rule_ids = m.get('alertRuleIds')
        if m.get('callSource') is not None:
            self.call_source = m.get('callSource')
        return self


class DeleteAlertRulesShrinkRequest(TeaModel):
    def __init__(
        self,
        alert_rule_ids_shrink: str = None,
        call_source: str = None,
    ):
        # This parameter is required.
        self.alert_rule_ids_shrink = alert_rule_ids_shrink
        self.call_source = call_source

    def validate(self):
        pass

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

        result = dict()
        if self.alert_rule_ids_shrink is not None:
            result['alertRuleIds'] = self.alert_rule_ids_shrink
        if self.call_source is not None:
            result['callSource'] = self.call_source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleIds') is not None:
            self.alert_rule_ids_shrink = m.get('alertRuleIds')
        if m.get('callSource') is not None:
            self.call_source = m.get('callSource')
        return self


class DeleteAlertRulesResponseBody(TeaModel):
    def __init__(
        self,
        data: int = None,
        request_id: str = None,
    ):
        self.data = data
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 DeleteAlertRulesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteAlertRulesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteAlertWebhooksRequest(TeaModel):
    def __init__(
        self,
        is_custom: str = None,
        source: str = None,
        webhook_ids: List[str] = None,
    ):
        self.is_custom = is_custom
        self.source = source
        # This parameter is required.
        self.webhook_ids = webhook_ids

    def validate(self):
        pass

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

        result = dict()
        if self.is_custom is not None:
            result['isCustom'] = self.is_custom
        if self.source is not None:
            result['source'] = self.source
        if self.webhook_ids is not None:
            result['webhookIds'] = self.webhook_ids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('isCustom') is not None:
            self.is_custom = m.get('isCustom')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('webhookIds') is not None:
            self.webhook_ids = m.get('webhookIds')
        return self


class DeleteAlertWebhooksShrinkRequest(TeaModel):
    def __init__(
        self,
        is_custom: str = None,
        source: str = None,
        webhook_ids_shrink: str = None,
    ):
        self.is_custom = is_custom
        self.source = source
        # This parameter is required.
        self.webhook_ids_shrink = webhook_ids_shrink

    def validate(self):
        pass

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

        result = dict()
        if self.is_custom is not None:
            result['isCustom'] = self.is_custom
        if self.source is not None:
            result['source'] = self.source
        if self.webhook_ids_shrink is not None:
            result['webhookIds'] = self.webhook_ids_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('isCustom') is not None:
            self.is_custom = m.get('isCustom')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('webhookIds') is not None:
            self.webhook_ids_shrink = m.get('webhookIds')
        return self


class DeleteAlertWebhooksResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteAlertWebhooksResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteAlertWebhooksResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteBizTraceResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteBizTraceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteBizTraceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteCloudResourceResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteCloudResourceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteCloudResourceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteContactGroupsRequest(TeaModel):
    def __init__(
        self,
        contact_group_ids: List[str] = None,
        source: str = None,
    ):
        # This parameter is required.
        self.contact_group_ids = contact_group_ids
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.contact_group_ids is not None:
            result['contactGroupIds'] = self.contact_group_ids
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactGroupIds') is not None:
            self.contact_group_ids = m.get('contactGroupIds')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class DeleteContactGroupsShrinkRequest(TeaModel):
    def __init__(
        self,
        contact_group_ids_shrink: str = None,
        source: str = None,
    ):
        # This parameter is required.
        self.contact_group_ids_shrink = contact_group_ids_shrink
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.contact_group_ids_shrink is not None:
            result['contactGroupIds'] = self.contact_group_ids_shrink
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactGroupIds') is not None:
            self.contact_group_ids_shrink = m.get('contactGroupIds')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class DeleteContactGroupsResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteContactGroupsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteContactGroupsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteContactsRequest(TeaModel):
    def __init__(
        self,
        contact_ids: List[str] = None,
        source: str = None,
    ):
        self.contact_ids = contact_ids
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.contact_ids is not None:
            result['contactIds'] = self.contact_ids
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactIds') is not None:
            self.contact_ids = m.get('contactIds')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class DeleteContactsShrinkRequest(TeaModel):
    def __init__(
        self,
        contact_ids_shrink: str = None,
        source: str = None,
    ):
        self.contact_ids_shrink = contact_ids_shrink
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.contact_ids_shrink is not None:
            result['contactIds'] = self.contact_ids_shrink
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactIds') is not None:
            self.contact_ids_shrink = m.get('contactIds')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class DeleteContactsResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteContactsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteContactsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteDatasetResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteDatasetResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteDatasetResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteDeliveryTaskResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteDeliveryTaskResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteDeliveryTaskResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteDigitalEmployeeResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteDigitalEmployeeResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteDigitalEmployeeResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteDigitalEmployeeSkillResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteDigitalEmployeeSkillResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteDigitalEmployeeSkillResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


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

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteEntityStoreResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteEntityStoreResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteEscalationPolicyRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class DeleteEscalationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        uuid: str = None,
    ):
        self.request_id = request_id
        self.uuid = uuid

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.uuid is not None:
            result['uuid'] = self.uuid
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('uuid') is not None:
            self.uuid = m.get('uuid')
        return self


class DeleteEscalationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteEscalationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteEvaluationTaskResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteEvaluationTaskResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteEvaluationTaskResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteExperimentPlanResponseBody(TeaModel):
    def __init__(
        self,
        plan_id: str = None,
        request_id: str = None,
        status: str = None,
    ):
        self.plan_id = plan_id
        self.request_id = request_id
        self.status = status

    def validate(self):
        pass

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

        result = dict()
        if self.plan_id is not None:
            result['planId'] = self.plan_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.status is not None:
            result['status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('planId') is not None:
            self.plan_id = m.get('planId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class DeleteExperimentPlanResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteExperimentPlanResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteIntegrationPolicyRequest(TeaModel):
    def __init__(
        self,
        force: bool = None,
    ):
        # Whether to forcibly delete the cloud-native all-in-one machine,
        # default value: `false`.
        self.force = force

    def validate(self):
        pass

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

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

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


class DeleteIntegrationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteIntegrationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteIntegrationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteMaintainWindowRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class DeleteMaintainWindowResponseBody(TeaModel):
    def __init__(
        self,
        maintain_window_id: str = None,
        request_id: str = None,
    ):
        self.maintain_window_id = maintain_window_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.maintain_window_id is not None:
            result['maintainWindowId'] = self.maintain_window_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('maintainWindowId') is not None:
            self.maintain_window_id = m.get('maintainWindowId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteMaintainWindowResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteMaintainWindowResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteMemoriesRequest(TeaModel):
    def __init__(
        self,
        agent_id: str = None,
        app_id: str = None,
        run_id: str = None,
        user_id: str = None,
    ):
        self.agent_id = agent_id
        self.app_id = app_id
        self.run_id = run_id
        self.user_id = user_id

    def validate(self):
        pass

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

        result = dict()
        if self.agent_id is not None:
            result['agentId'] = self.agent_id
        if self.app_id is not None:
            result['appId'] = self.app_id
        if self.run_id is not None:
            result['runId'] = self.run_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('agentId') is not None:
            self.agent_id = m.get('agentId')
        if m.get('appId') is not None:
            self.app_id = m.get('appId')
        if m.get('runId') is not None:
            self.run_id = m.get('runId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class DeleteMemoriesResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteMemoriesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteMemoriesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteMemoryResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteMemoryResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteMemoryResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteMemoryStoreResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteMemoryStoreResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteMemoryStoreResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteNotifyStrategyRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class DeleteNotifyStrategyResponseBody(TeaModel):
    def __init__(
        self,
        notify_strategy_id: str = None,
        request_id: str = None,
    ):
        self.notify_strategy_id = notify_strategy_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.notify_strategy_id is not None:
            result['notifyStrategyId'] = self.notify_strategy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('notifyStrategyId') is not None:
            self.notify_strategy_id = m.get('notifyStrategyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteNotifyStrategyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteNotifyStrategyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteOncallSchedulesRequest(TeaModel):
    def __init__(
        self,
        oncall_schedule_ids: List[str] = None,
        source: str = None,
    ):
        self.oncall_schedule_ids = oncall_schedule_ids
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.oncall_schedule_ids is not None:
            result['oncallScheduleIds'] = self.oncall_schedule_ids
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('oncallScheduleIds') is not None:
            self.oncall_schedule_ids = m.get('oncallScheduleIds')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class DeleteOncallSchedulesShrinkRequest(TeaModel):
    def __init__(
        self,
        oncall_schedule_ids_shrink: str = None,
        source: str = None,
    ):
        self.oncall_schedule_ids_shrink = oncall_schedule_ids_shrink
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.oncall_schedule_ids_shrink is not None:
            result['oncallScheduleIds'] = self.oncall_schedule_ids_shrink
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('oncallScheduleIds') is not None:
            self.oncall_schedule_ids_shrink = m.get('oncallScheduleIds')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class DeleteOncallSchedulesResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteOncallSchedulesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteOncallSchedulesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeletePipelineResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeletePipelineResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeletePipelineResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeletePrometheusClusterRequest(TeaModel):
    def __init__(
        self,
        force_delete: bool = None,
    ):
        self.force_delete = force_delete

    def validate(self):
        pass

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

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

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


class DeletePrometheusClusterResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeletePrometheusClusterResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeletePrometheusClusterResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeletePrometheusInstanceResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # ID of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeletePrometheusInstanceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeletePrometheusInstanceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeletePrometheusViewResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # ID of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeletePrometheusViewResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeletePrometheusViewResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeletePrometheusVirtualInstanceResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeletePrometheusVirtualInstanceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeletePrometheusVirtualInstanceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteServiceResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Request ID
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteServiceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteServiceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteServiceObservabilityResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteServiceObservabilityResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteServiceObservabilityResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteServiceTaskRequest(TeaModel):
    def __init__(
        self,
        type: str = None,
    ):
        self.type = type

    def validate(self):
        pass

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

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

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


class DeleteServiceTaskResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteServiceTaskResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteServiceTaskResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteSiteMonitorRequest(TeaModel):
    def __init__(
        self,
        client_token: str = None,
    ):
        self.client_token = client_token

    def validate(self):
        pass

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

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

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


class DeleteSiteMonitorResponseBodyData(TeaModel):
    def __init__(
        self,
        count: int = None,
    ):
        self.count = count

    def validate(self):
        pass

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

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

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


class DeleteSiteMonitorResponseBody(TeaModel):
    def __init__(
        self,
        data: DeleteSiteMonitorResponseBodyData = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

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

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

        result = dict()
        if self.data is not None:
            result['data'] = self.data.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('data') is not None:
            temp_model = DeleteSiteMonitorResponseBodyData()
            self.data = temp_model.from_map(m['data'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteSiteMonitorResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteSiteMonitorResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteSubscriptionRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class DeleteSubscriptionResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        subscription_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.subscription_id = subscription_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.subscription_id is not None:
            result['subscriptionId'] = self.subscription_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('subscriptionId') is not None:
            self.subscription_id = m.get('subscriptionId')
        return self


class DeleteSubscriptionResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteSubscriptionResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteThreadResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteThreadResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteThreadResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteTransformerRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        # This parameter is required.
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class DeleteTransformerResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        transformer_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.transformer_id = transformer_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.transformer_id is not None:
            result['transformerId'] = self.transformer_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('transformerId') is not None:
            self.transformer_id = m.get('transformerId')
        return self


class DeleteTransformerResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteTransformerResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


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

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteUmodelResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteUmodelResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteUmodelCommonSchemaRefHeaders(TeaModel):
    def __init__(
        self,
        common_headers: Dict[str, str] = None,
        log_version: str = None,
    ):
        self.common_headers = common_headers
        self.log_version = log_version

    def validate(self):
        pass

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

        result = dict()
        if self.common_headers is not None:
            result['commonHeaders'] = self.common_headers
        if self.log_version is not None:
            result['logVersion'] = self.log_version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('commonHeaders') is not None:
            self.common_headers = m.get('commonHeaders')
        if m.get('logVersion') is not None:
            self.log_version = m.get('logVersion')
        return self


class DeleteUmodelCommonSchemaRefRequest(TeaModel):
    def __init__(
        self,
        group: str = None,
    ):
        # This parameter is required.
        self.group = group

    def validate(self):
        pass

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

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

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


class DeleteUmodelCommonSchemaRefResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteUmodelCommonSchemaRefResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteUmodelCommonSchemaRefResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteUmodelDataRequest(TeaModel):
    def __init__(
        self,
        domain: str = None,
        kind: str = None,
        name: str = None,
    ):
        # Can specify the name of a specific Umodel data, leaving it blank means all
        self.domain = domain
        # Can specify the kind of a specific Umodel data, leaving it blank means all
        self.kind = kind
        # Can specify the name of a specific Umodel data, leaving it blank means all
        self.name = name

    def validate(self):
        pass

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

        result = dict()
        if self.domain is not None:
            result['domain'] = self.domain
        if self.kind is not None:
            result['kind'] = self.kind
        if self.name is not None:
            result['name'] = self.name
        return result

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


class DeleteUmodelDataResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Request ID
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteUmodelDataResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteUmodelDataResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DeleteWorkspaceResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Request ID
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DeleteWorkspaceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DeleteWorkspaceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DescribeMetricDataForAlertPreviewRequest(TeaModel):
    def __init__(
        self,
        datasource: str = None,
        end_time: int = None,
        limit: int = None,
        query: str = None,
        start_time: int = None,
        workspace: str = None,
    ):
        # This parameter is required.
        self.datasource = datasource
        # This parameter is required.
        self.end_time = end_time
        self.limit = limit
        # This parameter is required.
        self.query = query
        # This parameter is required.
        self.start_time = start_time
        self.workspace = workspace

    def validate(self):
        pass

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

        result = dict()
        if self.datasource is not None:
            result['datasource'] = self.datasource
        if self.end_time is not None:
            result['endTime'] = self.end_time
        if self.limit is not None:
            result['limit'] = self.limit
        if self.query is not None:
            result['query'] = self.query
        if self.start_time is not None:
            result['startTime'] = self.start_time
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('datasource') is not None:
            self.datasource = m.get('datasource')
        if m.get('endTime') is not None:
            self.end_time = m.get('endTime')
        if m.get('limit') is not None:
            self.limit = m.get('limit')
        if m.get('query') is not None:
            self.query = m.get('query')
        if m.get('startTime') is not None:
            self.start_time = m.get('startTime')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class DescribeMetricDataForAlertPreviewResponseBodyMetricListPoints(TeaModel):
    def __init__(
        self,
        t: str = None,
        v: str = None,
    ):
        self.t = t
        self.v = v

    def validate(self):
        pass

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

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

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


class DescribeMetricDataForAlertPreviewResponseBodyMetricList(TeaModel):
    def __init__(
        self,
        labels: Dict[str, Any] = None,
        points: List[DescribeMetricDataForAlertPreviewResponseBodyMetricListPoints] = None,
    ):
        self.labels = labels
        self.points = points

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

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

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

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


class DescribeMetricDataForAlertPreviewResponseBody(TeaModel):
    def __init__(
        self,
        metric_list: List[DescribeMetricDataForAlertPreviewResponseBodyMetricList] = None,
        request_id: str = None,
        warnings: List[str] = None,
    ):
        self.metric_list = metric_list
        self.request_id = request_id
        self.warnings = warnings

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

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

        result = dict()
        result['metricList'] = []
        if self.metric_list is not None:
            for k in self.metric_list:
                result['metricList'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.warnings is not None:
            result['warnings'] = self.warnings
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.metric_list = []
        if m.get('metricList') is not None:
            for k in m.get('metricList'):
                temp_model = DescribeMetricDataForAlertPreviewResponseBodyMetricList()
                self.metric_list.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('warnings') is not None:
            self.warnings = m.get('warnings')
        return self


class DescribeMetricDataForAlertPreviewResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DescribeMetricDataForAlertPreviewResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DescribeRegionsRequest(TeaModel):
    def __init__(
        self,
        language: str = None,
    ):
        self.language = language

    def validate(self):
        pass

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

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

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


class DescribeRegionsResponseBodyRegions(TeaModel):
    def __init__(
        self,
        local_name: str = None,
        region_id: str = None,
    ):
        self.local_name = local_name
        self.region_id = region_id

    def validate(self):
        pass

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

        result = dict()
        if self.local_name is not None:
            result['localName'] = self.local_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('localName') is not None:
            self.local_name = m.get('localName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class DescribeRegionsResponseBody(TeaModel):
    def __init__(
        self,
        regions: List[DescribeRegionsResponseBodyRegions] = None,
        request_id: str = None,
    ):
        self.regions = regions
        # Id of the request
        self.request_id = request_id

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

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

        result = dict()
        result['regions'] = []
        if self.regions is not None:
            for k in self.regions:
                result['regions'].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: dict = None):
        m = m or dict()
        self.regions = []
        if m.get('regions') is not None:
            for k in m.get('regions'):
                temp_model = DescribeRegionsResponseBodyRegions()
                self.regions.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DescribeRegionsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DescribeRegionsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DisableAlertEventIntegrationPolicyRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class DisableAlertEventIntegrationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        alert_event_integration_policy_id: str = None,
        request_id: str = None,
    ):
        self.alert_event_integration_policy_id = alert_event_integration_policy_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.alert_event_integration_policy_id is not None:
            result['alertEventIntegrationPolicyId'] = self.alert_event_integration_policy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertEventIntegrationPolicyId') is not None:
            self.alert_event_integration_policy_id = m.get('alertEventIntegrationPolicyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DisableAlertEventIntegrationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DisableAlertEventIntegrationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DisableAlertRulesRequest(TeaModel):
    def __init__(
        self,
        alert_rule_ids: List[str] = None,
    ):
        # This parameter is required.
        self.alert_rule_ids = alert_rule_ids

    def validate(self):
        pass

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

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

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


class DisableAlertRulesShrinkRequest(TeaModel):
    def __init__(
        self,
        alert_rule_ids_shrink: str = None,
    ):
        # This parameter is required.
        self.alert_rule_ids_shrink = alert_rule_ids_shrink

    def validate(self):
        pass

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

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

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


class DisableAlertRulesResponseBody(TeaModel):
    def __init__(
        self,
        data: int = None,
        request_id: str = None,
    ):
        self.data = data
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 DisableAlertRulesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DisableAlertRulesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DisableEscalationPolicyRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class DisableEscalationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        uuid: str = None,
    ):
        self.request_id = request_id
        self.uuid = uuid

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.uuid is not None:
            result['uuid'] = self.uuid
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('uuid') is not None:
            self.uuid = m.get('uuid')
        return self


class DisableEscalationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DisableEscalationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DisableMaintainWindowRequest(TeaModel):
    def __init__(
        self,
        client_token: str = None,
        workspace: str = None,
    ):
        self.client_token = client_token
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.workspace is not None:
            result['workspace'] = self.workspace
        return result

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


class DisableMaintainWindowResponseBody(TeaModel):
    def __init__(
        self,
        maintain_window_id: str = None,
        request_id: str = None,
    ):
        self.maintain_window_id = maintain_window_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.maintain_window_id is not None:
            result['maintainWindowId'] = self.maintain_window_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('maintainWindowId') is not None:
            self.maintain_window_id = m.get('maintainWindowId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DisableMaintainWindowResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DisableMaintainWindowResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DisableNotifyStrategyRequest(TeaModel):
    def __init__(
        self,
        client_token: str = None,
        workspace: str = None,
    ):
        self.client_token = client_token
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.workspace is not None:
            result['workspace'] = self.workspace
        return result

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


class DisableNotifyStrategyResponseBody(TeaModel):
    def __init__(
        self,
        notify_strategy_id: str = None,
        request_id: str = None,
    ):
        self.notify_strategy_id = notify_strategy_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.notify_strategy_id is not None:
            result['notifyStrategyId'] = self.notify_strategy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('notifyStrategyId') is not None:
            self.notify_strategy_id = m.get('notifyStrategyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DisableNotifyStrategyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DisableNotifyStrategyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DisableSiteMonitorRequest(TeaModel):
    def __init__(
        self,
        client_token: str = None,
    ):
        self.client_token = client_token

    def validate(self):
        pass

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

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

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


class DisableSiteMonitorResponseBodyData(TeaModel):
    def __init__(
        self,
        count: int = None,
    ):
        self.count = count

    def validate(self):
        pass

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

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

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


class DisableSiteMonitorResponseBody(TeaModel):
    def __init__(
        self,
        data: DisableSiteMonitorResponseBodyData = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

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

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

        result = dict()
        if self.data is not None:
            result['data'] = self.data.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('data') is not None:
            temp_model = DisableSiteMonitorResponseBodyData()
            self.data = temp_model.from_map(m['data'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class DisableSiteMonitorResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DisableSiteMonitorResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DisableSubscriptionRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class DisableSubscriptionResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        subscription_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.subscription_id = subscription_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.subscription_id is not None:
            result['subscriptionId'] = self.subscription_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('subscriptionId') is not None:
            self.subscription_id = m.get('subscriptionId')
        return self


class DisableSubscriptionResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DisableSubscriptionResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class DisableTransformerRequest(TeaModel):
    def __init__(
        self,
        client_token: str = None,
        workspace: str = None,
    ):
        self.client_token = client_token
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.workspace is not None:
            result['workspace'] = self.workspace
        return result

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


class DisableTransformerResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        transformer_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.transformer_id = transformer_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.transformer_id is not None:
            result['transformerId'] = self.transformer_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('transformerId') is not None:
            self.transformer_id = m.get('transformerId')
        return self


class DisableTransformerResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: DisableTransformerResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class EnableAlertEventIntegrationPolicyRequest(TeaModel):
    def __init__(
        self,
        client_token: str = None,
        workspace: str = None,
    ):
        self.client_token = client_token
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.workspace is not None:
            result['workspace'] = self.workspace
        return result

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


class EnableAlertEventIntegrationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        alert_event_integration_policy_id: str = None,
        request_id: str = None,
    ):
        self.alert_event_integration_policy_id = alert_event_integration_policy_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.alert_event_integration_policy_id is not None:
            result['alertEventIntegrationPolicyId'] = self.alert_event_integration_policy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertEventIntegrationPolicyId') is not None:
            self.alert_event_integration_policy_id = m.get('alertEventIntegrationPolicyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class EnableAlertEventIntegrationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: EnableAlertEventIntegrationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class EnableAlertRulesRequest(TeaModel):
    def __init__(
        self,
        alert_rule_ids: List[str] = None,
    ):
        # This parameter is required.
        self.alert_rule_ids = alert_rule_ids

    def validate(self):
        pass

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

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

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


class EnableAlertRulesShrinkRequest(TeaModel):
    def __init__(
        self,
        alert_rule_ids_shrink: str = None,
    ):
        # This parameter is required.
        self.alert_rule_ids_shrink = alert_rule_ids_shrink

    def validate(self):
        pass

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

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

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


class EnableAlertRulesResponseBody(TeaModel):
    def __init__(
        self,
        data: int = None,
        request_id: str = None,
    ):
        self.data = data
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 EnableAlertRulesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: EnableAlertRulesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class EnableEscalationPolicyRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class EnableEscalationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        uuid: str = None,
    ):
        self.request_id = request_id
        self.uuid = uuid

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.uuid is not None:
            result['uuid'] = self.uuid
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('uuid') is not None:
            self.uuid = m.get('uuid')
        return self


class EnableEscalationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: EnableEscalationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class EnableMaintainWindowRequest(TeaModel):
    def __init__(
        self,
        client_token: str = None,
        workspace: str = None,
    ):
        self.client_token = client_token
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.workspace is not None:
            result['workspace'] = self.workspace
        return result

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


class EnableMaintainWindowResponseBody(TeaModel):
    def __init__(
        self,
        maintain_window_id: str = None,
        request_id: str = None,
    ):
        self.maintain_window_id = maintain_window_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.maintain_window_id is not None:
            result['maintainWindowId'] = self.maintain_window_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('maintainWindowId') is not None:
            self.maintain_window_id = m.get('maintainWindowId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class EnableMaintainWindowResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: EnableMaintainWindowResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class EnableNotifyStrategyRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class EnableNotifyStrategyResponseBody(TeaModel):
    def __init__(
        self,
        notify_strategy_id: str = None,
        request_id: str = None,
    ):
        self.notify_strategy_id = notify_strategy_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

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

        result = dict()
        if self.notify_strategy_id is not None:
            result['notifyStrategyId'] = self.notify_strategy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('notifyStrategyId') is not None:
            self.notify_strategy_id = m.get('notifyStrategyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class EnableNotifyStrategyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: EnableNotifyStrategyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class EnableSiteMonitorRequest(TeaModel):
    def __init__(
        self,
        client_token: str = None,
    ):
        self.client_token = client_token

    def validate(self):
        pass

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

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

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


class EnableSiteMonitorResponseBodyData(TeaModel):
    def __init__(
        self,
        count: int = None,
    ):
        self.count = count

    def validate(self):
        pass

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

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

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


class EnableSiteMonitorResponseBody(TeaModel):
    def __init__(
        self,
        data: EnableSiteMonitorResponseBodyData = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

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

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

        result = dict()
        if self.data is not None:
            result['data'] = self.data.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('data') is not None:
            temp_model = EnableSiteMonitorResponseBodyData()
            self.data = temp_model.from_map(m['data'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class EnableSiteMonitorResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: EnableSiteMonitorResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class EnableSubscriptionRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

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

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

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


class EnableSubscriptionResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        subscription_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.subscription_id = subscription_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.subscription_id is not None:
            result['subscriptionId'] = self.subscription_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('subscriptionId') is not None:
            self.subscription_id = m.get('subscriptionId')
        return self


class EnableSubscriptionResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: EnableSubscriptionResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class EnableTransformerRequest(TeaModel):
    def __init__(
        self,
        client_token: str = None,
        workspace: str = None,
    ):
        self.client_token = client_token
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.workspace is not None:
            result['workspace'] = self.workspace
        return result

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


class EnableTransformerResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        transformer_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.transformer_id = transformer_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.transformer_id is not None:
            result['transformerId'] = self.transformer_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('transformerId') is not None:
            self.transformer_id = m.get('transformerId')
        return self


class EnableTransformerResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: EnableTransformerResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class EnqueueCustomEventRequest(TeaModel):
    def __init__(
        self,
        body: str = None,
        debug: bool = None,
        sign: str = None,
        timestamp: str = None,
    ):
        self.body = body
        self.debug = debug
        self.sign = sign
        self.timestamp = timestamp

    def validate(self):
        pass

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

        result = dict()
        if self.body is not None:
            result['body'] = self.body
        if self.debug is not None:
            result['debug'] = self.debug
        if self.sign is not None:
            result['sign'] = self.sign
        if self.timestamp is not None:
            result['timestamp'] = self.timestamp
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            self.body = m.get('body')
        if m.get('debug') is not None:
            self.debug = m.get('debug')
        if m.get('sign') is not None:
            self.sign = m.get('sign')
        if m.get('timestamp') is not None:
            self.timestamp = m.get('timestamp')
        return self


class EnqueueCustomEventResponseBody(TeaModel):
    def __init__(
        self,
        data: str = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 EnqueueCustomEventResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: EnqueueCustomEventResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class ExecuteQueryRequest(TeaModel):
    def __init__(
        self,
        query: str = None,
        type: str = None,
    ):
        # This parameter is required.
        self.query = query
        # This parameter is required.
        self.type = type

    def validate(self):
        pass

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

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

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


class ExecuteQueryResponseBodyMeta(TeaModel):
    def __init__(
        self,
        affected_rows: int = None,
        count: int = None,
        elapsed_millisecond: int = None,
        progress: str = None,
    ):
        self.affected_rows = affected_rows
        self.count = count
        self.elapsed_millisecond = elapsed_millisecond
        self.progress = progress

    def validate(self):
        pass

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

        result = dict()
        if self.affected_rows is not None:
            result['affectedRows'] = self.affected_rows
        if self.count is not None:
            result['count'] = self.count
        if self.elapsed_millisecond is not None:
            result['elapsedMillisecond'] = self.elapsed_millisecond
        if self.progress is not None:
            result['progress'] = self.progress
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('affectedRows') is not None:
            self.affected_rows = m.get('affectedRows')
        if m.get('count') is not None:
            self.count = m.get('count')
        if m.get('elapsedMillisecond') is not None:
            self.elapsed_millisecond = m.get('elapsedMillisecond')
        if m.get('progress') is not None:
            self.progress = m.get('progress')
        return self


class ExecuteQueryResponseBody(TeaModel):
    def __init__(
        self,
        data: List[Dict[str, str]] = None,
        meta: ExecuteQueryResponseBodyMeta = None,
        request_id: str = None,
    ):
        self.data = data
        self.meta = meta
        self.request_id = request_id

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

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

        result = dict()
        if self.data is not None:
            result['data'] = self.data
        if self.meta is not None:
            result['meta'] = self.meta.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('meta') is not None:
            temp_model = ExecuteQueryResponseBodyMeta()
            self.meta = temp_model.from_map(m['meta'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ExecuteQueryResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ExecuteQueryResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class ExportAlertRulesRequest(TeaModel):
    def __init__(
        self,
        alert_rule_ids: List[str] = None,
        format: str = None,
    ):
        # This parameter is required.
        self.alert_rule_ids = alert_rule_ids
        self.format = format

    def validate(self):
        pass

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

        result = dict()
        if self.alert_rule_ids is not None:
            result['alertRuleIds'] = self.alert_rule_ids
        if self.format is not None:
            result['format'] = self.format
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleIds') is not None:
            self.alert_rule_ids = m.get('alertRuleIds')
        if m.get('format') is not None:
            self.format = m.get('format')
        return self


class ExportAlertRulesShrinkRequest(TeaModel):
    def __init__(
        self,
        alert_rule_ids_shrink: str = None,
        format: str = None,
    ):
        # This parameter is required.
        self.alert_rule_ids_shrink = alert_rule_ids_shrink
        self.format = format

    def validate(self):
        pass

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

        result = dict()
        if self.alert_rule_ids_shrink is not None:
            result['alertRuleIds'] = self.alert_rule_ids_shrink
        if self.format is not None:
            result['format'] = self.format
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleIds') is not None:
            self.alert_rule_ids_shrink = m.get('alertRuleIds')
        if m.get('format') is not None:
            self.format = m.get('format')
        return self


class ExportAlertRulesResponseBody(TeaModel):
    def __init__(
        self,
        data: List[Any] = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 ExportAlertRulesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ExportAlertRulesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class GetAddonRequest(TeaModel):
    def __init__(
        self,
        aliyun_lang: str = None,
        version: str = None,
    ):
        self.aliyun_lang = aliyun_lang
        self.version = version

    def validate(self):
        pass

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

        result = dict()
        if self.aliyun_lang is not None:
            result['aliyunLang'] = self.aliyun_lang
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aliyunLang') is not None:
            self.aliyun_lang = m.get('aliyunLang')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class GetAddonResponseBodyDataDashboards(TeaModel):
    def __init__(
        self,
        description: str = None,
        name: str = None,
        url: str = None,
    ):
        self.description = description
        self.name = name
        self.url = url

    def validate(self):
        pass

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.name is not None:
            result['name'] = self.name
        if self.url is not None:
            result['url'] = self.url
        return result

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


class GetAddonResponseBodyDataEnvironmentsCommonSchemaRefs(TeaModel):
    def __init__(
        self,
        group: str = None,
        version: str = None,
    ):
        self.group = group
        self.version = version

    def validate(self):
        pass

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

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

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


class GetAddonResponseBodyDataEnvironmentsDependencies(TeaModel):
    def __init__(
        self,
        cluster_types: List[str] = None,
        features: Dict[str, bool] = None,
        services: List[str] = None,
    ):
        self.cluster_types = cluster_types
        self.features = features
        self.services = services

    def validate(self):
        pass

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

        result = dict()
        if self.cluster_types is not None:
            result['clusterTypes'] = self.cluster_types
        if self.features is not None:
            result['features'] = self.features
        if self.services is not None:
            result['services'] = self.services
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clusterTypes') is not None:
            self.cluster_types = m.get('clusterTypes')
        if m.get('features') is not None:
            self.features = m.get('features')
        if m.get('services') is not None:
            self.services = m.get('services')
        return self


class GetAddonResponseBodyDataEnvironmentsPoliciesMetricCheckRule(TeaModel):
    def __init__(
        self,
        prom_ql: List[str] = None,
    ):
        self.prom_ql = prom_ql

    def validate(self):
        pass

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

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

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


class GetAddonResponseBodyDataEnvironmentsPoliciesProtocols(TeaModel):
    def __init__(
        self,
        description: str = None,
        icon: str = None,
        label: str = None,
        name: str = None,
    ):
        self.description = description
        self.icon = icon
        self.label = label
        self.name = name

    def validate(self):
        pass

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.icon is not None:
            result['icon'] = self.icon
        if self.label is not None:
            result['label'] = self.label
        if self.name is not None:
            result['name'] = self.name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('icon') is not None:
            self.icon = m.get('icon')
        if m.get('label') is not None:
            self.label = m.get('label')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class GetAddonResponseBodyDataEnvironmentsPolicies(TeaModel):
    def __init__(
        self,
        alert_default_status: str = None,
        default_install: bool = None,
        enable_service_account: bool = None,
        metric_check_rule: GetAddonResponseBodyDataEnvironmentsPoliciesMetricCheckRule = None,
        need_restart_after_integration: bool = None,
        protocols: List[GetAddonResponseBodyDataEnvironmentsPoliciesProtocols] = None,
        target_addon_name: str = None,
    ):
        self.alert_default_status = alert_default_status
        self.default_install = default_install
        self.enable_service_account = enable_service_account
        self.metric_check_rule = metric_check_rule
        self.need_restart_after_integration = need_restart_after_integration
        self.protocols = protocols
        self.target_addon_name = target_addon_name

    def validate(self):
        if self.metric_check_rule:
            self.metric_check_rule.validate()
        if self.protocols:
            for k in self.protocols:
                if k:
                    k.validate()

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

        result = dict()
        if self.alert_default_status is not None:
            result['alertDefaultStatus'] = self.alert_default_status
        if self.default_install is not None:
            result['defaultInstall'] = self.default_install
        if self.enable_service_account is not None:
            result['enableServiceAccount'] = self.enable_service_account
        if self.metric_check_rule is not None:
            result['metricCheckRule'] = self.metric_check_rule.to_map()
        if self.need_restart_after_integration is not None:
            result['needRestartAfterIntegration'] = self.need_restart_after_integration
        result['protocols'] = []
        if self.protocols is not None:
            for k in self.protocols:
                result['protocols'].append(k.to_map() if k else None)
        if self.target_addon_name is not None:
            result['targetAddonName'] = self.target_addon_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertDefaultStatus') is not None:
            self.alert_default_status = m.get('alertDefaultStatus')
        if m.get('defaultInstall') is not None:
            self.default_install = m.get('defaultInstall')
        if m.get('enableServiceAccount') is not None:
            self.enable_service_account = m.get('enableServiceAccount')
        if m.get('metricCheckRule') is not None:
            temp_model = GetAddonResponseBodyDataEnvironmentsPoliciesMetricCheckRule()
            self.metric_check_rule = temp_model.from_map(m['metricCheckRule'])
        if m.get('needRestartAfterIntegration') is not None:
            self.need_restart_after_integration = m.get('needRestartAfterIntegration')
        self.protocols = []
        if m.get('protocols') is not None:
            for k in m.get('protocols'):
                temp_model = GetAddonResponseBodyDataEnvironmentsPoliciesProtocols()
                self.protocols.append(temp_model.from_map(k))
        if m.get('targetAddonName') is not None:
            self.target_addon_name = m.get('targetAddonName')
        return self


class GetAddonResponseBodyDataEnvironments(TeaModel):
    def __init__(
        self,
        common_schema_refs: List[GetAddonResponseBodyDataEnvironmentsCommonSchemaRefs] = None,
        dependencies: GetAddonResponseBodyDataEnvironmentsDependencies = None,
        description: str = None,
        enable: bool = None,
        label: str = None,
        name: str = None,
        policies: GetAddonResponseBodyDataEnvironmentsPolicies = None,
        policy_type: str = None,
    ):
        self.common_schema_refs = common_schema_refs
        self.dependencies = dependencies
        self.description = description
        self.enable = enable
        self.label = label
        self.name = name
        self.policies = policies
        self.policy_type = policy_type

    def validate(self):
        if self.common_schema_refs:
            for k in self.common_schema_refs:
                if k:
                    k.validate()
        if self.dependencies:
            self.dependencies.validate()
        if self.policies:
            self.policies.validate()

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

        result = dict()
        result['commonSchemaRefs'] = []
        if self.common_schema_refs is not None:
            for k in self.common_schema_refs:
                result['commonSchemaRefs'].append(k.to_map() if k else None)
        if self.dependencies is not None:
            result['dependencies'] = self.dependencies.to_map()
        if self.description is not None:
            result['description'] = self.description
        if self.enable is not None:
            result['enable'] = self.enable
        if self.label is not None:
            result['label'] = self.label
        if self.name is not None:
            result['name'] = self.name
        if self.policies is not None:
            result['policies'] = self.policies.to_map()
        if self.policy_type is not None:
            result['policyType'] = self.policy_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.common_schema_refs = []
        if m.get('commonSchemaRefs') is not None:
            for k in m.get('commonSchemaRefs'):
                temp_model = GetAddonResponseBodyDataEnvironmentsCommonSchemaRefs()
                self.common_schema_refs.append(temp_model.from_map(k))
        if m.get('dependencies') is not None:
            temp_model = GetAddonResponseBodyDataEnvironmentsDependencies()
            self.dependencies = temp_model.from_map(m['dependencies'])
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('label') is not None:
            self.label = m.get('label')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('policies') is not None:
            temp_model = GetAddonResponseBodyDataEnvironmentsPolicies()
            self.policies = temp_model.from_map(m['policies'])
        if m.get('policyType') is not None:
            self.policy_type = m.get('policyType')
        return self


class GetAddonResponseBodyData(TeaModel):
    def __init__(
        self,
        alias: str = None,
        categories: List[str] = None,
        dashboards: List[GetAddonResponseBodyDataDashboards] = None,
        description: str = None,
        environments: List[GetAddonResponseBodyDataEnvironments] = None,
        icon: str = None,
        keywords: List[str] = None,
        language: str = None,
        latest_release_create_time: str = None,
        name: str = None,
        once: bool = None,
        scene: str = None,
        version: str = None,
        weight: str = None,
    ):
        self.alias = alias
        self.categories = categories
        self.dashboards = dashboards
        self.description = description
        self.environments = environments
        self.icon = icon
        self.keywords = keywords
        self.language = language
        self.latest_release_create_time = latest_release_create_time
        self.name = name
        self.once = once
        self.scene = scene
        self.version = version
        self.weight = weight

    def validate(self):
        if self.dashboards:
            for k in self.dashboards:
                if k:
                    k.validate()
        if self.environments:
            for k in self.environments:
                if k:
                    k.validate()

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

        result = dict()
        if self.alias is not None:
            result['alias'] = self.alias
        if self.categories is not None:
            result['categories'] = self.categories
        result['dashboards'] = []
        if self.dashboards is not None:
            for k in self.dashboards:
                result['dashboards'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        result['environments'] = []
        if self.environments is not None:
            for k in self.environments:
                result['environments'].append(k.to_map() if k else None)
        if self.icon is not None:
            result['icon'] = self.icon
        if self.keywords is not None:
            result['keywords'] = self.keywords
        if self.language is not None:
            result['language'] = self.language
        if self.latest_release_create_time is not None:
            result['latestReleaseCreateTime'] = self.latest_release_create_time
        if self.name is not None:
            result['name'] = self.name
        if self.once is not None:
            result['once'] = self.once
        if self.scene is not None:
            result['scene'] = self.scene
        if self.version is not None:
            result['version'] = self.version
        if self.weight is not None:
            result['weight'] = self.weight
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alias') is not None:
            self.alias = m.get('alias')
        if m.get('categories') is not None:
            self.categories = m.get('categories')
        self.dashboards = []
        if m.get('dashboards') is not None:
            for k in m.get('dashboards'):
                temp_model = GetAddonResponseBodyDataDashboards()
                self.dashboards.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        self.environments = []
        if m.get('environments') is not None:
            for k in m.get('environments'):
                temp_model = GetAddonResponseBodyDataEnvironments()
                self.environments.append(temp_model.from_map(k))
        if m.get('icon') is not None:
            self.icon = m.get('icon')
        if m.get('keywords') is not None:
            self.keywords = m.get('keywords')
        if m.get('language') is not None:
            self.language = m.get('language')
        if m.get('latestReleaseCreateTime') is not None:
            self.latest_release_create_time = m.get('latestReleaseCreateTime')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('once') is not None:
            self.once = m.get('once')
        if m.get('scene') is not None:
            self.scene = m.get('scene')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class GetAddonResponseBody(TeaModel):
    def __init__(
        self,
        data: GetAddonResponseBodyData = None,
        request_id: str = None,
    ):
        self.data = data
        # Id of the request
        self.request_id = request_id

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

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

        result = dict()
        if self.data is not None:
            result['data'] = self.data.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('data') is not None:
            temp_model = GetAddonResponseBodyData()
            self.data = temp_model.from_map(m['data'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetAddonResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetAddonResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class GetAddonAlertTemplatesRequest(TeaModel):
    def __init__(
        self,
        addon_version: str = None,
        aliyun_lang: str = None,
        environment_type: str = None,
    ):
        self.addon_version = addon_version
        self.aliyun_lang = aliyun_lang
        self.environment_type = environment_type

    def validate(self):
        pass

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

        result = dict()
        if self.addon_version is not None:
            result['addonVersion'] = self.addon_version
        if self.aliyun_lang is not None:
            result['aliyunLang'] = self.aliyun_lang
        if self.environment_type is not None:
            result['environmentType'] = self.environment_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonVersion') is not None:
            self.addon_version = m.get('addonVersion')
        if m.get('aliyunLang') is not None:
            self.aliyun_lang = m.get('aliyunLang')
        if m.get('environmentType') is not None:
            self.environment_type = m.get('environmentType')
        return self


class GetAddonAlertTemplatesResponseBodyRules(TeaModel):
    def __init__(
        self,
        annotations: Dict[str, str] = None,
        duration: str = None,
        group: str = None,
        labels: Dict[str, str] = None,
        level: str = None,
        message: str = None,
        name: str = None,
        prom_ql: str = None,
    ):
        self.annotations = annotations
        self.duration = duration
        self.group = group
        self.labels = labels
        self.level = level
        self.message = message
        self.name = name
        self.prom_ql = prom_ql

    def validate(self):
        pass

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

        result = dict()
        if self.annotations is not None:
            result['annotations'] = self.annotations
        if self.duration is not None:
            result['duration'] = self.duration
        if self.group is not None:
            result['group'] = self.group
        if self.labels is not None:
            result['labels'] = self.labels
        if self.level is not None:
            result['level'] = self.level
        if self.message is not None:
            result['message'] = self.message
        if self.name is not None:
            result['name'] = self.name
        if self.prom_ql is not None:
            result['promQL'] = self.prom_ql
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('annotations') is not None:
            self.annotations = m.get('annotations')
        if m.get('duration') is not None:
            self.duration = m.get('duration')
        if m.get('group') is not None:
            self.group = m.get('group')
        if m.get('labels') is not None:
            self.labels = m.get('labels')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('promQL') is not None:
            self.prom_ql = m.get('promQL')
        return self


class GetAddonAlertTemplatesResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        rules: List[GetAddonAlertTemplatesResponseBodyRules] = None,
    ):
        self.request_id = request_id
        self.rules = rules

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

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

        result = dict()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        self.rules = []
        if m.get('rules') is not None:
            for k in m.get('rules'):
                temp_model = GetAddonAlertTemplatesResponseBodyRules()
                self.rules.append(temp_model.from_map(k))
        return self


class GetAddonAlertTemplatesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetAddonAlertTemplatesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class GetAddonCodeTemplateRequest(TeaModel):
    def __init__(
        self,
        aliyun_lang: str = None,
        environment_type: str = None,
        version: str = None,
    ):
        self.aliyun_lang = aliyun_lang
        self.environment_type = environment_type
        self.version = version

    def validate(self):
        pass

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

        result = dict()
        if self.aliyun_lang is not None:
            result['aliyunLang'] = self.aliyun_lang
        if self.environment_type is not None:
            result['environmentType'] = self.environment_type
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aliyunLang') is not None:
            self.aliyun_lang = m.get('aliyunLang')
        if m.get('environmentType') is not None:
            self.environment_type = m.get('environmentType')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class GetAddonCodeTemplateResponseBodyCodes(TeaModel):
    def __init__(
        self,
        code_template: str = None,
        name: str = None,
    ):
        self.code_template = code_template
        self.name = name

    def validate(self):
        pass

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

        result = dict()
        if self.code_template is not None:
            result['codeTemplate'] = self.code_template
        if self.name is not None:
            result['name'] = self.name
        return result

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


class GetAddonCodeTemplateResponseBody(TeaModel):
    def __init__(
        self,
        codes: List[GetAddonCodeTemplateResponseBodyCodes] = None,
        request_id: str = None,
    ):
        self.codes = codes
        # Id of the request
        self.request_id = request_id

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

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

        result = dict()
        result['codes'] = []
        if self.codes is not None:
            for k in self.codes:
                result['codes'].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: dict = None):
        m = m or dict()
        self.codes = []
        if m.get('codes') is not None:
            for k in m.get('codes'):
                temp_model = GetAddonCodeTemplateResponseBodyCodes()
                self.codes.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetAddonCodeTemplateResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetAddonCodeTemplateResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class GetAddonMetricsRequest(TeaModel):
    def __init__(
        self,
        aliyun_lang: str = None,
        environment_type: str = None,
        version: str = None,
    ):
        self.aliyun_lang = aliyun_lang
        self.environment_type = environment_type
        self.version = version

    def validate(self):
        pass

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

        result = dict()
        if self.aliyun_lang is not None:
            result['aliyunLang'] = self.aliyun_lang
        if self.environment_type is not None:
            result['environmentType'] = self.environment_type
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aliyunLang') is not None:
            self.aliyun_lang = m.get('aliyunLang')
        if m.get('environmentType') is not None:
            self.environment_type = m.get('environmentType')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class GetAddonMetricsResponseBodyGroupsLabels(TeaModel):
    def __init__(
        self,
        description: str = None,
        key: str = None,
        source: str = None,
    ):
        self.description = description
        self.key = key
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.key is not None:
            result['key'] = self.key
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class GetAddonMetricsResponseBodyGroupsMetricsLabels(TeaModel):
    def __init__(
        self,
        description: str = None,
        key: str = None,
        source: str = None,
    ):
        self.description = description
        self.key = key
        self.source = source

    def validate(self):
        pass

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.key is not None:
            result['key'] = self.key
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class GetAddonMetricsResponseBodyGroupsMetrics(TeaModel):
    def __init__(
        self,
        description: str = None,
        labels: List[GetAddonMetricsResponseBodyGroupsMetricsLabels] = None,
        metric: str = None,
        type: str = None,
        unit: str = None,
    ):
        self.description = description
        self.labels = labels
        self.metric = metric
        self.type = type
        self.unit = unit

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

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        result['labels'] = []
        if self.labels is not None:
            for k in self.labels:
                result['labels'].append(k.to_map() if k else None)
        if self.metric is not None:
            result['metric'] = self.metric
        if self.type is not None:
            result['type'] = self.type
        if self.unit is not None:
            result['unit'] = self.unit
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        self.labels = []
        if m.get('labels') is not None:
            for k in m.get('labels'):
                temp_model = GetAddonMetricsResponseBodyGroupsMetricsLabels()
                self.labels.append(temp_model.from_map(k))
        if m.get('metric') is not None:
            self.metric = m.get('metric')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('unit') is not None:
            self.unit = m.get('unit')
        return self


class GetAddonMetricsResponseBodyGroups(TeaModel):
    def __init__(
        self,
        group: str = None,
        labels: List[GetAddonMetricsResponseBodyGroupsLabels] = None,
        metrics: List[GetAddonMetricsResponseBodyGroupsMetrics] = None,
    ):
        self.group = group
        self.labels = labels
        self.metrics = metrics

    def validate(self):
        if self.labels:
            for k in self.labels:
                if k:
                    k.validate()
        if self.metrics:
            for k in self.metrics:
                if k:
                    k.validate()

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('group') is not None:
            self.group = m.get('group')
        self.labels = []
        if m.get('labels') is not None:
            for k in m.get('labels'):
                temp_model = GetAddonMetricsResponseBodyGroupsLabels()
                self.labels.append(temp_model.from_map(k))
        self.metrics = []
        if m.get('metrics') is not None:
            for k in m.get('metrics'):
                temp_model = GetAddonMetricsResponseBodyGroupsMetrics()
                self.metrics.append(temp_model.from_map(k))
        return self


class GetAddonMetricsResponseBody(TeaModel):
    def __init__(
        self,
        groups: List[GetAddonMetricsResponseBodyGroups] = None,
        request_id: str = None,
    ):
        self.groups = groups
        self.request_id = request_id

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

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

        result = dict()
        result['groups'] = []
        if self.groups is not None:
            for k in self.groups:
                result['groups'].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: dict = None):
        m = m or dict()
        self.groups = []
        if m.get('groups') is not None:
            for k in m.get('groups'):
                temp_model = GetAddonMetricsResponseBodyGroups()
                self.groups.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetAddonMetricsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetAddonMetricsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

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

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


class GetAddonReleaseResponseBodyReleaseConditions(TeaModel):
    def __init__(
        self,
        first_transition_time: str = None,
        last_transition_time: str = None,
        message: str = None,
        status: str = None,
        type: str = None,
    ):
        # First transition time.
        self.first_transition_time = first_transition_time
        # Last transition time.
        self.last_transition_time = last_transition_time
        # Details.
        self.message = message
        # Phase status.
        self.status = status
        # Phase type.
        self.type = type

    def validate(self):
        pass

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

        result = dict()
        if self.first_transition_time is not None:
            result['firstTransitionTime'] = self.first_transition_time
        if self.last_transition_time is not None:
            result['lastTransitionTime'] = self.last_transition_time
        if self.message is not None:
            result['message'] = self.message
        if self.status is not None:
            result['status'] = self.status
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('firstTransitionTime') is not None:
            self.first_transition_time = m.get('firstTransitionTime')
        if m.get('lastTransitionTime') is not None:
            self.last_transition_time = m.get('lastTransitionTime')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class GetAddonReleaseResponseBodyRelease(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        alert_rule_count: int = None,
        conditions: List[GetAddonReleaseResponseBodyReleaseConditions] = None,
        config: str = None,
        create_time: str = None,
        dashboard_count: int = None,
        entity_rules: EntityGroupBase = None,
        env_type: str = None,
        environment_id: str = None,
        exporter_count: int = None,
        have_config: bool = None,
        install_user_id: str = None,
        language: str = None,
        managed: bool = None,
        parent_addon_release_id: str = None,
        policy_id: str = None,
        region_id: str = None,
        release_id: str = None,
        release_name: str = None,
        scene: str = None,
        status: str = None,
        update_time: str = None,
        user_id: str = None,
        version: str = None,
        workspace: str = None,
    ):
        # Addon component name.
        self.addon_name = addon_name
        # Number of alert rules.
        self.alert_rule_count = alert_rule_count
        # Installation phase information.
        self.conditions = conditions
        # Component configuration information.
        self.config = config
        # Connection time.
        self.create_time = create_time
        # Number of dashboards.
        self.dashboard_count = dashboard_count
        # Entity details.
        self.entity_rules = entity_rules
        # Environment type.
        self.env_type = env_type
        # Environment ID.
        self.environment_id = environment_id
        # Number of plugins.
        self.exporter_count = exporter_count
        # Whether there is a configuration.
        self.have_config = have_config
        # User ID for connection.
        self.install_user_id = install_user_id
        # Language.
        self.language = language
        # Whether it is a managed component.
        self.managed = managed
        # Parent AddonRelease ID.
        self.parent_addon_release_id = parent_addon_release_id
        # Policy ID.
        self.policy_id = policy_id
        # Region ID.
        self.region_id = region_id
        # Release ID.
        self.release_id = release_id
        # The name of the Release.
        self.release_name = release_name
        # Component scenario.
        self.scene = scene
        # Component status.
        self.status = status
        # Update time.
        self.update_time = update_time
        # Owner user ID.
        self.user_id = user_id
        # Component version.
        self.version = version
        # Workspace.
        self.workspace = workspace

    def validate(self):
        if self.conditions:
            for k in self.conditions:
                if k:
                    k.validate()
        if self.entity_rules:
            self.entity_rules.validate()

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

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.alert_rule_count is not None:
            result['alertRuleCount'] = self.alert_rule_count
        result['conditions'] = []
        if self.conditions is not None:
            for k in self.conditions:
                result['conditions'].append(k.to_map() if k else None)
        if self.config is not None:
            result['config'] = self.config
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.dashboard_count is not None:
            result['dashboardCount'] = self.dashboard_count
        if self.entity_rules is not None:
            result['entityRules'] = self.entity_rules.to_map()
        if self.env_type is not None:
            result['envType'] = self.env_type
        if self.environment_id is not None:
            result['environmentId'] = self.environment_id
        if self.exporter_count is not None:
            result['exporterCount'] = self.exporter_count
        if self.have_config is not None:
            result['haveConfig'] = self.have_config
        if self.install_user_id is not None:
            result['installUserId'] = self.install_user_id
        if self.language is not None:
            result['language'] = self.language
        if self.managed is not None:
            result['managed'] = self.managed
        if self.parent_addon_release_id is not None:
            result['parentAddonReleaseId'] = self.parent_addon_release_id
        if self.policy_id is not None:
            result['policyId'] = self.policy_id
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.release_id is not None:
            result['releaseId'] = self.release_id
        if self.release_name is not None:
            result['releaseName'] = self.release_name
        if self.scene is not None:
            result['scene'] = self.scene
        if self.status is not None:
            result['status'] = self.status
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('alertRuleCount') is not None:
            self.alert_rule_count = m.get('alertRuleCount')
        self.conditions = []
        if m.get('conditions') is not None:
            for k in m.get('conditions'):
                temp_model = GetAddonReleaseResponseBodyReleaseConditions()
                self.conditions.append(temp_model.from_map(k))
        if m.get('config') is not None:
            self.config = m.get('config')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('dashboardCount') is not None:
            self.dashboard_count = m.get('dashboardCount')
        if m.get('entityRules') is not None:
            temp_model = EntityGroupBase()
            self.entity_rules = temp_model.from_map(m['entityRules'])
        if m.get('envType') is not None:
            self.env_type = m.get('envType')
        if m.get('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('exporterCount') is not None:
            self.exporter_count = m.get('exporterCount')
        if m.get('haveConfig') is not None:
            self.have_config = m.get('haveConfig')
        if m.get('installUserId') is not None:
            self.install_user_id = m.get('installUserId')
        if m.get('language') is not None:
            self.language = m.get('language')
        if m.get('managed') is not None:
            self.managed = m.get('managed')
        if m.get('parentAddonReleaseId') is not None:
            self.parent_addon_release_id = m.get('parentAddonReleaseId')
        if m.get('policyId') is not None:
            self.policy_id = m.get('policyId')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('releaseId') is not None:
            self.release_id = m.get('releaseId')
        if m.get('releaseName') is not None:
            self.release_name = m.get('releaseName')
        if m.get('scene') is not None:
            self.scene = m.get('scene')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetAddonReleaseResponseBody(TeaModel):
    def __init__(
        self,
        config: str = None,
        release: GetAddonReleaseResponseBodyRelease = None,
        request_id: str = None,
    ):
        # Component configuration.
        self.config = config
        # Detailed information.
        self.release = release
        # Request ID.
        self.request_id = request_id

    def validate(self):
        if self.release:
            self.release.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.config is not None:
            result['config'] = self.config
        if self.release is not None:
            result['release'] = self.release.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('config') is not None:
            self.config = m.get('config')
        if m.get('release') is not None:
            temp_model = GetAddonReleaseResponseBodyRelease()
            self.release = temp_model.from_map(m['release'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetAddonReleaseResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetAddonReleaseResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetAddonReleaseResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAddonSchemaRequest(TeaModel):
    def __init__(
        self,
        aliyun_lang: str = None,
        environment_type: str = None,
        version: str = None,
    ):
        self.aliyun_lang = aliyun_lang
        self.environment_type = environment_type
        self.version = version

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aliyun_lang is not None:
            result['aliyunLang'] = self.aliyun_lang
        if self.environment_type is not None:
            result['environmentType'] = self.environment_type
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aliyunLang') is not None:
            self.aliyun_lang = m.get('aliyunLang')
        if m.get('environmentType') is not None:
            self.environment_type = m.get('environmentType')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class GetAddonSchemaResponseBodyFieldsConditions(TeaModel):
    def __init__(
        self,
        action: str = None,
        field: str = None,
        op: str = None,
        value: Any = None,
    ):
        self.action = action
        self.field = field
        self.op = op
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.action is not None:
            result['action'] = self.action
        if self.field is not None:
            result['field'] = self.field
        if self.op is not None:
            result['op'] = self.op
        if self.value is not None:
            result['value'] = self.value
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('action') is not None:
            self.action = m.get('action')
        if m.get('field') is not None:
            self.field = m.get('field')
        if m.get('op') is not None:
            self.op = m.get('op')
        if m.get('value') is not None:
            self.value = m.get('value')
        return self


class GetAddonSchemaResponseBodyFieldsPropsDataSource(TeaModel):
    def __init__(
        self,
        label: str = None,
        value: str = None,
    ):
        self.label = label
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.label is not None:
            result['label'] = self.label
        if self.value is not None:
            result['value'] = self.value
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('label') is not None:
            self.label = m.get('label')
        if m.get('value') is not None:
            self.value = m.get('value')
        return self


class GetAddonSchemaResponseBodyFieldsProps(TeaModel):
    def __init__(
        self,
        data_source: List[GetAddonSchemaResponseBodyFieldsPropsDataSource] = None,
        related: List[str] = None,
        select_mode: str = None,
    ):
        # AK
        self.data_source = data_source
        self.related = related
        self.select_mode = select_mode

    def validate(self):
        if self.data_source:
            for k in self.data_source:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['dataSource'] = []
        if self.data_source is not None:
            for k in self.data_source:
                result['dataSource'].append(k.to_map() if k else None)
        if self.related is not None:
            result['related'] = self.related
        if self.select_mode is not None:
            result['selectMode'] = self.select_mode
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.data_source = []
        if m.get('dataSource') is not None:
            for k in m.get('dataSource'):
                temp_model = GetAddonSchemaResponseBodyFieldsPropsDataSource()
                self.data_source.append(temp_model.from_map(k))
        if m.get('related') is not None:
            self.related = m.get('related')
        if m.get('selectMode') is not None:
            self.select_mode = m.get('selectMode')
        return self


class GetAddonSchemaResponseBodyFieldsValidation(TeaModel):
    def __init__(
        self,
        max: int = None,
        max_length: int = None,
        message: str = None,
        min: int = None,
        min_length: int = None,
        regular: str = None,
        required: bool = None,
    ):
        self.max = max
        self.max_length = max_length
        self.message = message
        self.min = min
        self.min_length = min_length
        self.regular = regular
        self.required = required

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.max is not None:
            result['max'] = self.max
        if self.max_length is not None:
            result['maxLength'] = self.max_length
        if self.message is not None:
            result['message'] = self.message
        if self.min is not None:
            result['min'] = self.min
        if self.min_length is not None:
            result['minLength'] = self.min_length
        if self.regular is not None:
            result['regular'] = self.regular
        if self.required is not None:
            result['required'] = self.required
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('max') is not None:
            self.max = m.get('max')
        if m.get('maxLength') is not None:
            self.max_length = m.get('maxLength')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('min') is not None:
            self.min = m.get('min')
        if m.get('minLength') is not None:
            self.min_length = m.get('minLength')
        if m.get('regular') is not None:
            self.regular = m.get('regular')
        if m.get('required') is not None:
            self.required = m.get('required')
        return self


class GetAddonSchemaResponseBodyFields(TeaModel):
    def __init__(
        self,
        conditions: List[GetAddonSchemaResponseBodyFieldsConditions] = None,
        default_value: Any = None,
        description: str = None,
        disabled: bool = None,
        element: str = None,
        field_path: str = None,
        label: str = None,
        name: str = None,
        placeholder: str = None,
        props: GetAddonSchemaResponseBodyFieldsProps = None,
        type: str = None,
        validation: GetAddonSchemaResponseBodyFieldsValidation = None,
    ):
        self.conditions = conditions
        self.default_value = default_value
        self.description = description
        self.disabled = disabled
        self.element = element
        self.field_path = field_path
        self.label = label
        self.name = name
        self.placeholder = placeholder
        self.props = props
        self.type = type
        self.validation = validation

    def validate(self):
        if self.conditions:
            for k in self.conditions:
                if k:
                    k.validate()
        if self.props:
            self.props.validate()
        if self.validation:
            self.validation.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['conditions'] = []
        if self.conditions is not None:
            for k in self.conditions:
                result['conditions'].append(k.to_map() if k else None)
        if self.default_value is not None:
            result['defaultValue'] = self.default_value
        if self.description is not None:
            result['description'] = self.description
        if self.disabled is not None:
            result['disabled'] = self.disabled
        if self.element is not None:
            result['element'] = self.element
        if self.field_path is not None:
            result['fieldPath'] = self.field_path
        if self.label is not None:
            result['label'] = self.label
        if self.name is not None:
            result['name'] = self.name
        if self.placeholder is not None:
            result['placeholder'] = self.placeholder
        if self.props is not None:
            result['props'] = self.props.to_map()
        if self.type is not None:
            result['type'] = self.type
        if self.validation is not None:
            result['validation'] = self.validation.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.conditions = []
        if m.get('conditions') is not None:
            for k in m.get('conditions'):
                temp_model = GetAddonSchemaResponseBodyFieldsConditions()
                self.conditions.append(temp_model.from_map(k))
        if m.get('defaultValue') is not None:
            self.default_value = m.get('defaultValue')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('disabled') is not None:
            self.disabled = m.get('disabled')
        if m.get('element') is not None:
            self.element = m.get('element')
        if m.get('fieldPath') is not None:
            self.field_path = m.get('fieldPath')
        if m.get('label') is not None:
            self.label = m.get('label')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('placeholder') is not None:
            self.placeholder = m.get('placeholder')
        if m.get('props') is not None:
            temp_model = GetAddonSchemaResponseBodyFieldsProps()
            self.props = temp_model.from_map(m['props'])
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('validation') is not None:
            temp_model = GetAddonSchemaResponseBodyFieldsValidation()
            self.validation = temp_model.from_map(m['validation'])
        return self


class GetAddonSchemaResponseBody(TeaModel):
    def __init__(
        self,
        fields: List[GetAddonSchemaResponseBodyFields] = None,
        request_id: str = None,
        type: str = None,
    ):
        self.fields = fields
        self.request_id = request_id
        self.type = type

    def validate(self):
        if self.fields:
            for k in self.fields:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['fields'] = []
        if self.fields is not None:
            for k in self.fields:
                result['fields'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.fields = []
        if m.get('fields') is not None:
            for k in m.get('fields'):
                temp_model = GetAddonSchemaResponseBodyFields()
                self.fields.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class GetAddonSchemaResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetAddonSchemaResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetAddonSchemaResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAggTaskGroupResponseBodyAggTaskGroupTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # Key of the resource group tag.
        self.key = key
        # The value of the resource group tag.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 GetAggTaskGroupResponseBodyAggTaskGroup(TeaModel):
    def __init__(
        self,
        agg_task_group_config: str = None,
        agg_task_group_config_hash: str = None,
        agg_task_group_id: str = None,
        agg_task_group_name: str = None,
        cron_expr: str = None,
        delay: int = None,
        description: str = None,
        from_time: int = None,
        max_retries: int = None,
        max_run_time_in_seconds: int = None,
        precheck_string: str = None,
        region_id: str = None,
        schedule_mode: str = None,
        schedule_time_expr: str = None,
        source_prometheus_id: str = None,
        status: str = None,
        tags: List[GetAggTaskGroupResponseBodyAggTaskGroupTags] = None,
        target_prometheus_id: str = None,
        to_time: int = None,
        update_time: str = None,
        user_id: str = None,
    ):
        # Aggregation task group configuration.
        self.agg_task_group_config = agg_task_group_config
        # Summary of the aggregation task group configuration.
        self.agg_task_group_config_hash = agg_task_group_config_hash
        # ID of the aggregation task group.
        self.agg_task_group_id = agg_task_group_id
        # Name of the aggregation task group.
        self.agg_task_group_name = agg_task_group_name
        # Scheduling expression for the aggregation task group when the scheduling mode is \\"Cron\\".
        self.cron_expr = cron_expr
        # Fixed delay time (in seconds) for scheduling.
        self.delay = delay
        # Description of the aggregation task group.
        self.description = description
        # Second-level timestamp corresponding to the start time of scheduling (not yet effective).
        self.from_time = from_time
        # Maximum number of retries for executing the aggregation task.
        self.max_retries = max_retries
        # Maximum retry time for executing the aggregation task.
        self.max_run_time_in_seconds = max_run_time_in_seconds
        # Pre-check configuration.
        self.precheck_string = precheck_string
        # Region ID.
        self.region_id = region_id
        # Scheduling mode.
        self.schedule_mode = schedule_mode
        # Scheduling time expression.
        self.schedule_time_expr = schedule_time_expr
        # ID of the source Prometheus instance for the aggregation task group.
        self.source_prometheus_id = source_prometheus_id
        # Status of the aggregation task group.
        self.status = status
        # Resource group tags
        self.tags = tags
        # The target Prometheus instance ID of the aggregation task group.
        self.target_prometheus_id = target_prometheus_id
        # The second-level timestamp corresponding to the end time of the scheduling.
        self.to_time = to_time
        # The update time (timestamp) of the aggregation task group.
        self.update_time = update_time
        # The user to whom the aggregation task group belongs.
        self.user_id = user_id

    def validate(self):
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.agg_task_group_config is not None:
            result['aggTaskGroupConfig'] = self.agg_task_group_config
        if self.agg_task_group_config_hash is not None:
            result['aggTaskGroupConfigHash'] = self.agg_task_group_config_hash
        if self.agg_task_group_id is not None:
            result['aggTaskGroupId'] = self.agg_task_group_id
        if self.agg_task_group_name is not None:
            result['aggTaskGroupName'] = self.agg_task_group_name
        if self.cron_expr is not None:
            result['cronExpr'] = self.cron_expr
        if self.delay is not None:
            result['delay'] = self.delay
        if self.description is not None:
            result['description'] = self.description
        if self.from_time is not None:
            result['fromTime'] = self.from_time
        if self.max_retries is not None:
            result['maxRetries'] = self.max_retries
        if self.max_run_time_in_seconds is not None:
            result['maxRunTimeInSeconds'] = self.max_run_time_in_seconds
        if self.precheck_string is not None:
            result['precheckString'] = self.precheck_string
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.schedule_mode is not None:
            result['scheduleMode'] = self.schedule_mode
        if self.schedule_time_expr is not None:
            result['scheduleTimeExpr'] = self.schedule_time_expr
        if self.source_prometheus_id is not None:
            result['sourcePrometheusId'] = self.source_prometheus_id
        if self.status is not None:
            result['status'] = self.status
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.target_prometheus_id is not None:
            result['targetPrometheusId'] = self.target_prometheus_id
        if self.to_time is not None:
            result['toTime'] = self.to_time
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aggTaskGroupConfig') is not None:
            self.agg_task_group_config = m.get('aggTaskGroupConfig')
        if m.get('aggTaskGroupConfigHash') is not None:
            self.agg_task_group_config_hash = m.get('aggTaskGroupConfigHash')
        if m.get('aggTaskGroupId') is not None:
            self.agg_task_group_id = m.get('aggTaskGroupId')
        if m.get('aggTaskGroupName') is not None:
            self.agg_task_group_name = m.get('aggTaskGroupName')
        if m.get('cronExpr') is not None:
            self.cron_expr = m.get('cronExpr')
        if m.get('delay') is not None:
            self.delay = m.get('delay')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('fromTime') is not None:
            self.from_time = m.get('fromTime')
        if m.get('maxRetries') is not None:
            self.max_retries = m.get('maxRetries')
        if m.get('maxRunTimeInSeconds') is not None:
            self.max_run_time_in_seconds = m.get('maxRunTimeInSeconds')
        if m.get('precheckString') is not None:
            self.precheck_string = m.get('precheckString')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('scheduleMode') is not None:
            self.schedule_mode = m.get('scheduleMode')
        if m.get('scheduleTimeExpr') is not None:
            self.schedule_time_expr = m.get('scheduleTimeExpr')
        if m.get('sourcePrometheusId') is not None:
            self.source_prometheus_id = m.get('sourcePrometheusId')
        if m.get('status') is not None:
            self.status = m.get('status')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = GetAggTaskGroupResponseBodyAggTaskGroupTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('targetPrometheusId') is not None:
            self.target_prometheus_id = m.get('targetPrometheusId')
        if m.get('toTime') is not None:
            self.to_time = m.get('toTime')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class GetAggTaskGroupResponseBody(TeaModel):
    def __init__(
        self,
        agg_task_group: GetAggTaskGroupResponseBodyAggTaskGroup = None,
        request_id: str = None,
        success: bool = None,
    ):
        # Aggregation task group.
        self.agg_task_group = agg_task_group
        # Request ID
        self.request_id = request_id
        # Whether the request was successful
        self.success = success

    def validate(self):
        if self.agg_task_group:
            self.agg_task_group.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.agg_task_group is not None:
            result['aggTaskGroup'] = self.agg_task_group.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.success is not None:
            result['success'] = self.success
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aggTaskGroup') is not None:
            temp_model = GetAggTaskGroupResponseBodyAggTaskGroup()
            self.agg_task_group = temp_model.from_map(m['aggTaskGroup'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('success') is not None:
            self.success = m.get('success')
        return self


class GetAggTaskGroupResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetAggTaskGroupResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetAggTaskGroupResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAlertActionRequest(TeaModel):
    def __init__(
        self,
        source: str = None,
    ):
        self.source = source

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class GetAlertActionResponseBodyAlertActionsEbParam(TeaModel):
    def __init__(
        self,
        eb_source: str = None,
        event_bus_name: str = None,
        region_id: str = None,
        subject: str = None,
    ):
        self.eb_source = eb_source
        self.event_bus_name = event_bus_name
        self.region_id = region_id
        self.subject = subject

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.eb_source is not None:
            result['ebSource'] = self.eb_source
        if self.event_bus_name is not None:
            result['eventBusName'] = self.event_bus_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.subject is not None:
            result['subject'] = self.subject
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ebSource') is not None:
            self.eb_source = m.get('ebSource')
        if m.get('eventBusName') is not None:
            self.event_bus_name = m.get('eventBusName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('subject') is not None:
            self.subject = m.get('subject')
        return self


class GetAlertActionResponseBodyAlertActionsEssParam(TeaModel):
    def __init__(
        self,
        ess_group_id: str = None,
        ess_rule_id: str = None,
        region_id: str = None,
    ):
        self.ess_group_id = ess_group_id
        self.ess_rule_id = ess_rule_id
        self.region_id = region_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.ess_group_id is not None:
            result['essGroupId'] = self.ess_group_id
        if self.ess_rule_id is not None:
            result['essRuleId'] = self.ess_rule_id
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('essGroupId') is not None:
            self.ess_group_id = m.get('essGroupId')
        if m.get('essRuleId') is not None:
            self.ess_rule_id = m.get('essRuleId')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class GetAlertActionResponseBodyAlertActionsFc3Param(TeaModel):
    def __init__(
        self,
        function: str = None,
        qualifier: str = None,
        region_id: str = None,
    ):
        self.function = function
        self.qualifier = qualifier
        self.region_id = region_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.function is not None:
            result['function'] = self.function
        if self.qualifier is not None:
            result['qualifier'] = self.qualifier
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('function') is not None:
            self.function = m.get('function')
        if m.get('qualifier') is not None:
            self.qualifier = m.get('qualifier')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class GetAlertActionResponseBodyAlertActionsFcParam(TeaModel):
    def __init__(
        self,
        function: str = None,
        region_id: str = None,
        service: str = None,
    ):
        self.function = function
        self.region_id = region_id
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.function is not None:
            result['function'] = self.function
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.service is not None:
            result['service'] = self.service
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('function') is not None:
            self.function = m.get('function')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class GetAlertActionResponseBodyAlertActionsMnsParam(TeaModel):
    def __init__(
        self,
        mns_type: str = None,
        name: str = None,
        region_id: str = None,
    ):
        self.mns_type = mns_type
        self.name = name
        self.region_id = region_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.mns_type is not None:
            result['mnsType'] = self.mns_type
        if self.name is not None:
            result['name'] = self.name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('mnsType') is not None:
            self.mns_type = m.get('mnsType')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class GetAlertActionResponseBodyAlertActionsPagerDutyParam(TeaModel):
    def __init__(
        self,
        key: str = None,
        url: str = None,
    ):
        self.key = key
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.key is not None:
            result['key'] = self.key
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class GetAlertActionResponseBodyAlertActionsSlsParam(TeaModel):
    def __init__(
        self,
        logstore: str = None,
        project: str = None,
        region_id: str = None,
    ):
        self.logstore = logstore
        self.project = project
        self.region_id = region_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.logstore is not None:
            result['logstore'] = self.logstore
        if self.project is not None:
            result['project'] = self.project
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('logstore') is not None:
            self.logstore = m.get('logstore')
        if m.get('project') is not None:
            self.project = m.get('project')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class GetAlertActionResponseBodyAlertActionsWebhookParam(TeaModel):
    def __init__(
        self,
        content_type: str = None,
        headers: Dict[str, str] = None,
        method: str = None,
        url: str = None,
    ):
        self.content_type = content_type
        self.headers = headers
        self.method = method
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.content_type is not None:
            result['contentType'] = self.content_type
        if self.headers is not None:
            result['headers'] = self.headers
        if self.method is not None:
            result['method'] = self.method
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contentType') is not None:
            self.content_type = m.get('contentType')
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('method') is not None:
            self.method = m.get('method')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class GetAlertActionResponseBodyAlertActions(TeaModel):
    def __init__(
        self,
        alert_action_id: str = None,
        alert_action_name: str = None,
        eb_param: GetAlertActionResponseBodyAlertActionsEbParam = None,
        ess_param: GetAlertActionResponseBodyAlertActionsEssParam = None,
        fc_3param: GetAlertActionResponseBodyAlertActionsFc3Param = None,
        fc_param: GetAlertActionResponseBodyAlertActionsFcParam = None,
        mns_param: GetAlertActionResponseBodyAlertActionsMnsParam = None,
        pager_duty_param: GetAlertActionResponseBodyAlertActionsPagerDutyParam = None,
        sls_param: GetAlertActionResponseBodyAlertActionsSlsParam = None,
        type: str = None,
        webhook_param: GetAlertActionResponseBodyAlertActionsWebhookParam = None,
    ):
        self.alert_action_id = alert_action_id
        self.alert_action_name = alert_action_name
        self.eb_param = eb_param
        self.ess_param = ess_param
        self.fc_3param = fc_3param
        self.fc_param = fc_param
        self.mns_param = mns_param
        self.pager_duty_param = pager_duty_param
        self.sls_param = sls_param
        self.type = type
        self.webhook_param = webhook_param

    def validate(self):
        if self.eb_param:
            self.eb_param.validate()
        if self.ess_param:
            self.ess_param.validate()
        if self.fc_3param:
            self.fc_3param.validate()
        if self.fc_param:
            self.fc_param.validate()
        if self.mns_param:
            self.mns_param.validate()
        if self.pager_duty_param:
            self.pager_duty_param.validate()
        if self.sls_param:
            self.sls_param.validate()
        if self.webhook_param:
            self.webhook_param.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_action_id is not None:
            result['alertActionId'] = self.alert_action_id
        if self.alert_action_name is not None:
            result['alertActionName'] = self.alert_action_name
        if self.eb_param is not None:
            result['ebParam'] = self.eb_param.to_map()
        if self.ess_param is not None:
            result['essParam'] = self.ess_param.to_map()
        if self.fc_3param is not None:
            result['fc3Param'] = self.fc_3param.to_map()
        if self.fc_param is not None:
            result['fcParam'] = self.fc_param.to_map()
        if self.mns_param is not None:
            result['mnsParam'] = self.mns_param.to_map()
        if self.pager_duty_param is not None:
            result['pagerDutyParam'] = self.pager_duty_param.to_map()
        if self.sls_param is not None:
            result['slsParam'] = self.sls_param.to_map()
        if self.type is not None:
            result['type'] = self.type
        if self.webhook_param is not None:
            result['webhookParam'] = self.webhook_param.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionId') is not None:
            self.alert_action_id = m.get('alertActionId')
        if m.get('alertActionName') is not None:
            self.alert_action_name = m.get('alertActionName')
        if m.get('ebParam') is not None:
            temp_model = GetAlertActionResponseBodyAlertActionsEbParam()
            self.eb_param = temp_model.from_map(m['ebParam'])
        if m.get('essParam') is not None:
            temp_model = GetAlertActionResponseBodyAlertActionsEssParam()
            self.ess_param = temp_model.from_map(m['essParam'])
        if m.get('fc3Param') is not None:
            temp_model = GetAlertActionResponseBodyAlertActionsFc3Param()
            self.fc_3param = temp_model.from_map(m['fc3Param'])
        if m.get('fcParam') is not None:
            temp_model = GetAlertActionResponseBodyAlertActionsFcParam()
            self.fc_param = temp_model.from_map(m['fcParam'])
        if m.get('mnsParam') is not None:
            temp_model = GetAlertActionResponseBodyAlertActionsMnsParam()
            self.mns_param = temp_model.from_map(m['mnsParam'])
        if m.get('pagerDutyParam') is not None:
            temp_model = GetAlertActionResponseBodyAlertActionsPagerDutyParam()
            self.pager_duty_param = temp_model.from_map(m['pagerDutyParam'])
        if m.get('slsParam') is not None:
            temp_model = GetAlertActionResponseBodyAlertActionsSlsParam()
            self.sls_param = temp_model.from_map(m['slsParam'])
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('webhookParam') is not None:
            temp_model = GetAlertActionResponseBodyAlertActionsWebhookParam()
            self.webhook_param = temp_model.from_map(m['webhookParam'])
        return self


class GetAlertActionResponseBody(TeaModel):
    def __init__(
        self,
        alert_actions: GetAlertActionResponseBodyAlertActions = None,
        request_id: str = None,
    ):
        self.alert_actions = alert_actions
        self.request_id = request_id

    def validate(self):
        if self.alert_actions:
            self.alert_actions.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_actions is not None:
            result['alertActions'] = self.alert_actions.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActions') is not None:
            temp_model = GetAlertActionResponseBodyAlertActions()
            self.alert_actions = temp_model.from_map(m['alertActions'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetAlertActionResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetAlertActionResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetAlertActionResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetAlertEventIntegrationPolicyRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetAlertEventIntegrationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        alert_event_integration_policy: AlertEventIntegrationPolicyForView = None,
        request_id: str = None,
    ):
        self.alert_event_integration_policy = alert_event_integration_policy
        # Id of the request
        self.request_id = request_id

    def validate(self):
        if self.alert_event_integration_policy:
            self.alert_event_integration_policy.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_event_integration_policy is not None:
            result['alertEventIntegrationPolicy'] = self.alert_event_integration_policy.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertEventIntegrationPolicy') is not None:
            temp_model = AlertEventIntegrationPolicyForView()
            self.alert_event_integration_policy = temp_model.from_map(m['alertEventIntegrationPolicy'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetAlertEventIntegrationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetAlertEventIntegrationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetAlertEventIntegrationPolicyResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetBizTraceResponseBody(TeaModel):
    def __init__(
        self,
        item: BizTraceConfig = None,
        request_id: str = None,
    ):
        self.item = item
        self.request_id = request_id

    def validate(self):
        if self.item:
            self.item.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.item is not None:
            result['item'] = self.item.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('item') is not None:
            temp_model = BizTraceConfig()
            self.item = temp_model.from_map(m['item'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetBizTraceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetBizTraceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetBizTraceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetCloudResourceResponseBody(TeaModel):
    def __init__(
        self,
        region_id: str = None,
        request_id: str = None,
    ):
        self.region_id = region_id
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetCloudResourceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetCloudResourceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetCloudResourceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetCloudResourceDataHeaders(TeaModel):
    def __init__(
        self,
        common_headers: Dict[str, str] = None,
        accept_encoding: str = None,
    ):
        self.common_headers = common_headers
        self.accept_encoding = accept_encoding

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.common_headers is not None:
            result['commonHeaders'] = self.common_headers
        if self.accept_encoding is not None:
            result['Accept-Encoding'] = self.accept_encoding
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('commonHeaders') is not None:
            self.common_headers = m.get('commonHeaders')
        if m.get('Accept-Encoding') is not None:
            self.accept_encoding = m.get('Accept-Encoding')
        return self


class GetCloudResourceDataRequest(TeaModel):
    def __init__(
        self,
        from_: int = None,
        query: str = None,
        to: int = None,
    ):
        # This parameter is required.
        self.from_ = from_
        # This parameter is required.
        self.query = query
        # This parameter is required.
        self.to = to

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.from_ is not None:
            result['from'] = self.from_
        if self.query is not None:
            result['query'] = self.query
        if self.to is not None:
            result['to'] = self.to
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('from') is not None:
            self.from_ = m.get('from')
        if m.get('query') is not None:
            self.query = m.get('query')
        if m.get('to') is not None:
            self.to = m.get('to')
        return self


class GetCloudResourceDataResponseBody(TeaModel):
    def __init__(
        self,
        data: List[List[str]] = None,
        header: List[str] = None,
        request_id: str = None,
    ):
        self.data = data
        self.header = header
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.data is not None:
            result['data'] = self.data
        if self.header is not None:
            result['header'] = self.header
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('header') is not None:
            self.header = m.get('header')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetCloudResourceDataResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetCloudResourceDataResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetCloudResourceDataResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetCmsServiceRequest(TeaModel):
    def __init__(
        self,
        product: str = None,
        service: str = None,
    ):
        self.product = product
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.product is not None:
            result['product'] = self.product
        if self.service is not None:
            result['service'] = self.service
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('product') is not None:
            self.product = m.get('product')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class GetCmsServiceResponseBody(TeaModel):
    def __init__(
        self,
        enabled: bool = None,
        error_code: str = None,
        request_id: str = None,
    ):
        self.enabled = enabled
        self.error_code = error_code
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.error_code is not None:
            result['errorCode'] = self.error_code
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('errorCode') is not None:
            self.error_code = m.get('errorCode')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetCmsServiceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetCmsServiceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetCmsServiceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetDatasetResponseBody(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        dataset_name: str = None,
        description: str = None,
        region_id: str = None,
        request_id: str = None,
        schema: Dict[str, IndexKey] = None,
        update_time: str = None,
        workspace: str = None,
    ):
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        self.dataset_name = dataset_name
        self.description = description
        self.region_id = region_id
        self.request_id = request_id
        self.schema = schema
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.update_time = update_time
        self.workspace = workspace

    def validate(self):
        if self.schema:
            for v in self.schema.values():
                if v:
                    v.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.dataset_name is not None:
            result['datasetName'] = self.dataset_name
        if self.description is not None:
            result['description'] = self.description
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        result['schema'] = {}
        if self.schema is not None:
            for k, v in self.schema.items():
                result['schema'][k] = v.to_map()
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('datasetName') is not None:
            self.dataset_name = m.get('datasetName')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        self.schema = {}
        if m.get('schema') is not None:
            for k, v in m.get('schema').items():
                temp_model = IndexKey()
                self.schema[k] = temp_model.from_map(v)
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetDatasetResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetDatasetResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetDatasetResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetDeliveryTaskResponseBodyDeliveryTaskExtraInfo(TeaModel):
    def __init__(
        self,
        task_name_list: List[str] = None,
    ):
        self.task_name_list = task_name_list

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.task_name_list is not None:
            result['taskNameList'] = self.task_name_list
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('taskNameList') is not None:
            self.task_name_list = m.get('taskNameList')
        return self


class GetDeliveryTaskResponseBodyDeliveryTaskSinkList(TeaModel):
    def __init__(
        self,
        sink_configs: Dict[str, str] = None,
        sink_type: str = None,
    ):
        self.sink_configs = sink_configs
        self.sink_type = sink_type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.sink_configs is not None:
            result['sinkConfigs'] = self.sink_configs
        if self.sink_type is not None:
            result['sinkType'] = self.sink_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('sinkConfigs') is not None:
            self.sink_configs = m.get('sinkConfigs')
        if m.get('sinkType') is not None:
            self.sink_type = m.get('sinkType')
        return self


class GetDeliveryTaskResponseBodyDeliveryTaskTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        self.key = key
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 GetDeliveryTaskResponseBodyDeliveryTask(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        data_source_id: str = None,
        external_labels: Dict[str, str] = None,
        extra_info: GetDeliveryTaskResponseBodyDeliveryTaskExtraInfo = None,
        label_filters: Dict[str, str] = None,
        label_filters_type: str = None,
        region_id: str = None,
        sink_list: List[GetDeliveryTaskResponseBodyDeliveryTaskSinkList] = None,
        status: str = None,
        tags: List[GetDeliveryTaskResponseBodyDeliveryTaskTags] = None,
        task_description: str = None,
        task_id: str = None,
        task_name: str = None,
        update_time: str = None,
    ):
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        self.data_source_id = data_source_id
        self.external_labels = external_labels
        self.extra_info = extra_info
        self.label_filters = label_filters
        self.label_filters_type = label_filters_type
        self.region_id = region_id
        self.sink_list = sink_list
        self.status = status
        self.tags = tags
        self.task_description = task_description
        self.task_id = task_id
        self.task_name = task_name
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.update_time = update_time

    def validate(self):
        if self.extra_info:
            self.extra_info.validate()
        if self.sink_list:
            for k in self.sink_list:
                if k:
                    k.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.data_source_id is not None:
            result['dataSourceId'] = self.data_source_id
        if self.external_labels is not None:
            result['externalLabels'] = self.external_labels
        if self.extra_info is not None:
            result['extraInfo'] = self.extra_info.to_map()
        if self.label_filters is not None:
            result['labelFilters'] = self.label_filters
        if self.label_filters_type is not None:
            result['labelFiltersType'] = self.label_filters_type
        if self.region_id is not None:
            result['regionId'] = self.region_id
        result['sinkList'] = []
        if self.sink_list is not None:
            for k in self.sink_list:
                result['sinkList'].append(k.to_map() if k else None)
        if self.status is not None:
            result['status'] = self.status
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.task_description is not None:
            result['taskDescription'] = self.task_description
        if self.task_id is not None:
            result['taskId'] = self.task_id
        if self.task_name is not None:
            result['taskName'] = self.task_name
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('dataSourceId') is not None:
            self.data_source_id = m.get('dataSourceId')
        if m.get('externalLabels') is not None:
            self.external_labels = m.get('externalLabels')
        if m.get('extraInfo') is not None:
            temp_model = GetDeliveryTaskResponseBodyDeliveryTaskExtraInfo()
            self.extra_info = temp_model.from_map(m['extraInfo'])
        if m.get('labelFilters') is not None:
            self.label_filters = m.get('labelFilters')
        if m.get('labelFiltersType') is not None:
            self.label_filters_type = m.get('labelFiltersType')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        self.sink_list = []
        if m.get('sinkList') is not None:
            for k in m.get('sinkList'):
                temp_model = GetDeliveryTaskResponseBodyDeliveryTaskSinkList()
                self.sink_list.append(temp_model.from_map(k))
        if m.get('status') is not None:
            self.status = m.get('status')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = GetDeliveryTaskResponseBodyDeliveryTaskTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('taskDescription') is not None:
            self.task_description = m.get('taskDescription')
        if m.get('taskId') is not None:
            self.task_id = m.get('taskId')
        if m.get('taskName') is not None:
            self.task_name = m.get('taskName')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        return self


class GetDeliveryTaskResponseBody(TeaModel):
    def __init__(
        self,
        delivery_task: GetDeliveryTaskResponseBodyDeliveryTask = None,
        request_id: str = None,
    ):
        self.delivery_task = delivery_task
        self.request_id = request_id

    def validate(self):
        if self.delivery_task:
            self.delivery_task.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.delivery_task is not None:
            result['deliveryTask'] = self.delivery_task.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('deliveryTask') is not None:
            temp_model = GetDeliveryTaskResponseBodyDeliveryTask()
            self.delivery_task = temp_model.from_map(m['deliveryTask'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetDeliveryTaskResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetDeliveryTaskResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetDeliveryTaskResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetDigitalEmployeeResponseBodyKnowledgesBailian(TeaModel):
    def __init__(
        self,
        attributes: str = None,
        index_id: str = None,
        region: str = None,
        workspace_id: str = None,
    ):
        self.attributes = attributes
        self.index_id = index_id
        self.region = region
        self.workspace_id = workspace_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.attributes is not None:
            result['attributes'] = self.attributes
        if self.index_id is not None:
            result['indexId'] = self.index_id
        if self.region is not None:
            result['region'] = self.region
        if self.workspace_id is not None:
            result['workspaceId'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('attributes') is not None:
            self.attributes = m.get('attributes')
        if m.get('indexId') is not None:
            self.index_id = m.get('indexId')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('workspaceId') is not None:
            self.workspace_id = m.get('workspaceId')
        return self


class GetDigitalEmployeeResponseBodyKnowledges(TeaModel):
    def __init__(
        self,
        bailian: List[GetDigitalEmployeeResponseBodyKnowledgesBailian] = None,
        sop: List[Dict[str, Any]] = None,
    ):
        self.bailian = bailian
        self.sop = sop

    def validate(self):
        if self.bailian:
            for k in self.bailian:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['bailian'] = []
        if self.bailian is not None:
            for k in self.bailian:
                result['bailian'].append(k.to_map() if k else None)
        if self.sop is not None:
            result['sop'] = self.sop
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.bailian = []
        if m.get('bailian') is not None:
            for k in m.get('bailian'):
                temp_model = GetDigitalEmployeeResponseBodyKnowledgesBailian()
                self.bailian.append(temp_model.from_map(k))
        if m.get('sop') is not None:
            self.sop = m.get('sop')
        return self


class GetDigitalEmployeeResponseBody(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        default_rule: str = None,
        description: str = None,
        display_name: str = None,
        employee_type: str = None,
        knowledges: GetDigitalEmployeeResponseBodyKnowledges = None,
        name: str = None,
        region_id: str = None,
        request_id: str = None,
        resource_group_id: str = None,
        role_arn: str = None,
        tags: List[Tag] = None,
        update_time: str = None,
    ):
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        self.default_rule = default_rule
        self.description = description
        self.display_name = display_name
        self.employee_type = employee_type
        self.knowledges = knowledges
        self.name = name
        self.region_id = region_id
        self.request_id = request_id
        self.resource_group_id = resource_group_id
        self.role_arn = role_arn
        self.tags = tags
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.update_time = update_time

    def validate(self):
        if self.knowledges:
            self.knowledges.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.default_rule is not None:
            result['defaultRule'] = self.default_rule
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.employee_type is not None:
            result['employeeType'] = self.employee_type
        if self.knowledges is not None:
            result['knowledges'] = self.knowledges.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.role_arn is not None:
            result['roleArn'] = self.role_arn
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('defaultRule') is not None:
            self.default_rule = m.get('defaultRule')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('employeeType') is not None:
            self.employee_type = m.get('employeeType')
        if m.get('knowledges') is not None:
            temp_model = GetDigitalEmployeeResponseBodyKnowledges()
            self.knowledges = temp_model.from_map(m['knowledges'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('roleArn') is not None:
            self.role_arn = m.get('roleArn')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = Tag()
                self.tags.append(temp_model.from_map(k))
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        return self


class GetDigitalEmployeeResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetDigitalEmployeeResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetDigitalEmployeeResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetDigitalEmployeeSkillRequest(TeaModel):
    def __init__(
        self,
        version: str = None,
    ):
        self.version = version

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class GetDigitalEmployeeSkillResponseBodyFiles(TeaModel):
    def __init__(
        self,
        content: str = None,
        name: str = None,
    ):
        self.content = content
        self.name = name

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.content is not None:
            result['content'] = self.content
        if self.name is not None:
            result['name'] = self.name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('content') is not None:
            self.content = m.get('content')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class GetDigitalEmployeeSkillResponseBody(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        description: str = None,
        display_name: str = None,
        enable: bool = None,
        files: List[GetDigitalEmployeeSkillResponseBodyFiles] = None,
        remark: str = None,
        request_id: str = None,
        skill_name: str = None,
        update_time: str = None,
        version: str = None,
    ):
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        self.description = description
        self.display_name = display_name
        self.enable = enable
        self.files = files
        self.remark = remark
        # Id of the request
        self.request_id = request_id
        self.skill_name = skill_name
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.update_time = update_time
        self.version = version

    def validate(self):
        if self.files:
            for k in self.files:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.enable is not None:
            result['enable'] = self.enable
        result['files'] = []
        if self.files is not None:
            for k in self.files:
                result['files'].append(k.to_map() if k else None)
        if self.remark is not None:
            result['remark'] = self.remark
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.skill_name is not None:
            result['skillName'] = self.skill_name
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        self.files = []
        if m.get('files') is not None:
            for k in m.get('files'):
                temp_model = GetDigitalEmployeeSkillResponseBodyFiles()
                self.files.append(temp_model.from_map(k))
        if m.get('remark') is not None:
            self.remark = m.get('remark')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('skillName') is not None:
            self.skill_name = m.get('skillName')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class GetDigitalEmployeeSkillResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetDigitalEmployeeSkillResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetDigitalEmployeeSkillResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetEntityStoreResponseBody(TeaModel):
    def __init__(
        self,
        region_id: str = None,
        request_id: str = None,
        workspace_name: str = None,
    ):
        # Region ID
        self.region_id = region_id
        # Request ID
        self.request_id = request_id
        # Workspace name
        self.workspace_name = workspace_name

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.request_id is not None:
            result['requestId'] = self.request_id
        if self.workspace_name is not None:
            result['workspaceName'] = self.workspace_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('workspaceName') is not None:
            self.workspace_name = m.get('workspaceName')
        return self


class GetEntityStoreResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetEntityStoreResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetEntityStoreResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetEntityStoreDataHeaders(TeaModel):
    def __init__(
        self,
        common_headers: Dict[str, str] = None,
        accept_encoding: str = None,
    ):
        self.common_headers = common_headers
        # Content encoding type for the compression algorithm
        self.accept_encoding = accept_encoding

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.common_headers is not None:
            result['commonHeaders'] = self.common_headers
        if self.accept_encoding is not None:
            result['acceptEncoding'] = self.accept_encoding
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('commonHeaders') is not None:
            self.common_headers = m.get('commonHeaders')
        if m.get('acceptEncoding') is not None:
            self.accept_encoding = m.get('acceptEncoding')
        return self


class GetEntityStoreDataRequest(TeaModel):
    def __init__(
        self,
        from_: int = None,
        query: str = None,
        to: int = None,
    ):
        # Start time of the query.
        # 
        # Unix timestamp format, representing the number of seconds since 1970-1-1 00:00:00 UTC.
        # 
        # This parameter is required.
        self.from_ = from_
        # Query statement
        # 
        # This parameter is required.
        self.query = query
        # End time of the query.
        # 
        # Unix timestamp format, representing the number of seconds since 1970-1-1 00:00:00 UTC.
        # 
        # This parameter is required.
        self.to = to

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.from_ is not None:
            result['from'] = self.from_
        if self.query is not None:
            result['query'] = self.query
        if self.to is not None:
            result['to'] = self.to
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('from') is not None:
            self.from_ = m.get('from')
        if m.get('query') is not None:
            self.query = m.get('query')
        if m.get('to') is not None:
            self.to = m.get('to')
        return self


class GetEntityStoreDataResponseBodyResponseStatusStatusItem(TeaModel):
    def __init__(
        self,
        code: str = None,
        level: str = None,
        message: str = None,
        suggestion: str = None,
    ):
        # Status code
        self.code = code
        # Status level
        self.level = level
        # Calculation execution information
        self.message = message
        # Suggestions when an error occurs during execution
        self.suggestion = suggestion

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['code'] = self.code
        if self.level is not None:
            result['level'] = self.level
        if self.message is not None:
            result['message'] = self.message
        if self.suggestion is not None:
            result['suggestion'] = self.suggestion
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('code') is not None:
            self.code = m.get('code')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('suggestion') is not None:
            self.suggestion = m.get('suggestion')
        return self


class GetEntityStoreDataResponseBodyResponseStatus(TeaModel):
    def __init__(
        self,
        execution_states: str = None,
        level: str = None,
        result: str = None,
        retry_policy: str = None,
        status_item: List[GetEntityStoreDataResponseBodyResponseStatusStatusItem] = None,
    ):
        # Information during the execution process
        self.execution_states = execution_states
        # Status level
        self.level = level
        # Execution result
        self.result = result
        # Retry policy
        self.retry_policy = retry_policy
        # Detailed status information list
        self.status_item = status_item

    def validate(self):
        if self.status_item:
            for k in self.status_item:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.execution_states is not None:
            result['executionStates'] = self.execution_states
        if self.level is not None:
            result['level'] = self.level
        if self.result is not None:
            result['result'] = self.result
        if self.retry_policy is not None:
            result['retryPolicy'] = self.retry_policy
        result['statusItem'] = []
        if self.status_item is not None:
            for k in self.status_item:
                result['statusItem'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('executionStates') is not None:
            self.execution_states = m.get('executionStates')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('result') is not None:
            self.result = m.get('result')
        if m.get('retryPolicy') is not None:
            self.retry_policy = m.get('retryPolicy')
        self.status_item = []
        if m.get('statusItem') is not None:
            for k in m.get('statusItem'):
                temp_model = GetEntityStoreDataResponseBodyResponseStatusStatusItem()
                self.status_item.append(temp_model.from_map(k))
        return self


class GetEntityStoreDataResponseBody(TeaModel):
    def __init__(
        self,
        data: List[List[str]] = None,
        header: List[str] = None,
        request_id: str = None,
        response_status: GetEntityStoreDataResponseBodyResponseStatus = None,
    ):
        # Total list of returned data
        self.data = data
        # List of request headers
        self.header = header
        # Request ID
        self.request_id = request_id
        # Result status
        self.response_status = response_status

    def validate(self):
        if self.response_status:
            self.response_status.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.data is not None:
            result['data'] = self.data
        if self.header is not None:
            result['header'] = self.header
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.response_status is not None:
            result['responseStatus'] = self.response_status.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('header') is not None:
            self.header = m.get('header')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('responseStatus') is not None:
            temp_model = GetEntityStoreDataResponseBodyResponseStatus()
            self.response_status = temp_model.from_map(m['responseStatus'])
        return self


class GetEntityStoreDataResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetEntityStoreDataResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetEntityStoreDataResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetEscalationPolicyRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        # This parameter is required.
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetEscalationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        escalation_policy: IncidentEscalationPolicyForView = None,
        request_id: str = None,
    ):
        self.escalation_policy = escalation_policy
        self.request_id = request_id

    def validate(self):
        if self.escalation_policy:
            self.escalation_policy.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.escalation_policy is not None:
            result['escalationPolicy'] = self.escalation_policy.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('escalationPolicy') is not None:
            temp_model = IncidentEscalationPolicyForView()
            self.escalation_policy = temp_model.from_map(m['escalationPolicy'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetEscalationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetEscalationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetEscalationPolicyResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetEvaluationTaskResponseBody(TeaModel):
    def __init__(
        self,
        channel: str = None,
        config: Dict[str, str] = None,
        created_at: int = None,
        data_filter: str = None,
        data_type: str = None,
        evaluators: List[Evaluator] = None,
        request_id: str = None,
        status: str = None,
        tags: Dict[str, str] = None,
        task_id: str = None,
        task_mode: str = None,
        task_name: str = None,
        updated_at: int = None,
        workspace: str = None,
    ):
        self.channel = channel
        self.config = config
        self.created_at = created_at
        self.data_filter = data_filter
        self.data_type = data_type
        self.evaluators = evaluators
        self.request_id = request_id
        self.status = status
        self.tags = tags
        self.task_id = task_id
        self.task_mode = task_mode
        self.task_name = task_name
        self.updated_at = updated_at
        self.workspace = workspace

    def validate(self):
        if self.evaluators:
            for k in self.evaluators:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.channel is not None:
            result['channel'] = self.channel
        if self.config is not None:
            result['config'] = self.config
        if self.created_at is not None:
            result['createdAt'] = self.created_at
        if self.data_filter is not None:
            result['dataFilter'] = self.data_filter
        if self.data_type is not None:
            result['dataType'] = self.data_type
        result['evaluators'] = []
        if self.evaluators is not None:
            for k in self.evaluators:
                result['evaluators'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.status is not None:
            result['status'] = self.status
        if self.tags is not None:
            result['tags'] = self.tags
        if self.task_id is not None:
            result['taskId'] = self.task_id
        if self.task_mode is not None:
            result['taskMode'] = self.task_mode
        if self.task_name is not None:
            result['taskName'] = self.task_name
        if self.updated_at is not None:
            result['updatedAt'] = self.updated_at
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('channel') is not None:
            self.channel = m.get('channel')
        if m.get('config') is not None:
            self.config = m.get('config')
        if m.get('createdAt') is not None:
            self.created_at = m.get('createdAt')
        if m.get('dataFilter') is not None:
            self.data_filter = m.get('dataFilter')
        if m.get('dataType') is not None:
            self.data_type = m.get('dataType')
        self.evaluators = []
        if m.get('evaluators') is not None:
            for k in m.get('evaluators'):
                temp_model = Evaluator()
                self.evaluators.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('tags') is not None:
            self.tags = m.get('tags')
        if m.get('taskId') is not None:
            self.task_id = m.get('taskId')
        if m.get('taskMode') is not None:
            self.task_mode = m.get('taskMode')
        if m.get('taskName') is not None:
            self.task_name = m.get('taskName')
        if m.get('updatedAt') is not None:
            self.updated_at = m.get('updatedAt')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetEvaluationTaskResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetEvaluationTaskResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetEvaluationTaskResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetExperimentPlanResponseBody(TeaModel):
    def __init__(
        self,
        created_at: int = None,
        dataset_id: str = None,
        dataset_project: str = None,
        description: str = None,
        experiments: List[ExperimentConfig] = None,
        plan_id: str = None,
        plan_name: str = None,
        request_id: str = None,
        status: str = None,
        updated_at: int = None,
    ):
        self.created_at = created_at
        self.dataset_id = dataset_id
        self.dataset_project = dataset_project
        self.description = description
        self.experiments = experiments
        self.plan_id = plan_id
        self.plan_name = plan_name
        self.request_id = request_id
        self.status = status
        self.updated_at = updated_at

    def validate(self):
        if self.experiments:
            for k in self.experiments:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.created_at is not None:
            result['createdAt'] = self.created_at
        if self.dataset_id is not None:
            result['datasetId'] = self.dataset_id
        if self.dataset_project is not None:
            result['datasetProject'] = self.dataset_project
        if self.description is not None:
            result['description'] = self.description
        result['experiments'] = []
        if self.experiments is not None:
            for k in self.experiments:
                result['experiments'].append(k.to_map() if k else None)
        if self.plan_id is not None:
            result['planId'] = self.plan_id
        if self.plan_name is not None:
            result['planName'] = self.plan_name
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.status is not None:
            result['status'] = self.status
        if self.updated_at is not None:
            result['updatedAt'] = self.updated_at
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createdAt') is not None:
            self.created_at = m.get('createdAt')
        if m.get('datasetId') is not None:
            self.dataset_id = m.get('datasetId')
        if m.get('datasetProject') is not None:
            self.dataset_project = m.get('datasetProject')
        if m.get('description') is not None:
            self.description = m.get('description')
        self.experiments = []
        if m.get('experiments') is not None:
            for k in m.get('experiments'):
                temp_model = ExperimentConfig()
                self.experiments.append(temp_model.from_map(k))
        if m.get('planId') is not None:
            self.plan_id = m.get('planId')
        if m.get('planName') is not None:
            self.plan_name = m.get('planName')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('updatedAt') is not None:
            self.updated_at = m.get('updatedAt')
        return self


class GetExperimentPlanResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetExperimentPlanResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetExperimentPlanResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetExperimentTaskResponseBody(TeaModel):
    def __init__(
        self,
        record: ExperimentRecord = None,
        request_id: str = None,
    ):
        self.record = record
        self.request_id = request_id

    def validate(self):
        if self.record:
            self.record.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.record is not None:
            result['record'] = self.record.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('record') is not None:
            temp_model = ExperimentRecord()
            self.record = temp_model.from_map(m['record'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetExperimentTaskResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetExperimentTaskResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetExperimentTaskResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetIncidentRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetIncidentResponseBody(TeaModel):
    def __init__(
        self,
        data: IncidentForView = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.data is not None:
            result['data'] = self.data.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('data') is not None:
            temp_model = IncidentForView()
            self.data = temp_model.from_map(m['data'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetIncidentResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetIncidentResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetIncidentResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetIntegrationPolicyResponseBodyPolicyBindResource(TeaModel):
    def __init__(
        self,
        cluster_id: str = None,
        cluster_type: str = None,
        vpc_cidr: str = None,
        vpc_id: str = None,
    ):
        # Cluster ID.
        self.cluster_id = cluster_id
        # Cluster type.
        self.cluster_type = cluster_type
        # VPC CIDR.
        self.vpc_cidr = vpc_cidr
        # VPC ID.
        self.vpc_id = vpc_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.cluster_id is not None:
            result['clusterId'] = self.cluster_id
        if self.cluster_type is not None:
            result['clusterType'] = self.cluster_type
        if self.vpc_cidr is not None:
            result['vpcCidr'] = self.vpc_cidr
        if self.vpc_id is not None:
            result['vpcId'] = self.vpc_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clusterId') is not None:
            self.cluster_id = m.get('clusterId')
        if m.get('clusterType') is not None:
            self.cluster_type = m.get('clusterType')
        if m.get('vpcCidr') is not None:
            self.vpc_cidr = m.get('vpcCidr')
        if m.get('vpcId') is not None:
            self.vpc_id = m.get('vpcId')
        return self


class GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesAnnotations(TeaModel):
    def __init__(
        self,
        op: str = None,
        tag_key: str = None,
        tag_values: List[str] = None,
    ):
        # Operation to be performed.
        self.op = op
        # Tag key.
        self.tag_key = tag_key
        # Tag values.
        self.tag_values = tag_values

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.op is not None:
            result['op'] = self.op
        if self.tag_key is not None:
            result['tagKey'] = self.tag_key
        if self.tag_values is not None:
            result['tagValues'] = self.tag_values
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('op') is not None:
            self.op = m.get('op')
        if m.get('tagKey') is not None:
            self.tag_key = m.get('tagKey')
        if m.get('tagValues') is not None:
            self.tag_values = m.get('tagValues')
        return self


class GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesFieldRules(TeaModel):
    def __init__(
        self,
        field_key: str = None,
        field_values: List[str] = None,
        op: str = None,
    ):
        # Unique identifier for the field.
        self.field_key = field_key
        # Field content.
        self.field_values = field_values
        # Operation to be performed.
        self.op = op

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.field_key is not None:
            result['fieldKey'] = self.field_key
        if self.field_values is not None:
            result['fieldValues'] = self.field_values
        if self.op is not None:
            result['op'] = self.op
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('fieldKey') is not None:
            self.field_key = m.get('fieldKey')
        if m.get('fieldValues') is not None:
            self.field_values = m.get('fieldValues')
        if m.get('op') is not None:
            self.op = m.get('op')
        return self


class GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesIpMatchRule(TeaModel):
    def __init__(
        self,
        ip_cidr: str = None,
        ip_field_key: str = None,
    ):
        # IP segment.
        self.ip_cidr = ip_cidr
        # Key for the IP field.
        self.ip_field_key = ip_field_key

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.ip_cidr is not None:
            result['ipCidr'] = self.ip_cidr
        if self.ip_field_key is not None:
            result['ipFieldKey'] = self.ip_field_key
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ipCidr') is not None:
            self.ip_cidr = m.get('ipCidr')
        if m.get('ipFieldKey') is not None:
            self.ip_field_key = m.get('ipFieldKey')
        return self


class GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesLabels(TeaModel):
    def __init__(
        self,
        op: str = None,
        tag_key: str = None,
        tag_values: List[str] = None,
    ):
        # The operation to be performed.
        self.op = op
        # The tag key of the instance.
        self.tag_key = tag_key
        # List of tag values.
        self.tag_values = tag_values

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.op is not None:
            result['op'] = self.op
        if self.tag_key is not None:
            result['tagKey'] = self.tag_key
        if self.tag_values is not None:
            result['tagValues'] = self.tag_values
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('op') is not None:
            self.op = m.get('op')
        if m.get('tagKey') is not None:
            self.tag_key = m.get('tagKey')
        if m.get('tagValues') is not None:
            self.tag_values = m.get('tagValues')
        return self


class GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesTags(TeaModel):
    def __init__(
        self,
        op: str = None,
        tag_key: str = None,
        tag_values: List[str] = None,
    ):
        # The operation to be performed.
        self.op = op
        # The tag key of the instance.
        self.tag_key = tag_key
        # List of tag values.
        self.tag_values = tag_values

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.op is not None:
            result['op'] = self.op
        if self.tag_key is not None:
            result['tagKey'] = self.tag_key
        if self.tag_values is not None:
            result['tagValues'] = self.tag_values
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('op') is not None:
            self.op = m.get('op')
        if m.get('tagKey') is not None:
            self.tag_key = m.get('tagKey')
        if m.get('tagValues') is not None:
            self.tag_values = m.get('tagValues')
        return self


class GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRules(TeaModel):
    def __init__(
        self,
        annotations: List[GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesAnnotations] = None,
        entity_types: List[str] = None,
        field_rules: List[GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesFieldRules] = None,
        instance_ids: List[str] = None,
        ip_match_rule: GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesIpMatchRule = None,
        labels: List[GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesLabels] = None,
        region_ids: List[str] = None,
        resource_group_id: str = None,
        tags: List[GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesTags] = None,
    ):
        # Annotations.
        self.annotations = annotations
        # List of entity types.
        self.entity_types = entity_types
        # List of field rules.
        self.field_rules = field_rules
        # Instance ID.
        self.instance_ids = instance_ids
        # IP matching rule.
        self.ip_match_rule = ip_match_rule
        # Labels.
        self.labels = labels
        # List of region IDs.
        self.region_ids = region_ids
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Tag values.
        self.tags = tags

    def validate(self):
        if self.annotations:
            for k in self.annotations:
                if k:
                    k.validate()
        if self.field_rules:
            for k in self.field_rules:
                if k:
                    k.validate()
        if self.ip_match_rule:
            self.ip_match_rule.validate()
        if self.labels:
            for k in self.labels:
                if k:
                    k.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['annotations'] = []
        if self.annotations is not None:
            for k in self.annotations:
                result['annotations'].append(k.to_map() if k else None)
        if self.entity_types is not None:
            result['entityTypes'] = self.entity_types
        result['fieldRules'] = []
        if self.field_rules is not None:
            for k in self.field_rules:
                result['fieldRules'].append(k.to_map() if k else None)
        if self.instance_ids is not None:
            result['instanceIds'] = self.instance_ids
        if self.ip_match_rule is not None:
            result['ipMatchRule'] = self.ip_match_rule.to_map()
        result['labels'] = []
        if self.labels is not None:
            for k in self.labels:
                result['labels'].append(k.to_map() if k else None)
        if self.region_ids is not None:
            result['regionIds'] = self.region_ids
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        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: dict = None):
        m = m or dict()
        self.annotations = []
        if m.get('annotations') is not None:
            for k in m.get('annotations'):
                temp_model = GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesAnnotations()
                self.annotations.append(temp_model.from_map(k))
        if m.get('entityTypes') is not None:
            self.entity_types = m.get('entityTypes')
        self.field_rules = []
        if m.get('fieldRules') is not None:
            for k in m.get('fieldRules'):
                temp_model = GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesFieldRules()
                self.field_rules.append(temp_model.from_map(k))
        if m.get('instanceIds') is not None:
            self.instance_ids = m.get('instanceIds')
        if m.get('ipMatchRule') is not None:
            temp_model = GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesIpMatchRule()
            self.ip_match_rule = temp_model.from_map(m['ipMatchRule'])
        self.labels = []
        if m.get('labels') is not None:
            for k in m.get('labels'):
                temp_model = GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesLabels()
                self.labels.append(temp_model.from_map(k))
        if m.get('regionIds') is not None:
            self.region_ids = m.get('regionIds')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRulesTags()
                self.tags.append(temp_model.from_map(k))
        return self


class GetIntegrationPolicyResponseBodyPolicyEntityGroup(TeaModel):
    def __init__(
        self,
        description: str = None,
        entity_group_id: str = None,
        entity_group_name: str = None,
        entity_rules: GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRules = None,
        query: str = None,
        region_id: str = None,
        user_id: str = None,
        workspace: str = None,
    ):
        # Description.
        self.description = description
        # Entity group ID.
        self.entity_group_id = entity_group_id
        # Entity group name.
        self.entity_group_name = entity_group_name
        # Entity rules.
        self.entity_rules = entity_rules
        # For querying
        self.query = query
        # Region ID.
        self.region_id = region_id
        # User ID.
        self.user_id = user_id
        # Workspace.
        self.workspace = workspace

    def validate(self):
        if self.entity_rules:
            self.entity_rules.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.entity_group_id is not None:
            result['entityGroupId'] = self.entity_group_id
        if self.entity_group_name is not None:
            result['entityGroupName'] = self.entity_group_name
        if self.entity_rules is not None:
            result['entityRules'] = self.entity_rules.to_map()
        if self.query is not None:
            result['query'] = self.query
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('entityGroupId') is not None:
            self.entity_group_id = m.get('entityGroupId')
        if m.get('entityGroupName') is not None:
            self.entity_group_name = m.get('entityGroupName')
        if m.get('entityRules') is not None:
            temp_model = GetIntegrationPolicyResponseBodyPolicyEntityGroupEntityRules()
            self.entity_rules = temp_model.from_map(m['entityRules'])
        if m.get('query') is not None:
            self.query = m.get('query')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetIntegrationPolicyResponseBodyPolicyManagedInfo(TeaModel):
    def __init__(
        self,
        security_group_id: str = None,
        vswitch_id: str = None,
    ):
        # Security group ID.
        self.security_group_id = security_group_id
        # VSwitch ID.
        self.vswitch_id = vswitch_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.security_group_id is not None:
            result['securityGroupId'] = self.security_group_id
        if self.vswitch_id is not None:
            result['vswitchId'] = self.vswitch_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('securityGroupId') is not None:
            self.security_group_id = m.get('securityGroupId')
        if m.get('vswitchId') is not None:
            self.vswitch_id = m.get('vswitchId')
        return self


class GetIntegrationPolicyResponseBodyPolicyTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # Tag key.
        self.key = key
        # Tag value.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 GetIntegrationPolicyResponseBodyPolicy(TeaModel):
    def __init__(
        self,
        bind_resource: GetIntegrationPolicyResponseBodyPolicyBindResource = None,
        cs_umodel_status: bool = None,
        entity_group: GetIntegrationPolicyResponseBodyPolicyEntityGroup = None,
        managed_info: GetIntegrationPolicyResponseBodyPolicyManagedInfo = None,
        policy_id: str = None,
        policy_name: str = None,
        policy_type: str = None,
        region_id: str = None,
        resource_group_id: str = None,
        tags: List[GetIntegrationPolicyResponseBodyPolicyTags] = None,
        user_id: str = None,
        workspace: str = None,
    ):
        # Bound resource information.
        self.bind_resource = bind_resource
        # Cs umodel status
        self.cs_umodel_status = cs_umodel_status
        # Entity group.
        self.entity_group = entity_group
        # Policy management information.
        self.managed_info = managed_info
        # Policy ID.
        self.policy_id = policy_id
        # Rule name.
        self.policy_name = policy_name
        # Access policy type.
        self.policy_type = policy_type
        # Region ID.
        self.region_id = region_id
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Tag keys.
        self.tags = tags
        # User ID.
        self.user_id = user_id
        # Workspace.
        self.workspace = workspace

    def validate(self):
        if self.bind_resource:
            self.bind_resource.validate()
        if self.entity_group:
            self.entity_group.validate()
        if self.managed_info:
            self.managed_info.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bind_resource is not None:
            result['bindResource'] = self.bind_resource.to_map()
        if self.cs_umodel_status is not None:
            result['csUmodelStatus'] = self.cs_umodel_status
        if self.entity_group is not None:
            result['entityGroup'] = self.entity_group.to_map()
        if self.managed_info is not None:
            result['managedInfo'] = self.managed_info.to_map()
        if self.policy_id is not None:
            result['policyId'] = self.policy_id
        if self.policy_name is not None:
            result['policyName'] = self.policy_name
        if self.policy_type is not None:
            result['policyType'] = self.policy_type
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('bindResource') is not None:
            temp_model = GetIntegrationPolicyResponseBodyPolicyBindResource()
            self.bind_resource = temp_model.from_map(m['bindResource'])
        if m.get('csUmodelStatus') is not None:
            self.cs_umodel_status = m.get('csUmodelStatus')
        if m.get('entityGroup') is not None:
            temp_model = GetIntegrationPolicyResponseBodyPolicyEntityGroup()
            self.entity_group = temp_model.from_map(m['entityGroup'])
        if m.get('managedInfo') is not None:
            temp_model = GetIntegrationPolicyResponseBodyPolicyManagedInfo()
            self.managed_info = temp_model.from_map(m['managedInfo'])
        if m.get('policyId') is not None:
            self.policy_id = m.get('policyId')
        if m.get('policyName') is not None:
            self.policy_name = m.get('policyName')
        if m.get('policyType') is not None:
            self.policy_type = m.get('policyType')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = GetIntegrationPolicyResponseBodyPolicyTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetIntegrationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        policy: GetIntegrationPolicyResponseBodyPolicy = None,
        request_id: str = None,
    ):
        # Access policy.
        self.policy = policy
        # ID of the request.
        self.request_id = request_id

    def validate(self):
        if self.policy:
            self.policy.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.policy is not None:
            result['policy'] = self.policy.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('policy') is not None:
            temp_model = GetIntegrationPolicyResponseBodyPolicy()
            self.policy = temp_model.from_map(m['policy'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetIntegrationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetIntegrationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetIntegrationPolicyResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetIntegrationVersionForCSRequest(TeaModel):
    def __init__(
        self,
        cluster_id: str = None,
        cluster_type: str = None,
    ):
        # This parameter is required.
        self.cluster_id = cluster_id
        # This parameter is required.
        self.cluster_type = cluster_type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.cluster_id is not None:
            result['clusterId'] = self.cluster_id
        if self.cluster_type is not None:
            result['clusterType'] = self.cluster_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clusterId') is not None:
            self.cluster_id = m.get('clusterId')
        if m.get('clusterType') is not None:
            self.cluster_type = m.get('clusterType')
        return self


class GetIntegrationVersionForCSResponseBody(TeaModel):
    def __init__(
        self,
        integration_version: str = None,
        request_id: str = None,
    ):
        self.integration_version = integration_version
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.integration_version is not None:
            result['integrationVersion'] = self.integration_version
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('integrationVersion') is not None:
            self.integration_version = m.get('integrationVersion')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetIntegrationVersionForCSResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetIntegrationVersionForCSResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetIntegrationVersionForCSResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetKubeConfigRequest(TeaModel):
    def __init__(
        self,
        cluster_id: str = None,
        cluster_region_id: str = None,
        user_id: str = None,
        user_token: str = None,
    ):
        self.cluster_id = cluster_id
        self.cluster_region_id = cluster_region_id
        self.user_id = user_id
        self.user_token = user_token

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.cluster_id is not None:
            result['clusterId'] = self.cluster_id
        if self.cluster_region_id is not None:
            result['clusterRegionId'] = self.cluster_region_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.user_token is not None:
            result['userToken'] = self.user_token
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clusterId') is not None:
            self.cluster_id = m.get('clusterId')
        if m.get('clusterRegionId') is not None:
            self.cluster_region_id = m.get('clusterRegionId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('userToken') is not None:
            self.user_token = m.get('userToken')
        return self


class GetKubeConfigResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: str = None,
        message: str = None,
        request_id: str = None,
    ):
        self.code = code
        self.data = data
        self.message = message
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['code'] = self.code
        if self.data is not None:
            result['data'] = self.data
        if self.message is not None:
            result['message'] = self.message
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('code') is not None:
            self.code = m.get('code')
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetKubeConfigResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetKubeConfigResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetKubeConfigResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetMaintainWindowRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetMaintainWindowResponseBody(TeaModel):
    def __init__(
        self,
        maintain_window: MaintainWindowForView = None,
        request_id: str = None,
    ):
        self.maintain_window = maintain_window
        # Id of the request
        self.request_id = request_id

    def validate(self):
        if self.maintain_window:
            self.maintain_window.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.maintain_window is not None:
            result['maintainWindow'] = self.maintain_window.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('maintainWindow') is not None:
            temp_model = MaintainWindowForView()
            self.maintain_window = temp_model.from_map(m['maintainWindow'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetMaintainWindowResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetMaintainWindowResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetMaintainWindowResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetMemoriesRequest(TeaModel):
    def __init__(
        self,
        agent_id: str = None,
        app_id: str = None,
        limit: int = None,
        metadata: Dict[str, Any] = None,
        page: int = None,
        page_size: int = None,
        run_id: str = None,
        user_id: str = None,
    ):
        self.agent_id = agent_id
        self.app_id = app_id
        self.limit = limit
        self.metadata = metadata
        self.page = page
        self.page_size = page_size
        self.run_id = run_id
        self.user_id = user_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.agent_id is not None:
            result['agentId'] = self.agent_id
        if self.app_id is not None:
            result['appId'] = self.app_id
        if self.limit is not None:
            result['limit'] = self.limit
        if self.metadata is not None:
            result['metadata'] = self.metadata
        if self.page is not None:
            result['page'] = self.page
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.run_id is not None:
            result['runId'] = self.run_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('agentId') is not None:
            self.agent_id = m.get('agentId')
        if m.get('appId') is not None:
            self.app_id = m.get('appId')
        if m.get('limit') is not None:
            self.limit = m.get('limit')
        if m.get('metadata') is not None:
            self.metadata = m.get('metadata')
        if m.get('page') is not None:
            self.page = m.get('page')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        if m.get('runId') is not None:
            self.run_id = m.get('runId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class GetMemoriesResponseBodyRelations(TeaModel):
    def __init__(
        self,
        destination: str = None,
        relationship: str = None,
        source: str = None,
    ):
        self.destination = destination
        self.relationship = relationship
        self.source = source

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.destination is not None:
            result['destination'] = self.destination
        if self.relationship is not None:
            result['relationship'] = self.relationship
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('destination') is not None:
            self.destination = m.get('destination')
        if m.get('relationship') is not None:
            self.relationship = m.get('relationship')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class GetMemoriesResponseBodyResults(TeaModel):
    def __init__(
        self,
        actor_id: str = None,
        agent_id: str = None,
        created_at: str = None,
        hash: str = None,
        id: str = None,
        memory: str = None,
        metadata: Dict[str, Any] = None,
        role: str = None,
        run_id: str = None,
        score: float = None,
        updated_at: str = None,
        user_id: str = None,
    ):
        self.actor_id = actor_id
        self.agent_id = agent_id
        self.created_at = created_at
        self.hash = hash
        self.id = id
        self.memory = memory
        self.metadata = metadata
        self.role = role
        self.run_id = run_id
        self.score = score
        self.updated_at = updated_at
        self.user_id = user_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.actor_id is not None:
            result['actorId'] = self.actor_id
        if self.agent_id is not None:
            result['agentId'] = self.agent_id
        if self.created_at is not None:
            result['createdAt'] = self.created_at
        if self.hash is not None:
            result['hash'] = self.hash
        if self.id is not None:
            result['id'] = self.id
        if self.memory is not None:
            result['memory'] = self.memory
        if self.metadata is not None:
            result['metadata'] = self.metadata
        if self.role is not None:
            result['role'] = self.role
        if self.run_id is not None:
            result['runId'] = self.run_id
        if self.score is not None:
            result['score'] = self.score
        if self.updated_at is not None:
            result['updatedAt'] = self.updated_at
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('actorId') is not None:
            self.actor_id = m.get('actorId')
        if m.get('agentId') is not None:
            self.agent_id = m.get('agentId')
        if m.get('createdAt') is not None:
            self.created_at = m.get('createdAt')
        if m.get('hash') is not None:
            self.hash = m.get('hash')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('memory') is not None:
            self.memory = m.get('memory')
        if m.get('metadata') is not None:
            self.metadata = m.get('metadata')
        if m.get('role') is not None:
            self.role = m.get('role')
        if m.get('runId') is not None:
            self.run_id = m.get('runId')
        if m.get('score') is not None:
            self.score = m.get('score')
        if m.get('updatedAt') is not None:
            self.updated_at = m.get('updatedAt')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class GetMemoriesResponseBody(TeaModel):
    def __init__(
        self,
        relations: List[GetMemoriesResponseBodyRelations] = None,
        request_id: str = None,
        results: List[GetMemoriesResponseBodyResults] = None,
    ):
        self.relations = relations
        self.request_id = request_id
        self.results = results

    def validate(self):
        if self.relations:
            for k in self.relations:
                if k:
                    k.validate()
        if self.results:
            for k in self.results:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['relations'] = []
        if self.relations is not None:
            for k in self.relations:
                result['relations'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['requestId'] = self.request_id
        result['results'] = []
        if self.results is not None:
            for k in self.results:
                result['results'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.relations = []
        if m.get('relations') is not None:
            for k in m.get('relations'):
                temp_model = GetMemoriesResponseBodyRelations()
                self.relations.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        self.results = []
        if m.get('results') is not None:
            for k in m.get('results'):
                temp_model = GetMemoriesResponseBodyResults()
                self.results.append(temp_model.from_map(k))
        return self


class GetMemoriesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetMemoriesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetMemoriesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetMemoryResponseBody(TeaModel):
    def __init__(
        self,
        created_at: str = None,
        expiration_date: str = None,
        id: str = None,
        immutable: str = None,
        memory: str = None,
        metadata: str = None,
        organization: str = None,
        owner: str = None,
        request_id: str = None,
        updated_at: str = None,
    ):
        self.created_at = created_at
        self.expiration_date = expiration_date
        self.id = id
        self.immutable = immutable
        self.memory = memory
        self.metadata = metadata
        self.organization = organization
        self.owner = owner
        self.request_id = request_id
        self.updated_at = updated_at

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.created_at is not None:
            result['createdAt'] = self.created_at
        if self.expiration_date is not None:
            result['expirationDate'] = self.expiration_date
        if self.id is not None:
            result['id'] = self.id
        if self.immutable is not None:
            result['immutable'] = self.immutable
        if self.memory is not None:
            result['memory'] = self.memory
        if self.metadata is not None:
            result['metadata'] = self.metadata
        if self.organization is not None:
            result['organization'] = self.organization
        if self.owner is not None:
            result['owner'] = self.owner
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.updated_at is not None:
            result['updatedAt'] = self.updated_at
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createdAt') is not None:
            self.created_at = m.get('createdAt')
        if m.get('expirationDate') is not None:
            self.expiration_date = m.get('expirationDate')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('immutable') is not None:
            self.immutable = m.get('immutable')
        if m.get('memory') is not None:
            self.memory = m.get('memory')
        if m.get('metadata') is not None:
            self.metadata = m.get('metadata')
        if m.get('organization') is not None:
            self.organization = m.get('organization')
        if m.get('owner') is not None:
            self.owner = m.get('owner')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('updatedAt') is not None:
            self.updated_at = m.get('updatedAt')
        return self


class GetMemoryResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetMemoryResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetMemoryResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetMemoryHistoryResponseBodyResultsInput(TeaModel):
    def __init__(
        self,
        content: str = None,
        role: str = None,
    ):
        self.content = content
        self.role = role

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.content is not None:
            result['content'] = self.content
        if self.role is not None:
            result['role'] = self.role
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('content') is not None:
            self.content = m.get('content')
        if m.get('role') is not None:
            self.role = m.get('role')
        return self


class GetMemoryHistoryResponseBodyResults(TeaModel):
    def __init__(
        self,
        created_at: str = None,
        event: str = None,
        id: str = None,
        input: List[GetMemoryHistoryResponseBodyResultsInput] = None,
        memory_id: str = None,
        metadata: Dict[str, Any] = None,
        new_memory: str = None,
        old_memory: str = None,
        updated_at: str = None,
        user_id: str = None,
    ):
        self.created_at = created_at
        self.event = event
        self.id = id
        self.input = input
        self.memory_id = memory_id
        self.metadata = metadata
        self.new_memory = new_memory
        self.old_memory = old_memory
        self.updated_at = updated_at
        self.user_id = user_id

    def validate(self):
        if self.input:
            for k in self.input:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.created_at is not None:
            result['createdAt'] = self.created_at
        if self.event is not None:
            result['event'] = self.event
        if self.id is not None:
            result['id'] = self.id
        result['input'] = []
        if self.input is not None:
            for k in self.input:
                result['input'].append(k.to_map() if k else None)
        if self.memory_id is not None:
            result['memoryId'] = self.memory_id
        if self.metadata is not None:
            result['metadata'] = self.metadata
        if self.new_memory is not None:
            result['newMemory'] = self.new_memory
        if self.old_memory is not None:
            result['oldMemory'] = self.old_memory
        if self.updated_at is not None:
            result['updatedAt'] = self.updated_at
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createdAt') is not None:
            self.created_at = m.get('createdAt')
        if m.get('event') is not None:
            self.event = m.get('event')
        if m.get('id') is not None:
            self.id = m.get('id')
        self.input = []
        if m.get('input') is not None:
            for k in m.get('input'):
                temp_model = GetMemoryHistoryResponseBodyResultsInput()
                self.input.append(temp_model.from_map(k))
        if m.get('memoryId') is not None:
            self.memory_id = m.get('memoryId')
        if m.get('metadata') is not None:
            self.metadata = m.get('metadata')
        if m.get('newMemory') is not None:
            self.new_memory = m.get('newMemory')
        if m.get('oldMemory') is not None:
            self.old_memory = m.get('oldMemory')
        if m.get('updatedAt') is not None:
            self.updated_at = m.get('updatedAt')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class GetMemoryHistoryResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        results: List[GetMemoryHistoryResponseBodyResults] = None,
    ):
        self.request_id = request_id
        self.results = results

    def validate(self):
        if self.results:
            for k in self.results:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        result['results'] = []
        if self.results is not None:
            for k in self.results:
                result['results'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        self.results = []
        if m.get('results') is not None:
            for k in m.get('results'):
                temp_model = GetMemoryHistoryResponseBodyResults()
                self.results.append(temp_model.from_map(k))
        return self


class GetMemoryHistoryResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetMemoryHistoryResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetMemoryHistoryResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetMemoryStoreResponseBody(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        custom_extraction_strategies: List[CustomExtractionStrategy] = None,
        description: str = None,
        enable_graph: bool = None,
        extraction_strategies: List[str] = None,
        memory_store_name: str = None,
        region_id: str = None,
        request_id: str = None,
        short_term_ttl: int = None,
        strategy: str = None,
        update_time: str = None,
        workspace: str = None,
    ):
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        self.custom_extraction_strategies = custom_extraction_strategies
        self.description = description
        self.enable_graph = enable_graph
        self.extraction_strategies = extraction_strategies
        self.memory_store_name = memory_store_name
        self.region_id = region_id
        self.request_id = request_id
        self.short_term_ttl = short_term_ttl
        self.strategy = strategy
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.update_time = update_time
        self.workspace = workspace

    def validate(self):
        if self.custom_extraction_strategies:
            for k in self.custom_extraction_strategies:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        result['customExtractionStrategies'] = []
        if self.custom_extraction_strategies is not None:
            for k in self.custom_extraction_strategies:
                result['customExtractionStrategies'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.enable_graph is not None:
            result['enableGraph'] = self.enable_graph
        if self.extraction_strategies is not None:
            result['extractionStrategies'] = self.extraction_strategies
        if self.memory_store_name is not None:
            result['memoryStoreName'] = self.memory_store_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.short_term_ttl is not None:
            result['shortTermTtl'] = self.short_term_ttl
        if self.strategy is not None:
            result['strategy'] = self.strategy
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        self.custom_extraction_strategies = []
        if m.get('customExtractionStrategies') is not None:
            for k in m.get('customExtractionStrategies'):
                temp_model = CustomExtractionStrategy()
                self.custom_extraction_strategies.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enableGraph') is not None:
            self.enable_graph = m.get('enableGraph')
        if m.get('extractionStrategies') is not None:
            self.extraction_strategies = m.get('extractionStrategies')
        if m.get('memoryStoreName') is not None:
            self.memory_store_name = m.get('memoryStoreName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('shortTermTtl') is not None:
            self.short_term_ttl = m.get('shortTermTtl')
        if m.get('strategy') is not None:
            self.strategy = m.get('strategy')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetMemoryStoreResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetMemoryStoreResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetMemoryStoreResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetNotifyStrategyRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        # This parameter is required.
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetNotifyStrategyResponseBody(TeaModel):
    def __init__(
        self,
        notify_strategy: NotifyStrategyForView = None,
        request_id: str = None,
    ):
        self.notify_strategy = notify_strategy
        # Id of the request
        self.request_id = request_id

    def validate(self):
        if self.notify_strategy:
            self.notify_strategy.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.notify_strategy is not None:
            result['notifyStrategy'] = self.notify_strategy.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('notifyStrategy') is not None:
            temp_model = NotifyStrategyForView()
            self.notify_strategy = temp_model.from_map(m['notifyStrategy'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetNotifyStrategyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetNotifyStrategyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetNotifyStrategyResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetOncallScheduleRequest(TeaModel):
    def __init__(
        self,
        source: str = None,
    ):
        self.source = source

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class GetOncallScheduleResponseBodyRotations(TeaModel):
    def __init__(
        self,
        active_days: List[int] = None,
        contacts: List[str] = None,
        rotation_end_time: str = None,
        rotation_name: str = None,
        rotation_start_time: str = None,
        shift_length: int = None,
        shift_recurrence_frequency: str = None,
        start_date: str = None,
        time_zone: str = None,
    ):
        self.active_days = active_days
        self.contacts = contacts
        self.rotation_end_time = rotation_end_time
        self.rotation_name = rotation_name
        self.rotation_start_time = rotation_start_time
        self.shift_length = shift_length
        self.shift_recurrence_frequency = shift_recurrence_frequency
        self.start_date = start_date
        self.time_zone = time_zone

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.active_days is not None:
            result['activeDays'] = self.active_days
        if self.contacts is not None:
            result['contacts'] = self.contacts
        if self.rotation_end_time is not None:
            result['rotationEndTime'] = self.rotation_end_time
        if self.rotation_name is not None:
            result['rotationName'] = self.rotation_name
        if self.rotation_start_time is not None:
            result['rotationStartTime'] = self.rotation_start_time
        if self.shift_length is not None:
            result['shiftLength'] = self.shift_length
        if self.shift_recurrence_frequency is not None:
            result['shiftRecurrenceFrequency'] = self.shift_recurrence_frequency
        if self.start_date is not None:
            result['startDate'] = self.start_date
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('activeDays') is not None:
            self.active_days = m.get('activeDays')
        if m.get('contacts') is not None:
            self.contacts = m.get('contacts')
        if m.get('rotationEndTime') is not None:
            self.rotation_end_time = m.get('rotationEndTime')
        if m.get('rotationName') is not None:
            self.rotation_name = m.get('rotationName')
        if m.get('rotationStartTime') is not None:
            self.rotation_start_time = m.get('rotationStartTime')
        if m.get('shiftLength') is not None:
            self.shift_length = m.get('shiftLength')
        if m.get('shiftRecurrenceFrequency') is not None:
            self.shift_recurrence_frequency = m.get('shiftRecurrenceFrequency')
        if m.get('startDate') is not None:
            self.start_date = m.get('startDate')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        return self


class GetOncallScheduleResponseBody(TeaModel):
    def __init__(
        self,
        oncall_schedule_id: str = None,
        oncall_schedule_name: str = None,
        request_id: str = None,
        rotations: List[GetOncallScheduleResponseBodyRotations] = None,
        shift_robot_id: str = None,
    ):
        self.oncall_schedule_id = oncall_schedule_id
        self.oncall_schedule_name = oncall_schedule_name
        self.request_id = request_id
        self.rotations = rotations
        self.shift_robot_id = shift_robot_id

    def validate(self):
        if self.rotations:
            for k in self.rotations:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.oncall_schedule_id is not None:
            result['oncallScheduleId'] = self.oncall_schedule_id
        if self.oncall_schedule_name is not None:
            result['oncallScheduleName'] = self.oncall_schedule_name
        if self.request_id is not None:
            result['requestId'] = self.request_id
        result['rotations'] = []
        if self.rotations is not None:
            for k in self.rotations:
                result['rotations'].append(k.to_map() if k else None)
        if self.shift_robot_id is not None:
            result['shiftRobotId'] = self.shift_robot_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('oncallScheduleId') is not None:
            self.oncall_schedule_id = m.get('oncallScheduleId')
        if m.get('oncallScheduleName') is not None:
            self.oncall_schedule_name = m.get('oncallScheduleName')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        self.rotations = []
        if m.get('rotations') is not None:
            for k in m.get('rotations'):
                temp_model = GetOncallScheduleResponseBodyRotations()
                self.rotations.append(temp_model.from_map(k))
        if m.get('shiftRobotId') is not None:
            self.shift_robot_id = m.get('shiftRobotId')
        return self


class GetOncallScheduleResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetOncallScheduleResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetOncallScheduleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetPipelineResponseBodyExecutePolicyRunOnce(TeaModel):
    def __init__(
        self,
        from_time: int = None,
        to_time: int = None,
    ):
        self.from_time = from_time
        self.to_time = to_time

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.from_time is not None:
            result['fromTime'] = self.from_time
        if self.to_time is not None:
            result['toTime'] = self.to_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('fromTime') is not None:
            self.from_time = m.get('fromTime')
        if m.get('toTime') is not None:
            self.to_time = m.get('toTime')
        return self


class GetPipelineResponseBodyExecutePolicyScheduled(TeaModel):
    def __init__(
        self,
        interval: str = None,
    ):
        self.interval = interval

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.interval is not None:
            result['interval'] = self.interval
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        return self


class GetPipelineResponseBodyExecutePolicy(TeaModel):
    def __init__(
        self,
        mode: str = None,
        run_once: GetPipelineResponseBodyExecutePolicyRunOnce = None,
        scheduled: GetPipelineResponseBodyExecutePolicyScheduled = None,
    ):
        self.mode = mode
        self.run_once = run_once
        self.scheduled = scheduled

    def validate(self):
        if self.run_once:
            self.run_once.validate()
        if self.scheduled:
            self.scheduled.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.mode is not None:
            result['mode'] = self.mode
        if self.run_once is not None:
            result['runOnce'] = self.run_once.to_map()
        if self.scheduled is not None:
            result['scheduled'] = self.scheduled.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('mode') is not None:
            self.mode = m.get('mode')
        if m.get('runOnce') is not None:
            temp_model = GetPipelineResponseBodyExecutePolicyRunOnce()
            self.run_once = temp_model.from_map(m['runOnce'])
        if m.get('scheduled') is not None:
            temp_model = GetPipelineResponseBodyExecutePolicyScheduled()
            self.scheduled = temp_model.from_map(m['scheduled'])
        return self


class GetPipelineResponseBodyPipelineNodes(TeaModel):
    def __init__(
        self,
        id: str = None,
        parameters: Dict[str, Any] = None,
        type: str = None,
    ):
        self.id = id
        self.parameters = parameters
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.parameters is not None:
            result['parameters'] = self.parameters
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('parameters') is not None:
            self.parameters = m.get('parameters')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class GetPipelineResponseBodyPipeline(TeaModel):
    def __init__(
        self,
        nodes: List[GetPipelineResponseBodyPipelineNodes] = None,
    ):
        self.nodes = nodes

    def validate(self):
        if self.nodes:
            for k in self.nodes:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['nodes'] = []
        if self.nodes is not None:
            for k in self.nodes:
                result['nodes'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.nodes = []
        if m.get('nodes') is not None:
            for k in m.get('nodes'):
                temp_model = GetPipelineResponseBodyPipelineNodes()
                self.nodes.append(temp_model.from_map(k))
        return self


class GetPipelineResponseBodySinkDataset(TeaModel):
    def __init__(
        self,
        dataset: str = None,
        workspace: str = None,
    ):
        self.dataset = dataset
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.dataset is not None:
            result['dataset'] = self.dataset
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dataset') is not None:
            self.dataset = m.get('dataset')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetPipelineResponseBodySink(TeaModel):
    def __init__(
        self,
        dataset: GetPipelineResponseBodySinkDataset = None,
        type: str = None,
    ):
        self.dataset = dataset
        self.type = type

    def validate(self):
        if self.dataset:
            self.dataset.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.dataset is not None:
            result['dataset'] = self.dataset.to_map()
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dataset') is not None:
            temp_model = GetPipelineResponseBodySinkDataset()
            self.dataset = temp_model.from_map(m['dataset'])
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class GetPipelineResponseBodySourceLogstore(TeaModel):
    def __init__(
        self,
        logstore: str = None,
        project: str = None,
    ):
        self.logstore = logstore
        self.project = project

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.logstore is not None:
            result['logstore'] = self.logstore
        if self.project is not None:
            result['project'] = self.project
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('logstore') is not None:
            self.logstore = m.get('logstore')
        if m.get('project') is not None:
            self.project = m.get('project')
        return self


class GetPipelineResponseBodySource(TeaModel):
    def __init__(
        self,
        logstore: GetPipelineResponseBodySourceLogstore = None,
        type: str = None,
    ):
        self.logstore = logstore
        self.type = type

    def validate(self):
        if self.logstore:
            self.logstore.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.logstore is not None:
            result['logstore'] = self.logstore.to_map()
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('logstore') is not None:
            temp_model = GetPipelineResponseBodySourceLogstore()
            self.logstore = temp_model.from_map(m['logstore'])
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class GetPipelineResponseBody(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        description: str = None,
        execute_policy: GetPipelineResponseBodyExecutePolicy = None,
        pipeline: GetPipelineResponseBodyPipeline = None,
        pipeline_name: str = None,
        region_id: str = None,
        request_id: str = None,
        sink: GetPipelineResponseBodySink = None,
        source: GetPipelineResponseBodySource = None,
        update_time: str = None,
        workspace: str = None,
    ):
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        self.description = description
        self.execute_policy = execute_policy
        self.pipeline = pipeline
        self.pipeline_name = pipeline_name
        self.region_id = region_id
        self.request_id = request_id
        self.sink = sink
        self.source = source
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.update_time = update_time
        self.workspace = workspace

    def validate(self):
        if self.execute_policy:
            self.execute_policy.validate()
        if self.pipeline:
            self.pipeline.validate()
        if self.sink:
            self.sink.validate()
        if self.source:
            self.source.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.execute_policy is not None:
            result['executePolicy'] = self.execute_policy.to_map()
        if self.pipeline is not None:
            result['pipeline'] = self.pipeline.to_map()
        if self.pipeline_name is not None:
            result['pipelineName'] = self.pipeline_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.sink is not None:
            result['sink'] = self.sink.to_map()
        if self.source is not None:
            result['source'] = self.source.to_map()
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('executePolicy') is not None:
            temp_model = GetPipelineResponseBodyExecutePolicy()
            self.execute_policy = temp_model.from_map(m['executePolicy'])
        if m.get('pipeline') is not None:
            temp_model = GetPipelineResponseBodyPipeline()
            self.pipeline = temp_model.from_map(m['pipeline'])
        if m.get('pipelineName') is not None:
            self.pipeline_name = m.get('pipelineName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('sink') is not None:
            temp_model = GetPipelineResponseBodySink()
            self.sink = temp_model.from_map(m['sink'])
        if m.get('source') is not None:
            temp_model = GetPipelineResponseBodySource()
            self.source = temp_model.from_map(m['source'])
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetPipelineResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetPipelineResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetPipelineResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetPrometheusClusterRequest(TeaModel):
    def __init__(
        self,
        resource_group_id: str = None,
    ):
        self.resource_group_id = resource_group_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        return self


class GetPrometheusClusterResponseBodyPrometheusClusterPushGatewayEndPoint(TeaModel):
    def __init__(
        self,
        internal: str = None,
        internet: str = None,
        intranet: str = None,
    ):
        self.internal = internal
        self.internet = internet
        self.intranet = intranet

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.internal is not None:
            result['internal'] = self.internal
        if self.internet is not None:
            result['internet'] = self.internet
        if self.intranet is not None:
            result['intranet'] = self.intranet
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('internal') is not None:
            self.internal = m.get('internal')
        if m.get('internet') is not None:
            self.internet = m.get('internet')
        if m.get('intranet') is not None:
            self.intranet = m.get('intranet')
        return self


class GetPrometheusClusterResponseBodyPrometheusClusterRemoteWriteEndPoint(TeaModel):
    def __init__(
        self,
        internal: str = None,
        internet: str = None,
        intranet: str = None,
    ):
        self.internal = internal
        self.internet = internet
        self.intranet = intranet

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.internal is not None:
            result['internal'] = self.internal
        if self.internet is not None:
            result['internet'] = self.internet
        if self.intranet is not None:
            result['intranet'] = self.intranet
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('internal') is not None:
            self.internal = m.get('internal')
        if m.get('internet') is not None:
            self.internet = m.get('internet')
        if m.get('intranet') is not None:
            self.intranet = m.get('intranet')
        return self


class GetPrometheusClusterResponseBodyPrometheusClusterReplicaInstances(TeaModel):
    def __init__(
        self,
        prometheus_instance_id: str = None,
        sls_metric_store: str = None,
        user_id: str = None,
    ):
        self.prometheus_instance_id = prometheus_instance_id
        self.sls_metric_store = sls_metric_store
        self.user_id = user_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.prometheus_instance_id is not None:
            result['prometheusInstanceId'] = self.prometheus_instance_id
        if self.sls_metric_store is not None:
            result['slsMetricStore'] = self.sls_metric_store
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusInstanceId') is not None:
            self.prometheus_instance_id = m.get('prometheusInstanceId')
        if m.get('slsMetricStore') is not None:
            self.sls_metric_store = m.get('slsMetricStore')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class GetPrometheusClusterResponseBodyPrometheusClusterTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        self.key = key
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 GetPrometheusClusterResponseBodyPrometheusCluster(TeaModel):
    def __init__(
        self,
        auth_free_write_policy: str = None,
        create_time: str = None,
        enable_auth_free_write: bool = None,
        extra_info: Dict[str, str] = None,
        hash_label_key: str = None,
        payment_type: str = None,
        prometheus_cluster_name: str = None,
        prometheus_view_id: str = None,
        push_gateway_end_point: GetPrometheusClusterResponseBodyPrometheusClusterPushGatewayEndPoint = None,
        region_id: str = None,
        remote_write_end_point: GetPrometheusClusterResponseBodyPrometheusClusterRemoteWriteEndPoint = None,
        replica_instances: List[GetPrometheusClusterResponseBodyPrometheusClusterReplicaInstances] = None,
        replicas: int = None,
        resource_group_id: str = None,
        storage_duration: int = None,
        tags: List[GetPrometheusClusterResponseBodyPrometheusClusterTags] = None,
        user_id: str = None,
    ):
        self.auth_free_write_policy = auth_free_write_policy
        self.create_time = create_time
        self.enable_auth_free_write = enable_auth_free_write
        self.extra_info = extra_info
        self.hash_label_key = hash_label_key
        self.payment_type = payment_type
        self.prometheus_cluster_name = prometheus_cluster_name
        self.prometheus_view_id = prometheus_view_id
        self.push_gateway_end_point = push_gateway_end_point
        self.region_id = region_id
        self.remote_write_end_point = remote_write_end_point
        self.replica_instances = replica_instances
        self.replicas = replicas
        self.resource_group_id = resource_group_id
        self.storage_duration = storage_duration
        self.tags = tags
        self.user_id = user_id

    def validate(self):
        if self.push_gateway_end_point:
            self.push_gateway_end_point.validate()
        if self.remote_write_end_point:
            self.remote_write_end_point.validate()
        if self.replica_instances:
            for k in self.replica_instances:
                if k:
                    k.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.auth_free_write_policy is not None:
            result['authFreeWritePolicy'] = self.auth_free_write_policy
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.enable_auth_free_write is not None:
            result['enableAuthFreeWrite'] = self.enable_auth_free_write
        if self.extra_info is not None:
            result['extraInfo'] = self.extra_info
        if self.hash_label_key is not None:
            result['hashLabelKey'] = self.hash_label_key
        if self.payment_type is not None:
            result['paymentType'] = self.payment_type
        if self.prometheus_cluster_name is not None:
            result['prometheusClusterName'] = self.prometheus_cluster_name
        if self.prometheus_view_id is not None:
            result['prometheusViewId'] = self.prometheus_view_id
        if self.push_gateway_end_point is not None:
            result['pushGatewayEndPoint'] = self.push_gateway_end_point.to_map()
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.remote_write_end_point is not None:
            result['remoteWriteEndPoint'] = self.remote_write_end_point.to_map()
        result['replicaInstances'] = []
        if self.replica_instances is not None:
            for k in self.replica_instances:
                result['replicaInstances'].append(k.to_map() if k else None)
        if self.replicas is not None:
            result['replicas'] = self.replicas
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.storage_duration is not None:
            result['storageDuration'] = self.storage_duration
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('authFreeWritePolicy') is not None:
            self.auth_free_write_policy = m.get('authFreeWritePolicy')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('enableAuthFreeWrite') is not None:
            self.enable_auth_free_write = m.get('enableAuthFreeWrite')
        if m.get('extraInfo') is not None:
            self.extra_info = m.get('extraInfo')
        if m.get('hashLabelKey') is not None:
            self.hash_label_key = m.get('hashLabelKey')
        if m.get('paymentType') is not None:
            self.payment_type = m.get('paymentType')
        if m.get('prometheusClusterName') is not None:
            self.prometheus_cluster_name = m.get('prometheusClusterName')
        if m.get('prometheusViewId') is not None:
            self.prometheus_view_id = m.get('prometheusViewId')
        if m.get('pushGatewayEndPoint') is not None:
            temp_model = GetPrometheusClusterResponseBodyPrometheusClusterPushGatewayEndPoint()
            self.push_gateway_end_point = temp_model.from_map(m['pushGatewayEndPoint'])
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('remoteWriteEndPoint') is not None:
            temp_model = GetPrometheusClusterResponseBodyPrometheusClusterRemoteWriteEndPoint()
            self.remote_write_end_point = temp_model.from_map(m['remoteWriteEndPoint'])
        self.replica_instances = []
        if m.get('replicaInstances') is not None:
            for k in m.get('replicaInstances'):
                temp_model = GetPrometheusClusterResponseBodyPrometheusClusterReplicaInstances()
                self.replica_instances.append(temp_model.from_map(k))
        if m.get('replicas') is not None:
            self.replicas = m.get('replicas')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('storageDuration') is not None:
            self.storage_duration = m.get('storageDuration')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = GetPrometheusClusterResponseBodyPrometheusClusterTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class GetPrometheusClusterResponseBody(TeaModel):
    def __init__(
        self,
        prometheus_cluster: GetPrometheusClusterResponseBodyPrometheusCluster = None,
        request_id: str = None,
    ):
        self.prometheus_cluster = prometheus_cluster
        # Id of the request
        self.request_id = request_id

    def validate(self):
        if self.prometheus_cluster:
            self.prometheus_cluster.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.prometheus_cluster is not None:
            result['prometheusCluster'] = self.prometheus_cluster.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusCluster') is not None:
            temp_model = GetPrometheusClusterResponseBodyPrometheusCluster()
            self.prometheus_cluster = temp_model.from_map(m['prometheusCluster'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetPrometheusClusterResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetPrometheusClusterResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetPrometheusClusterResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetPrometheusInstanceRequest(TeaModel):
    def __init__(
        self,
        aliyun_lang: str = None,
        resource_group_id: str = None,
    ):
        # Language setting, default is Chinese zh | en
        self.aliyun_lang = aliyun_lang
        # Resource group ID.
        self.resource_group_id = resource_group_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aliyun_lang is not None:
            result['aliyunLang'] = self.aliyun_lang
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aliyunLang') is not None:
            self.aliyun_lang = m.get('aliyunLang')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        return self


class GetPrometheusInstanceResponseBodyPrometheusInstanceTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # Tag key.
        self.key = key
        # Matched value.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 GetPrometheusInstanceResponseBodyPrometheusInstance(TeaModel):
    def __init__(
        self,
        access_type: str = None,
        archive_duration: int = None,
        auth_free_read_policy: str = None,
        auth_free_write_policy: str = None,
        auth_token: str = None,
        basic_metric_query_limit: bool = None,
        create_time: str = None,
        enable_auth_free_read: bool = None,
        enable_auth_free_write: bool = None,
        enable_auth_token: bool = None,
        extra_info: Dict[str, str] = None,
        folder_url: str = None,
        grafana_instance_id: str = None,
        grafana_instance_name: str = None,
        http_api_inter_url: str = None,
        http_api_intra_url: str = None,
        instance_type: str = None,
        payment_type: str = None,
        payment_type_update_time: str = None,
        product: str = None,
        prometheus_instance_id: str = None,
        prometheus_instance_name: str = None,
        push_gateway_inter_url: str = None,
        push_gateway_intra_url: str = None,
        region_id: str = None,
        remote_read_inter_url: str = None,
        remote_read_intra_url: str = None,
        remote_write_inter_url: str = None,
        remote_write_intra_url: str = None,
        resource_group_id: str = None,
        resource_type: str = None,
        status: str = None,
        storage_duration: int = None,
        support_auth_types: List[str] = None,
        tags: List[GetPrometheusInstanceResponseBodyPrometheusInstanceTags] = None,
        user_id: str = None,
        version: str = None,
        workspace: str = None,
    ):
        # Access type:
        # readWrite, readOnly, httpReadOnly
        self.access_type = access_type
        # Number of days to automatically archive and save after storage expiration. 0 means no archiving, 3650 means permanent saving.
        self.archive_duration = archive_duration
        # Password-free read policy (supports IP segments and VpcId).
        self.auth_free_read_policy = auth_free_read_policy
        # Password-free write policy (supports IP segments and VpcId).
        self.auth_free_write_policy = auth_free_write_policy
        # authToken string.
        self.auth_token = auth_token
        self.basic_metric_query_limit = basic_metric_query_limit
        # Instance creation time, using UTC+0, formatted as yyyy-MM-ddTHH:mmZ.
        self.create_time = create_time
        # Whether to enable password-free reading.
        self.enable_auth_free_read = enable_auth_free_read
        # Whether to enable password-free writing.
        self.enable_auth_free_write = enable_auth_free_write
        # Whether to enable authentication token.
        self.enable_auth_token = enable_auth_token
        # Additional information.
        self.extra_info = extra_info
        # URL of the visualization dashboard directory.
        self.folder_url = folder_url
        # ID of the managed Grafana instance that is bound.
        self.grafana_instance_id = grafana_instance_id
        # Name of the managed Grafana instance that is bound.
        self.grafana_instance_name = grafana_instance_name
        # HTTP public network address.
        self.http_api_inter_url = http_api_inter_url
        # HTTP intranet address.
        self.http_api_intra_url = http_api_intra_url
        # Prometheus instance type.
        self.instance_type = instance_type
        # Billing method:
        # POSTPAY: Pay-as-you-go based on metric reporting volume.
        # POSTPAY_GB: Pay-as-you-go based on metric write volume.
        self.payment_type = payment_type
        # Time when the billing method of the instance was updated.
        self.payment_type_update_time = payment_type_update_time
        # The product to which the Prometheus instance belongs (arms or cms).
        self.product = product
        # Instance ID.
        self.prometheus_instance_id = prometheus_instance_id
        # Instance name.
        self.prometheus_instance_name = prometheus_instance_name
        # Public network address of PushGateway.
        self.push_gateway_inter_url = push_gateway_inter_url
        # Intranet address of PushGateway.
        self.push_gateway_intra_url = push_gateway_intra_url
        # Region ID.
        self.region_id = region_id
        # Public network read address.
        self.remote_read_inter_url = remote_read_inter_url
        # Intranet read address.
        self.remote_read_intra_url = remote_read_intra_url
        # Public network write address.
        self.remote_write_inter_url = remote_write_inter_url
        # Intranet write address.
        self.remote_write_intra_url = remote_write_intra_url
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Fixed value: PrometheusInstance.
        self.resource_type = resource_type
        # Instance status.
        self.status = status
        # Storage duration (in days).
        self.storage_duration = storage_duration
        # Supported authentication types.
        self.support_auth_types = support_auth_types
        # List of tags.
        self.tags = tags
        # User ID.
        self.user_id = user_id
        # Version.
        self.version = version
        # The workspace to which the Prometheus instance belongs.
        self.workspace = workspace

    def validate(self):
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.access_type is not None:
            result['accessType'] = self.access_type
        if self.archive_duration is not None:
            result['archiveDuration'] = self.archive_duration
        if self.auth_free_read_policy is not None:
            result['authFreeReadPolicy'] = self.auth_free_read_policy
        if self.auth_free_write_policy is not None:
            result['authFreeWritePolicy'] = self.auth_free_write_policy
        if self.auth_token is not None:
            result['authToken'] = self.auth_token
        if self.basic_metric_query_limit is not None:
            result['basicMetricQueryLimit'] = self.basic_metric_query_limit
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.enable_auth_free_read is not None:
            result['enableAuthFreeRead'] = self.enable_auth_free_read
        if self.enable_auth_free_write is not None:
            result['enableAuthFreeWrite'] = self.enable_auth_free_write
        if self.enable_auth_token is not None:
            result['enableAuthToken'] = self.enable_auth_token
        if self.extra_info is not None:
            result['extraInfo'] = self.extra_info
        if self.folder_url is not None:
            result['folderUrl'] = self.folder_url
        if self.grafana_instance_id is not None:
            result['grafanaInstanceId'] = self.grafana_instance_id
        if self.grafana_instance_name is not None:
            result['grafanaInstanceName'] = self.grafana_instance_name
        if self.http_api_inter_url is not None:
            result['httpApiInterUrl'] = self.http_api_inter_url
        if self.http_api_intra_url is not None:
            result['httpApiIntraUrl'] = self.http_api_intra_url
        if self.instance_type is not None:
            result['instanceType'] = self.instance_type
        if self.payment_type is not None:
            result['paymentType'] = self.payment_type
        if self.payment_type_update_time is not None:
            result['paymentTypeUpdateTime'] = self.payment_type_update_time
        if self.product is not None:
            result['product'] = self.product
        if self.prometheus_instance_id is not None:
            result['prometheusInstanceId'] = self.prometheus_instance_id
        if self.prometheus_instance_name is not None:
            result['prometheusInstanceName'] = self.prometheus_instance_name
        if self.push_gateway_inter_url is not None:
            result['pushGatewayInterUrl'] = self.push_gateway_inter_url
        if self.push_gateway_intra_url is not None:
            result['pushGatewayIntraUrl'] = self.push_gateway_intra_url
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.remote_read_inter_url is not None:
            result['remoteReadInterUrl'] = self.remote_read_inter_url
        if self.remote_read_intra_url is not None:
            result['remoteReadIntraUrl'] = self.remote_read_intra_url
        if self.remote_write_inter_url is not None:
            result['remoteWriteInterUrl'] = self.remote_write_inter_url
        if self.remote_write_intra_url is not None:
            result['remoteWriteIntraUrl'] = self.remote_write_intra_url
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.resource_type is not None:
            result['resourceType'] = self.resource_type
        if self.status is not None:
            result['status'] = self.status
        if self.storage_duration is not None:
            result['storageDuration'] = self.storage_duration
        if self.support_auth_types is not None:
            result['supportAuthTypes'] = self.support_auth_types
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('accessType') is not None:
            self.access_type = m.get('accessType')
        if m.get('archiveDuration') is not None:
            self.archive_duration = m.get('archiveDuration')
        if m.get('authFreeReadPolicy') is not None:
            self.auth_free_read_policy = m.get('authFreeReadPolicy')
        if m.get('authFreeWritePolicy') is not None:
            self.auth_free_write_policy = m.get('authFreeWritePolicy')
        if m.get('authToken') is not None:
            self.auth_token = m.get('authToken')
        if m.get('basicMetricQueryLimit') is not None:
            self.basic_metric_query_limit = m.get('basicMetricQueryLimit')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('enableAuthFreeRead') is not None:
            self.enable_auth_free_read = m.get('enableAuthFreeRead')
        if m.get('enableAuthFreeWrite') is not None:
            self.enable_auth_free_write = m.get('enableAuthFreeWrite')
        if m.get('enableAuthToken') is not None:
            self.enable_auth_token = m.get('enableAuthToken')
        if m.get('extraInfo') is not None:
            self.extra_info = m.get('extraInfo')
        if m.get('folderUrl') is not None:
            self.folder_url = m.get('folderUrl')
        if m.get('grafanaInstanceId') is not None:
            self.grafana_instance_id = m.get('grafanaInstanceId')
        if m.get('grafanaInstanceName') is not None:
            self.grafana_instance_name = m.get('grafanaInstanceName')
        if m.get('httpApiInterUrl') is not None:
            self.http_api_inter_url = m.get('httpApiInterUrl')
        if m.get('httpApiIntraUrl') is not None:
            self.http_api_intra_url = m.get('httpApiIntraUrl')
        if m.get('instanceType') is not None:
            self.instance_type = m.get('instanceType')
        if m.get('paymentType') is not None:
            self.payment_type = m.get('paymentType')
        if m.get('paymentTypeUpdateTime') is not None:
            self.payment_type_update_time = m.get('paymentTypeUpdateTime')
        if m.get('product') is not None:
            self.product = m.get('product')
        if m.get('prometheusInstanceId') is not None:
            self.prometheus_instance_id = m.get('prometheusInstanceId')
        if m.get('prometheusInstanceName') is not None:
            self.prometheus_instance_name = m.get('prometheusInstanceName')
        if m.get('pushGatewayInterUrl') is not None:
            self.push_gateway_inter_url = m.get('pushGatewayInterUrl')
        if m.get('pushGatewayIntraUrl') is not None:
            self.push_gateway_intra_url = m.get('pushGatewayIntraUrl')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('remoteReadInterUrl') is not None:
            self.remote_read_inter_url = m.get('remoteReadInterUrl')
        if m.get('remoteReadIntraUrl') is not None:
            self.remote_read_intra_url = m.get('remoteReadIntraUrl')
        if m.get('remoteWriteInterUrl') is not None:
            self.remote_write_inter_url = m.get('remoteWriteInterUrl')
        if m.get('remoteWriteIntraUrl') is not None:
            self.remote_write_intra_url = m.get('remoteWriteIntraUrl')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('resourceType') is not None:
            self.resource_type = m.get('resourceType')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('storageDuration') is not None:
            self.storage_duration = m.get('storageDuration')
        if m.get('supportAuthTypes') is not None:
            self.support_auth_types = m.get('supportAuthTypes')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = GetPrometheusInstanceResponseBodyPrometheusInstanceTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetPrometheusInstanceResponseBody(TeaModel):
    def __init__(
        self,
        prometheus_instance: GetPrometheusInstanceResponseBodyPrometheusInstance = None,
        request_id: str = None,
    ):
        # Details of the Prometheus instance.
        self.prometheus_instance = prometheus_instance
        # Unique identifier for the request.
        self.request_id = request_id

    def validate(self):
        if self.prometheus_instance:
            self.prometheus_instance.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.prometheus_instance is not None:
            result['prometheusInstance'] = self.prometheus_instance.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusInstance') is not None:
            temp_model = GetPrometheusInstanceResponseBodyPrometheusInstance()
            self.prometheus_instance = temp_model.from_map(m['prometheusInstance'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetPrometheusInstanceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetPrometheusInstanceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetPrometheusInstanceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetPrometheusUserSettingRequest(TeaModel):
    def __init__(
        self,
        aliyun_lang: str = None,
    ):
        self.aliyun_lang = aliyun_lang

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aliyun_lang is not None:
            result['aliyunLang'] = self.aliyun_lang
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aliyunLang') is not None:
            self.aliyun_lang = m.get('aliyunLang')
        return self


class GetPrometheusUserSettingResponseBody(TeaModel):
    def __init__(
        self,
        prometheus_user_setting: Dict[str, str] = None,
        request_id: str = None,
    ):
        self.prometheus_user_setting = prometheus_user_setting
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.prometheus_user_setting is not None:
            result['prometheusUserSetting'] = self.prometheus_user_setting
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusUserSetting') is not None:
            self.prometheus_user_setting = m.get('prometheusUserSetting')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetPrometheusUserSettingResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetPrometheusUserSettingResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetPrometheusUserSettingResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetPrometheusViewRequest(TeaModel):
    def __init__(
        self,
        aliyun_lang: str = None,
        resource_group_id: str = None,
    ):
        # Language environment, default is Chinese zh | en
        self.aliyun_lang = aliyun_lang
        # Resource group ID.
        self.resource_group_id = resource_group_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aliyun_lang is not None:
            result['aliyunLang'] = self.aliyun_lang
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aliyunLang') is not None:
            self.aliyun_lang = m.get('aliyunLang')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        return self


class GetPrometheusViewResponseBodyPrometheusViewPrometheusInstances(TeaModel):
    def __init__(
        self,
        prometheus_instance_id: str = None,
        region_id: str = None,
        user_id: str = None,
    ):
        # Instance ID.
        self.prometheus_instance_id = prometheus_instance_id
        # Region ID
        self.region_id = region_id
        # User ID.
        self.user_id = user_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.prometheus_instance_id is not None:
            result['prometheusInstanceId'] = self.prometheus_instance_id
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusInstanceId') is not None:
            self.prometheus_instance_id = m.get('prometheusInstanceId')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class GetPrometheusViewResponseBodyPrometheusViewTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # PagerDuty integration key.
        self.key = key
        # Tag value.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 GetPrometheusViewResponseBodyPrometheusView(TeaModel):
    def __init__(
        self,
        auth_free_read_policy: str = None,
        auth_token: str = None,
        create_time: str = None,
        enable_auth_free_read: bool = None,
        enable_auth_token: bool = None,
        folder_url: str = None,
        grafana_instance_id: str = None,
        grafana_instance_name: str = None,
        http_api_inter_url: str = None,
        http_api_intra_url: str = None,
        instance_type: str = None,
        payment_type: str = None,
        product: str = None,
        prometheus_instances: List[GetPrometheusViewResponseBodyPrometheusViewPrometheusInstances] = None,
        prometheus_view_id: str = None,
        prometheus_view_name: str = None,
        region_id: str = None,
        remote_read_inter_url: str = None,
        remote_read_intra_url: str = None,
        resource_group_id: str = None,
        resource_type: str = None,
        status: str = None,
        support_auth_types: List[str] = None,
        tags: List[GetPrometheusViewResponseBodyPrometheusViewTags] = None,
        user_id: str = None,
        version: str = None,
        workspace: str = None,
    ):
        # Password-free read policy (supports IP segments and VpcId).
        self.auth_free_read_policy = auth_free_read_policy
        # authToken string.
        self.auth_token = auth_token
        # Instance creation time, using UTC+0 time, format is yyyy-MM-ddTHH:mmZ.
        self.create_time = create_time
        # Whether to enable password-free read.
        self.enable_auth_free_read = enable_auth_free_read
        # Whether to enable authToken.
        self.enable_auth_token = enable_auth_token
        # Observability dashboard URL.
        self.folder_url = folder_url
        # Bound managed Grafana instance ID.
        self.grafana_instance_id = grafana_instance_id
        # Bound managed Grafana instance name.
        self.grafana_instance_name = grafana_instance_name
        # Public HTTP address.
        self.http_api_inter_url = http_api_inter_url
        # Private HTTP address.
        self.http_api_intra_url = http_api_intra_url
        # Instance type, fixed value prom-view.
        self.instance_type = instance_type
        # Payment type. Currently, the fixed value is FREE (free).
        self.payment_type = payment_type
        # Product that the prom instance belongs to.
        self.product = product
        # Prometheus instance list.
        self.prometheus_instances = prometheus_instances
        # Prometheus view ID.
        self.prometheus_view_id = prometheus_view_id
        # Prometheus view name.
        self.prometheus_view_name = prometheus_view_name
        # Region ID
        self.region_id = region_id
        # Remote read public URL.
        self.remote_read_inter_url = remote_read_inter_url
        # Remote read intranet URL.
        self.remote_read_intra_url = remote_read_intra_url
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Fixed value: PrometheusView
        self.resource_type = resource_type
        # Backend data storage status
        self.status = status
        # Supported authentication types.
        self.support_auth_types = support_auth_types
        # Instance tag keys.
        self.tags = tags
        # User ID.
        self.user_id = user_id
        # Version.
        self.version = version
        # Workspace to which the environment belongs
        self.workspace = workspace

    def validate(self):
        if self.prometheus_instances:
            for k in self.prometheus_instances:
                if k:
                    k.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.auth_free_read_policy is not None:
            result['authFreeReadPolicy'] = self.auth_free_read_policy
        if self.auth_token is not None:
            result['authToken'] = self.auth_token
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.enable_auth_free_read is not None:
            result['enableAuthFreeRead'] = self.enable_auth_free_read
        if self.enable_auth_token is not None:
            result['enableAuthToken'] = self.enable_auth_token
        if self.folder_url is not None:
            result['folderUrl'] = self.folder_url
        if self.grafana_instance_id is not None:
            result['grafanaInstanceId'] = self.grafana_instance_id
        if self.grafana_instance_name is not None:
            result['grafanaInstanceName'] = self.grafana_instance_name
        if self.http_api_inter_url is not None:
            result['httpApiInterUrl'] = self.http_api_inter_url
        if self.http_api_intra_url is not None:
            result['httpApiIntraUrl'] = self.http_api_intra_url
        if self.instance_type is not None:
            result['instanceType'] = self.instance_type
        if self.payment_type is not None:
            result['paymentType'] = self.payment_type
        if self.product is not None:
            result['product'] = self.product
        result['prometheusInstances'] = []
        if self.prometheus_instances is not None:
            for k in self.prometheus_instances:
                result['prometheusInstances'].append(k.to_map() if k else None)
        if self.prometheus_view_id is not None:
            result['prometheusViewId'] = self.prometheus_view_id
        if self.prometheus_view_name is not None:
            result['prometheusViewName'] = self.prometheus_view_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.remote_read_inter_url is not None:
            result['remoteReadInterUrl'] = self.remote_read_inter_url
        if self.remote_read_intra_url is not None:
            result['remoteReadIntraUrl'] = self.remote_read_intra_url
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.resource_type is not None:
            result['resourceType'] = self.resource_type
        if self.status is not None:
            result['status'] = self.status
        if self.support_auth_types is not None:
            result['supportAuthTypes'] = self.support_auth_types
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('authFreeReadPolicy') is not None:
            self.auth_free_read_policy = m.get('authFreeReadPolicy')
        if m.get('authToken') is not None:
            self.auth_token = m.get('authToken')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('enableAuthFreeRead') is not None:
            self.enable_auth_free_read = m.get('enableAuthFreeRead')
        if m.get('enableAuthToken') is not None:
            self.enable_auth_token = m.get('enableAuthToken')
        if m.get('folderUrl') is not None:
            self.folder_url = m.get('folderUrl')
        if m.get('grafanaInstanceId') is not None:
            self.grafana_instance_id = m.get('grafanaInstanceId')
        if m.get('grafanaInstanceName') is not None:
            self.grafana_instance_name = m.get('grafanaInstanceName')
        if m.get('httpApiInterUrl') is not None:
            self.http_api_inter_url = m.get('httpApiInterUrl')
        if m.get('httpApiIntraUrl') is not None:
            self.http_api_intra_url = m.get('httpApiIntraUrl')
        if m.get('instanceType') is not None:
            self.instance_type = m.get('instanceType')
        if m.get('paymentType') is not None:
            self.payment_type = m.get('paymentType')
        if m.get('product') is not None:
            self.product = m.get('product')
        self.prometheus_instances = []
        if m.get('prometheusInstances') is not None:
            for k in m.get('prometheusInstances'):
                temp_model = GetPrometheusViewResponseBodyPrometheusViewPrometheusInstances()
                self.prometheus_instances.append(temp_model.from_map(k))
        if m.get('prometheusViewId') is not None:
            self.prometheus_view_id = m.get('prometheusViewId')
        if m.get('prometheusViewName') is not None:
            self.prometheus_view_name = m.get('prometheusViewName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('remoteReadInterUrl') is not None:
            self.remote_read_inter_url = m.get('remoteReadInterUrl')
        if m.get('remoteReadIntraUrl') is not None:
            self.remote_read_intra_url = m.get('remoteReadIntraUrl')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('resourceType') is not None:
            self.resource_type = m.get('resourceType')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('supportAuthTypes') is not None:
            self.support_auth_types = m.get('supportAuthTypes')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = GetPrometheusViewResponseBodyPrometheusViewTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetPrometheusViewResponseBody(TeaModel):
    def __init__(
        self,
        prometheus_view: GetPrometheusViewResponseBodyPrometheusView = None,
        request_id: str = None,
    ):
        # View instance.
        self.prometheus_view = prometheus_view
        # Id of the request
        self.request_id = request_id

    def validate(self):
        if self.prometheus_view:
            self.prometheus_view.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.prometheus_view is not None:
            result['prometheusView'] = self.prometheus_view.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusView') is not None:
            temp_model = GetPrometheusViewResponseBodyPrometheusView()
            self.prometheus_view = temp_model.from_map(m['prometheusView'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetPrometheusViewResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetPrometheusViewResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetPrometheusViewResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetServiceResponseBodyServiceTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        self.key = key
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 GetServiceResponseBodyService(TeaModel):
    def __init__(
        self,
        attributes: str = None,
        create_time: str = None,
        description: str = None,
        display_name: str = None,
        pid: str = None,
        region_id: str = None,
        resource_group_id: str = None,
        service_id: str = None,
        service_name: str = None,
        service_status: str = None,
        service_type: str = None,
        tags: List[GetServiceResponseBodyServiceTags] = None,
        workspace: str = None,
    ):
        # Extended information.
        self.attributes = attributes
        # Creation time
        self.create_time = create_time
        # Description, only valid when serviceType=RUM.
        self.description = description
        # Display name, only valid when serviceType=RUM.
        self.display_name = display_name
        # Legacy ARMS application ID
        self.pid = pid
        # Region ID
        self.region_id = region_id
        self.resource_group_id = resource_group_id
        # Service ID.
        self.service_id = service_id
        # Service name
        self.service_name = service_name
        # Service status, only valid when serviceType=RUM.
        self.service_status = service_status
        # Service type.
        self.service_type = service_type
        self.tags = tags
        # Workspace name
        self.workspace = workspace

    def validate(self):
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.attributes is not None:
            result['attributes'] = self.attributes
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.pid is not None:
            result['pid'] = self.pid
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.service_id is not None:
            result['serviceId'] = self.service_id
        if self.service_name is not None:
            result['serviceName'] = self.service_name
        if self.service_status is not None:
            result['serviceStatus'] = self.service_status
        if self.service_type is not None:
            result['serviceType'] = self.service_type
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('attributes') is not None:
            self.attributes = m.get('attributes')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('pid') is not None:
            self.pid = m.get('pid')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('serviceId') is not None:
            self.service_id = m.get('serviceId')
        if m.get('serviceName') is not None:
            self.service_name = m.get('serviceName')
        if m.get('serviceStatus') is not None:
            self.service_status = m.get('serviceStatus')
        if m.get('serviceType') is not None:
            self.service_type = m.get('serviceType')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = GetServiceResponseBodyServiceTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetServiceResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        service: GetServiceResponseBodyService = None,
    ):
        # Request ID
        self.request_id = request_id
        # Service object.
        self.service = service

    def validate(self):
        if self.service:
            self.service.validate()

    def to_map(self):
        _map = super().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.service is not None:
            result['service'] = self.service.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('service') is not None:
            temp_model = GetServiceResponseBodyService()
            self.service = temp_model.from_map(m['service'])
        return self


class GetServiceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetServiceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetServiceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetServiceDictionaryRequest(TeaModel):
    def __init__(
        self,
        meta_keys: Dict[str, Any] = None,
        meta_type: str = None,
    ):
        self.meta_keys = meta_keys
        # This parameter is required.
        self.meta_type = meta_type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.meta_keys is not None:
            result['metaKeys'] = self.meta_keys
        if self.meta_type is not None:
            result['metaType'] = self.meta_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('metaKeys') is not None:
            self.meta_keys = m.get('metaKeys')
        if m.get('metaType') is not None:
            self.meta_type = m.get('metaType')
        return self


class GetServiceDictionaryResponseBody(TeaModel):
    def __init__(
        self,
        data: Dict[str, Any] = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 GetServiceDictionaryResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetServiceDictionaryResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetServiceDictionaryResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetServiceObservabilityResponseBodyEntryPointInfo(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        private_domain: str = None,
        project: str = None,
        public_domain: str = None,
    ):
        # Authentication Token for Data Reporting
        self.auth_token = auth_token
        # Private Network Access Address
        self.private_domain = private_domain
        # SLS Project
        self.project = project
        # Public Network Access Address
        self.public_domain = public_domain

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.auth_token is not None:
            result['authToken'] = self.auth_token
        if self.private_domain is not None:
            result['privateDomain'] = self.private_domain
        if self.project is not None:
            result['project'] = self.project
        if self.public_domain is not None:
            result['publicDomain'] = self.public_domain
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('authToken') is not None:
            self.auth_token = m.get('authToken')
        if m.get('privateDomain') is not None:
            self.private_domain = m.get('privateDomain')
        if m.get('project') is not None:
            self.project = m.get('project')
        if m.get('publicDomain') is not None:
            self.public_domain = m.get('publicDomain')
        return self


class GetServiceObservabilityResponseBody(TeaModel):
    def __init__(
        self,
        entry_point_info: GetServiceObservabilityResponseBodyEntryPointInfo = None,
        fee_type: str = None,
        quotas: Dict[str, str] = None,
        region_id: str = None,
        request_id: str = None,
        settings: Dict[str, str] = None,
        status: str = None,
        type: str = None,
        workspace: str = None,
    ):
        # Endpoint and Authentication Information
        self.entry_point_info = entry_point_info
        # Billing Type
        self.fee_type = fee_type
        # Quota Configuration
        self.quotas = quotas
        # Region
        self.region_id = region_id
        # Request ID
        self.request_id = request_id
        # System Configuration
        self.settings = settings
        # Resource Initialization Status
        self.status = status
        # Application Observability Type
        self.type = type
        # Workspace Name
        self.workspace = workspace

    def validate(self):
        if self.entry_point_info:
            self.entry_point_info.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.entry_point_info is not None:
            result['entryPointInfo'] = self.entry_point_info.to_map()
        if self.fee_type is not None:
            result['feeType'] = self.fee_type
        if self.quotas is not None:
            result['quotas'] = self.quotas
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.settings is not None:
            result['settings'] = self.settings
        if self.status is not None:
            result['status'] = self.status
        if self.type is not None:
            result['type'] = self.type
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('entryPointInfo') is not None:
            temp_model = GetServiceObservabilityResponseBodyEntryPointInfo()
            self.entry_point_info = temp_model.from_map(m['entryPointInfo'])
        if m.get('feeType') is not None:
            self.fee_type = m.get('feeType')
        if m.get('quotas') is not None:
            self.quotas = m.get('quotas')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('settings') is not None:
            self.settings = m.get('settings')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetServiceObservabilityResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetServiceObservabilityResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetServiceObservabilityResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetServiceTaskRequest(TeaModel):
    def __init__(
        self,
        type: str = None,
    ):
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class GetServiceTaskResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        service_task: Dict[str, Any] = None,
    ):
        self.request_id = request_id
        self.service_task = service_task

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.service_task is not None:
            result['serviceTask'] = self.service_task
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('serviceTask') is not None:
            self.service_task = m.get('serviceTask')
        return self


class GetServiceTaskResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetServiceTaskResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetServiceTaskResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetSiteMonitorRequest(TeaModel):
    def __init__(
        self,
        client_token: str = None,
    ):
        self.client_token = client_token

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        return self


class GetSiteMonitorResponseBodySiteMonitorCustomSchedule(TeaModel):
    def __init__(
        self,
        days: List[int] = None,
        end_hour: int = None,
        start_hour: int = None,
        time_zone: str = None,
    ):
        self.days = days
        self.end_hour = end_hour
        self.start_hour = start_hour
        self.time_zone = time_zone

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.days is not None:
            result['days'] = self.days
        if self.end_hour is not None:
            result['endHour'] = self.end_hour
        if self.start_hour is not None:
            result['startHour'] = self.start_hour
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('days') is not None:
            self.days = m.get('days')
        if m.get('endHour') is not None:
            self.end_hour = m.get('endHour')
        if m.get('startHour') is not None:
            self.start_hour = m.get('startHour')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        return self


class GetSiteMonitorResponseBodySiteMonitorIspCities(TeaModel):
    def __init__(
        self,
        city: str = None,
        city_name: str = None,
        isp: str = None,
        isp_name: str = None,
        type: str = None,
    ):
        self.city = city
        self.city_name = city_name
        self.isp = isp
        self.isp_name = isp_name
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.city is not None:
            result['city'] = self.city
        if self.city_name is not None:
            result['cityName'] = self.city_name
        if self.isp is not None:
            result['isp'] = self.isp
        if self.isp_name is not None:
            result['ispName'] = self.isp_name
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('city') is not None:
            self.city = m.get('city')
        if m.get('cityName') is not None:
            self.city_name = m.get('cityName')
        if m.get('isp') is not None:
            self.isp = m.get('isp')
        if m.get('ispName') is not None:
            self.isp_name = m.get('ispName')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class GetSiteMonitorResponseBodySiteMonitorVpcConfig(TeaModel):
    def __init__(
        self,
        region: str = None,
        security_group_id: str = None,
        vpc_id: str = None,
        vswitch_id: str = None,
    ):
        self.region = region
        self.security_group_id = security_group_id
        self.vpc_id = vpc_id
        self.vswitch_id = vswitch_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.region is not None:
            result['region'] = self.region
        if self.security_group_id is not None:
            result['securityGroupId'] = self.security_group_id
        if self.vpc_id is not None:
            result['vpcId'] = self.vpc_id
        if self.vswitch_id is not None:
            result['vswitchId'] = self.vswitch_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('securityGroupId') is not None:
            self.security_group_id = m.get('securityGroupId')
        if m.get('vpcId') is not None:
            self.vpc_id = m.get('vpcId')
        if m.get('vswitchId') is not None:
            self.vswitch_id = m.get('vswitchId')
        return self


class GetSiteMonitorResponseBodySiteMonitor(TeaModel):
    def __init__(
        self,
        address: str = None,
        agent_group: str = None,
        custom_schedule: GetSiteMonitorResponseBodySiteMonitorCustomSchedule = None,
        end_time: str = None,
        interval: int = None,
        interval_unit: str = None,
        isp_cities: List[GetSiteMonitorResponseBodySiteMonitorIspCities] = None,
        option: str = None,
        task_id: str = None,
        task_name: str = None,
        task_state: int = None,
        task_type: str = None,
        vpc_config: GetSiteMonitorResponseBodySiteMonitorVpcConfig = None,
    ):
        self.address = address
        self.agent_group = agent_group
        self.custom_schedule = custom_schedule
        self.end_time = end_time
        self.interval = interval
        self.interval_unit = interval_unit
        self.isp_cities = isp_cities
        self.option = option
        self.task_id = task_id
        self.task_name = task_name
        self.task_state = task_state
        self.task_type = task_type
        self.vpc_config = vpc_config

    def validate(self):
        if self.custom_schedule:
            self.custom_schedule.validate()
        if self.isp_cities:
            for k in self.isp_cities:
                if k:
                    k.validate()
        if self.vpc_config:
            self.vpc_config.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.address is not None:
            result['address'] = self.address
        if self.agent_group is not None:
            result['agentGroup'] = self.agent_group
        if self.custom_schedule is not None:
            result['customSchedule'] = self.custom_schedule.to_map()
        if self.end_time is not None:
            result['endTime'] = self.end_time
        if self.interval is not None:
            result['interval'] = self.interval
        if self.interval_unit is not None:
            result['intervalUnit'] = self.interval_unit
        result['ispCities'] = []
        if self.isp_cities is not None:
            for k in self.isp_cities:
                result['ispCities'].append(k.to_map() if k else None)
        if self.option is not None:
            result['option'] = self.option
        if self.task_id is not None:
            result['taskId'] = self.task_id
        if self.task_name is not None:
            result['taskName'] = self.task_name
        if self.task_state is not None:
            result['taskState'] = self.task_state
        if self.task_type is not None:
            result['taskType'] = self.task_type
        if self.vpc_config is not None:
            result['vpcConfig'] = self.vpc_config.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('address') is not None:
            self.address = m.get('address')
        if m.get('agentGroup') is not None:
            self.agent_group = m.get('agentGroup')
        if m.get('customSchedule') is not None:
            temp_model = GetSiteMonitorResponseBodySiteMonitorCustomSchedule()
            self.custom_schedule = temp_model.from_map(m['customSchedule'])
        if m.get('endTime') is not None:
            self.end_time = m.get('endTime')
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('intervalUnit') is not None:
            self.interval_unit = m.get('intervalUnit')
        self.isp_cities = []
        if m.get('ispCities') is not None:
            for k in m.get('ispCities'):
                temp_model = GetSiteMonitorResponseBodySiteMonitorIspCities()
                self.isp_cities.append(temp_model.from_map(k))
        if m.get('option') is not None:
            self.option = m.get('option')
        if m.get('taskId') is not None:
            self.task_id = m.get('taskId')
        if m.get('taskName') is not None:
            self.task_name = m.get('taskName')
        if m.get('taskState') is not None:
            self.task_state = m.get('taskState')
        if m.get('taskType') is not None:
            self.task_type = m.get('taskType')
        if m.get('vpcConfig') is not None:
            temp_model = GetSiteMonitorResponseBodySiteMonitorVpcConfig()
            self.vpc_config = temp_model.from_map(m['vpcConfig'])
        return self


class GetSiteMonitorResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        site_monitor: GetSiteMonitorResponseBodySiteMonitor = None,
    ):
        self.request_id = request_id
        self.site_monitor = site_monitor

    def validate(self):
        if self.site_monitor:
            self.site_monitor.validate()

    def to_map(self):
        _map = super().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.site_monitor is not None:
            result['siteMonitor'] = self.site_monitor.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('siteMonitor') is not None:
            temp_model = GetSiteMonitorResponseBodySiteMonitor()
            self.site_monitor = temp_model.from_map(m['siteMonitor'])
        return self


class GetSiteMonitorResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetSiteMonitorResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetSiteMonitorResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetSubscriptionRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetSubscriptionResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        subscription: SubscriptionForView = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.subscription = subscription

    def validate(self):
        if self.subscription:
            self.subscription.validate()

    def to_map(self):
        _map = super().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.subscription is not None:
            result['subscription'] = self.subscription.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('subscription') is not None:
            temp_model = SubscriptionForView()
            self.subscription = temp_model.from_map(m['subscription'])
        return self


class GetSubscriptionResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetSubscriptionResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetSubscriptionResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetThreadResponseBodyVariables(TeaModel):
    def __init__(
        self,
        project: str = None,
        workspace: str = None,
    ):
        self.project = project
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.project is not None:
            result['project'] = self.project
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('project') is not None:
            self.project = m.get('project')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetThreadResponseBody(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        digital_employee_name: str = None,
        request_id: str = None,
        status: str = None,
        thread_id: str = None,
        title: str = None,
        update_time: str = None,
        variables: GetThreadResponseBodyVariables = None,
        version: int = None,
    ):
        self.create_time = create_time
        self.digital_employee_name = digital_employee_name
        # Id of the request
        self.request_id = request_id
        self.status = status
        self.thread_id = thread_id
        self.title = title
        self.update_time = update_time
        self.variables = variables
        self.version = version

    def validate(self):
        if self.variables:
            self.variables.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.digital_employee_name is not None:
            result['digitalEmployeeName'] = self.digital_employee_name
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.status is not None:
            result['status'] = self.status
        if self.thread_id is not None:
            result['threadId'] = self.thread_id
        if self.title is not None:
            result['title'] = self.title
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.variables is not None:
            result['variables'] = self.variables.to_map()
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('digitalEmployeeName') is not None:
            self.digital_employee_name = m.get('digitalEmployeeName')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('threadId') is not None:
            self.thread_id = m.get('threadId')
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('variables') is not None:
            temp_model = GetThreadResponseBodyVariables()
            self.variables = temp_model.from_map(m['variables'])
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class GetThreadResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetThreadResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetThreadResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetThreadDataRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
    ):
        self.max_results = max_results
        self.next_token = next_token

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 GetThreadDataResponseBodyDataMessages(TeaModel):
    def __init__(
        self,
        agents: List[Dict[str, Any]] = None,
        artifacts: List[Dict[str, Any]] = None,
        call_id: str = None,
        contents: List[Dict[str, Any]] = None,
        detail: str = None,
        events: List[Dict[str, Any]] = None,
        parent_call_id: str = None,
        role: str = None,
        seq: int = None,
        timestamp: str = None,
        tools: List[Dict[str, Any]] = None,
        type: str = None,
        version: str = None,
    ):
        self.agents = agents
        self.artifacts = artifacts
        self.call_id = call_id
        self.contents = contents
        self.detail = detail
        self.events = events
        self.parent_call_id = parent_call_id
        self.role = role
        self.seq = seq
        self.timestamp = timestamp
        self.tools = tools
        self.type = type
        self.version = version

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.agents is not None:
            result['agents'] = self.agents
        if self.artifacts is not None:
            result['artifacts'] = self.artifacts
        if self.call_id is not None:
            result['callId'] = self.call_id
        if self.contents is not None:
            result['contents'] = self.contents
        if self.detail is not None:
            result['detail'] = self.detail
        if self.events is not None:
            result['events'] = self.events
        if self.parent_call_id is not None:
            result['parentCallId'] = self.parent_call_id
        if self.role is not None:
            result['role'] = self.role
        if self.seq is not None:
            result['seq'] = self.seq
        if self.timestamp is not None:
            result['timestamp'] = self.timestamp
        if self.tools is not None:
            result['tools'] = self.tools
        if self.type is not None:
            result['type'] = self.type
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('agents') is not None:
            self.agents = m.get('agents')
        if m.get('artifacts') is not None:
            self.artifacts = m.get('artifacts')
        if m.get('callId') is not None:
            self.call_id = m.get('callId')
        if m.get('contents') is not None:
            self.contents = m.get('contents')
        if m.get('detail') is not None:
            self.detail = m.get('detail')
        if m.get('events') is not None:
            self.events = m.get('events')
        if m.get('parentCallId') is not None:
            self.parent_call_id = m.get('parentCallId')
        if m.get('role') is not None:
            self.role = m.get('role')
        if m.get('seq') is not None:
            self.seq = m.get('seq')
        if m.get('timestamp') is not None:
            self.timestamp = m.get('timestamp')
        if m.get('tools') is not None:
            self.tools = m.get('tools')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class GetThreadDataResponseBodyData(TeaModel):
    def __init__(
        self,
        messages: List[GetThreadDataResponseBodyDataMessages] = None,
        request_id: str = None,
        trace_id: str = None,
    ):
        self.messages = messages
        self.request_id = request_id
        self.trace_id = trace_id

    def validate(self):
        if self.messages:
            for k in self.messages:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['messages'] = []
        if self.messages is not None:
            for k in self.messages:
                result['messages'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.trace_id is not None:
            result['traceId'] = self.trace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.messages = []
        if m.get('messages') is not None:
            for k in m.get('messages'):
                temp_model = GetThreadDataResponseBodyDataMessages()
                self.messages.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('traceId') is not None:
            self.trace_id = m.get('traceId')
        return self


class GetThreadDataResponseBody(TeaModel):
    def __init__(
        self,
        data: List[GetThreadDataResponseBodyData] = None,
        digital_employee_name: str = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        thread_id: str = None,
    ):
        self.data = data
        self.digital_employee_name = digital_employee_name
        self.max_results = max_results
        self.next_token = next_token
        # Id of the request
        self.request_id = request_id
        self.thread_id = thread_id

    def validate(self):
        if self.data:
            for k in self.data:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.digital_employee_name is not None:
            result['digitalEmployeeName'] = self.digital_employee_name
        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.request_id is not None:
            result['requestId'] = self.request_id
        if self.thread_id is not None:
            result['threadId'] = self.thread_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = GetThreadDataResponseBodyData()
                self.data.append(temp_model.from_map(k))
        if m.get('digitalEmployeeName') is not None:
            self.digital_employee_name = m.get('digitalEmployeeName')
        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('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('threadId') is not None:
            self.thread_id = m.get('threadId')
        return self


class GetThreadDataResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetThreadDataResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetThreadDataResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetTransformerRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        # This parameter is required.
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetTransformerResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        transformer: TransformerForView = None,
    ):
        self.request_id = request_id
        self.transformer = transformer

    def validate(self):
        if self.transformer:
            self.transformer.validate()

    def to_map(self):
        _map = super().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.transformer is not None:
            result['transformer'] = self.transformer.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('transformer') is not None:
            temp_model = TransformerForView()
            self.transformer = temp_model.from_map(m['transformer'])
        return self


class GetTransformerResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetTransformerResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetTransformerResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetUmodelHeaders(TeaModel):
    def __init__(
        self,
        common_headers: Dict[str, str] = None,
        log_version: str = None,
    ):
        self.common_headers = common_headers
        self.log_version = log_version

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.common_headers is not None:
            result['commonHeaders'] = self.common_headers
        if self.log_version is not None:
            result['logVersion'] = self.log_version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('commonHeaders') is not None:
            self.common_headers = m.get('commonHeaders')
        if m.get('logVersion') is not None:
            self.log_version = m.get('logVersion')
        return self


class GetUmodelResponseBodyCommonSchemaRef(TeaModel):
    def __init__(
        self,
        group: str = None,
        version: str = None,
    ):
        # Common Umodel Schema group
        self.group = group
        # Version
        self.version = version

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.group is not None:
            result['group'] = self.group
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('group') is not None:
            self.group = m.get('group')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class GetUmodelResponseBody(TeaModel):
    def __init__(
        self,
        common_schema_ref: List[GetUmodelResponseBodyCommonSchemaRef] = None,
        description: str = None,
        region_id: str = None,
        request_id: str = None,
        workspace: str = None,
    ):
        # This field does not need to be filled currently
        self.common_schema_ref = common_schema_ref
        # Umodel description
        self.description = description
        # Region
        self.region_id = region_id
        # Request ID
        self.request_id = request_id
        # Workspace name
        self.workspace = workspace

    def validate(self):
        if self.common_schema_ref:
            for k in self.common_schema_ref:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['commonSchemaRef'] = []
        if self.common_schema_ref is not None:
            for k in self.common_schema_ref:
                result['commonSchemaRef'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.common_schema_ref = []
        if m.get('commonSchemaRef') is not None:
            for k in m.get('commonSchemaRef'):
                temp_model = GetUmodelResponseBodyCommonSchemaRef()
                self.common_schema_ref.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetUmodelResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetUmodelResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetUmodelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetUmodelCommonSchemaRefHeaders(TeaModel):
    def __init__(
        self,
        common_headers: Dict[str, str] = None,
        log_version: str = None,
    ):
        self.common_headers = common_headers
        self.log_version = log_version

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.common_headers is not None:
            result['commonHeaders'] = self.common_headers
        if self.log_version is not None:
            result['logVersion'] = self.log_version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('commonHeaders') is not None:
            self.common_headers = m.get('commonHeaders')
        if m.get('logVersion') is not None:
            self.log_version = m.get('logVersion')
        return self


class GetUmodelCommonSchemaRefResponseBodyCommonSchemaRef(TeaModel):
    def __init__(
        self,
        group: str = None,
        version: str = None,
    ):
        self.group = group
        self.version = version

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.group is not None:
            result['group'] = self.group
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('group') is not None:
            self.group = m.get('group')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class GetUmodelCommonSchemaRefResponseBody(TeaModel):
    def __init__(
        self,
        common_schema_ref: List[GetUmodelCommonSchemaRefResponseBodyCommonSchemaRef] = None,
    ):
        self.common_schema_ref = common_schema_ref

    def validate(self):
        if self.common_schema_ref:
            for k in self.common_schema_ref:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['commonSchemaRef'] = []
        if self.common_schema_ref is not None:
            for k in self.common_schema_ref:
                result['commonSchemaRef'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.common_schema_ref = []
        if m.get('commonSchemaRef') is not None:
            for k in m.get('commonSchemaRef'):
                temp_model = GetUmodelCommonSchemaRefResponseBodyCommonSchemaRef()
                self.common_schema_ref.append(temp_model.from_map(k))
        return self


class GetUmodelCommonSchemaRefResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetUmodelCommonSchemaRefResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetUmodelCommonSchemaRefResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetUmodelDataRequest(TeaModel):
    def __init__(
        self,
        content: Any = None,
        method: str = None,
    ):
        # Query conditions
        self.content = content
        # Method
        # 
        # This parameter is required.
        self.method = method

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.content is not None:
            result['content'] = self.content
        if self.method is not None:
            result['method'] = self.method
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('content') is not None:
            self.content = m.get('content')
        if m.get('method') is not None:
            self.method = m.get('method')
        return self


class GetUmodelDataResponseBodyErrors(TeaModel):
    def __init__(
        self,
        message: str = None,
        type: str = None,
    ):
        # Details.
        self.message = message
        # Error type
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.message is not None:
            result['message'] = self.message
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class GetUmodelDataResponseBody(TeaModel):
    def __init__(
        self,
        errors: List[GetUmodelDataResponseBodyErrors] = None,
        links: List[Any] = None,
        nodes: List[Any] = None,
        request_id: str = None,
        total_links_count: int = None,
        total_nodes_count: int = None,
    ):
        # Error information
        self.errors = errors
        # List of node link relationships
        self.links = links
        # List of nodes
        self.nodes = nodes
        # Request ID
        self.request_id = request_id
        # Total number of node links
        self.total_links_count = total_links_count
        # Total number of nodes
        self.total_nodes_count = total_nodes_count

    def validate(self):
        if self.errors:
            for k in self.errors:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['errors'] = []
        if self.errors is not None:
            for k in self.errors:
                result['errors'].append(k.to_map() if k else None)
        if self.links is not None:
            result['links'] = self.links
        if self.nodes is not None:
            result['nodes'] = self.nodes
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.total_links_count is not None:
            result['totalLinksCount'] = self.total_links_count
        if self.total_nodes_count is not None:
            result['totalNodesCount'] = self.total_nodes_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.errors = []
        if m.get('errors') is not None:
            for k in m.get('errors'):
                temp_model = GetUmodelDataResponseBodyErrors()
                self.errors.append(temp_model.from_map(k))
        if m.get('links') is not None:
            self.links = m.get('links')
        if m.get('nodes') is not None:
            self.nodes = m.get('nodes')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('totalLinksCount') is not None:
            self.total_links_count = m.get('totalLinksCount')
        if m.get('totalNodesCount') is not None:
            self.total_nodes_count = m.get('totalNodesCount')
        return self


class GetUmodelDataResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetUmodelDataResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetUmodelDataResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetUserTokenForRoleRequest(TeaModel):
    def __init__(
        self,
        role_name: str = None,
        user_id: str = None,
        user_token: str = None,
    ):
        self.role_name = role_name
        self.user_id = user_id
        self.user_token = user_token

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.role_name is not None:
            result['roleName'] = self.role_name
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.user_token is not None:
            result['userToken'] = self.user_token
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('roleName') is not None:
            self.role_name = m.get('roleName')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('userToken') is not None:
            self.user_token = m.get('userToken')
        return self


class GetUserTokenForRoleResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: str = None,
        message: str = None,
        request_id: str = None,
    ):
        self.code = code
        self.data = data
        self.message = message
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['code'] = self.code
        if self.data is not None:
            result['data'] = self.data
        if self.message is not None:
            result['message'] = self.message
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('code') is not None:
            self.code = m.get('code')
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class GetUserTokenForRoleResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetUserTokenForRoleResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetUserTokenForRoleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class GetWorkspaceResponseBody(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        description: str = None,
        display_name: str = None,
        last_modify_time: str = None,
        region_id: str = None,
        request_id: str = None,
        sls_project: str = None,
        workspace_name: str = None,
    ):
        # Creation Time
        # 
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ss.SSSZ
        self.create_time = create_time
        # Workspace Description
        self.description = description
        # Workspace Display Name
        self.display_name = display_name
        # Last Modified Time
        # 
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.last_modify_time = last_modify_time
        # Region ID
        self.region_id = region_id
        # Request ID
        self.request_id = request_id
        # Log Service Project Name
        self.sls_project = sls_project
        # Workspace Name
        # 
        # This parameter is required.
        self.workspace_name = workspace_name

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.last_modify_time is not None:
            result['lastModifyTime'] = self.last_modify_time
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.sls_project is not None:
            result['slsProject'] = self.sls_project
        if self.workspace_name is not None:
            result['workspaceName'] = self.workspace_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('lastModifyTime') is not None:
            self.last_modify_time = m.get('lastModifyTime')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('slsProject') is not None:
            self.sls_project = m.get('slsProject')
        if m.get('workspaceName') is not None:
            self.workspace_name = m.get('workspaceName')
        return self


class GetWorkspaceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: GetWorkspaceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = GetWorkspaceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ImportAlertRulesRequest(TeaModel):
    def __init__(
        self,
        body: str = None,
        format: str = None,
    ):
        self.body = body
        self.format = format

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.body is not None:
            result['body'] = self.body
        if self.format is not None:
            result['format'] = self.format
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            self.body = m.get('body')
        if m.get('format') is not None:
            self.format = m.get('format')
        return self


class ImportAlertRulesResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: Any = None,
        message: str = None,
        request_id: str = None,
        success: bool = None,
    ):
        self.code = code
        self.data = data
        self.message = message
        self.request_id = request_id
        self.success = success

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['code'] = self.code
        if self.data is not None:
            result['data'] = self.data
        if self.message is not None:
            result['message'] = self.message
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.success is not None:
            result['success'] = self.success
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('code') is not None:
            self.code = m.get('code')
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('success') is not None:
            self.success = m.get('success')
        return self


class ImportAlertRulesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ImportAlertRulesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ImportAlertRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class InitCmsAlertResourcesRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class InitCmsAlertResourcesResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        message: str = None,
        request_id: str = None,
    ):
        self.code = code
        self.message = message
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['code'] = self.code
        if self.message is not None:
            result['message'] = self.message
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('code') is not None:
            self.code = m.get('code')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class InitCmsAlertResourcesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: InitCmsAlertResourcesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = InitCmsAlertResourcesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class InitializeSyntheticsResourcesRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
        workspace_region: str = None,
    ):
        self.workspace = workspace
        self.workspace_region = workspace_region

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.workspace_region is not None:
            result['workspaceRegion'] = self.workspace_region
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        if m.get('workspaceRegion') is not None:
            self.workspace_region = m.get('workspaceRegion')
        return self


class InitializeSyntheticsResourcesResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class InitializeSyntheticsResourcesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: InitializeSyntheticsResourcesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = InitializeSyntheticsResourcesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAddonReleasesRequest(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        parent_addon_release_id: str = None,
    ):
        # Addon component name.
        self.addon_name = addon_name
        # Parent AddonReleaseId.
        self.parent_addon_release_id = parent_addon_release_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.parent_addon_release_id is not None:
            result['parentAddonReleaseId'] = self.parent_addon_release_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('parentAddonReleaseId') is not None:
            self.parent_addon_release_id = m.get('parentAddonReleaseId')
        return self


class ListAddonReleasesResponseBodyReleasesConditions(TeaModel):
    def __init__(
        self,
        first_transition_time: str = None,
        last_transition_time: str = None,
        message: str = None,
        status: str = None,
        type: str = None,
    ):
        # First transition time.
        self.first_transition_time = first_transition_time
        # Last transition time.
        self.last_transition_time = last_transition_time
        # Details.
        self.message = message
        # Phase status.
        self.status = status
        # Phase type.
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.first_transition_time is not None:
            result['firstTransitionTime'] = self.first_transition_time
        if self.last_transition_time is not None:
            result['lastTransitionTime'] = self.last_transition_time
        if self.message is not None:
            result['message'] = self.message
        if self.status is not None:
            result['status'] = self.status
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('firstTransitionTime') is not None:
            self.first_transition_time = m.get('firstTransitionTime')
        if m.get('lastTransitionTime') is not None:
            self.last_transition_time = m.get('lastTransitionTime')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ListAddonReleasesResponseBodyReleasesSubAddonRelease(TeaModel):
    def __init__(
        self,
        ready: int = None,
        total: int = None,
    ):
        # Number of ready sub-Releases.
        self.ready = ready
        # Number of sub-Releases.
        self.total = total

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.ready is not None:
            result['ready'] = self.ready
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ready') is not None:
            self.ready = m.get('ready')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListAddonReleasesResponseBodyReleases(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        alert_rule_count: int = None,
        api_version: str = None,
        conditions: List[ListAddonReleasesResponseBodyReleasesConditions] = None,
        config: str = None,
        create_time: str = None,
        dashboard_count: int = None,
        entity_rules: EntityGroupBase = None,
        env_type: str = None,
        environment_id: str = None,
        exporter_count: int = None,
        have_config: bool = None,
        install_user_id: str = None,
        language: str = None,
        managed: bool = None,
        next_version: str = None,
        parent_addon_release_id: str = None,
        policy_id: str = None,
        region_id: str = None,
        release_id: str = None,
        release_name: str = None,
        scene: str = None,
        status: str = None,
        sub_addon_release: ListAddonReleasesResponseBodyReleasesSubAddonRelease = None,
        update_time: str = None,
        user_id: str = None,
        version: str = None,
        workspace: str = None,
    ):
        # Addon name.
        self.addon_name = addon_name
        # Number of alert rules.
        self.alert_rule_count = alert_rule_count
        # API version.
        self.api_version = api_version
        # Installation phase information.
        self.conditions = conditions
        # Component configuration information.
        self.config = config
        # Access time.
        self.create_time = create_time
        # Number of dashboards.
        self.dashboard_count = dashboard_count
        # Entity details.
        self.entity_rules = entity_rules
        # Environment type.
        self.env_type = env_type
        # Environment ID.
        self.environment_id = environment_id
        # Number of plugins.
        self.exporter_count = exporter_count
        # Whether there is a configuration.
        self.have_config = have_config
        # Access user ID.
        self.install_user_id = install_user_id
        # Language.
        self.language = language
        # Whether it is a managed component.
        self.managed = managed
        # Starting version number for the remaining list.
        self.next_version = next_version
        # Parent AddonReleaseId.
        self.parent_addon_release_id = parent_addon_release_id
        # Policy ID.
        self.policy_id = policy_id
        # Region ID.
        self.region_id = region_id
        # Release ID.
        self.release_id = release_id
        # Release name.
        self.release_name = release_name
        # Component scenario.
        self.scene = scene
        # Status.
        self.status = status
        # Sub-AddonRelease statistics.
        self.sub_addon_release = sub_addon_release
        # Update time.
        self.update_time = update_time
        # Owner user ID.
        self.user_id = user_id
        # Component version.
        self.version = version
        # Workspace.
        self.workspace = workspace

    def validate(self):
        if self.conditions:
            for k in self.conditions:
                if k:
                    k.validate()
        if self.entity_rules:
            self.entity_rules.validate()
        if self.sub_addon_release:
            self.sub_addon_release.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.alert_rule_count is not None:
            result['alertRuleCount'] = self.alert_rule_count
        if self.api_version is not None:
            result['apiVersion'] = self.api_version
        result['conditions'] = []
        if self.conditions is not None:
            for k in self.conditions:
                result['conditions'].append(k.to_map() if k else None)
        if self.config is not None:
            result['config'] = self.config
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.dashboard_count is not None:
            result['dashboardCount'] = self.dashboard_count
        if self.entity_rules is not None:
            result['entityRules'] = self.entity_rules.to_map()
        if self.env_type is not None:
            result['envType'] = self.env_type
        if self.environment_id is not None:
            result['environmentId'] = self.environment_id
        if self.exporter_count is not None:
            result['exporterCount'] = self.exporter_count
        if self.have_config is not None:
            result['haveConfig'] = self.have_config
        if self.install_user_id is not None:
            result['installUserId'] = self.install_user_id
        if self.language is not None:
            result['language'] = self.language
        if self.managed is not None:
            result['managed'] = self.managed
        if self.next_version is not None:
            result['nextVersion'] = self.next_version
        if self.parent_addon_release_id is not None:
            result['parentAddonReleaseId'] = self.parent_addon_release_id
        if self.policy_id is not None:
            result['policyId'] = self.policy_id
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.release_id is not None:
            result['releaseId'] = self.release_id
        if self.release_name is not None:
            result['releaseName'] = self.release_name
        if self.scene is not None:
            result['scene'] = self.scene
        if self.status is not None:
            result['status'] = self.status
        if self.sub_addon_release is not None:
            result['subAddonRelease'] = self.sub_addon_release.to_map()
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('alertRuleCount') is not None:
            self.alert_rule_count = m.get('alertRuleCount')
        if m.get('apiVersion') is not None:
            self.api_version = m.get('apiVersion')
        self.conditions = []
        if m.get('conditions') is not None:
            for k in m.get('conditions'):
                temp_model = ListAddonReleasesResponseBodyReleasesConditions()
                self.conditions.append(temp_model.from_map(k))
        if m.get('config') is not None:
            self.config = m.get('config')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('dashboardCount') is not None:
            self.dashboard_count = m.get('dashboardCount')
        if m.get('entityRules') is not None:
            temp_model = EntityGroupBase()
            self.entity_rules = temp_model.from_map(m['entityRules'])
        if m.get('envType') is not None:
            self.env_type = m.get('envType')
        if m.get('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('exporterCount') is not None:
            self.exporter_count = m.get('exporterCount')
        if m.get('haveConfig') is not None:
            self.have_config = m.get('haveConfig')
        if m.get('installUserId') is not None:
            self.install_user_id = m.get('installUserId')
        if m.get('language') is not None:
            self.language = m.get('language')
        if m.get('managed') is not None:
            self.managed = m.get('managed')
        if m.get('nextVersion') is not None:
            self.next_version = m.get('nextVersion')
        if m.get('parentAddonReleaseId') is not None:
            self.parent_addon_release_id = m.get('parentAddonReleaseId')
        if m.get('policyId') is not None:
            self.policy_id = m.get('policyId')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('releaseId') is not None:
            self.release_id = m.get('releaseId')
        if m.get('releaseName') is not None:
            self.release_name = m.get('releaseName')
        if m.get('scene') is not None:
            self.scene = m.get('scene')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('subAddonRelease') is not None:
            temp_model = ListAddonReleasesResponseBodyReleasesSubAddonRelease()
            self.sub_addon_release = temp_model.from_map(m['subAddonRelease'])
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListAddonReleasesResponseBody(TeaModel):
    def __init__(
        self,
        releases: List[ListAddonReleasesResponseBodyReleases] = None,
        request_id: str = None,
        total: int = None,
    ):
        # Set of add-on component information.
        self.releases = releases
        # Request ID.
        self.request_id = request_id
        # Number of components.
        self.total = total

    def validate(self):
        if self.releases:
            for k in self.releases:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['releases'] = []
        if self.releases is not None:
            for k in self.releases:
                result['releases'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.releases = []
        if m.get('releases') is not None:
            for k in m.get('releases'):
                temp_model = ListAddonReleasesResponseBodyReleases()
                self.releases.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListAddonReleasesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAddonReleasesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAddonReleasesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAddonsRequest(TeaModel):
    def __init__(
        self,
        aliyun_lang: str = None,
        category: str = None,
        regexp: bool = None,
        search: str = None,
    ):
        self.aliyun_lang = aliyun_lang
        self.category = category
        self.regexp = regexp
        self.search = search

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aliyun_lang is not None:
            result['aliyunLang'] = self.aliyun_lang
        if self.category is not None:
            result['category'] = self.category
        if self.regexp is not None:
            result['regexp'] = self.regexp
        if self.search is not None:
            result['search'] = self.search
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aliyunLang') is not None:
            self.aliyun_lang = m.get('aliyunLang')
        if m.get('category') is not None:
            self.category = m.get('category')
        if m.get('regexp') is not None:
            self.regexp = m.get('regexp')
        if m.get('search') is not None:
            self.search = m.get('search')
        return self


class ListAddonsResponseBodyAddonsDashboards(TeaModel):
    def __init__(
        self,
        description: str = None,
        name: str = None,
        url: str = None,
    ):
        self.description = description
        self.name = name
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.name is not None:
            result['name'] = self.name
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class ListAddonsResponseBodyAddonsEnvironmentsCommonSchemaRefs(TeaModel):
    def __init__(
        self,
        group: str = None,
        version: str = None,
    ):
        self.group = group
        self.version = version

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.group is not None:
            result['group'] = self.group
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('group') is not None:
            self.group = m.get('group')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class ListAddonsResponseBodyAddonsEnvironmentsDependencies(TeaModel):
    def __init__(
        self,
        cluster_types: List[str] = None,
        features: Dict[str, bool] = None,
        services: List[str] = None,
    ):
        self.cluster_types = cluster_types
        self.features = features
        self.services = services

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.cluster_types is not None:
            result['clusterTypes'] = self.cluster_types
        if self.features is not None:
            result['features'] = self.features
        if self.services is not None:
            result['services'] = self.services
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clusterTypes') is not None:
            self.cluster_types = m.get('clusterTypes')
        if m.get('features') is not None:
            self.features = m.get('features')
        if m.get('services') is not None:
            self.services = m.get('services')
        return self


class ListAddonsResponseBodyAddonsEnvironmentsPoliciesMetricCheckRule(TeaModel):
    def __init__(
        self,
        prom_ql: List[str] = None,
    ):
        self.prom_ql = prom_ql

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.prom_ql is not None:
            result['promQL'] = self.prom_ql
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('promQL') is not None:
            self.prom_ql = m.get('promQL')
        return self


class ListAddonsResponseBodyAddonsEnvironmentsPoliciesProtocols(TeaModel):
    def __init__(
        self,
        description: str = None,
        icon: str = None,
        label: str = None,
        name: str = None,
    ):
        self.description = description
        self.icon = icon
        self.label = label
        self.name = name

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.icon is not None:
            result['icon'] = self.icon
        if self.label is not None:
            result['label'] = self.label
        if self.name is not None:
            result['name'] = self.name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('icon') is not None:
            self.icon = m.get('icon')
        if m.get('label') is not None:
            self.label = m.get('label')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class ListAddonsResponseBodyAddonsEnvironmentsPolicies(TeaModel):
    def __init__(
        self,
        alert_default_status: str = None,
        default_install: bool = None,
        enable_service_account: bool = None,
        metric_check_rule: ListAddonsResponseBodyAddonsEnvironmentsPoliciesMetricCheckRule = None,
        need_restart_after_integration: bool = None,
        protocols: List[ListAddonsResponseBodyAddonsEnvironmentsPoliciesProtocols] = None,
        target_addon_name: str = None,
    ):
        self.alert_default_status = alert_default_status
        self.default_install = default_install
        self.enable_service_account = enable_service_account
        self.metric_check_rule = metric_check_rule
        self.need_restart_after_integration = need_restart_after_integration
        self.protocols = protocols
        self.target_addon_name = target_addon_name

    def validate(self):
        if self.metric_check_rule:
            self.metric_check_rule.validate()
        if self.protocols:
            for k in self.protocols:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_default_status is not None:
            result['alertDefaultStatus'] = self.alert_default_status
        if self.default_install is not None:
            result['defaultInstall'] = self.default_install
        if self.enable_service_account is not None:
            result['enableServiceAccount'] = self.enable_service_account
        if self.metric_check_rule is not None:
            result['metricCheckRule'] = self.metric_check_rule.to_map()
        if self.need_restart_after_integration is not None:
            result['needRestartAfterIntegration'] = self.need_restart_after_integration
        result['protocols'] = []
        if self.protocols is not None:
            for k in self.protocols:
                result['protocols'].append(k.to_map() if k else None)
        if self.target_addon_name is not None:
            result['targetAddonName'] = self.target_addon_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertDefaultStatus') is not None:
            self.alert_default_status = m.get('alertDefaultStatus')
        if m.get('defaultInstall') is not None:
            self.default_install = m.get('defaultInstall')
        if m.get('enableServiceAccount') is not None:
            self.enable_service_account = m.get('enableServiceAccount')
        if m.get('metricCheckRule') is not None:
            temp_model = ListAddonsResponseBodyAddonsEnvironmentsPoliciesMetricCheckRule()
            self.metric_check_rule = temp_model.from_map(m['metricCheckRule'])
        if m.get('needRestartAfterIntegration') is not None:
            self.need_restart_after_integration = m.get('needRestartAfterIntegration')
        self.protocols = []
        if m.get('protocols') is not None:
            for k in m.get('protocols'):
                temp_model = ListAddonsResponseBodyAddonsEnvironmentsPoliciesProtocols()
                self.protocols.append(temp_model.from_map(k))
        if m.get('targetAddonName') is not None:
            self.target_addon_name = m.get('targetAddonName')
        return self


class ListAddonsResponseBodyAddonsEnvironments(TeaModel):
    def __init__(
        self,
        common_schema_refs: List[ListAddonsResponseBodyAddonsEnvironmentsCommonSchemaRefs] = None,
        dependencies: ListAddonsResponseBodyAddonsEnvironmentsDependencies = None,
        description: str = None,
        enable: bool = None,
        label: str = None,
        name: str = None,
        policies: ListAddonsResponseBodyAddonsEnvironmentsPolicies = None,
        policy_type: str = None,
    ):
        self.common_schema_refs = common_schema_refs
        self.dependencies = dependencies
        self.description = description
        self.enable = enable
        self.label = label
        self.name = name
        self.policies = policies
        self.policy_type = policy_type

    def validate(self):
        if self.common_schema_refs:
            for k in self.common_schema_refs:
                if k:
                    k.validate()
        if self.dependencies:
            self.dependencies.validate()
        if self.policies:
            self.policies.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['commonSchemaRefs'] = []
        if self.common_schema_refs is not None:
            for k in self.common_schema_refs:
                result['commonSchemaRefs'].append(k.to_map() if k else None)
        if self.dependencies is not None:
            result['dependencies'] = self.dependencies.to_map()
        if self.description is not None:
            result['description'] = self.description
        if self.enable is not None:
            result['enable'] = self.enable
        if self.label is not None:
            result['label'] = self.label
        if self.name is not None:
            result['name'] = self.name
        if self.policies is not None:
            result['policies'] = self.policies.to_map()
        if self.policy_type is not None:
            result['policyType'] = self.policy_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.common_schema_refs = []
        if m.get('commonSchemaRefs') is not None:
            for k in m.get('commonSchemaRefs'):
                temp_model = ListAddonsResponseBodyAddonsEnvironmentsCommonSchemaRefs()
                self.common_schema_refs.append(temp_model.from_map(k))
        if m.get('dependencies') is not None:
            temp_model = ListAddonsResponseBodyAddonsEnvironmentsDependencies()
            self.dependencies = temp_model.from_map(m['dependencies'])
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('label') is not None:
            self.label = m.get('label')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('policies') is not None:
            temp_model = ListAddonsResponseBodyAddonsEnvironmentsPolicies()
            self.policies = temp_model.from_map(m['policies'])
        if m.get('policyType') is not None:
            self.policy_type = m.get('policyType')
        return self


class ListAddonsResponseBodyAddons(TeaModel):
    def __init__(
        self,
        alias: str = None,
        categories: List[str] = None,
        dashboards: List[ListAddonsResponseBodyAddonsDashboards] = None,
        description: str = None,
        environments: List[ListAddonsResponseBodyAddonsEnvironments] = None,
        icon: str = None,
        keywords: List[str] = None,
        language: str = None,
        latest_release_create_time: str = None,
        name: str = None,
        once: bool = None,
        scene: str = None,
        version: str = None,
        weight: str = None,
    ):
        self.alias = alias
        self.categories = categories
        self.dashboards = dashboards
        self.description = description
        self.environments = environments
        self.icon = icon
        self.keywords = keywords
        self.language = language
        self.latest_release_create_time = latest_release_create_time
        self.name = name
        self.once = once
        self.scene = scene
        self.version = version
        self.weight = weight

    def validate(self):
        if self.dashboards:
            for k in self.dashboards:
                if k:
                    k.validate()
        if self.environments:
            for k in self.environments:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alias is not None:
            result['alias'] = self.alias
        if self.categories is not None:
            result['categories'] = self.categories
        result['dashboards'] = []
        if self.dashboards is not None:
            for k in self.dashboards:
                result['dashboards'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        result['environments'] = []
        if self.environments is not None:
            for k in self.environments:
                result['environments'].append(k.to_map() if k else None)
        if self.icon is not None:
            result['icon'] = self.icon
        if self.keywords is not None:
            result['keywords'] = self.keywords
        if self.language is not None:
            result['language'] = self.language
        if self.latest_release_create_time is not None:
            result['latestReleaseCreateTime'] = self.latest_release_create_time
        if self.name is not None:
            result['name'] = self.name
        if self.once is not None:
            result['once'] = self.once
        if self.scene is not None:
            result['scene'] = self.scene
        if self.version is not None:
            result['version'] = self.version
        if self.weight is not None:
            result['weight'] = self.weight
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alias') is not None:
            self.alias = m.get('alias')
        if m.get('categories') is not None:
            self.categories = m.get('categories')
        self.dashboards = []
        if m.get('dashboards') is not None:
            for k in m.get('dashboards'):
                temp_model = ListAddonsResponseBodyAddonsDashboards()
                self.dashboards.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        self.environments = []
        if m.get('environments') is not None:
            for k in m.get('environments'):
                temp_model = ListAddonsResponseBodyAddonsEnvironments()
                self.environments.append(temp_model.from_map(k))
        if m.get('icon') is not None:
            self.icon = m.get('icon')
        if m.get('keywords') is not None:
            self.keywords = m.get('keywords')
        if m.get('language') is not None:
            self.language = m.get('language')
        if m.get('latestReleaseCreateTime') is not None:
            self.latest_release_create_time = m.get('latestReleaseCreateTime')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('once') is not None:
            self.once = m.get('once')
        if m.get('scene') is not None:
            self.scene = m.get('scene')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class ListAddonsResponseBody(TeaModel):
    def __init__(
        self,
        addons: List[ListAddonsResponseBodyAddons] = None,
        request_id: str = None,
    ):
        self.addons = addons
        # Id of the request
        self.request_id = request_id

    def validate(self):
        if self.addons:
            for k in self.addons:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['addons'] = []
        if self.addons is not None:
            for k in self.addons:
                result['addons'].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: dict = None):
        m = m or dict()
        self.addons = []
        if m.get('addons') is not None:
            for k in m.get('addons'):
                temp_model = ListAddonsResponseBodyAddons()
                self.addons.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListAddonsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAddonsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAddonsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAggTaskGroupsRequestTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # Key of the resource group tag.
        self.key = key
        # Value of the resource group tag.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 ListAggTaskGroupsRequest(TeaModel):
    def __init__(
        self,
        filter_agg_task_group_ids: str = None,
        filter_agg_task_group_names: str = None,
        max_results: int = None,
        next_token: str = None,
        query: str = None,
        status: str = None,
        tags: List[ListAggTaskGroupsRequestTags] = None,
        target_prometheus_id: str = None,
    ):
        # List of IDs for the aggregation task groups, which must be JSON parseable.
        self.filter_agg_task_group_ids = filter_agg_task_group_ids
        # List of names for the aggregation task groups, which must be JSON parseable.
        self.filter_agg_task_group_names = filter_agg_task_group_names
        # Maximum number of records to return.
        self.max_results = max_results
        # Query token.
        self.next_token = next_token
        # Name search, supports fuzzy matching.
        self.query = query
        # Status of the aggregation task group, either \\"Running\\" or \\"Stopped\\". Default is Running.
        self.status = status
        # Resource group tags.
        self.tags = tags
        # The target Prometheus instance ID for the aggregation task group.
        self.target_prometheus_id = target_prometheus_id

    def validate(self):
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.filter_agg_task_group_ids is not None:
            result['filterAggTaskGroupIds'] = self.filter_agg_task_group_ids
        if self.filter_agg_task_group_names is not None:
            result['filterAggTaskGroupNames'] = self.filter_agg_task_group_names
        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.query is not None:
            result['query'] = self.query
        if self.status is not None:
            result['status'] = self.status
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.target_prometheus_id is not None:
            result['targetPrometheusId'] = self.target_prometheus_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('filterAggTaskGroupIds') is not None:
            self.filter_agg_task_group_ids = m.get('filterAggTaskGroupIds')
        if m.get('filterAggTaskGroupNames') is not None:
            self.filter_agg_task_group_names = m.get('filterAggTaskGroupNames')
        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('query') is not None:
            self.query = m.get('query')
        if m.get('status') is not None:
            self.status = m.get('status')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = ListAggTaskGroupsRequestTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('targetPrometheusId') is not None:
            self.target_prometheus_id = m.get('targetPrometheusId')
        return self


class ListAggTaskGroupsShrinkRequest(TeaModel):
    def __init__(
        self,
        filter_agg_task_group_ids: str = None,
        filter_agg_task_group_names: str = None,
        max_results: int = None,
        next_token: str = None,
        query: str = None,
        status: str = None,
        tags_shrink: str = None,
        target_prometheus_id: str = None,
    ):
        # List of IDs for the aggregation task groups, which must be JSON parseable.
        self.filter_agg_task_group_ids = filter_agg_task_group_ids
        # List of names for the aggregation task groups, which must be JSON parseable.
        self.filter_agg_task_group_names = filter_agg_task_group_names
        # Maximum number of records to return.
        self.max_results = max_results
        # Query token.
        self.next_token = next_token
        # Name search, supports fuzzy matching.
        self.query = query
        # Status of the aggregation task group, either \\"Running\\" or \\"Stopped\\". Default is Running.
        self.status = status
        # Resource group tags.
        self.tags_shrink = tags_shrink
        # The target Prometheus instance ID for the aggregation task group.
        self.target_prometheus_id = target_prometheus_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.filter_agg_task_group_ids is not None:
            result['filterAggTaskGroupIds'] = self.filter_agg_task_group_ids
        if self.filter_agg_task_group_names is not None:
            result['filterAggTaskGroupNames'] = self.filter_agg_task_group_names
        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.query is not None:
            result['query'] = self.query
        if self.status is not None:
            result['status'] = self.status
        if self.tags_shrink is not None:
            result['tags'] = self.tags_shrink
        if self.target_prometheus_id is not None:
            result['targetPrometheusId'] = self.target_prometheus_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('filterAggTaskGroupIds') is not None:
            self.filter_agg_task_group_ids = m.get('filterAggTaskGroupIds')
        if m.get('filterAggTaskGroupNames') is not None:
            self.filter_agg_task_group_names = m.get('filterAggTaskGroupNames')
        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('query') is not None:
            self.query = m.get('query')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('tags') is not None:
            self.tags_shrink = m.get('tags')
        if m.get('targetPrometheusId') is not None:
            self.target_prometheus_id = m.get('targetPrometheusId')
        return self


class ListAggTaskGroupsResponseBodyAggTaskGroups(TeaModel):
    def __init__(
        self,
        agg_task_group_config_hash: str = None,
        agg_task_group_id: str = None,
        agg_task_group_name: str = None,
        cron_expr: str = None,
        delay: int = None,
        description: str = None,
        from_time: int = None,
        interval: str = None,
        max_retries: int = None,
        max_run_time_in_seconds: int = None,
        region_id: str = None,
        schedule_mode: str = None,
        schedule_time_expr: str = None,
        source_prometheus_id: str = None,
        status: str = None,
        target_prometheus_id: str = None,
        to_time: int = None,
        update_time: str = None,
    ):
        # Hash of the aggregation task group configuration.
        self.agg_task_group_config_hash = agg_task_group_config_hash
        # ID of the aggregation task group.
        self.agg_task_group_id = agg_task_group_id
        # Name of the aggregation task group.
        self.agg_task_group_name = agg_task_group_name
        # Cron expression for the aggregation task group when the scheduling mode is set to \\"Cron\\".
        self.cron_expr = cron_expr
        # Fixed delay time (in seconds) for scheduling.
        self.delay = delay
        # Description of the aggregation task group.
        self.description = description
        # Start time of the schedule in seconds since epoch.
        self.from_time = from_time
        # Scheduling interval.
        self.interval = interval
        # Maximum number of retries for the aggregation task.
        self.max_retries = max_retries
        # Maximum retry time (in seconds) for the aggregation task.
        self.max_run_time_in_seconds = max_run_time_in_seconds
        # Region ID.
        self.region_id = region_id
        # Scheduling mode.
        self.schedule_mode = schedule_mode
        # Scheduling time expression.
        self.schedule_time_expr = schedule_time_expr
        # The source Prometheus instance ID of the aggregation task group.
        self.source_prometheus_id = source_prometheus_id
        # Status of the aggregation task group.
        self.status = status
        # The target Prometheus instance ID of the aggregation task group.
        self.target_prometheus_id = target_prometheus_id
        # The second-level timestamp corresponding to the end time of scheduling.
        self.to_time = to_time
        # Update time of the aggregation task group.
        self.update_time = update_time

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.agg_task_group_config_hash is not None:
            result['aggTaskGroupConfigHash'] = self.agg_task_group_config_hash
        if self.agg_task_group_id is not None:
            result['aggTaskGroupId'] = self.agg_task_group_id
        if self.agg_task_group_name is not None:
            result['aggTaskGroupName'] = self.agg_task_group_name
        if self.cron_expr is not None:
            result['cronExpr'] = self.cron_expr
        if self.delay is not None:
            result['delay'] = self.delay
        if self.description is not None:
            result['description'] = self.description
        if self.from_time is not None:
            result['fromTime'] = self.from_time
        if self.interval is not None:
            result['interval'] = self.interval
        if self.max_retries is not None:
            result['maxRetries'] = self.max_retries
        if self.max_run_time_in_seconds is not None:
            result['maxRunTimeInSeconds'] = self.max_run_time_in_seconds
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.schedule_mode is not None:
            result['scheduleMode'] = self.schedule_mode
        if self.schedule_time_expr is not None:
            result['scheduleTimeExpr'] = self.schedule_time_expr
        if self.source_prometheus_id is not None:
            result['sourcePrometheusId'] = self.source_prometheus_id
        if self.status is not None:
            result['status'] = self.status
        if self.target_prometheus_id is not None:
            result['targetPrometheusId'] = self.target_prometheus_id
        if self.to_time is not None:
            result['toTime'] = self.to_time
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aggTaskGroupConfigHash') is not None:
            self.agg_task_group_config_hash = m.get('aggTaskGroupConfigHash')
        if m.get('aggTaskGroupId') is not None:
            self.agg_task_group_id = m.get('aggTaskGroupId')
        if m.get('aggTaskGroupName') is not None:
            self.agg_task_group_name = m.get('aggTaskGroupName')
        if m.get('cronExpr') is not None:
            self.cron_expr = m.get('cronExpr')
        if m.get('delay') is not None:
            self.delay = m.get('delay')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('fromTime') is not None:
            self.from_time = m.get('fromTime')
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('maxRetries') is not None:
            self.max_retries = m.get('maxRetries')
        if m.get('maxRunTimeInSeconds') is not None:
            self.max_run_time_in_seconds = m.get('maxRunTimeInSeconds')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('scheduleMode') is not None:
            self.schedule_mode = m.get('scheduleMode')
        if m.get('scheduleTimeExpr') is not None:
            self.schedule_time_expr = m.get('scheduleTimeExpr')
        if m.get('sourcePrometheusId') is not None:
            self.source_prometheus_id = m.get('sourcePrometheusId')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('targetPrometheusId') is not None:
            self.target_prometheus_id = m.get('targetPrometheusId')
        if m.get('toTime') is not None:
            self.to_time = m.get('toTime')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        return self


class ListAggTaskGroupsResponseBody(TeaModel):
    def __init__(
        self,
        agg_task_groups: List[ListAggTaskGroupsResponseBodyAggTaskGroups] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total_count: int = None,
    ):
        # List of aggregation task groups.
        self.agg_task_groups = agg_task_groups
        # The maximum number of records returned.
        self.max_results = max_results
        # Token for the next query.
        self.next_token = next_token
        # Request ID.
        self.request_id = request_id
        # Total number of instances.
        self.total_count = total_count

    def validate(self):
        if self.agg_task_groups:
            for k in self.agg_task_groups:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['aggTaskGroups'] = []
        if self.agg_task_groups is not None:
            for k in self.agg_task_groups:
                result['aggTaskGroups'].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.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: dict = None):
        m = m or dict()
        self.agg_task_groups = []
        if m.get('aggTaskGroups') is not None:
            for k in m.get('aggTaskGroups'):
                temp_model = ListAggTaskGroupsResponseBodyAggTaskGroups()
                self.agg_task_groups.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('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 ListAggTaskGroupsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAggTaskGroupsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAggTaskGroupsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAlertActionsRequest(TeaModel):
    def __init__(
        self,
        alert_action_ids: List[str] = None,
        alert_action_name: str = None,
        max_results: int = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        source: str = None,
        type: str = None,
    ):
        # Unique identifier for the action integration.
        self.alert_action_ids = alert_action_ids
        # Name of the action integration.
        self.alert_action_name = alert_action_name
        self.max_results = max_results
        self.next_token = next_token
        # Page number. Default is 1.
        self.page_number = page_number
        # Page size. Default is 100.
        self.page_size = page_size
        self.source = source
        # Type of the action integration.
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_action_ids is not None:
            result['alertActionIds'] = self.alert_action_ids
        if self.alert_action_name is not None:
            result['alertActionName'] = self.alert_action_name
        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.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.source is not None:
            result['source'] = self.source
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionIds') is not None:
            self.alert_action_ids = m.get('alertActionIds')
        if m.get('alertActionName') is not None:
            self.alert_action_name = m.get('alertActionName')
        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('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('source') is not None:
            self.source = m.get('source')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ListAlertActionsShrinkRequest(TeaModel):
    def __init__(
        self,
        alert_action_ids_shrink: str = None,
        alert_action_name: str = None,
        max_results: int = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        source: str = None,
        type: str = None,
    ):
        # Unique identifier for the action integration.
        self.alert_action_ids_shrink = alert_action_ids_shrink
        # Name of the action integration.
        self.alert_action_name = alert_action_name
        self.max_results = max_results
        self.next_token = next_token
        # Page number. Default is 1.
        self.page_number = page_number
        # Page size. Default is 100.
        self.page_size = page_size
        self.source = source
        # Type of the action integration.
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_action_ids_shrink is not None:
            result['alertActionIds'] = self.alert_action_ids_shrink
        if self.alert_action_name is not None:
            result['alertActionName'] = self.alert_action_name
        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.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.source is not None:
            result['source'] = self.source
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionIds') is not None:
            self.alert_action_ids_shrink = m.get('alertActionIds')
        if m.get('alertActionName') is not None:
            self.alert_action_name = m.get('alertActionName')
        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('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('source') is not None:
            self.source = m.get('source')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ListAlertActionsResponseBodyAlertActionsEbParam(TeaModel):
    def __init__(
        self,
        eb_source: str = None,
        event_bus_name: str = None,
        region_id: str = None,
        subject: str = None,
    ):
        # Event source.
        self.eb_source = eb_source
        # Event bus name.
        self.event_bus_name = event_bus_name
        # Region ID.
        self.region_id = region_id
        # Subject.
        self.subject = subject

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.eb_source is not None:
            result['ebSource'] = self.eb_source
        if self.event_bus_name is not None:
            result['eventBusName'] = self.event_bus_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.subject is not None:
            result['subject'] = self.subject
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ebSource') is not None:
            self.eb_source = m.get('ebSource')
        if m.get('eventBusName') is not None:
            self.event_bus_name = m.get('eventBusName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('subject') is not None:
            self.subject = m.get('subject')
        return self


class ListAlertActionsResponseBodyAlertActionsEssParam(TeaModel):
    def __init__(
        self,
        ess_group_id: str = None,
        ess_rule_id: str = None,
        region_id: str = None,
    ):
        # Elastic scaling group ID.
        self.ess_group_id = ess_group_id
        # Elastic scaling rule ID.
        self.ess_rule_id = ess_rule_id
        # Region ID.
        self.region_id = region_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.ess_group_id is not None:
            result['essGroupId'] = self.ess_group_id
        if self.ess_rule_id is not None:
            result['essRuleId'] = self.ess_rule_id
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('essGroupId') is not None:
            self.ess_group_id = m.get('essGroupId')
        if m.get('essRuleId') is not None:
            self.ess_rule_id = m.get('essRuleId')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class ListAlertActionsResponseBodyAlertActionsFc3Param(TeaModel):
    def __init__(
        self,
        function: str = None,
        qualifier: str = None,
        region_id: str = None,
    ):
        # Function name of the Function Compute service.
        self.function = function
        # Version or alias of the function.
        self.qualifier = qualifier
        # Region ID.
        self.region_id = region_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.function is not None:
            result['function'] = self.function
        if self.qualifier is not None:
            result['qualifier'] = self.qualifier
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('function') is not None:
            self.function = m.get('function')
        if m.get('qualifier') is not None:
            self.qualifier = m.get('qualifier')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class ListAlertActionsResponseBodyAlertActionsFcParam(TeaModel):
    def __init__(
        self,
        function: str = None,
        region_id: str = None,
        service: str = None,
    ):
        # Function name in the Function Compute service.
        self.function = function
        # Region ID.
        self.region_id = region_id
        # Function Compute service name.
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.function is not None:
            result['function'] = self.function
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.service is not None:
            result['service'] = self.service
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('function') is not None:
            self.function = m.get('function')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class ListAlertActionsResponseBodyAlertActionsMnsParam(TeaModel):
    def __init__(
        self,
        mns_type: str = None,
        name: str = None,
        region_id: str = None,
    ):
        # Resource type of the Lightweight Message Queue (formerly MNS).
        self.mns_type = mns_type
        # Resource name.
        # 
        # - If the resource type is queue, the resource name is the queue name.
        # - If the resource type is topic, the resource name is the topic name.
        self.name = name
        # Region ID.
        self.region_id = region_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.mns_type is not None:
            result['mnsType'] = self.mns_type
        if self.name is not None:
            result['name'] = self.name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('mnsType') is not None:
            self.mns_type = m.get('mnsType')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class ListAlertActionsResponseBodyAlertActionsPagerDutyParam(TeaModel):
    def __init__(
        self,
        key: str = None,
        url: str = None,
    ):
        # Integration key for PagerDuty.
        self.key = key
        # Integration webhook for PagerDuty. Supports V1 and V2 versions.
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.key is not None:
            result['key'] = self.key
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class ListAlertActionsResponseBodyAlertActionsSlsParam(TeaModel):
    def __init__(
        self,
        logstore: str = None,
        project: str = None,
        region_id: str = None,
    ):
        # Logstore name of the Log Service.
        self.logstore = logstore
        # Log Service project name.
        self.project = project
        # Region ID.
        self.region_id = region_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.logstore is not None:
            result['logstore'] = self.logstore
        if self.project is not None:
            result['project'] = self.project
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('logstore') is not None:
            self.logstore = m.get('logstore')
        if m.get('project') is not None:
            self.project = m.get('project')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class ListAlertActionsResponseBodyAlertActionsWebhookParam(TeaModel):
    def __init__(
        self,
        content_type: str = None,
        headers: Dict[str, str] = None,
        method: str = None,
        url: str = None,
    ):
        # Data format, effective when the request method is POST.
        self.content_type = content_type
        # Request headers.
        self.headers = headers
        # Webhook request method.
        self.method = method
        # The URL address for the alarm callback.
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.content_type is not None:
            result['contentType'] = self.content_type
        if self.headers is not None:
            result['headers'] = self.headers
        if self.method is not None:
            result['method'] = self.method
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contentType') is not None:
            self.content_type = m.get('contentType')
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('method') is not None:
            self.method = m.get('method')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class ListAlertActionsResponseBodyAlertActions(TeaModel):
    def __init__(
        self,
        alert_action_id: str = None,
        alert_action_name: str = None,
        eb_param: ListAlertActionsResponseBodyAlertActionsEbParam = None,
        ess_param: ListAlertActionsResponseBodyAlertActionsEssParam = None,
        fc_3param: ListAlertActionsResponseBodyAlertActionsFc3Param = None,
        fc_param: ListAlertActionsResponseBodyAlertActionsFcParam = None,
        mns_param: ListAlertActionsResponseBodyAlertActionsMnsParam = None,
        pager_duty_param: ListAlertActionsResponseBodyAlertActionsPagerDutyParam = None,
        sls_param: ListAlertActionsResponseBodyAlertActionsSlsParam = None,
        type: str = None,
        webhook_param: ListAlertActionsResponseBodyAlertActionsWebhookParam = None,
    ):
        # Unique identifier for the action integration.
        self.alert_action_id = alert_action_id
        # Alert action name.
        self.alert_action_name = alert_action_name
        # Event Bridge parameters.
        self.eb_param = eb_param
        # Elastic scaling parameters.
        self.ess_param = ess_param
        # Function Compute 3.0 parameters.
        self.fc_3param = fc_3param
        # Function Compute parameters.
        self.fc_param = fc_param
        # Lightweight Message Queue (formerly MNS) parameters.
        self.mns_param = mns_param
        # PagerDuty parameters
        self.pager_duty_param = pager_duty_param
        # Log Service parameters.
        self.sls_param = sls_param
        # Action integration type.
        self.type = type
        # Webhook parameters
        self.webhook_param = webhook_param

    def validate(self):
        if self.eb_param:
            self.eb_param.validate()
        if self.ess_param:
            self.ess_param.validate()
        if self.fc_3param:
            self.fc_3param.validate()
        if self.fc_param:
            self.fc_param.validate()
        if self.mns_param:
            self.mns_param.validate()
        if self.pager_duty_param:
            self.pager_duty_param.validate()
        if self.sls_param:
            self.sls_param.validate()
        if self.webhook_param:
            self.webhook_param.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_action_id is not None:
            result['alertActionId'] = self.alert_action_id
        if self.alert_action_name is not None:
            result['alertActionName'] = self.alert_action_name
        if self.eb_param is not None:
            result['ebParam'] = self.eb_param.to_map()
        if self.ess_param is not None:
            result['essParam'] = self.ess_param.to_map()
        if self.fc_3param is not None:
            result['fc3Param'] = self.fc_3param.to_map()
        if self.fc_param is not None:
            result['fcParam'] = self.fc_param.to_map()
        if self.mns_param is not None:
            result['mnsParam'] = self.mns_param.to_map()
        if self.pager_duty_param is not None:
            result['pagerDutyParam'] = self.pager_duty_param.to_map()
        if self.sls_param is not None:
            result['slsParam'] = self.sls_param.to_map()
        if self.type is not None:
            result['type'] = self.type
        if self.webhook_param is not None:
            result['webhookParam'] = self.webhook_param.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionId') is not None:
            self.alert_action_id = m.get('alertActionId')
        if m.get('alertActionName') is not None:
            self.alert_action_name = m.get('alertActionName')
        if m.get('ebParam') is not None:
            temp_model = ListAlertActionsResponseBodyAlertActionsEbParam()
            self.eb_param = temp_model.from_map(m['ebParam'])
        if m.get('essParam') is not None:
            temp_model = ListAlertActionsResponseBodyAlertActionsEssParam()
            self.ess_param = temp_model.from_map(m['essParam'])
        if m.get('fc3Param') is not None:
            temp_model = ListAlertActionsResponseBodyAlertActionsFc3Param()
            self.fc_3param = temp_model.from_map(m['fc3Param'])
        if m.get('fcParam') is not None:
            temp_model = ListAlertActionsResponseBodyAlertActionsFcParam()
            self.fc_param = temp_model.from_map(m['fcParam'])
        if m.get('mnsParam') is not None:
            temp_model = ListAlertActionsResponseBodyAlertActionsMnsParam()
            self.mns_param = temp_model.from_map(m['mnsParam'])
        if m.get('pagerDutyParam') is not None:
            temp_model = ListAlertActionsResponseBodyAlertActionsPagerDutyParam()
            self.pager_duty_param = temp_model.from_map(m['pagerDutyParam'])
        if m.get('slsParam') is not None:
            temp_model = ListAlertActionsResponseBodyAlertActionsSlsParam()
            self.sls_param = temp_model.from_map(m['slsParam'])
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('webhookParam') is not None:
            temp_model = ListAlertActionsResponseBodyAlertActionsWebhookParam()
            self.webhook_param = temp_model.from_map(m['webhookParam'])
        return self


class ListAlertActionsResponseBody(TeaModel):
    def __init__(
        self,
        alert_actions: List[ListAlertActionsResponseBodyAlertActions] = None,
        max_results: int = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        total: int = None,
    ):
        # List of alert action configurations.
        self.alert_actions = alert_actions
        self.max_results = max_results
        self.next_token = next_token
        # Page number.
        self.page_number = page_number
        # Page size.
        self.page_size = page_size
        # Request ID.
        self.request_id = request_id
        # Total number of items.
        self.total = total

    def validate(self):
        if self.alert_actions:
            for k in self.alert_actions:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['alertActions'] = []
        if self.alert_actions is not None:
            for k in self.alert_actions:
                result['alertActions'].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.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
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.alert_actions = []
        if m.get('alertActions') is not None:
            for k in m.get('alertActions'):
                temp_model = ListAlertActionsResponseBodyAlertActions()
                self.alert_actions.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('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')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListAlertActionsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAlertActionsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAlertActionsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAlertEventIntegrationPoliciesRequest(TeaModel):
    def __init__(
        self,
        alert_event_integration_policy_id: str = None,
        alert_event_integration_policy_name: str = None,
        direction: str = None,
        enable: bool = None,
        max_results: int = None,
        next_token: str = None,
        order_by: str = None,
        workspace: str = None,
    ):
        self.alert_event_integration_policy_id = alert_event_integration_policy_id
        self.alert_event_integration_policy_name = alert_event_integration_policy_name
        self.direction = direction
        self.enable = enable
        self.max_results = max_results
        self.next_token = next_token
        self.order_by = order_by
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_event_integration_policy_id is not None:
            result['alertEventIntegrationPolicyId'] = self.alert_event_integration_policy_id
        if self.alert_event_integration_policy_name is not None:
            result['alertEventIntegrationPolicyName'] = self.alert_event_integration_policy_name
        if self.direction is not None:
            result['direction'] = self.direction
        if self.enable is not None:
            result['enable'] = self.enable
        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.order_by is not None:
            result['orderBy'] = self.order_by
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertEventIntegrationPolicyId') is not None:
            self.alert_event_integration_policy_id = m.get('alertEventIntegrationPolicyId')
        if m.get('alertEventIntegrationPolicyName') is not None:
            self.alert_event_integration_policy_name = m.get('alertEventIntegrationPolicyName')
        if m.get('direction') is not None:
            self.direction = m.get('direction')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        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('orderBy') is not None:
            self.order_by = m.get('orderBy')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListAlertEventIntegrationPoliciesResponseBody(TeaModel):
    def __init__(
        self,
        alert_event_integration_policy_list: List[AlertEventIntegrationPolicyForView] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
    ):
        self.alert_event_integration_policy_list = alert_event_integration_policy_list
        self.max_results = max_results
        self.next_token = next_token
        # Id of the request
        self.request_id = request_id

    def validate(self):
        if self.alert_event_integration_policy_list:
            for k in self.alert_event_integration_policy_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['alertEventIntegrationPolicyList'] = []
        if self.alert_event_integration_policy_list is not None:
            for k in self.alert_event_integration_policy_list:
                result['alertEventIntegrationPolicyList'].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.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.alert_event_integration_policy_list = []
        if m.get('alertEventIntegrationPolicyList') is not None:
            for k in m.get('alertEventIntegrationPolicyList'):
                temp_model = AlertEventIntegrationPolicyForView()
                self.alert_event_integration_policy_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('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListAlertEventIntegrationPoliciesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAlertEventIntegrationPoliciesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAlertEventIntegrationPoliciesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAlertHistoriesRequest(TeaModel):
    def __init__(
        self,
        alert_history_id: str = None,
        alert_rule_id: str = None,
        biz_source: str = None,
        display_name_key_word: str = None,
        instance_key: str = None,
        label_filter: AlertRuleLabelFilter = None,
        latest_level: str = None,
        max_level: str = None,
        max_results: int = None,
        next_token: str = None,
        notification_filter: AlertRuleNotificationFilter = None,
        page_number: int = None,
        page_size: int = None,
        start_time_from: int = None,
        start_time_to: int = None,
        status: str = None,
        workspace: str = None,
    ):
        self.alert_history_id = alert_history_id
        self.alert_rule_id = alert_rule_id
        self.biz_source = biz_source
        self.display_name_key_word = display_name_key_word
        self.instance_key = instance_key
        self.label_filter = label_filter
        self.latest_level = latest_level
        self.max_level = max_level
        self.max_results = max_results
        self.next_token = next_token
        self.notification_filter = notification_filter
        self.page_number = page_number
        self.page_size = page_size
        self.start_time_from = start_time_from
        self.start_time_to = start_time_to
        self.status = status
        self.workspace = workspace

    def validate(self):
        if self.label_filter:
            self.label_filter.validate()
        if self.notification_filter:
            self.notification_filter.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_history_id is not None:
            result['alertHistoryId'] = self.alert_history_id
        if self.alert_rule_id is not None:
            result['alertRuleId'] = self.alert_rule_id
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.display_name_key_word is not None:
            result['displayNameKeyWord'] = self.display_name_key_word
        if self.instance_key is not None:
            result['instanceKey'] = self.instance_key
        if self.label_filter is not None:
            result['labelFilter'] = self.label_filter.to_map()
        if self.latest_level is not None:
            result['latestLevel'] = self.latest_level
        if self.max_level is not None:
            result['maxLevel'] = self.max_level
        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.notification_filter is not None:
            result['notificationFilter'] = self.notification_filter.to_map()
        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.start_time_from is not None:
            result['startTimeFrom'] = self.start_time_from
        if self.start_time_to is not None:
            result['startTimeTo'] = self.start_time_to
        if self.status is not None:
            result['status'] = self.status
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertHistoryId') is not None:
            self.alert_history_id = m.get('alertHistoryId')
        if m.get('alertRuleId') is not None:
            self.alert_rule_id = m.get('alertRuleId')
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('displayNameKeyWord') is not None:
            self.display_name_key_word = m.get('displayNameKeyWord')
        if m.get('instanceKey') is not None:
            self.instance_key = m.get('instanceKey')
        if m.get('labelFilter') is not None:
            temp_model = AlertRuleLabelFilter()
            self.label_filter = temp_model.from_map(m['labelFilter'])
        if m.get('latestLevel') is not None:
            self.latest_level = m.get('latestLevel')
        if m.get('maxLevel') is not None:
            self.max_level = m.get('maxLevel')
        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('notificationFilter') is not None:
            temp_model = AlertRuleNotificationFilter()
            self.notification_filter = temp_model.from_map(m['notificationFilter'])
        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('startTimeFrom') is not None:
            self.start_time_from = m.get('startTimeFrom')
        if m.get('startTimeTo') is not None:
            self.start_time_to = m.get('startTimeTo')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListAlertHistoriesShrinkRequest(TeaModel):
    def __init__(
        self,
        alert_history_id: str = None,
        alert_rule_id: str = None,
        biz_source: str = None,
        display_name_key_word: str = None,
        instance_key: str = None,
        label_filter_shrink: str = None,
        latest_level: str = None,
        max_level: str = None,
        max_results: int = None,
        next_token: str = None,
        notification_filter_shrink: str = None,
        page_number: int = None,
        page_size: int = None,
        start_time_from: int = None,
        start_time_to: int = None,
        status: str = None,
        workspace: str = None,
    ):
        self.alert_history_id = alert_history_id
        self.alert_rule_id = alert_rule_id
        self.biz_source = biz_source
        self.display_name_key_word = display_name_key_word
        self.instance_key = instance_key
        self.label_filter_shrink = label_filter_shrink
        self.latest_level = latest_level
        self.max_level = max_level
        self.max_results = max_results
        self.next_token = next_token
        self.notification_filter_shrink = notification_filter_shrink
        self.page_number = page_number
        self.page_size = page_size
        self.start_time_from = start_time_from
        self.start_time_to = start_time_to
        self.status = status
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_history_id is not None:
            result['alertHistoryId'] = self.alert_history_id
        if self.alert_rule_id is not None:
            result['alertRuleId'] = self.alert_rule_id
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.display_name_key_word is not None:
            result['displayNameKeyWord'] = self.display_name_key_word
        if self.instance_key is not None:
            result['instanceKey'] = self.instance_key
        if self.label_filter_shrink is not None:
            result['labelFilter'] = self.label_filter_shrink
        if self.latest_level is not None:
            result['latestLevel'] = self.latest_level
        if self.max_level is not None:
            result['maxLevel'] = self.max_level
        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.notification_filter_shrink is not None:
            result['notificationFilter'] = self.notification_filter_shrink
        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.start_time_from is not None:
            result['startTimeFrom'] = self.start_time_from
        if self.start_time_to is not None:
            result['startTimeTo'] = self.start_time_to
        if self.status is not None:
            result['status'] = self.status
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertHistoryId') is not None:
            self.alert_history_id = m.get('alertHistoryId')
        if m.get('alertRuleId') is not None:
            self.alert_rule_id = m.get('alertRuleId')
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('displayNameKeyWord') is not None:
            self.display_name_key_word = m.get('displayNameKeyWord')
        if m.get('instanceKey') is not None:
            self.instance_key = m.get('instanceKey')
        if m.get('labelFilter') is not None:
            self.label_filter_shrink = m.get('labelFilter')
        if m.get('latestLevel') is not None:
            self.latest_level = m.get('latestLevel')
        if m.get('maxLevel') is not None:
            self.max_level = m.get('maxLevel')
        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('notificationFilter') is not None:
            self.notification_filter_shrink = m.get('notificationFilter')
        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('startTimeFrom') is not None:
            self.start_time_from = m.get('startTimeFrom')
        if m.get('startTimeTo') is not None:
            self.start_time_to = m.get('startTimeTo')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListAlertHistoriesResponseBodyData(TeaModel):
    def __init__(
        self,
        alert_history_id: str = None,
        alert_rule_id: str = None,
        annotations: Dict[str, str] = None,
        biz_source: str = None,
        count: int = None,
        end_time: int = None,
        gmt_create: int = None,
        gmt_modified: int = None,
        instance_detail: Dict[str, str] = None,
        instance_key: str = None,
        labels: Dict[str, str] = None,
        latest_level: str = None,
        max_level: str = None,
        message: str = None,
        region_id: str = None,
        rule_display_name: str = None,
        send: AlertRuleSend = None,
        start_time: int = None,
        status: str = None,
        workspace: str = None,
    ):
        self.alert_history_id = alert_history_id
        self.alert_rule_id = alert_rule_id
        self.annotations = annotations
        self.biz_source = biz_source
        self.count = count
        self.end_time = end_time
        self.gmt_create = gmt_create
        self.gmt_modified = gmt_modified
        self.instance_detail = instance_detail
        self.instance_key = instance_key
        self.labels = labels
        self.latest_level = latest_level
        self.max_level = max_level
        self.message = message
        self.region_id = region_id
        self.rule_display_name = rule_display_name
        self.send = send
        self.start_time = start_time
        self.status = status
        self.workspace = workspace

    def validate(self):
        if self.send:
            self.send.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_history_id is not None:
            result['alertHistoryId'] = self.alert_history_id
        if self.alert_rule_id is not None:
            result['alertRuleId'] = self.alert_rule_id
        if self.annotations is not None:
            result['annotations'] = self.annotations
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.count is not None:
            result['count'] = self.count
        if self.end_time is not None:
            result['endTime'] = self.end_time
        if self.gmt_create is not None:
            result['gmtCreate'] = self.gmt_create
        if self.gmt_modified is not None:
            result['gmtModified'] = self.gmt_modified
        if self.instance_detail is not None:
            result['instanceDetail'] = self.instance_detail
        if self.instance_key is not None:
            result['instanceKey'] = self.instance_key
        if self.labels is not None:
            result['labels'] = self.labels
        if self.latest_level is not None:
            result['latestLevel'] = self.latest_level
        if self.max_level is not None:
            result['maxLevel'] = self.max_level
        if self.message is not None:
            result['message'] = self.message
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.rule_display_name is not None:
            result['ruleDisplayName'] = self.rule_display_name
        if self.send is not None:
            result['send'] = self.send.to_map()
        if self.start_time is not None:
            result['startTime'] = self.start_time
        if self.status is not None:
            result['status'] = self.status
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertHistoryId') is not None:
            self.alert_history_id = m.get('alertHistoryId')
        if m.get('alertRuleId') is not None:
            self.alert_rule_id = m.get('alertRuleId')
        if m.get('annotations') is not None:
            self.annotations = m.get('annotations')
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('count') is not None:
            self.count = m.get('count')
        if m.get('endTime') is not None:
            self.end_time = m.get('endTime')
        if m.get('gmtCreate') is not None:
            self.gmt_create = m.get('gmtCreate')
        if m.get('gmtModified') is not None:
            self.gmt_modified = m.get('gmtModified')
        if m.get('instanceDetail') is not None:
            self.instance_detail = m.get('instanceDetail')
        if m.get('instanceKey') is not None:
            self.instance_key = m.get('instanceKey')
        if m.get('labels') is not None:
            self.labels = m.get('labels')
        if m.get('latestLevel') is not None:
            self.latest_level = m.get('latestLevel')
        if m.get('maxLevel') is not None:
            self.max_level = m.get('maxLevel')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('ruleDisplayName') is not None:
            self.rule_display_name = m.get('ruleDisplayName')
        if m.get('send') is not None:
            temp_model = AlertRuleSend()
            self.send = temp_model.from_map(m['send'])
        if m.get('startTime') is not None:
            self.start_time = m.get('startTime')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListAlertHistoriesResponseBody(TeaModel):
    def __init__(
        self,
        data: List[ListAlertHistoriesResponseBodyData] = None,
        max_results: int = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        total_count: int = None,
    ):
        self.data = data
        self.max_results = max_results
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        # Id of the request
        self.request_id = request_id
        self.total_count = total_count

    def validate(self):
        if self.data:
            for k in self.data:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.max_results is not None:
            result['maxResults'] = self.max_results
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        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
        if self.total_count is not None:
            result['totalCount'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = ListAlertHistoriesResponseBodyData()
                self.data.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('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')
        if m.get('totalCount') is not None:
            self.total_count = m.get('totalCount')
        return self


class ListAlertHistoriesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAlertHistoriesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAlertHistoriesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAlertMetricGroupsRequest(TeaModel):
    def __init__(
        self,
        alert_metric_group_id: str = None,
        datasource_type: str = None,
        include_details: bool = None,
        max_results: int = None,
        next_token: str = None,
    ):
        self.alert_metric_group_id = alert_metric_group_id
        self.datasource_type = datasource_type
        self.include_details = include_details
        self.max_results = max_results
        self.next_token = next_token

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_metric_group_id is not None:
            result['alertMetricGroupId'] = self.alert_metric_group_id
        if self.datasource_type is not None:
            result['datasourceType'] = self.datasource_type
        if self.include_details is not None:
            result['includeDetails'] = self.include_details
        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: dict = None):
        m = m or dict()
        if m.get('alertMetricGroupId') is not None:
            self.alert_metric_group_id = m.get('alertMetricGroupId')
        if m.get('datasourceType') is not None:
            self.datasource_type = m.get('datasourceType')
        if m.get('includeDetails') is not None:
            self.include_details = m.get('includeDetails')
        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 ListAlertMetricGroupsResponseBodyData(TeaModel):
    def __init__(
        self,
        alert_metric_group_id: str = None,
        datasource_types: str = None,
        description_cn: str = None,
        description_en: str = None,
        display_name_cn: str = None,
        display_name_en: str = None,
        filters: List[AlertRuleAlertMetricFilterDef] = None,
        order_index: int = None,
        params: List[AlertRuleAlertMetricParamDef] = None,
    ):
        self.alert_metric_group_id = alert_metric_group_id
        self.datasource_types = datasource_types
        self.description_cn = description_cn
        self.description_en = description_en
        self.display_name_cn = display_name_cn
        self.display_name_en = display_name_en
        self.filters = filters
        self.order_index = order_index
        self.params = params

    def validate(self):
        if self.filters:
            for k in self.filters:
                if k:
                    k.validate()
        if self.params:
            for k in self.params:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_metric_group_id is not None:
            result['alertMetricGroupId'] = self.alert_metric_group_id
        if self.datasource_types is not None:
            result['datasourceTypes'] = self.datasource_types
        if self.description_cn is not None:
            result['descriptionCn'] = self.description_cn
        if self.description_en is not None:
            result['descriptionEn'] = self.description_en
        if self.display_name_cn is not None:
            result['displayNameCn'] = self.display_name_cn
        if self.display_name_en is not None:
            result['displayNameEn'] = self.display_name_en
        result['filters'] = []
        if self.filters is not None:
            for k in self.filters:
                result['filters'].append(k.to_map() if k else None)
        if self.order_index is not None:
            result['orderIndex'] = self.order_index
        result['params'] = []
        if self.params is not None:
            for k in self.params:
                result['params'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertMetricGroupId') is not None:
            self.alert_metric_group_id = m.get('alertMetricGroupId')
        if m.get('datasourceTypes') is not None:
            self.datasource_types = m.get('datasourceTypes')
        if m.get('descriptionCn') is not None:
            self.description_cn = m.get('descriptionCn')
        if m.get('descriptionEn') is not None:
            self.description_en = m.get('descriptionEn')
        if m.get('displayNameCn') is not None:
            self.display_name_cn = m.get('displayNameCn')
        if m.get('displayNameEn') is not None:
            self.display_name_en = m.get('displayNameEn')
        self.filters = []
        if m.get('filters') is not None:
            for k in m.get('filters'):
                temp_model = AlertRuleAlertMetricFilterDef()
                self.filters.append(temp_model.from_map(k))
        if m.get('orderIndex') is not None:
            self.order_index = m.get('orderIndex')
        self.params = []
        if m.get('params') is not None:
            for k in m.get('params'):
                temp_model = AlertRuleAlertMetricParamDef()
                self.params.append(temp_model.from_map(k))
        return self


class ListAlertMetricGroupsResponseBody(TeaModel):
    def __init__(
        self,
        data: List[ListAlertMetricGroupsResponseBodyData] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total_count: int = None,
    ):
        self.data = data
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.total_count = total_count

    def validate(self):
        if self.data:
            for k in self.data:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.max_results is not None:
            result['maxResults'] = self.max_results
        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.total_count is not None:
            result['totalCount'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = ListAlertMetricGroupsResponseBodyData()
                self.data.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('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 ListAlertMetricGroupsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAlertMetricGroupsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAlertMetricGroupsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAlertMetricsRequest(TeaModel):
    def __init__(
        self,
        alert_metric_id: str = None,
        group: str = None,
        include_details: bool = None,
        max_results: int = None,
        next_token: str = None,
    ):
        self.alert_metric_id = alert_metric_id
        self.group = group
        self.include_details = include_details
        self.max_results = max_results
        self.next_token = next_token

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_metric_id is not None:
            result['alertMetricId'] = self.alert_metric_id
        if self.group is not None:
            result['group'] = self.group
        if self.include_details is not None:
            result['includeDetails'] = self.include_details
        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: dict = None):
        m = m or dict()
        if m.get('alertMetricId') is not None:
            self.alert_metric_id = m.get('alertMetricId')
        if m.get('group') is not None:
            self.group = m.get('group')
        if m.get('includeDetails') is not None:
            self.include_details = m.get('includeDetails')
        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 ListAlertMetricsResponseBodyDataExprTemplate(TeaModel):
    def __init__(
        self,
        tpl: str = None,
        type: str = None,
    ):
        self.tpl = tpl
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.tpl is not None:
            result['tpl'] = self.tpl
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('tpl') is not None:
            self.tpl = m.get('tpl')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ListAlertMetricsResponseBodyData(TeaModel):
    def __init__(
        self,
        alert_level: str = None,
        alert_message_cn: str = None,
        alert_message_en: str = None,
        alert_metric_id: str = None,
        base_unit: str = None,
        display_name_cn: str = None,
        display_name_en: str = None,
        display_statement_cn: str = None,
        display_statement_en: str = None,
        duration: int = None,
        expr_template: ListAlertMetricsResponseBodyDataExprTemplate = None,
        ext_info: Dict[str, str] = None,
        filters: List[AlertRuleAlertMetricFilterDef] = None,
        group: str = None,
        params: List[AlertRuleAlertMetricParamDef] = None,
        unit_cn: str = None,
        unit_en: str = None,
    ):
        self.alert_level = alert_level
        self.alert_message_cn = alert_message_cn
        self.alert_message_en = alert_message_en
        self.alert_metric_id = alert_metric_id
        self.base_unit = base_unit
        self.display_name_cn = display_name_cn
        self.display_name_en = display_name_en
        self.display_statement_cn = display_statement_cn
        self.display_statement_en = display_statement_en
        self.duration = duration
        self.expr_template = expr_template
        self.ext_info = ext_info
        self.filters = filters
        self.group = group
        self.params = params
        self.unit_cn = unit_cn
        self.unit_en = unit_en

    def validate(self):
        if self.expr_template:
            self.expr_template.validate()
        if self.filters:
            for k in self.filters:
                if k:
                    k.validate()
        if self.params:
            for k in self.params:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_level is not None:
            result['alertLevel'] = self.alert_level
        if self.alert_message_cn is not None:
            result['alertMessageCn'] = self.alert_message_cn
        if self.alert_message_en is not None:
            result['alertMessageEn'] = self.alert_message_en
        if self.alert_metric_id is not None:
            result['alertMetricId'] = self.alert_metric_id
        if self.base_unit is not None:
            result['baseUnit'] = self.base_unit
        if self.display_name_cn is not None:
            result['displayNameCn'] = self.display_name_cn
        if self.display_name_en is not None:
            result['displayNameEn'] = self.display_name_en
        if self.display_statement_cn is not None:
            result['displayStatementCn'] = self.display_statement_cn
        if self.display_statement_en is not None:
            result['displayStatementEn'] = self.display_statement_en
        if self.duration is not None:
            result['duration'] = self.duration
        if self.expr_template is not None:
            result['exprTemplate'] = self.expr_template.to_map()
        if self.ext_info is not None:
            result['extInfo'] = self.ext_info
        result['filters'] = []
        if self.filters is not None:
            for k in self.filters:
                result['filters'].append(k.to_map() if k else None)
        if self.group is not None:
            result['group'] = self.group
        result['params'] = []
        if self.params is not None:
            for k in self.params:
                result['params'].append(k.to_map() if k else None)
        if self.unit_cn is not None:
            result['unitCn'] = self.unit_cn
        if self.unit_en is not None:
            result['unitEn'] = self.unit_en
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertLevel') is not None:
            self.alert_level = m.get('alertLevel')
        if m.get('alertMessageCn') is not None:
            self.alert_message_cn = m.get('alertMessageCn')
        if m.get('alertMessageEn') is not None:
            self.alert_message_en = m.get('alertMessageEn')
        if m.get('alertMetricId') is not None:
            self.alert_metric_id = m.get('alertMetricId')
        if m.get('baseUnit') is not None:
            self.base_unit = m.get('baseUnit')
        if m.get('displayNameCn') is not None:
            self.display_name_cn = m.get('displayNameCn')
        if m.get('displayNameEn') is not None:
            self.display_name_en = m.get('displayNameEn')
        if m.get('displayStatementCn') is not None:
            self.display_statement_cn = m.get('displayStatementCn')
        if m.get('displayStatementEn') is not None:
            self.display_statement_en = m.get('displayStatementEn')
        if m.get('duration') is not None:
            self.duration = m.get('duration')
        if m.get('exprTemplate') is not None:
            temp_model = ListAlertMetricsResponseBodyDataExprTemplate()
            self.expr_template = temp_model.from_map(m['exprTemplate'])
        if m.get('extInfo') is not None:
            self.ext_info = m.get('extInfo')
        self.filters = []
        if m.get('filters') is not None:
            for k in m.get('filters'):
                temp_model = AlertRuleAlertMetricFilterDef()
                self.filters.append(temp_model.from_map(k))
        if m.get('group') is not None:
            self.group = m.get('group')
        self.params = []
        if m.get('params') is not None:
            for k in m.get('params'):
                temp_model = AlertRuleAlertMetricParamDef()
                self.params.append(temp_model.from_map(k))
        if m.get('unitCn') is not None:
            self.unit_cn = m.get('unitCn')
        if m.get('unitEn') is not None:
            self.unit_en = m.get('unitEn')
        return self


class ListAlertMetricsResponseBody(TeaModel):
    def __init__(
        self,
        data: List[ListAlertMetricsResponseBodyData] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total_count: int = None,
    ):
        self.data = data
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.total_count = total_count

    def validate(self):
        if self.data:
            for k in self.data:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.max_results is not None:
            result['maxResults'] = self.max_results
        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.total_count is not None:
            result['totalCount'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = ListAlertMetricsResponseBodyData()
                self.data.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('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 ListAlertMetricsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAlertMetricsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAlertMetricsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAlertNotifyTemplatesRequest(TeaModel):
    def __init__(
        self,
        alert_notify_template_ids: List[str] = None,
        alert_notify_template_name: str = None,
        max_results: int = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        program_lang: str = None,
        type: str = None,
    ):
        self.alert_notify_template_ids = alert_notify_template_ids
        self.alert_notify_template_name = alert_notify_template_name
        self.max_results = max_results
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        self.program_lang = program_lang
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_notify_template_ids is not None:
            result['alertNotifyTemplateIds'] = self.alert_notify_template_ids
        if self.alert_notify_template_name is not None:
            result['alertNotifyTemplateName'] = self.alert_notify_template_name
        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.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.program_lang is not None:
            result['programLang'] = self.program_lang
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertNotifyTemplateIds') is not None:
            self.alert_notify_template_ids = m.get('alertNotifyTemplateIds')
        if m.get('alertNotifyTemplateName') is not None:
            self.alert_notify_template_name = m.get('alertNotifyTemplateName')
        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('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('programLang') is not None:
            self.program_lang = m.get('programLang')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ListAlertNotifyTemplatesShrinkRequest(TeaModel):
    def __init__(
        self,
        alert_notify_template_ids_shrink: str = None,
        alert_notify_template_name: str = None,
        max_results: int = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        program_lang: str = None,
        type: str = None,
    ):
        self.alert_notify_template_ids_shrink = alert_notify_template_ids_shrink
        self.alert_notify_template_name = alert_notify_template_name
        self.max_results = max_results
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        self.program_lang = program_lang
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_notify_template_ids_shrink is not None:
            result['alertNotifyTemplateIds'] = self.alert_notify_template_ids_shrink
        if self.alert_notify_template_name is not None:
            result['alertNotifyTemplateName'] = self.alert_notify_template_name
        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.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.program_lang is not None:
            result['programLang'] = self.program_lang
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertNotifyTemplateIds') is not None:
            self.alert_notify_template_ids_shrink = m.get('alertNotifyTemplateIds')
        if m.get('alertNotifyTemplateName') is not None:
            self.alert_notify_template_name = m.get('alertNotifyTemplateName')
        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('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('programLang') is not None:
            self.program_lang = m.get('programLang')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ListAlertNotifyTemplatesResponseBodyAlertNotifyTemplates(TeaModel):
    def __init__(
        self,
        alert_notify_template_id: str = None,
        alert_notify_template_name: str = None,
        program_lang: str = None,
        templates: Dict[str, dict] = None,
        type: str = None,
    ):
        self.alert_notify_template_id = alert_notify_template_id
        self.alert_notify_template_name = alert_notify_template_name
        self.program_lang = program_lang
        self.templates = templates
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_notify_template_id is not None:
            result['alertNotifyTemplateId'] = self.alert_notify_template_id
        if self.alert_notify_template_name is not None:
            result['alertNotifyTemplateName'] = self.alert_notify_template_name
        if self.program_lang is not None:
            result['programLang'] = self.program_lang
        if self.templates is not None:
            result['templates'] = self.templates
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertNotifyTemplateId') is not None:
            self.alert_notify_template_id = m.get('alertNotifyTemplateId')
        if m.get('alertNotifyTemplateName') is not None:
            self.alert_notify_template_name = m.get('alertNotifyTemplateName')
        if m.get('programLang') is not None:
            self.program_lang = m.get('programLang')
        if m.get('templates') is not None:
            self.templates = m.get('templates')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ListAlertNotifyTemplatesResponseBody(TeaModel):
    def __init__(
        self,
        alert_notify_templates: List[ListAlertNotifyTemplatesResponseBodyAlertNotifyTemplates] = None,
        max_results: int = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        total: int = None,
    ):
        self.alert_notify_templates = alert_notify_templates
        self.max_results = max_results
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        self.request_id = request_id
        self.total = total

    def validate(self):
        if self.alert_notify_templates:
            for k in self.alert_notify_templates:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['alertNotifyTemplates'] = []
        if self.alert_notify_templates is not None:
            for k in self.alert_notify_templates:
                result['alertNotifyTemplates'].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.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
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.alert_notify_templates = []
        if m.get('alertNotifyTemplates') is not None:
            for k in m.get('alertNotifyTemplates'):
                temp_model = ListAlertNotifyTemplatesResponseBodyAlertNotifyTemplates()
                self.alert_notify_templates.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('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')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListAlertNotifyTemplatesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAlertNotifyTemplatesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAlertNotifyTemplatesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAlertRobotsRequest(TeaModel):
    def __init__(
        self,
        is_custom: str = None,
        max_results: int = None,
        name: str = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        robot_ids: List[str] = None,
        source: str = None,
        types: List[str] = None,
    ):
        self.is_custom = is_custom
        self.max_results = max_results
        self.name = name
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        self.robot_ids = robot_ids
        self.source = source
        self.types = types

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.is_custom is not None:
            result['isCustom'] = self.is_custom
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.name is not None:
            result['name'] = self.name
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        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.robot_ids is not None:
            result['robotIds'] = self.robot_ids
        if self.source is not None:
            result['source'] = self.source
        if self.types is not None:
            result['types'] = self.types
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('isCustom') is not None:
            self.is_custom = m.get('isCustom')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('nextToken') is not None:
            self.next_token = m.get('nextToken')
        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('robotIds') is not None:
            self.robot_ids = m.get('robotIds')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('types') is not None:
            self.types = m.get('types')
        return self


class ListAlertRobotsShrinkRequest(TeaModel):
    def __init__(
        self,
        is_custom: str = None,
        max_results: int = None,
        name: str = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        robot_ids_shrink: str = None,
        source: str = None,
        types_shrink: str = None,
    ):
        self.is_custom = is_custom
        self.max_results = max_results
        self.name = name
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        self.robot_ids_shrink = robot_ids_shrink
        self.source = source
        self.types_shrink = types_shrink

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.is_custom is not None:
            result['isCustom'] = self.is_custom
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.name is not None:
            result['name'] = self.name
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        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.robot_ids_shrink is not None:
            result['robotIds'] = self.robot_ids_shrink
        if self.source is not None:
            result['source'] = self.source
        if self.types_shrink is not None:
            result['types'] = self.types_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('isCustom') is not None:
            self.is_custom = m.get('isCustom')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('nextToken') is not None:
            self.next_token = m.get('nextToken')
        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('robotIds') is not None:
            self.robot_ids_shrink = m.get('robotIds')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('types') is not None:
            self.types_shrink = m.get('types')
        return self


class ListAlertRobotsResponseBodyRobots(TeaModel):
    def __init__(
        self,
        lang: str = None,
        name: str = None,
        robot_id: str = None,
        type: str = None,
        url: str = None,
    ):
        self.lang = lang
        self.name = name
        self.robot_id = robot_id
        self.type = type
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.lang is not None:
            result['lang'] = self.lang
        if self.name is not None:
            result['name'] = self.name
        if self.robot_id is not None:
            result['robotId'] = self.robot_id
        if self.type is not None:
            result['type'] = self.type
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('lang') is not None:
            self.lang = m.get('lang')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('robotId') is not None:
            self.robot_id = m.get('robotId')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class ListAlertRobotsResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        robots: List[ListAlertRobotsResponseBodyRobots] = None,
        total: int = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        # Id of the request
        self.request_id = request_id
        self.robots = robots
        self.total = total

    def validate(self):
        if self.robots:
            for k in self.robots:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.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
        result['robots'] = []
        if self.robots is not None:
            for k in self.robots:
                result['robots'].append(k.to_map() if k else None)
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = 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('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')
        self.robots = []
        if m.get('robots') is not None:
            for k in m.get('robots'):
                temp_model = ListAlertRobotsResponseBodyRobots()
                self.robots.append(temp_model.from_map(k))
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListAlertRobotsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAlertRobotsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAlertRobotsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAlertRuleTemplatesRequest(TeaModel):
    def __init__(
        self,
        alert_rule_template_id: str = None,
        biz_source: str = None,
        include_details: bool = None,
        max_results: int = None,
        next_token: str = None,
    ):
        self.alert_rule_template_id = alert_rule_template_id
        self.biz_source = biz_source
        self.include_details = include_details
        self.max_results = max_results
        self.next_token = next_token

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_rule_template_id is not None:
            result['alertRuleTemplateId'] = self.alert_rule_template_id
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.include_details is not None:
            result['includeDetails'] = self.include_details
        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: dict = None):
        m = m or dict()
        if m.get('alertRuleTemplateId') is not None:
            self.alert_rule_template_id = m.get('alertRuleTemplateId')
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('includeDetails') is not None:
            self.include_details = m.get('includeDetails')
        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 ListAlertRuleTemplatesResponseBodyData(TeaModel):
    def __init__(
        self,
        alert_rule_template_id: str = None,
        annotations_cn: Dict[str, str] = None,
        annotations_en: Dict[str, str] = None,
        biz_source: str = None,
        condition: AlertRuleCondition = None,
        datasource: AlertRuleDataSource = None,
        description_cn: str = None,
        description_en: str = None,
        display_name_cn: str = None,
        display_name_en: str = None,
        interval: int = None,
        labels: Dict[str, str] = None,
        level: str = None,
        message_cn: str = None,
        message_en: str = None,
        query: AlertRuleQuery = None,
    ):
        self.alert_rule_template_id = alert_rule_template_id
        self.annotations_cn = annotations_cn
        self.annotations_en = annotations_en
        self.biz_source = biz_source
        self.condition = condition
        self.datasource = datasource
        self.description_cn = description_cn
        self.description_en = description_en
        self.display_name_cn = display_name_cn
        self.display_name_en = display_name_en
        self.interval = interval
        self.labels = labels
        self.level = level
        self.message_cn = message_cn
        self.message_en = message_en
        self.query = query

    def validate(self):
        if self.condition:
            self.condition.validate()
        if self.datasource:
            self.datasource.validate()
        if self.query:
            self.query.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_rule_template_id is not None:
            result['alertRuleTemplateId'] = self.alert_rule_template_id
        if self.annotations_cn is not None:
            result['annotationsCn'] = self.annotations_cn
        if self.annotations_en is not None:
            result['annotationsEn'] = self.annotations_en
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.condition is not None:
            result['condition'] = self.condition.to_map()
        if self.datasource is not None:
            result['datasource'] = self.datasource.to_map()
        if self.description_cn is not None:
            result['descriptionCn'] = self.description_cn
        if self.description_en is not None:
            result['descriptionEn'] = self.description_en
        if self.display_name_cn is not None:
            result['displayNameCn'] = self.display_name_cn
        if self.display_name_en is not None:
            result['displayNameEn'] = self.display_name_en
        if self.interval is not None:
            result['interval'] = self.interval
        if self.labels is not None:
            result['labels'] = self.labels
        if self.level is not None:
            result['level'] = self.level
        if self.message_cn is not None:
            result['messageCn'] = self.message_cn
        if self.message_en is not None:
            result['messageEn'] = self.message_en
        if self.query is not None:
            result['query'] = self.query.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleTemplateId') is not None:
            self.alert_rule_template_id = m.get('alertRuleTemplateId')
        if m.get('annotationsCn') is not None:
            self.annotations_cn = m.get('annotationsCn')
        if m.get('annotationsEn') is not None:
            self.annotations_en = m.get('annotationsEn')
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('condition') is not None:
            temp_model = AlertRuleCondition()
            self.condition = temp_model.from_map(m['condition'])
        if m.get('datasource') is not None:
            temp_model = AlertRuleDataSource()
            self.datasource = temp_model.from_map(m['datasource'])
        if m.get('descriptionCn') is not None:
            self.description_cn = m.get('descriptionCn')
        if m.get('descriptionEn') is not None:
            self.description_en = m.get('descriptionEn')
        if m.get('displayNameCn') is not None:
            self.display_name_cn = m.get('displayNameCn')
        if m.get('displayNameEn') is not None:
            self.display_name_en = m.get('displayNameEn')
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('labels') is not None:
            self.labels = m.get('labels')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('messageCn') is not None:
            self.message_cn = m.get('messageCn')
        if m.get('messageEn') is not None:
            self.message_en = m.get('messageEn')
        if m.get('query') is not None:
            temp_model = AlertRuleQuery()
            self.query = temp_model.from_map(m['query'])
        return self


class ListAlertRuleTemplatesResponseBody(TeaModel):
    def __init__(
        self,
        data: List[ListAlertRuleTemplatesResponseBodyData] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total_count: int = None,
    ):
        self.data = data
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.total_count = total_count

    def validate(self):
        if self.data:
            for k in self.data:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.max_results is not None:
            result['maxResults'] = self.max_results
        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.total_count is not None:
            result['totalCount'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = ListAlertRuleTemplatesResponseBodyData()
                self.data.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('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 ListAlertRuleTemplatesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAlertRuleTemplatesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAlertRuleTemplatesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAlertRulesRequest(TeaModel):
    def __init__(
        self,
        alert_rule_id: str = None,
        biz_source: str = None,
        display_name_key_word: str = None,
        enabled: bool = None,
        group: str = None,
        label_filter: AlertRuleLabelFilter = None,
        max_results: int = None,
        next_token: str = None,
        notification_filter: AlertRuleNotificationFilter = None,
        page_number: int = None,
        page_size: int = None,
        status: str = None,
        workspace: str = None,
    ):
        self.alert_rule_id = alert_rule_id
        self.biz_source = biz_source
        self.display_name_key_word = display_name_key_word
        self.enabled = enabled
        self.group = group
        self.label_filter = label_filter
        self.max_results = max_results
        self.next_token = next_token
        self.notification_filter = notification_filter
        self.page_number = page_number
        self.page_size = page_size
        self.status = status
        self.workspace = workspace

    def validate(self):
        if self.label_filter:
            self.label_filter.validate()
        if self.notification_filter:
            self.notification_filter.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_rule_id is not None:
            result['alertRuleId'] = self.alert_rule_id
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.display_name_key_word is not None:
            result['displayNameKeyWord'] = self.display_name_key_word
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.group is not None:
            result['group'] = self.group
        if self.label_filter is not None:
            result['labelFilter'] = self.label_filter.to_map()
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        if self.notification_filter is not None:
            result['notificationFilter'] = self.notification_filter.to_map()
        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
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleId') is not None:
            self.alert_rule_id = m.get('alertRuleId')
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('displayNameKeyWord') is not None:
            self.display_name_key_word = m.get('displayNameKeyWord')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('group') is not None:
            self.group = m.get('group')
        if m.get('labelFilter') is not None:
            temp_model = AlertRuleLabelFilter()
            self.label_filter = temp_model.from_map(m['labelFilter'])
        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('notificationFilter') is not None:
            temp_model = AlertRuleNotificationFilter()
            self.notification_filter = temp_model.from_map(m['notificationFilter'])
        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')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListAlertRulesShrinkRequest(TeaModel):
    def __init__(
        self,
        alert_rule_id: str = None,
        biz_source: str = None,
        display_name_key_word: str = None,
        enabled: bool = None,
        group: str = None,
        label_filter_shrink: str = None,
        max_results: int = None,
        next_token: str = None,
        notification_filter_shrink: str = None,
        page_number: int = None,
        page_size: int = None,
        status: str = None,
        workspace: str = None,
    ):
        self.alert_rule_id = alert_rule_id
        self.biz_source = biz_source
        self.display_name_key_word = display_name_key_word
        self.enabled = enabled
        self.group = group
        self.label_filter_shrink = label_filter_shrink
        self.max_results = max_results
        self.next_token = next_token
        self.notification_filter_shrink = notification_filter_shrink
        self.page_number = page_number
        self.page_size = page_size
        self.status = status
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_rule_id is not None:
            result['alertRuleId'] = self.alert_rule_id
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.display_name_key_word is not None:
            result['displayNameKeyWord'] = self.display_name_key_word
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.group is not None:
            result['group'] = self.group
        if self.label_filter_shrink is not None:
            result['labelFilter'] = self.label_filter_shrink
        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.notification_filter_shrink is not None:
            result['notificationFilter'] = self.notification_filter_shrink
        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
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleId') is not None:
            self.alert_rule_id = m.get('alertRuleId')
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('displayNameKeyWord') is not None:
            self.display_name_key_word = m.get('displayNameKeyWord')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('group') is not None:
            self.group = m.get('group')
        if m.get('labelFilter') is not None:
            self.label_filter_shrink = m.get('labelFilter')
        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('notificationFilter') is not None:
            self.notification_filter_shrink = m.get('notificationFilter')
        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')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListAlertRulesResponseBodyData(TeaModel):
    def __init__(
        self,
        alert_metric_input: AlertRuleAlertMetricInput = None,
        alert_rule_id: str = None,
        annotations: Dict[str, str] = None,
        biz_source: str = None,
        condition: AlertRuleCondition = None,
        created_by: str = None,
        datasource: AlertRuleDataSource = None,
        display_name: str = None,
        enabled: bool = None,
        gmt_create: int = None,
        gmt_modified: int = None,
        interval: int = None,
        labels: Dict[str, str] = None,
        level: str = None,
        message: str = None,
        query: AlertRuleQuery = None,
        region_id: str = None,
        send: AlertRuleSend = None,
        status: str = None,
        workspace: str = None,
    ):
        self.alert_metric_input = alert_metric_input
        self.alert_rule_id = alert_rule_id
        self.annotations = annotations
        self.biz_source = biz_source
        self.condition = condition
        self.created_by = created_by
        self.datasource = datasource
        self.display_name = display_name
        self.enabled = enabled
        self.gmt_create = gmt_create
        self.gmt_modified = gmt_modified
        self.interval = interval
        self.labels = labels
        self.level = level
        self.message = message
        self.query = query
        self.region_id = region_id
        self.send = send
        self.status = status
        self.workspace = workspace

    def validate(self):
        if self.alert_metric_input:
            self.alert_metric_input.validate()
        if self.condition:
            self.condition.validate()
        if self.datasource:
            self.datasource.validate()
        if self.query:
            self.query.validate()
        if self.send:
            self.send.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_metric_input is not None:
            result['alertMetricInput'] = self.alert_metric_input.to_map()
        if self.alert_rule_id is not None:
            result['alertRuleId'] = self.alert_rule_id
        if self.annotations is not None:
            result['annotations'] = self.annotations
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.condition is not None:
            result['condition'] = self.condition.to_map()
        if self.created_by is not None:
            result['createdBy'] = self.created_by
        if self.datasource is not None:
            result['datasource'] = self.datasource.to_map()
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.gmt_create is not None:
            result['gmtCreate'] = self.gmt_create
        if self.gmt_modified is not None:
            result['gmtModified'] = self.gmt_modified
        if self.interval is not None:
            result['interval'] = self.interval
        if self.labels is not None:
            result['labels'] = self.labels
        if self.level is not None:
            result['level'] = self.level
        if self.message is not None:
            result['message'] = self.message
        if self.query is not None:
            result['query'] = self.query.to_map()
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.send is not None:
            result['send'] = self.send.to_map()
        if self.status is not None:
            result['status'] = self.status
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertMetricInput') is not None:
            temp_model = AlertRuleAlertMetricInput()
            self.alert_metric_input = temp_model.from_map(m['alertMetricInput'])
        if m.get('alertRuleId') is not None:
            self.alert_rule_id = m.get('alertRuleId')
        if m.get('annotations') is not None:
            self.annotations = m.get('annotations')
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('condition') is not None:
            temp_model = AlertRuleCondition()
            self.condition = temp_model.from_map(m['condition'])
        if m.get('createdBy') is not None:
            self.created_by = m.get('createdBy')
        if m.get('datasource') is not None:
            temp_model = AlertRuleDataSource()
            self.datasource = temp_model.from_map(m['datasource'])
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('gmtCreate') is not None:
            self.gmt_create = m.get('gmtCreate')
        if m.get('gmtModified') is not None:
            self.gmt_modified = m.get('gmtModified')
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('labels') is not None:
            self.labels = m.get('labels')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('query') is not None:
            temp_model = AlertRuleQuery()
            self.query = temp_model.from_map(m['query'])
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('send') is not None:
            temp_model = AlertRuleSend()
            self.send = temp_model.from_map(m['send'])
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListAlertRulesResponseBody(TeaModel):
    def __init__(
        self,
        data: List[ListAlertRulesResponseBodyData] = None,
        max_results: int = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        total_count: int = None,
    ):
        self.data = data
        self.max_results = max_results
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        # Id of the request
        self.request_id = request_id
        self.total_count = total_count

    def validate(self):
        if self.data:
            for k in self.data:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.max_results is not None:
            result['maxResults'] = self.max_results
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        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
        if self.total_count is not None:
            result['totalCount'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = ListAlertRulesResponseBodyData()
                self.data.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('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')
        if m.get('totalCount') is not None:
            self.total_count = m.get('totalCount')
        return self


class ListAlertRulesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAlertRulesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAlertRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAlertWebhooksRequest(TeaModel):
    def __init__(
        self,
        is_custom: str = None,
        max_results: int = None,
        name: str = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        source: str = None,
        webhook_ids: List[str] = None,
    ):
        self.is_custom = is_custom
        self.max_results = max_results
        self.name = name
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        self.source = source
        self.webhook_ids = webhook_ids

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.is_custom is not None:
            result['isCustom'] = self.is_custom
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.name is not None:
            result['name'] = self.name
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        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.source is not None:
            result['source'] = self.source
        if self.webhook_ids is not None:
            result['webhookIds'] = self.webhook_ids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('isCustom') is not None:
            self.is_custom = m.get('isCustom')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('nextToken') is not None:
            self.next_token = m.get('nextToken')
        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('source') is not None:
            self.source = m.get('source')
        if m.get('webhookIds') is not None:
            self.webhook_ids = m.get('webhookIds')
        return self


class ListAlertWebhooksShrinkRequest(TeaModel):
    def __init__(
        self,
        is_custom: str = None,
        max_results: int = None,
        name: str = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        source: str = None,
        webhook_ids_shrink: str = None,
    ):
        self.is_custom = is_custom
        self.max_results = max_results
        self.name = name
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        self.source = source
        self.webhook_ids_shrink = webhook_ids_shrink

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.is_custom is not None:
            result['isCustom'] = self.is_custom
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.name is not None:
            result['name'] = self.name
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        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.source is not None:
            result['source'] = self.source
        if self.webhook_ids_shrink is not None:
            result['webhookIds'] = self.webhook_ids_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('isCustom') is not None:
            self.is_custom = m.get('isCustom')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('nextToken') is not None:
            self.next_token = m.get('nextToken')
        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('source') is not None:
            self.source = m.get('source')
        if m.get('webhookIds') is not None:
            self.webhook_ids_shrink = m.get('webhookIds')
        return self


class ListAlertWebhooksResponseBodyWebhooks(TeaModel):
    def __init__(
        self,
        content_type: str = None,
        headers: Dict[str, Any] = None,
        lang: str = None,
        method: str = None,
        name: str = None,
        url: str = None,
        webhook_id: str = None,
    ):
        self.content_type = content_type
        # headers
        self.headers = headers
        self.lang = lang
        self.method = method
        self.name = name
        self.url = url
        self.webhook_id = webhook_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.content_type is not None:
            result['contentType'] = self.content_type
        if self.headers is not None:
            result['headers'] = self.headers
        if self.lang is not None:
            result['lang'] = self.lang
        if self.method is not None:
            result['method'] = self.method
        if self.name is not None:
            result['name'] = self.name
        if self.url is not None:
            result['url'] = self.url
        if self.webhook_id is not None:
            result['webhookId'] = self.webhook_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contentType') is not None:
            self.content_type = m.get('contentType')
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('lang') is not None:
            self.lang = m.get('lang')
        if m.get('method') is not None:
            self.method = m.get('method')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('url') is not None:
            self.url = m.get('url')
        if m.get('webhookId') is not None:
            self.webhook_id = m.get('webhookId')
        return self


class ListAlertWebhooksResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        total: int = None,
        webhooks: List[ListAlertWebhooksResponseBodyWebhooks] = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        self.request_id = request_id
        self.total = total
        # webhooks
        self.webhooks = webhooks

    def validate(self):
        if self.webhooks:
            for k in self.webhooks:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.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
        if self.total is not None:
            result['total'] = self.total
        result['webhooks'] = []
        if self.webhooks is not None:
            for k in self.webhooks:
                result['webhooks'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = 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('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')
        if m.get('total') is not None:
            self.total = m.get('total')
        self.webhooks = []
        if m.get('webhooks') is not None:
            for k in m.get('webhooks'):
                temp_model = ListAlertWebhooksResponseBodyWebhooks()
                self.webhooks.append(temp_model.from_map(k))
        return self


class ListAlertWebhooksResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAlertWebhooksResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAlertWebhooksResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListAvailableRegionsForSyntheticsRequest(TeaModel):
    def __init__(
        self,
        related_service: str = None,
    ):
        self.related_service = related_service

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.related_service is not None:
            result['relatedService'] = self.related_service
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('relatedService') is not None:
            self.related_service = m.get('relatedService')
        return self


class ListAvailableRegionsForSyntheticsResponseBody(TeaModel):
    def __init__(
        self,
        regions: List[str] = None,
        request_id: str = None,
    ):
        self.regions = regions
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.regions is not None:
            result['regions'] = self.regions
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('regions') is not None:
            self.regions = m.get('regions')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListAvailableRegionsForSyntheticsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListAvailableRegionsForSyntheticsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListAvailableRegionsForSyntheticsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListBizTracesRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        workspace: str = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = 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('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListBizTracesResponseBody(TeaModel):
    def __init__(
        self,
        items: List[BizTraceConfig] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total_count: int = None,
    ):
        self.items = items
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.total_count = total_count

    def validate(self):
        if self.items:
            for k in self.items:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['items'] = []
        if self.items is not None:
            for k in self.items:
                result['items'].append(k.to_map() if k else None)
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        if self.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: dict = None):
        m = m or dict()
        self.items = []
        if m.get('items') is not None:
            for k in m.get('items'):
                temp_model = BizTraceConfig()
                self.items.append(temp_model.from_map(k))
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('nextToken') is not None:
            self.next_token = m.get('nextToken')
        if m.get('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 ListBizTracesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListBizTracesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListBizTracesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListContactGroupsRequest(TeaModel):
    def __init__(
        self,
        contact_group_ids: List[str] = None,
        max_results: int = None,
        name: str = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        source: str = None,
    ):
        self.contact_group_ids = contact_group_ids
        self.max_results = max_results
        self.name = name
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        self.source = source

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.contact_group_ids is not None:
            result['contactGroupIds'] = self.contact_group_ids
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.name is not None:
            result['name'] = self.name
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        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.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactGroupIds') is not None:
            self.contact_group_ids = m.get('contactGroupIds')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('nextToken') is not None:
            self.next_token = m.get('nextToken')
        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('source') is not None:
            self.source = m.get('source')
        return self


class ListContactGroupsShrinkRequest(TeaModel):
    def __init__(
        self,
        contact_group_ids_shrink: str = None,
        max_results: int = None,
        name: str = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        source: str = None,
    ):
        self.contact_group_ids_shrink = contact_group_ids_shrink
        self.max_results = max_results
        self.name = name
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        self.source = source

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.contact_group_ids_shrink is not None:
            result['contactGroupIds'] = self.contact_group_ids_shrink
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.name is not None:
            result['name'] = self.name
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        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.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactGroupIds') is not None:
            self.contact_group_ids_shrink = m.get('contactGroupIds')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('nextToken') is not None:
            self.next_token = m.get('nextToken')
        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('source') is not None:
            self.source = m.get('source')
        return self


class ListContactGroupsResponseBodyContactGroups(TeaModel):
    def __init__(
        self,
        contact_group_id: str = None,
        contact_ids: List[str] = None,
        name: str = None,
    ):
        self.contact_group_id = contact_group_id
        self.contact_ids = contact_ids
        self.name = name

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.contact_group_id is not None:
            result['contactGroupId'] = self.contact_group_id
        if self.contact_ids is not None:
            result['contactIds'] = self.contact_ids
        if self.name is not None:
            result['name'] = self.name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactGroupId') is not None:
            self.contact_group_id = m.get('contactGroupId')
        if m.get('contactIds') is not None:
            self.contact_ids = m.get('contactIds')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class ListContactGroupsResponseBody(TeaModel):
    def __init__(
        self,
        contact_groups: List[ListContactGroupsResponseBodyContactGroups] = None,
        max_results: int = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        total: int = None,
    ):
        self.contact_groups = contact_groups
        self.max_results = max_results
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        # Id of the request
        self.request_id = request_id
        self.total = total

    def validate(self):
        if self.contact_groups:
            for k in self.contact_groups:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['contactGroups'] = []
        if self.contact_groups is not None:
            for k in self.contact_groups:
                result['contactGroups'].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.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
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.contact_groups = []
        if m.get('contactGroups') is not None:
            for k in m.get('contactGroups'):
                temp_model = ListContactGroupsResponseBodyContactGroups()
                self.contact_groups.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('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')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListContactGroupsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListContactGroupsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListContactGroupsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListContactsRequest(TeaModel):
    def __init__(
        self,
        contact_ids: List[str] = None,
        email: str = None,
        group_id: str = None,
        max_results: int = None,
        name: str = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        phone: str = None,
        query_ungrouped_contacts: bool = None,
        source: str = None,
    ):
        self.contact_ids = contact_ids
        self.email = email
        self.group_id = group_id
        self.max_results = max_results
        self.name = name
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        self.phone = phone
        self.query_ungrouped_contacts = query_ungrouped_contacts
        self.source = source

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.contact_ids is not None:
            result['contactIds'] = self.contact_ids
        if self.email is not None:
            result['email'] = self.email
        if self.group_id is not None:
            result['groupId'] = self.group_id
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.name is not None:
            result['name'] = self.name
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        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.phone is not None:
            result['phone'] = self.phone
        if self.query_ungrouped_contacts is not None:
            result['queryUngroupedContacts'] = self.query_ungrouped_contacts
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactIds') is not None:
            self.contact_ids = m.get('contactIds')
        if m.get('email') is not None:
            self.email = m.get('email')
        if m.get('groupId') is not None:
            self.group_id = m.get('groupId')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('nextToken') is not None:
            self.next_token = m.get('nextToken')
        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('phone') is not None:
            self.phone = m.get('phone')
        if m.get('queryUngroupedContacts') is not None:
            self.query_ungrouped_contacts = m.get('queryUngroupedContacts')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class ListContactsShrinkRequest(TeaModel):
    def __init__(
        self,
        contact_ids_shrink: str = None,
        email: str = None,
        group_id: str = None,
        max_results: int = None,
        name: str = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        phone: str = None,
        query_ungrouped_contacts: bool = None,
        source: str = None,
    ):
        self.contact_ids_shrink = contact_ids_shrink
        self.email = email
        self.group_id = group_id
        self.max_results = max_results
        self.name = name
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        self.phone = phone
        self.query_ungrouped_contacts = query_ungrouped_contacts
        self.source = source

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.contact_ids_shrink is not None:
            result['contactIds'] = self.contact_ids_shrink
        if self.email is not None:
            result['email'] = self.email
        if self.group_id is not None:
            result['groupId'] = self.group_id
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.name is not None:
            result['name'] = self.name
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        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.phone is not None:
            result['phone'] = self.phone
        if self.query_ungrouped_contacts is not None:
            result['queryUngroupedContacts'] = self.query_ungrouped_contacts
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactIds') is not None:
            self.contact_ids_shrink = m.get('contactIds')
        if m.get('email') is not None:
            self.email = m.get('email')
        if m.get('groupId') is not None:
            self.group_id = m.get('groupId')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('nextToken') is not None:
            self.next_token = m.get('nextToken')
        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('phone') is not None:
            self.phone = m.get('phone')
        if m.get('queryUngroupedContacts') is not None:
            self.query_ungrouped_contacts = m.get('queryUngroupedContacts')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class ListContactsResponseBodyContacts(TeaModel):
    def __init__(
        self,
        contact_id: str = None,
        email: str = None,
        email_verify: bool = None,
        group_list: List[str] = None,
        im_user_ids: Dict[str, str] = None,
        lang: str = None,
        name: str = None,
        phone: str = None,
        phone_code: str = None,
        phone_verify: bool = None,
        update_time: str = None,
    ):
        self.contact_id = contact_id
        self.email = email
        self.email_verify = email_verify
        self.group_list = group_list
        self.im_user_ids = im_user_ids
        self.lang = lang
        self.name = name
        self.phone = phone
        self.phone_code = phone_code
        self.phone_verify = phone_verify
        self.update_time = update_time

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.contact_id is not None:
            result['contactId'] = self.contact_id
        if self.email is not None:
            result['email'] = self.email
        if self.email_verify is not None:
            result['emailVerify'] = self.email_verify
        if self.group_list is not None:
            result['groupList'] = self.group_list
        if self.im_user_ids is not None:
            result['imUserIds'] = self.im_user_ids
        if self.lang is not None:
            result['lang'] = self.lang
        if self.name is not None:
            result['name'] = self.name
        if self.phone is not None:
            result['phone'] = self.phone
        if self.phone_code is not None:
            result['phoneCode'] = self.phone_code
        if self.phone_verify is not None:
            result['phoneVerify'] = self.phone_verify
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactId') is not None:
            self.contact_id = m.get('contactId')
        if m.get('email') is not None:
            self.email = m.get('email')
        if m.get('emailVerify') is not None:
            self.email_verify = m.get('emailVerify')
        if m.get('groupList') is not None:
            self.group_list = m.get('groupList')
        if m.get('imUserIds') is not None:
            self.im_user_ids = m.get('imUserIds')
        if m.get('lang') is not None:
            self.lang = m.get('lang')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('phone') is not None:
            self.phone = m.get('phone')
        if m.get('phoneCode') is not None:
            self.phone_code = m.get('phoneCode')
        if m.get('phoneVerify') is not None:
            self.phone_verify = m.get('phoneVerify')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        return self


class ListContactsResponseBody(TeaModel):
    def __init__(
        self,
        contacts: List[ListContactsResponseBodyContacts] = None,
        max_results: int = None,
        next_token: str = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        total: int = None,
    ):
        self.contacts = contacts
        self.max_results = max_results
        self.next_token = next_token
        self.page_number = page_number
        self.page_size = page_size
        # Id of the request
        self.request_id = request_id
        self.total = total

    def validate(self):
        if self.contacts:
            for k in self.contacts:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['contacts'] = []
        if self.contacts is not None:
            for k in self.contacts:
                result['contacts'].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.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
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.contacts = []
        if m.get('contacts') is not None:
            for k in m.get('contacts'):
                temp_model = ListContactsResponseBodyContacts()
                self.contacts.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('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')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListContactsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListContactsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListContactsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListCustomRawEventTopNRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
    ):
        self.max_results = max_results

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        return self


class ListCustomRawEventTopNResponseBody(TeaModel):
    def __init__(
        self,
        event_list: List[str] = None,
        request_id: str = None,
    ):
        self.event_list = event_list
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.event_list is not None:
            result['eventList'] = self.event_list
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('eventList') is not None:
            self.event_list = m.get('eventList')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListCustomRawEventTopNResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListCustomRawEventTopNResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListCustomRawEventTopNResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListDatasetsRequest(TeaModel):
    def __init__(
        self,
        dataset_name: str = None,
        max_results: int = None,
        next_token: str = None,
    ):
        self.dataset_name = dataset_name
        self.max_results = max_results
        self.next_token = next_token

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.dataset_name is not None:
            result['datasetName'] = self.dataset_name
        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: dict = None):
        m = m or dict()
        if m.get('datasetName') is not None:
            self.dataset_name = m.get('datasetName')
        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 ListDatasetsResponseBodyDatasets(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        dataset_name: str = None,
        description: str = None,
        region_id: str = None,
        update_time: str = None,
        workspace: str = None,
    ):
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        self.dataset_name = dataset_name
        self.description = description
        self.region_id = region_id
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.update_time = update_time
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.dataset_name is not None:
            result['datasetName'] = self.dataset_name
        if self.description is not None:
            result['description'] = self.description
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('datasetName') is not None:
            self.dataset_name = m.get('datasetName')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListDatasetsResponseBody(TeaModel):
    def __init__(
        self,
        datasets: List[ListDatasetsResponseBodyDatasets] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
    ):
        self.datasets = datasets
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id

    def validate(self):
        if self.datasets:
            for k in self.datasets:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['datasets'] = []
        if self.datasets is not None:
            for k in self.datasets:
                result['datasets'].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.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.datasets = []
        if m.get('datasets') is not None:
            for k in m.get('datasets'):
                temp_model = ListDatasetsResponseBodyDatasets()
                self.datasets.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('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListDatasetsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListDatasetsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListDatasetsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListDeliveryTasksRequestTag(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        self.key = key
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 ListDeliveryTasksRequest(TeaModel):
    def __init__(
        self,
        key_words: str = None,
        max_results: int = None,
        next_token: str = None,
        resource_group_id: str = None,
        tag: List[ListDeliveryTasksRequestTag] = None,
    ):
        self.key_words = key_words
        self.max_results = max_results
        self.next_token = next_token
        self.resource_group_id = resource_group_id
        self.tag = tag

    def validate(self):
        if self.tag:
            for k in self.tag:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.key_words is not None:
            result['keyWords'] = self.key_words
        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_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        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: dict = None):
        m = m or dict()
        if m.get('keyWords') is not None:
            self.key_words = m.get('keyWords')
        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('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.tag = []
        if m.get('tag') is not None:
            for k in m.get('tag'):
                temp_model = ListDeliveryTasksRequestTag()
                self.tag.append(temp_model.from_map(k))
        return self


class ListDeliveryTasksResponseBodyDeliveryTasksExtraInfo(TeaModel):
    def __init__(
        self,
        task_name_list: List[str] = None,
    ):
        self.task_name_list = task_name_list

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.task_name_list is not None:
            result['taskNameList'] = self.task_name_list
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('taskNameList') is not None:
            self.task_name_list = m.get('taskNameList')
        return self


class ListDeliveryTasksResponseBodyDeliveryTasksSinkList(TeaModel):
    def __init__(
        self,
        sink_configs: Dict[str, str] = None,
        sink_type: str = None,
    ):
        self.sink_configs = sink_configs
        self.sink_type = sink_type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.sink_configs is not None:
            result['sinkConfigs'] = self.sink_configs
        if self.sink_type is not None:
            result['sinkType'] = self.sink_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('sinkConfigs') is not None:
            self.sink_configs = m.get('sinkConfigs')
        if m.get('sinkType') is not None:
            self.sink_type = m.get('sinkType')
        return self


class ListDeliveryTasksResponseBodyDeliveryTasksTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        self.key = key
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 ListDeliveryTasksResponseBodyDeliveryTasks(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        data_source_id: str = None,
        external_labels: Dict[str, str] = None,
        extra_info: ListDeliveryTasksResponseBodyDeliveryTasksExtraInfo = None,
        label_filters: Dict[str, str] = None,
        label_filters_type: str = None,
        resource_group_id: str = None,
        sink_list: List[ListDeliveryTasksResponseBodyDeliveryTasksSinkList] = None,
        status: str = None,
        tags: List[ListDeliveryTasksResponseBodyDeliveryTasksTags] = None,
        task_description: str = None,
        task_id: str = None,
        task_name: str = None,
        update_time: str = None,
    ):
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        self.data_source_id = data_source_id
        self.external_labels = external_labels
        self.extra_info = extra_info
        self.label_filters = label_filters
        self.label_filters_type = label_filters_type
        self.resource_group_id = resource_group_id
        self.sink_list = sink_list
        self.status = status
        self.tags = tags
        self.task_description = task_description
        self.task_id = task_id
        self.task_name = task_name
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.update_time = update_time

    def validate(self):
        if self.extra_info:
            self.extra_info.validate()
        if self.sink_list:
            for k in self.sink_list:
                if k:
                    k.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.data_source_id is not None:
            result['dataSourceId'] = self.data_source_id
        if self.external_labels is not None:
            result['externalLabels'] = self.external_labels
        if self.extra_info is not None:
            result['extraInfo'] = self.extra_info.to_map()
        if self.label_filters is not None:
            result['labelFilters'] = self.label_filters
        if self.label_filters_type is not None:
            result['labelFiltersType'] = self.label_filters_type
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        result['sinkList'] = []
        if self.sink_list is not None:
            for k in self.sink_list:
                result['sinkList'].append(k.to_map() if k else None)
        if self.status is not None:
            result['status'] = self.status
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.task_description is not None:
            result['taskDescription'] = self.task_description
        if self.task_id is not None:
            result['taskId'] = self.task_id
        if self.task_name is not None:
            result['taskName'] = self.task_name
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('dataSourceId') is not None:
            self.data_source_id = m.get('dataSourceId')
        if m.get('externalLabels') is not None:
            self.external_labels = m.get('externalLabels')
        if m.get('extraInfo') is not None:
            temp_model = ListDeliveryTasksResponseBodyDeliveryTasksExtraInfo()
            self.extra_info = temp_model.from_map(m['extraInfo'])
        if m.get('labelFilters') is not None:
            self.label_filters = m.get('labelFilters')
        if m.get('labelFiltersType') is not None:
            self.label_filters_type = m.get('labelFiltersType')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.sink_list = []
        if m.get('sinkList') is not None:
            for k in m.get('sinkList'):
                temp_model = ListDeliveryTasksResponseBodyDeliveryTasksSinkList()
                self.sink_list.append(temp_model.from_map(k))
        if m.get('status') is not None:
            self.status = m.get('status')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = ListDeliveryTasksResponseBodyDeliveryTasksTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('taskDescription') is not None:
            self.task_description = m.get('taskDescription')
        if m.get('taskId') is not None:
            self.task_id = m.get('taskId')
        if m.get('taskName') is not None:
            self.task_name = m.get('taskName')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        return self


class ListDeliveryTasksResponseBody(TeaModel):
    def __init__(
        self,
        delivery_tasks: List[ListDeliveryTasksResponseBodyDeliveryTasks] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total_count: int = None,
    ):
        self.delivery_tasks = delivery_tasks
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.total_count = total_count

    def validate(self):
        if self.delivery_tasks:
            for k in self.delivery_tasks:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['deliveryTasks'] = []
        if self.delivery_tasks is not None:
            for k in self.delivery_tasks:
                result['deliveryTasks'].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.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: dict = None):
        m = m or dict()
        self.delivery_tasks = []
        if m.get('deliveryTasks') is not None:
            for k in m.get('deliveryTasks'):
                temp_model = ListDeliveryTasksResponseBodyDeliveryTasks()
                self.delivery_tasks.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('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 ListDeliveryTasksResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListDeliveryTasksResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListDeliveryTasksResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListDigitalEmployeeSkillVersionsResponseBodyData(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        description: str = None,
        display_name: str = None,
        enable: bool = None,
        remark: str = None,
        skill_name: str = None,
        update_time: str = None,
        version: str = None,
    ):
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        self.description = description
        self.display_name = display_name
        self.enable = enable
        self.remark = remark
        self.skill_name = skill_name
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.update_time = update_time
        self.version = version

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.enable is not None:
            result['enable'] = self.enable
        if self.remark is not None:
            result['remark'] = self.remark
        if self.skill_name is not None:
            result['skillName'] = self.skill_name
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('remark') is not None:
            self.remark = m.get('remark')
        if m.get('skillName') is not None:
            self.skill_name = m.get('skillName')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class ListDigitalEmployeeSkillVersionsResponseBody(TeaModel):
    def __init__(
        self,
        data: List[ListDigitalEmployeeSkillVersionsResponseBodyData] = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

    def validate(self):
        if self.data:
            for k in self.data:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = ListDigitalEmployeeSkillVersionsResponseBodyData()
                self.data.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListDigitalEmployeeSkillVersionsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListDigitalEmployeeSkillVersionsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListDigitalEmployeeSkillVersionsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListDigitalEmployeeSkillsRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        skill_name: str = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.skill_name = skill_name

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.skill_name is not None:
            result['skillName'] = self.skill_name
        return result

    def from_map(self, m: dict = 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('skillName') is not None:
            self.skill_name = m.get('skillName')
        return self


class ListDigitalEmployeeSkillsResponseBodySkills(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        description: str = None,
        display_name: str = None,
        enable: bool = None,
        skill_name: str = None,
        update_time: str = None,
    ):
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        self.description = description
        self.display_name = display_name
        self.enable = enable
        self.skill_name = skill_name
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.update_time = update_time

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.enable is not None:
            result['enable'] = self.enable
        if self.skill_name is not None:
            result['skillName'] = self.skill_name
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('skillName') is not None:
            self.skill_name = m.get('skillName')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        return self


class ListDigitalEmployeeSkillsResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        skills: List[ListDigitalEmployeeSkillsResponseBodySkills] = None,
        total: int = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        # Id of the request
        self.request_id = request_id
        self.skills = skills
        self.total = total

    def validate(self):
        if self.skills:
            for k in self.skills:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.request_id is not None:
            result['requestId'] = self.request_id
        result['skills'] = []
        if self.skills is not None:
            for k in self.skills:
                result['skills'].append(k.to_map() if k else None)
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = 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('requestId') is not None:
            self.request_id = m.get('requestId')
        self.skills = []
        if m.get('skills') is not None:
            for k in m.get('skills'):
                temp_model = ListDigitalEmployeeSkillsResponseBodySkills()
                self.skills.append(temp_model.from_map(k))
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListDigitalEmployeeSkillsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListDigitalEmployeeSkillsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListDigitalEmployeeSkillsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListDigitalEmployeeToolsResponseBodyMcpServicesMcpServiceListToolList(TeaModel):
    def __init__(
        self,
        confirm: bool = None,
        description: str = None,
        display_name: str = None,
        enable: bool = None,
        input_schema: str = None,
        name: str = None,
        output_schema: str = None,
        required: List[str] = None,
    ):
        self.confirm = confirm
        self.description = description
        self.display_name = display_name
        self.enable = enable
        self.input_schema = input_schema
        self.name = name
        self.output_schema = output_schema
        self.required = required

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.confirm is not None:
            result['confirm'] = self.confirm
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.enable is not None:
            result['enable'] = self.enable
        if self.input_schema is not None:
            result['inputSchema'] = self.input_schema
        if self.name is not None:
            result['name'] = self.name
        if self.output_schema is not None:
            result['outputSchema'] = self.output_schema
        if self.required is not None:
            result['required'] = self.required
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('confirm') is not None:
            self.confirm = m.get('confirm')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('inputSchema') is not None:
            self.input_schema = m.get('inputSchema')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('outputSchema') is not None:
            self.output_schema = m.get('outputSchema')
        if m.get('required') is not None:
            self.required = m.get('required')
        return self


class ListDigitalEmployeeToolsResponseBodyMcpServicesMcpServiceList(TeaModel):
    def __init__(
        self,
        connection: Dict[str, Any] = None,
        description: str = None,
        display_name: str = None,
        enable: bool = None,
        name: str = None,
        network: Dict[str, Any] = None,
        region: str = None,
        tool_list: List[ListDigitalEmployeeToolsResponseBodyMcpServicesMcpServiceListToolList] = None,
    ):
        self.connection = connection
        self.description = description
        self.display_name = display_name
        self.enable = enable
        self.name = name
        self.network = network
        self.region = region
        self.tool_list = tool_list

    def validate(self):
        if self.tool_list:
            for k in self.tool_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.connection is not None:
            result['connection'] = self.connection
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.enable is not None:
            result['enable'] = self.enable
        if self.name is not None:
            result['name'] = self.name
        if self.network is not None:
            result['network'] = self.network
        if self.region is not None:
            result['region'] = self.region
        result['toolList'] = []
        if self.tool_list is not None:
            for k in self.tool_list:
                result['toolList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('connection') is not None:
            self.connection = m.get('connection')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('network') is not None:
            self.network = m.get('network')
        if m.get('region') is not None:
            self.region = m.get('region')
        self.tool_list = []
        if m.get('toolList') is not None:
            for k in m.get('toolList'):
                temp_model = ListDigitalEmployeeToolsResponseBodyMcpServicesMcpServiceListToolList()
                self.tool_list.append(temp_model.from_map(k))
        return self


class ListDigitalEmployeeToolsResponseBodyMcpServices(TeaModel):
    def __init__(
        self,
        mcp_service_list: List[ListDigitalEmployeeToolsResponseBodyMcpServicesMcpServiceList] = None,
    ):
        self.mcp_service_list = mcp_service_list

    def validate(self):
        if self.mcp_service_list:
            for k in self.mcp_service_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['mcpServiceList'] = []
        if self.mcp_service_list is not None:
            for k in self.mcp_service_list:
                result['mcpServiceList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.mcp_service_list = []
        if m.get('mcpServiceList') is not None:
            for k in m.get('mcpServiceList'):
                temp_model = ListDigitalEmployeeToolsResponseBodyMcpServicesMcpServiceList()
                self.mcp_service_list.append(temp_model.from_map(k))
        return self


class ListDigitalEmployeeToolsResponseBody(TeaModel):
    def __init__(
        self,
        mcp_services: ListDigitalEmployeeToolsResponseBodyMcpServices = None,
        request_id: str = None,
    ):
        self.mcp_services = mcp_services
        self.request_id = request_id

    def validate(self):
        if self.mcp_services:
            self.mcp_services.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.mcp_services is not None:
            result['mcpServices'] = self.mcp_services.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('mcpServices') is not None:
            temp_model = ListDigitalEmployeeToolsResponseBodyMcpServices()
            self.mcp_services = temp_model.from_map(m['mcpServices'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListDigitalEmployeeToolsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListDigitalEmployeeToolsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListDigitalEmployeeToolsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListDigitalEmployeesRequest(TeaModel):
    def __init__(
        self,
        display_name: str = None,
        employee_type: str = None,
        max_results: int = None,
        name: str = None,
        next_token: str = None,
        resource_group_id: str = None,
        tags: List[Tag] = None,
    ):
        self.display_name = display_name
        self.employee_type = employee_type
        self.max_results = max_results
        self.name = name
        self.next_token = next_token
        self.resource_group_id = resource_group_id
        self.tags = tags

    def validate(self):
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.employee_type is not None:
            result['employeeType'] = self.employee_type
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.name is not None:
            result['name'] = self.name
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        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: dict = None):
        m = m or dict()
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('employeeType') is not None:
            self.employee_type = m.get('employeeType')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('nextToken') is not None:
            self.next_token = m.get('nextToken')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = Tag()
                self.tags.append(temp_model.from_map(k))
        return self


class ListDigitalEmployeesShrinkRequest(TeaModel):
    def __init__(
        self,
        display_name: str = None,
        employee_type: str = None,
        max_results: int = None,
        name: str = None,
        next_token: str = None,
        resource_group_id: str = None,
        tags_shrink: str = None,
    ):
        self.display_name = display_name
        self.employee_type = employee_type
        self.max_results = max_results
        self.name = name
        self.next_token = next_token
        self.resource_group_id = resource_group_id
        self.tags_shrink = tags_shrink

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.employee_type is not None:
            result['employeeType'] = self.employee_type
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.name is not None:
            result['name'] = self.name
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.tags_shrink is not None:
            result['tags'] = self.tags_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('employeeType') is not None:
            self.employee_type = m.get('employeeType')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('nextToken') is not None:
            self.next_token = m.get('nextToken')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('tags') is not None:
            self.tags_shrink = m.get('tags')
        return self


class ListDigitalEmployeesResponseBodyDigitalEmployeesKnowledgesBailian(TeaModel):
    def __init__(
        self,
        attributes: str = None,
        index_id: str = None,
        region: str = None,
        workspace_id: str = None,
    ):
        self.attributes = attributes
        self.index_id = index_id
        self.region = region
        self.workspace_id = workspace_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.attributes is not None:
            result['attributes'] = self.attributes
        if self.index_id is not None:
            result['indexId'] = self.index_id
        if self.region is not None:
            result['region'] = self.region
        if self.workspace_id is not None:
            result['workspaceId'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('attributes') is not None:
            self.attributes = m.get('attributes')
        if m.get('indexId') is not None:
            self.index_id = m.get('indexId')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('workspaceId') is not None:
            self.workspace_id = m.get('workspaceId')
        return self


class ListDigitalEmployeesResponseBodyDigitalEmployeesKnowledges(TeaModel):
    def __init__(
        self,
        bailian: List[ListDigitalEmployeesResponseBodyDigitalEmployeesKnowledgesBailian] = None,
        sop: List[Dict[str, Any]] = None,
    ):
        self.bailian = bailian
        self.sop = sop

    def validate(self):
        if self.bailian:
            for k in self.bailian:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['bailian'] = []
        if self.bailian is not None:
            for k in self.bailian:
                result['bailian'].append(k.to_map() if k else None)
        if self.sop is not None:
            result['sop'] = self.sop
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.bailian = []
        if m.get('bailian') is not None:
            for k in m.get('bailian'):
                temp_model = ListDigitalEmployeesResponseBodyDigitalEmployeesKnowledgesBailian()
                self.bailian.append(temp_model.from_map(k))
        if m.get('sop') is not None:
            self.sop = m.get('sop')
        return self


class ListDigitalEmployeesResponseBodyDigitalEmployees(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        default_rule: str = None,
        description: str = None,
        display_name: str = None,
        employee_type: str = None,
        knowledges: ListDigitalEmployeesResponseBodyDigitalEmployeesKnowledges = None,
        name: str = None,
        resource_group_id: str = None,
        role_arn: str = None,
        tags: List[Tag] = None,
        update_time: str = None,
    ):
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        self.default_rule = default_rule
        self.description = description
        self.display_name = display_name
        self.employee_type = employee_type
        self.knowledges = knowledges
        self.name = name
        self.resource_group_id = resource_group_id
        self.role_arn = role_arn
        self.tags = tags
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.update_time = update_time

    def validate(self):
        if self.knowledges:
            self.knowledges.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.default_rule is not None:
            result['defaultRule'] = self.default_rule
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.employee_type is not None:
            result['employeeType'] = self.employee_type
        if self.knowledges is not None:
            result['knowledges'] = self.knowledges.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.role_arn is not None:
            result['roleArn'] = self.role_arn
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('defaultRule') is not None:
            self.default_rule = m.get('defaultRule')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('employeeType') is not None:
            self.employee_type = m.get('employeeType')
        if m.get('knowledges') is not None:
            temp_model = ListDigitalEmployeesResponseBodyDigitalEmployeesKnowledges()
            self.knowledges = temp_model.from_map(m['knowledges'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('roleArn') is not None:
            self.role_arn = m.get('roleArn')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = Tag()
                self.tags.append(temp_model.from_map(k))
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        return self


class ListDigitalEmployeesResponseBody(TeaModel):
    def __init__(
        self,
        digital_employees: List[ListDigitalEmployeesResponseBodyDigitalEmployees] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total: int = None,
    ):
        self.digital_employees = digital_employees
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.total = total

    def validate(self):
        if self.digital_employees:
            for k in self.digital_employees:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['digitalEmployees'] = []
        if self.digital_employees is not None:
            for k in self.digital_employees:
                result['digitalEmployees'].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.request_id is not None:
            result['requestId'] = self.request_id
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.digital_employees = []
        if m.get('digitalEmployees') is not None:
            for k in m.get('digitalEmployees'):
                temp_model = ListDigitalEmployeesResponseBodyDigitalEmployees()
                self.digital_employees.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('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListDigitalEmployeesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListDigitalEmployeesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListDigitalEmployeesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListEscalationPoliciesRequest(TeaModel):
    def __init__(
        self,
        direction: str = None,
        enable: bool = None,
        max_results: int = None,
        name: str = None,
        next_token: str = None,
        order_by: str = None,
        uuid: str = None,
        workspace: str = None,
    ):
        self.direction = direction
        self.enable = enable
        self.max_results = max_results
        self.name = name
        self.next_token = next_token
        self.order_by = order_by
        self.uuid = uuid
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.direction is not None:
            result['direction'] = self.direction
        if self.enable is not None:
            result['enable'] = self.enable
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.name is not None:
            result['name'] = self.name
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        if self.order_by is not None:
            result['orderBy'] = self.order_by
        if self.uuid is not None:
            result['uuid'] = self.uuid
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('direction') is not None:
            self.direction = m.get('direction')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('nextToken') is not None:
            self.next_token = m.get('nextToken')
        if m.get('orderBy') is not None:
            self.order_by = m.get('orderBy')
        if m.get('uuid') is not None:
            self.uuid = m.get('uuid')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListEscalationPoliciesResponseBody(TeaModel):
    def __init__(
        self,
        escalation_policy_list: List[IncidentEscalationPolicyForView] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
    ):
        self.escalation_policy_list = escalation_policy_list
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id

    def validate(self):
        if self.escalation_policy_list:
            for k in self.escalation_policy_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['escalationPolicyList'] = []
        if self.escalation_policy_list is not None:
            for k in self.escalation_policy_list:
                result['escalationPolicyList'].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.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.escalation_policy_list = []
        if m.get('escalationPolicyList') is not None:
            for k in m.get('escalationPolicyList'):
                temp_model = IncidentEscalationPolicyForView()
                self.escalation_policy_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('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListEscalationPoliciesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListEscalationPoliciesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListEscalationPoliciesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListEvaluationTasksRequest(TeaModel):
    def __init__(
        self,
        channel: str = None,
        data_type: str = None,
        max_results: int = None,
        next_token: str = None,
        status: str = None,
        tags: str = None,
        task_mode: str = None,
        task_name: str = None,
        workspace: str = None,
    ):
        self.channel = channel
        self.data_type = data_type
        self.max_results = max_results
        self.next_token = next_token
        self.status = status
        self.tags = tags
        self.task_mode = task_mode
        self.task_name = task_name
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.channel is not None:
            result['channel'] = self.channel
        if self.data_type is not None:
            result['dataType'] = self.data_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.status is not None:
            result['status'] = self.status
        if self.tags is not None:
            result['tags'] = self.tags
        if self.task_mode is not None:
            result['taskMode'] = self.task_mode
        if self.task_name is not None:
            result['taskName'] = self.task_name
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('channel') is not None:
            self.channel = m.get('channel')
        if m.get('dataType') is not None:
            self.data_type = m.get('dataType')
        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('status') is not None:
            self.status = m.get('status')
        if m.get('tags') is not None:
            self.tags = m.get('tags')
        if m.get('taskMode') is not None:
            self.task_mode = m.get('taskMode')
        if m.get('taskName') is not None:
            self.task_name = m.get('taskName')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListEvaluationTasksResponseBodyEvaluationTasks(TeaModel):
    def __init__(
        self,
        config: Dict[str, str] = None,
        created_at: int = None,
        data_type: str = None,
        evaluators: str = None,
        status: str = None,
        tags: Dict[str, str] = None,
        task_id: str = None,
        task_mode: str = None,
        task_name: str = None,
        updated_at: int = None,
    ):
        self.config = config
        self.created_at = created_at
        self.data_type = data_type
        self.evaluators = evaluators
        self.status = status
        self.tags = tags
        self.task_id = task_id
        self.task_mode = task_mode
        self.task_name = task_name
        self.updated_at = updated_at

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.config is not None:
            result['config'] = self.config
        if self.created_at is not None:
            result['createdAt'] = self.created_at
        if self.data_type is not None:
            result['dataType'] = self.data_type
        if self.evaluators is not None:
            result['evaluators'] = self.evaluators
        if self.status is not None:
            result['status'] = self.status
        if self.tags is not None:
            result['tags'] = self.tags
        if self.task_id is not None:
            result['taskId'] = self.task_id
        if self.task_mode is not None:
            result['taskMode'] = self.task_mode
        if self.task_name is not None:
            result['taskName'] = self.task_name
        if self.updated_at is not None:
            result['updatedAt'] = self.updated_at
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('config') is not None:
            self.config = m.get('config')
        if m.get('createdAt') is not None:
            self.created_at = m.get('createdAt')
        if m.get('dataType') is not None:
            self.data_type = m.get('dataType')
        if m.get('evaluators') is not None:
            self.evaluators = m.get('evaluators')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('tags') is not None:
            self.tags = m.get('tags')
        if m.get('taskId') is not None:
            self.task_id = m.get('taskId')
        if m.get('taskMode') is not None:
            self.task_mode = m.get('taskMode')
        if m.get('taskName') is not None:
            self.task_name = m.get('taskName')
        if m.get('updatedAt') is not None:
            self.updated_at = m.get('updatedAt')
        return self


class ListEvaluationTasksResponseBody(TeaModel):
    def __init__(
        self,
        evaluation_tasks: List[ListEvaluationTasksResponseBodyEvaluationTasks] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total_count: int = None,
    ):
        self.evaluation_tasks = evaluation_tasks
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.total_count = total_count

    def validate(self):
        if self.evaluation_tasks:
            for k in self.evaluation_tasks:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['evaluationTasks'] = []
        if self.evaluation_tasks is not None:
            for k in self.evaluation_tasks:
                result['evaluationTasks'].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.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: dict = None):
        m = m or dict()
        self.evaluation_tasks = []
        if m.get('evaluationTasks') is not None:
            for k in m.get('evaluationTasks'):
                temp_model = ListEvaluationTasksResponseBodyEvaluationTasks()
                self.evaluation_tasks.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('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 ListEvaluationTasksResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListEvaluationTasksResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListEvaluationTasksResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListEventLabelCacheKeysRequest(TeaModel):
    def __init__(
        self,
        key: str = None,
        max_results: int = None,
        workspace: str = None,
    ):
        self.key = key
        self.max_results = max_results
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.key is not None:
            result['key'] = self.key
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListEventLabelCacheKeysResponseBody(TeaModel):
    def __init__(
        self,
        keys: List[str] = None,
        max_results: int = None,
        request_id: str = None,
    ):
        self.keys = keys
        self.max_results = max_results
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.keys is not None:
            result['keys'] = self.keys
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('keys') is not None:
            self.keys = m.get('keys')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListEventLabelCacheKeysResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListEventLabelCacheKeysResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListEventLabelCacheKeysResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListEventLabelCacheValuesRequest(TeaModel):
    def __init__(
        self,
        key: str = None,
        max_results: int = None,
        value: str = None,
        workspace: str = None,
    ):
        # This parameter is required.
        self.key = key
        self.max_results = max_results
        self.value = value
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.key is not None:
            result['key'] = self.key
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.value is not None:
            result['value'] = self.value
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('value') is not None:
            self.value = m.get('value')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListEventLabelCacheValuesResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        request_id: str = None,
        values: List[str] = None,
    ):
        self.max_results = max_results
        self.request_id = request_id
        self.values = values

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.request_id is not None:
            result['requestId'] = self.request_id
        if self.values is not None:
            result['values'] = self.values
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('values') is not None:
            self.values = m.get('values')
        return self


class ListEventLabelCacheValuesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListEventLabelCacheValuesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListEventLabelCacheValuesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListExperimentPlansRequest(TeaModel):
    def __init__(
        self,
        limit: int = None,
        max_results: int = None,
        next_token: str = None,
        offset: int = None,
    ):
        self.limit = limit
        self.max_results = max_results
        self.next_token = next_token
        self.offset = offset

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.limit is not None:
            result['limit'] = self.limit
        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.offset is not None:
            result['offset'] = self.offset
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('limit') is not None:
            self.limit = m.get('limit')
        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('offset') is not None:
            self.offset = m.get('offset')
        return self


class ListExperimentPlansResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        page: int = None,
        page_size: int = None,
        plans: List[ExperimentPlanData] = None,
        request_id: str = None,
        total: int = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.page = page
        self.page_size = page_size
        self.plans = plans
        self.request_id = request_id
        self.total = total

    def validate(self):
        if self.plans:
            for k in self.plans:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.page is not None:
            result['page'] = self.page
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        result['plans'] = []
        if self.plans is not None:
            for k in self.plans:
                result['plans'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = 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('page') is not None:
            self.page = m.get('page')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        self.plans = []
        if m.get('plans') is not None:
            for k in m.get('plans'):
                temp_model = ExperimentPlanData()
                self.plans.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListExperimentPlansResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListExperimentPlansResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListExperimentPlansResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListExperimentTasksRequest(TeaModel):
    def __init__(
        self,
        dataset_id: str = None,
        max_results: int = None,
        next_token: str = None,
        page: int = None,
        page_size: int = None,
        status: str = None,
    ):
        self.dataset_id = dataset_id
        self.max_results = max_results
        self.next_token = next_token
        self.page = page
        self.page_size = page_size
        self.status = status

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.dataset_id is not None:
            result['datasetId'] = self.dataset_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.page is not None:
            result['page'] = self.page
        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: dict = None):
        m = m or dict()
        if m.get('datasetId') is not None:
            self.dataset_id = m.get('datasetId')
        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('page') is not None:
            self.page = m.get('page')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class ListExperimentTasksResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        page: int = None,
        page_size: int = None,
        records: List[ExperimentRecord] = None,
        request_id: str = None,
        total: str = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.page = page
        self.page_size = page_size
        self.records = records
        self.request_id = request_id
        self.total = total

    def validate(self):
        if self.records:
            for k in self.records:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.page is not None:
            result['page'] = self.page
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        result['records'] = []
        if self.records is not None:
            for k in self.records:
                result['records'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = 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('page') is not None:
            self.page = m.get('page')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        self.records = []
        if m.get('records') is not None:
            for k in m.get('records'):
                temp_model = ExperimentRecord()
                self.records.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListExperimentTasksResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListExperimentTasksResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListExperimentTasksResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIncidentEventsRequest(TeaModel):
    def __init__(
        self,
        array_index: str = None,
        dimension: str = None,
        end_time: int = None,
        group_by: str = None,
        incident_uuid: str = None,
        labels: str = None,
        max_results: int = None,
        next_token: str = None,
        resource_domain: str = None,
        resource_entity_id: str = None,
        resource_entity_type: str = None,
        resource_props: str = None,
        resource_tags: str = None,
        severity: str = None,
        start_time: int = None,
        status: int = None,
        text_index: str = None,
        title: str = None,
        workspace: str = None,
    ):
        self.array_index = array_index
        self.dimension = dimension
        self.end_time = end_time
        self.group_by = group_by
        self.incident_uuid = incident_uuid
        self.labels = labels
        self.max_results = max_results
        self.next_token = next_token
        self.resource_domain = resource_domain
        self.resource_entity_id = resource_entity_id
        self.resource_entity_type = resource_entity_type
        self.resource_props = resource_props
        self.resource_tags = resource_tags
        self.severity = severity
        self.start_time = start_time
        self.status = status
        self.text_index = text_index
        self.title = title
        # This parameter is required.
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.array_index is not None:
            result['arrayIndex'] = self.array_index
        if self.dimension is not None:
            result['dimension'] = self.dimension
        if self.end_time is not None:
            result['endTime'] = self.end_time
        if self.group_by is not None:
            result['groupBy'] = self.group_by
        if self.incident_uuid is not None:
            result['incidentUuid'] = self.incident_uuid
        if self.labels is not None:
            result['labels'] = self.labels
        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_domain is not None:
            result['resourceDomain'] = self.resource_domain
        if self.resource_entity_id is not None:
            result['resourceEntityId'] = self.resource_entity_id
        if self.resource_entity_type is not None:
            result['resourceEntityType'] = self.resource_entity_type
        if self.resource_props is not None:
            result['resourceProps'] = self.resource_props
        if self.resource_tags is not None:
            result['resourceTags'] = self.resource_tags
        if self.severity is not None:
            result['severity'] = self.severity
        if self.start_time is not None:
            result['startTime'] = self.start_time
        if self.status is not None:
            result['status'] = self.status
        if self.text_index is not None:
            result['textIndex'] = self.text_index
        if self.title is not None:
            result['title'] = self.title
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('arrayIndex') is not None:
            self.array_index = m.get('arrayIndex')
        if m.get('dimension') is not None:
            self.dimension = m.get('dimension')
        if m.get('endTime') is not None:
            self.end_time = m.get('endTime')
        if m.get('groupBy') is not None:
            self.group_by = m.get('groupBy')
        if m.get('incidentUuid') is not None:
            self.incident_uuid = m.get('incidentUuid')
        if m.get('labels') is not None:
            self.labels = m.get('labels')
        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('resourceDomain') is not None:
            self.resource_domain = m.get('resourceDomain')
        if m.get('resourceEntityId') is not None:
            self.resource_entity_id = m.get('resourceEntityId')
        if m.get('resourceEntityType') is not None:
            self.resource_entity_type = m.get('resourceEntityType')
        if m.get('resourceProps') is not None:
            self.resource_props = m.get('resourceProps')
        if m.get('resourceTags') is not None:
            self.resource_tags = m.get('resourceTags')
        if m.get('severity') is not None:
            self.severity = m.get('severity')
        if m.get('startTime') is not None:
            self.start_time = m.get('startTime')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('textIndex') is not None:
            self.text_index = m.get('textIndex')
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListIncidentEventsResponseBody(TeaModel):
    def __init__(
        self,
        event_list: List[IncidentEventForView] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total: int = None,
    ):
        self.event_list = event_list
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.total = total

    def validate(self):
        if self.event_list:
            for k in self.event_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['eventList'] = []
        if self.event_list is not None:
            for k in self.event_list:
                result['eventList'].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.request_id is not None:
            result['requestId'] = self.request_id
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.event_list = []
        if m.get('eventList') is not None:
            for k in m.get('eventList'):
                temp_model = IncidentEventForView()
                self.event_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('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListIncidentEventsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListIncidentEventsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListIncidentEventsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIncidentTimelinesRequest(TeaModel):
    def __init__(
        self,
        change_type: str = None,
        end_time: int = None,
        incident_uuid: str = None,
        max_results: int = None,
        next_token: str = None,
        operator: str = None,
        start_time: int = None,
        title: str = None,
        type: str = None,
        workspace: str = None,
    ):
        self.change_type = change_type
        self.end_time = end_time
        self.incident_uuid = incident_uuid
        self.max_results = max_results
        self.next_token = next_token
        self.operator = operator
        self.start_time = start_time
        self.title = title
        self.type = type
        # This parameter is required.
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.change_type is not None:
            result['changeType'] = self.change_type
        if self.end_time is not None:
            result['endTime'] = self.end_time
        if self.incident_uuid is not None:
            result['incidentUuid'] = self.incident_uuid
        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.operator is not None:
            result['operator'] = self.operator
        if self.start_time is not None:
            result['startTime'] = self.start_time
        if self.title is not None:
            result['title'] = self.title
        if self.type is not None:
            result['type'] = self.type
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('changeType') is not None:
            self.change_type = m.get('changeType')
        if m.get('endTime') is not None:
            self.end_time = m.get('endTime')
        if m.get('incidentUuid') is not None:
            self.incident_uuid = m.get('incidentUuid')
        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('operator') is not None:
            self.operator = m.get('operator')
        if m.get('startTime') is not None:
            self.start_time = m.get('startTime')
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListIncidentTimelinesResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        timeline_list: List[IncidentTimelineForView] = None,
        total: int = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.timeline_list = timeline_list
        self.total = total

    def validate(self):
        if self.timeline_list:
            for k in self.timeline_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.request_id is not None:
            result['requestId'] = self.request_id
        result['timelineList'] = []
        if self.timeline_list is not None:
            for k in self.timeline_list:
                result['timelineList'].append(k.to_map() if k else None)
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = 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('requestId') is not None:
            self.request_id = m.get('requestId')
        self.timeline_list = []
        if m.get('timelineList') is not None:
            for k in m.get('timelineList'):
                temp_model = IncidentTimelineForView()
                self.timeline_list.append(temp_model.from_map(k))
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListIncidentTimelinesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListIncidentTimelinesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListIncidentTimelinesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIncidentsRequest(TeaModel):
    def __init__(
        self,
        array_index: str = None,
        end_time: int = None,
        max_results: int = None,
        next_token: str = None,
        operator: str = None,
        owner: str = None,
        participant: str = None,
        plan_id: str = None,
        resource_domain: str = None,
        resource_entity_id: str = None,
        resource_entity_type: str = None,
        resource_props: str = None,
        resource_tags: str = None,
        root_cause_category: str = None,
        severity: str = None,
        solution: str = None,
        start_time: int = None,
        state: str = None,
        text_index: str = None,
        title: str = None,
        workspace: str = None,
    ):
        self.array_index = array_index
        self.end_time = end_time
        self.max_results = max_results
        self.next_token = next_token
        self.operator = operator
        self.owner = owner
        self.participant = participant
        self.plan_id = plan_id
        self.resource_domain = resource_domain
        self.resource_entity_id = resource_entity_id
        self.resource_entity_type = resource_entity_type
        self.resource_props = resource_props
        self.resource_tags = resource_tags
        self.root_cause_category = root_cause_category
        self.severity = severity
        self.solution = solution
        self.start_time = start_time
        self.state = state
        self.text_index = text_index
        self.title = title
        # This parameter is required.
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.array_index is not None:
            result['arrayIndex'] = self.array_index
        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.operator is not None:
            result['operator'] = self.operator
        if self.owner is not None:
            result['owner'] = self.owner
        if self.participant is not None:
            result['participant'] = self.participant
        if self.plan_id is not None:
            result['planId'] = self.plan_id
        if self.resource_domain is not None:
            result['resourceDomain'] = self.resource_domain
        if self.resource_entity_id is not None:
            result['resourceEntityId'] = self.resource_entity_id
        if self.resource_entity_type is not None:
            result['resourceEntityType'] = self.resource_entity_type
        if self.resource_props is not None:
            result['resourceProps'] = self.resource_props
        if self.resource_tags is not None:
            result['resourceTags'] = self.resource_tags
        if self.root_cause_category is not None:
            result['rootCauseCategory'] = self.root_cause_category
        if self.severity is not None:
            result['severity'] = self.severity
        if self.solution is not None:
            result['solution'] = self.solution
        if self.start_time is not None:
            result['startTime'] = self.start_time
        if self.state is not None:
            result['state'] = self.state
        if self.text_index is not None:
            result['textIndex'] = self.text_index
        if self.title is not None:
            result['title'] = self.title
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('arrayIndex') is not None:
            self.array_index = m.get('arrayIndex')
        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('operator') is not None:
            self.operator = m.get('operator')
        if m.get('owner') is not None:
            self.owner = m.get('owner')
        if m.get('participant') is not None:
            self.participant = m.get('participant')
        if m.get('planId') is not None:
            self.plan_id = m.get('planId')
        if m.get('resourceDomain') is not None:
            self.resource_domain = m.get('resourceDomain')
        if m.get('resourceEntityId') is not None:
            self.resource_entity_id = m.get('resourceEntityId')
        if m.get('resourceEntityType') is not None:
            self.resource_entity_type = m.get('resourceEntityType')
        if m.get('resourceProps') is not None:
            self.resource_props = m.get('resourceProps')
        if m.get('resourceTags') is not None:
            self.resource_tags = m.get('resourceTags')
        if m.get('rootCauseCategory') is not None:
            self.root_cause_category = m.get('rootCauseCategory')
        if m.get('severity') is not None:
            self.severity = m.get('severity')
        if m.get('solution') is not None:
            self.solution = m.get('solution')
        if m.get('startTime') is not None:
            self.start_time = m.get('startTime')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('textIndex') is not None:
            self.text_index = m.get('textIndex')
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListIncidentsResponseBody(TeaModel):
    def __init__(
        self,
        incident_list: List[IncidentForView] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total: int = None,
    ):
        self.incident_list = incident_list
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.total = total

    def validate(self):
        if self.incident_list:
            for k in self.incident_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['incidentList'] = []
        if self.incident_list is not None:
            for k in self.incident_list:
                result['incidentList'].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.request_id is not None:
            result['requestId'] = self.request_id
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.incident_list = []
        if m.get('incidentList') is not None:
            for k in m.get('incidentList'):
                temp_model = IncidentForView()
                self.incident_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('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListIncidentsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListIncidentsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListIncidentsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIntegrationPoliciesRequestTag(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # Tag key
        self.key = key
        # Tag value
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 ListIntegrationPoliciesRequest(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        bind_resource_id: str = None,
        entity_group_ids: str = None,
        filter_region_ids: str = None,
        max_results: int = None,
        next_token: str = None,
        policy_id: str = None,
        policy_name: str = None,
        policy_type: str = None,
        prometheus_instance_id: str = None,
        query: str = None,
        resource_group_id: str = None,
        tag: List[ListIntegrationPoliciesRequestTag] = None,
        workspace: str = None,
    ):
        # Addon name.
        self.addon_name = addon_name
        # Bound resource ID
        self.bind_resource_id = bind_resource_id
        # Filter for entity IDs, separated by commas
        self.entity_group_ids = entity_group_ids
        # Used for Region query, separated by commas
        self.filter_region_ids = filter_region_ids
        # Maximum number of results to return. Default is 30, with a maximum of 100.
        self.max_results = max_results
        # Used to return more results. This parameter is not required for the first query. For subsequent queries, use the Token obtained from the response.
        self.next_token = next_token
        # Policy ID.
        self.policy_id = policy_id
        # Rule name.
        self.policy_name = policy_name
        # Policy type
        self.policy_type = policy_type
        # Instance ID.
        self.prometheus_instance_id = prometheus_instance_id
        # Used for general queries
        self.query = query
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Tag list.
        self.tag = tag
        # Workspace.
        self.workspace = workspace

    def validate(self):
        if self.tag:
            for k in self.tag:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.bind_resource_id is not None:
            result['bindResourceId'] = self.bind_resource_id
        if self.entity_group_ids is not None:
            result['entityGroupIds'] = self.entity_group_ids
        if self.filter_region_ids is not None:
            result['filterRegionIds'] = self.filter_region_ids
        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.policy_id is not None:
            result['policyId'] = self.policy_id
        if self.policy_name is not None:
            result['policyName'] = self.policy_name
        if self.policy_type is not None:
            result['policyType'] = self.policy_type
        if self.prometheus_instance_id is not None:
            result['prometheusInstanceId'] = self.prometheus_instance_id
        if self.query is not None:
            result['query'] = self.query
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        result['tag'] = []
        if self.tag is not None:
            for k in self.tag:
                result['tag'].append(k.to_map() if k else None)
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('bindResourceId') is not None:
            self.bind_resource_id = m.get('bindResourceId')
        if m.get('entityGroupIds') is not None:
            self.entity_group_ids = m.get('entityGroupIds')
        if m.get('filterRegionIds') is not None:
            self.filter_region_ids = m.get('filterRegionIds')
        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('policyId') is not None:
            self.policy_id = m.get('policyId')
        if m.get('policyName') is not None:
            self.policy_name = m.get('policyName')
        if m.get('policyType') is not None:
            self.policy_type = m.get('policyType')
        if m.get('prometheusInstanceId') is not None:
            self.prometheus_instance_id = m.get('prometheusInstanceId')
        if m.get('query') is not None:
            self.query = m.get('query')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.tag = []
        if m.get('tag') is not None:
            for k in m.get('tag'):
                temp_model = ListIntegrationPoliciesRequestTag()
                self.tag.append(temp_model.from_map(k))
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListIntegrationPoliciesShrinkRequest(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        bind_resource_id: str = None,
        entity_group_ids: str = None,
        filter_region_ids: str = None,
        max_results: int = None,
        next_token: str = None,
        policy_id: str = None,
        policy_name: str = None,
        policy_type: str = None,
        prometheus_instance_id: str = None,
        query: str = None,
        resource_group_id: str = None,
        tag_shrink: str = None,
        workspace: str = None,
    ):
        # Addon name.
        self.addon_name = addon_name
        # Bound resource ID
        self.bind_resource_id = bind_resource_id
        # Filter for entity IDs, separated by commas
        self.entity_group_ids = entity_group_ids
        # Used for Region query, separated by commas
        self.filter_region_ids = filter_region_ids
        # Maximum number of results to return. Default is 30, with a maximum of 100.
        self.max_results = max_results
        # Used to return more results. This parameter is not required for the first query. For subsequent queries, use the Token obtained from the response.
        self.next_token = next_token
        # Policy ID.
        self.policy_id = policy_id
        # Rule name.
        self.policy_name = policy_name
        # Policy type
        self.policy_type = policy_type
        # Instance ID.
        self.prometheus_instance_id = prometheus_instance_id
        # Used for general queries
        self.query = query
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Tag list.
        self.tag_shrink = tag_shrink
        # Workspace.
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.bind_resource_id is not None:
            result['bindResourceId'] = self.bind_resource_id
        if self.entity_group_ids is not None:
            result['entityGroupIds'] = self.entity_group_ids
        if self.filter_region_ids is not None:
            result['filterRegionIds'] = self.filter_region_ids
        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.policy_id is not None:
            result['policyId'] = self.policy_id
        if self.policy_name is not None:
            result['policyName'] = self.policy_name
        if self.policy_type is not None:
            result['policyType'] = self.policy_type
        if self.prometheus_instance_id is not None:
            result['prometheusInstanceId'] = self.prometheus_instance_id
        if self.query is not None:
            result['query'] = self.query
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.tag_shrink is not None:
            result['tag'] = self.tag_shrink
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('bindResourceId') is not None:
            self.bind_resource_id = m.get('bindResourceId')
        if m.get('entityGroupIds') is not None:
            self.entity_group_ids = m.get('entityGroupIds')
        if m.get('filterRegionIds') is not None:
            self.filter_region_ids = m.get('filterRegionIds')
        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('policyId') is not None:
            self.policy_id = m.get('policyId')
        if m.get('policyName') is not None:
            self.policy_name = m.get('policyName')
        if m.get('policyType') is not None:
            self.policy_type = m.get('policyType')
        if m.get('prometheusInstanceId') is not None:
            self.prometheus_instance_id = m.get('prometheusInstanceId')
        if m.get('query') is not None:
            self.query = m.get('query')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('tag') is not None:
            self.tag_shrink = m.get('tag')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListIntegrationPoliciesResponseBodyPoliciesBindResource(TeaModel):
    def __init__(
        self,
        cluster_id: str = None,
        cluster_type: str = None,
        vpc_cidr: str = None,
        vpc_id: str = None,
    ):
        # Cluster ID.
        self.cluster_id = cluster_id
        # Cluster type.
        self.cluster_type = cluster_type
        # VPC CIDR
        self.vpc_cidr = vpc_cidr
        # Virtual Private Cloud (VPC).
        self.vpc_id = vpc_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.cluster_id is not None:
            result['clusterId'] = self.cluster_id
        if self.cluster_type is not None:
            result['clusterType'] = self.cluster_type
        if self.vpc_cidr is not None:
            result['vpcCidr'] = self.vpc_cidr
        if self.vpc_id is not None:
            result['vpcId'] = self.vpc_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clusterId') is not None:
            self.cluster_id = m.get('clusterId')
        if m.get('clusterType') is not None:
            self.cluster_type = m.get('clusterType')
        if m.get('vpcCidr') is not None:
            self.vpc_cidr = m.get('vpcCidr')
        if m.get('vpcId') is not None:
            self.vpc_id = m.get('vpcId')
        return self


class ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesAnnotations(TeaModel):
    def __init__(
        self,
        op: str = None,
        tag_key: str = None,
        tag_values: List[str] = None,
    ):
        # Operation to be performed.
        self.op = op
        # Tag key.
        self.tag_key = tag_key
        # Tag values
        self.tag_values = tag_values

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.op is not None:
            result['op'] = self.op
        if self.tag_key is not None:
            result['tagKey'] = self.tag_key
        if self.tag_values is not None:
            result['tagValues'] = self.tag_values
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('op') is not None:
            self.op = m.get('op')
        if m.get('tagKey') is not None:
            self.tag_key = m.get('tagKey')
        if m.get('tagValues') is not None:
            self.tag_values = m.get('tagValues')
        return self


class ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesFieldRules(TeaModel):
    def __init__(
        self,
        field_key: str = None,
        field_values: List[str] = None,
        op: str = None,
    ):
        # Unique identifier for the field.
        self.field_key = field_key
        # Field content, multiple values separated by English commas.
        self.field_values = field_values
        # Operation to be performed.
        self.op = op

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.field_key is not None:
            result['fieldKey'] = self.field_key
        if self.field_values is not None:
            result['fieldValues'] = self.field_values
        if self.op is not None:
            result['op'] = self.op
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('fieldKey') is not None:
            self.field_key = m.get('fieldKey')
        if m.get('fieldValues') is not None:
            self.field_values = m.get('fieldValues')
        if m.get('op') is not None:
            self.op = m.get('op')
        return self


class ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesIpMatchRule(TeaModel):
    def __init__(
        self,
        ip_cidr: str = None,
        ip_field_key: str = None,
    ):
        # IP segment
        self.ip_cidr = ip_cidr
        # Key of the IP field
        self.ip_field_key = ip_field_key

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.ip_cidr is not None:
            result['ipCidr'] = self.ip_cidr
        if self.ip_field_key is not None:
            result['ipFieldKey'] = self.ip_field_key
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ipCidr') is not None:
            self.ip_cidr = m.get('ipCidr')
        if m.get('ipFieldKey') is not None:
            self.ip_field_key = m.get('ipFieldKey')
        return self


class ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesLabels(TeaModel):
    def __init__(
        self,
        op: str = None,
        tag_key: str = None,
        tag_values: List[str] = None,
    ):
        # Operation to be performed.
        self.op = op
        # Tag key.
        self.tag_key = tag_key
        # Tag values
        self.tag_values = tag_values

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.op is not None:
            result['op'] = self.op
        if self.tag_key is not None:
            result['tagKey'] = self.tag_key
        if self.tag_values is not None:
            result['tagValues'] = self.tag_values
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('op') is not None:
            self.op = m.get('op')
        if m.get('tagKey') is not None:
            self.tag_key = m.get('tagKey')
        if m.get('tagValues') is not None:
            self.tag_values = m.get('tagValues')
        return self


class ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesTags(TeaModel):
    def __init__(
        self,
        op: str = None,
        tag_key: str = None,
        tag_values: List[str] = None,
    ):
        # Operation to be performed.
        self.op = op
        # Tag key.
        self.tag_key = tag_key
        # Tag value.
        self.tag_values = tag_values

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.op is not None:
            result['op'] = self.op
        if self.tag_key is not None:
            result['tagKey'] = self.tag_key
        if self.tag_values is not None:
            result['tagValues'] = self.tag_values
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('op') is not None:
            self.op = m.get('op')
        if m.get('tagKey') is not None:
            self.tag_key = m.get('tagKey')
        if m.get('tagValues') is not None:
            self.tag_values = m.get('tagValues')
        return self


class ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRules(TeaModel):
    def __init__(
        self,
        annotations: List[ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesAnnotations] = None,
        entity_types: List[str] = None,
        field_rules: List[ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesFieldRules] = None,
        instance_ids: List[str] = None,
        ip_match_rule: ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesIpMatchRule = None,
        labels: List[ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesLabels] = None,
        region_ids: List[str] = None,
        resource_group_id: str = None,
        tags: List[ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesTags] = None,
    ):
        # Annotations
        self.annotations = annotations
        # List of entity types
        self.entity_types = entity_types
        # Field rules
        self.field_rules = field_rules
        # Instance IDs.
        self.instance_ids = instance_ids
        # IP match rule
        self.ip_match_rule = ip_match_rule
        # Labels
        self.labels = labels
        # List of region IDs.
        self.region_ids = region_ids
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Instance tag information.
        self.tags = tags

    def validate(self):
        if self.annotations:
            for k in self.annotations:
                if k:
                    k.validate()
        if self.field_rules:
            for k in self.field_rules:
                if k:
                    k.validate()
        if self.ip_match_rule:
            self.ip_match_rule.validate()
        if self.labels:
            for k in self.labels:
                if k:
                    k.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['annotations'] = []
        if self.annotations is not None:
            for k in self.annotations:
                result['annotations'].append(k.to_map() if k else None)
        if self.entity_types is not None:
            result['entityTypes'] = self.entity_types
        result['fieldRules'] = []
        if self.field_rules is not None:
            for k in self.field_rules:
                result['fieldRules'].append(k.to_map() if k else None)
        if self.instance_ids is not None:
            result['instanceIds'] = self.instance_ids
        if self.ip_match_rule is not None:
            result['ipMatchRule'] = self.ip_match_rule.to_map()
        result['labels'] = []
        if self.labels is not None:
            for k in self.labels:
                result['labels'].append(k.to_map() if k else None)
        if self.region_ids is not None:
            result['regionIds'] = self.region_ids
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        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: dict = None):
        m = m or dict()
        self.annotations = []
        if m.get('annotations') is not None:
            for k in m.get('annotations'):
                temp_model = ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesAnnotations()
                self.annotations.append(temp_model.from_map(k))
        if m.get('entityTypes') is not None:
            self.entity_types = m.get('entityTypes')
        self.field_rules = []
        if m.get('fieldRules') is not None:
            for k in m.get('fieldRules'):
                temp_model = ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesFieldRules()
                self.field_rules.append(temp_model.from_map(k))
        if m.get('instanceIds') is not None:
            self.instance_ids = m.get('instanceIds')
        if m.get('ipMatchRule') is not None:
            temp_model = ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesIpMatchRule()
            self.ip_match_rule = temp_model.from_map(m['ipMatchRule'])
        self.labels = []
        if m.get('labels') is not None:
            for k in m.get('labels'):
                temp_model = ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesLabels()
                self.labels.append(temp_model.from_map(k))
        if m.get('regionIds') is not None:
            self.region_ids = m.get('regionIds')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRulesTags()
                self.tags.append(temp_model.from_map(k))
        return self


class ListIntegrationPoliciesResponseBodyPoliciesEntityGroup(TeaModel):
    def __init__(
        self,
        description: str = None,
        entity_group_id: str = None,
        entity_group_name: str = None,
        entity_rules: ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRules = None,
        query: str = None,
        region_id: str = None,
        user_id: str = None,
        workspace: str = None,
    ):
        # Description.
        self.description = description
        # Entity group ID
        self.entity_group_id = entity_group_id
        # Entity group name
        self.entity_group_name = entity_group_name
        # Entity group
        self.entity_rules = entity_rules
        # Search keywords, supporting document library name and description
        self.query = query
        # Region ID.
        self.region_id = region_id
        # User ID
        self.user_id = user_id
        # Workspace.
        self.workspace = workspace

    def validate(self):
        if self.entity_rules:
            self.entity_rules.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.entity_group_id is not None:
            result['entityGroupId'] = self.entity_group_id
        if self.entity_group_name is not None:
            result['entityGroupName'] = self.entity_group_name
        if self.entity_rules is not None:
            result['entityRules'] = self.entity_rules.to_map()
        if self.query is not None:
            result['query'] = self.query
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('entityGroupId') is not None:
            self.entity_group_id = m.get('entityGroupId')
        if m.get('entityGroupName') is not None:
            self.entity_group_name = m.get('entityGroupName')
        if m.get('entityRules') is not None:
            temp_model = ListIntegrationPoliciesResponseBodyPoliciesEntityGroupEntityRules()
            self.entity_rules = temp_model.from_map(m['entityRules'])
        if m.get('query') is not None:
            self.query = m.get('query')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListIntegrationPoliciesResponseBodyPoliciesManagedInfo(TeaModel):
    def __init__(
        self,
        eni_id: str = None,
        security_group_id: str = None,
        vswitch_id: str = None,
    ):
        # ENI card ID of the managed probe. For example: eni-xxxx.
        self.eni_id = eni_id
        # Security group ID
        self.security_group_id = security_group_id
        # VSwitch ID.
        self.vswitch_id = vswitch_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.eni_id is not None:
            result['eniId'] = self.eni_id
        if self.security_group_id is not None:
            result['securityGroupId'] = self.security_group_id
        if self.vswitch_id is not None:
            result['vswitchId'] = self.vswitch_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('eniId') is not None:
            self.eni_id = m.get('eniId')
        if m.get('securityGroupId') is not None:
            self.security_group_id = m.get('securityGroupId')
        if m.get('vswitchId') is not None:
            self.vswitch_id = m.get('vswitchId')
        return self


class ListIntegrationPoliciesResponseBodyPoliciesSubAddonRelease(TeaModel):
    def __init__(
        self,
        ready: int = None,
        total: int = None,
    ):
        # Number of ready sub-releases
        self.ready = ready
        # Number of rules.
        self.total = total

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.ready is not None:
            result['ready'] = self.ready
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ready') is not None:
            self.ready = m.get('ready')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListIntegrationPoliciesResponseBodyPolicies(TeaModel):
    def __init__(
        self,
        bind_resource: ListIntegrationPoliciesResponseBodyPoliciesBindResource = None,
        cs_umodel_status: bool = None,
        entity_group: ListIntegrationPoliciesResponseBodyPoliciesEntityGroup = None,
        fee_package: str = None,
        managed_info: ListIntegrationPoliciesResponseBodyPoliciesManagedInfo = None,
        policy_id: str = None,
        policy_name: str = None,
        policy_type: str = None,
        region_id: str = None,
        resource_group_id: str = None,
        sub_addon_release: ListIntegrationPoliciesResponseBodyPoliciesSubAddonRelease = None,
        user_id: str = None,
        workspace: str = None,
    ):
        # Bound resource information
        self.bind_resource = bind_resource
        # Container environment umodel installation status.
        self.cs_umodel_status = cs_umodel_status
        # Entity group
        self.entity_group = entity_group
        # Billing type.
        self.fee_package = fee_package
        # Policy network management information.
        self.managed_info = managed_info
        # Policy ID.
        self.policy_id = policy_id
        # Rule name.
        self.policy_name = policy_name
        # Access center policy type
        self.policy_type = policy_type
        # Region ID.
        self.region_id = region_id
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Number of sub-releases
        self.sub_addon_release = sub_addon_release
        # User ID
        self.user_id = user_id
        # Workspace.
        self.workspace = workspace

    def validate(self):
        if self.bind_resource:
            self.bind_resource.validate()
        if self.entity_group:
            self.entity_group.validate()
        if self.managed_info:
            self.managed_info.validate()
        if self.sub_addon_release:
            self.sub_addon_release.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.bind_resource is not None:
            result['bindResource'] = self.bind_resource.to_map()
        if self.cs_umodel_status is not None:
            result['csUmodelStatus'] = self.cs_umodel_status
        if self.entity_group is not None:
            result['entityGroup'] = self.entity_group.to_map()
        if self.fee_package is not None:
            result['feePackage'] = self.fee_package
        if self.managed_info is not None:
            result['managedInfo'] = self.managed_info.to_map()
        if self.policy_id is not None:
            result['policyId'] = self.policy_id
        if self.policy_name is not None:
            result['policyName'] = self.policy_name
        if self.policy_type is not None:
            result['policyType'] = self.policy_type
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.sub_addon_release is not None:
            result['subAddonRelease'] = self.sub_addon_release.to_map()
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('bindResource') is not None:
            temp_model = ListIntegrationPoliciesResponseBodyPoliciesBindResource()
            self.bind_resource = temp_model.from_map(m['bindResource'])
        if m.get('csUmodelStatus') is not None:
            self.cs_umodel_status = m.get('csUmodelStatus')
        if m.get('entityGroup') is not None:
            temp_model = ListIntegrationPoliciesResponseBodyPoliciesEntityGroup()
            self.entity_group = temp_model.from_map(m['entityGroup'])
        if m.get('feePackage') is not None:
            self.fee_package = m.get('feePackage')
        if m.get('managedInfo') is not None:
            temp_model = ListIntegrationPoliciesResponseBodyPoliciesManagedInfo()
            self.managed_info = temp_model.from_map(m['managedInfo'])
        if m.get('policyId') is not None:
            self.policy_id = m.get('policyId')
        if m.get('policyName') is not None:
            self.policy_name = m.get('policyName')
        if m.get('policyType') is not None:
            self.policy_type = m.get('policyType')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('subAddonRelease') is not None:
            temp_model = ListIntegrationPoliciesResponseBodyPoliciesSubAddonRelease()
            self.sub_addon_release = temp_model.from_map(m['subAddonRelease'])
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListIntegrationPoliciesResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        policies: List[ListIntegrationPoliciesResponseBodyPolicies] = None,
        request_id: str = None,
        total_count: int = None,
    ):
        # Page size
        # Default value:
        # 	50
        # Maximum value:
        # 	50
        self.max_results = max_results
        # Pagination token
        self.next_token = next_token
        # Access policy list
        self.policies = policies
        # ID of the request
        self.request_id = request_id
        # Total number of entries
        self.total_count = total_count

    def validate(self):
        if self.policies:
            for k in self.policies:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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['policies'] = []
        if self.policies is not None:
            for k in self.policies:
                result['policies'].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: dict = 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.policies = []
        if m.get('policies') is not None:
            for k in m.get('policies'):
                temp_model = ListIntegrationPoliciesResponseBodyPolicies()
                self.policies.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 ListIntegrationPoliciesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListIntegrationPoliciesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListIntegrationPoliciesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIntegrationPolicyAddonsResponseBodyAddonsDashboards(TeaModel):
    def __init__(
        self,
        description: str = None,
        name: str = None,
        url: str = None,
    ):
        self.description = description
        self.name = name
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.name is not None:
            result['name'] = self.name
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class ListIntegrationPolicyAddonsResponseBodyAddonsEnvironmentsDependencies(TeaModel):
    def __init__(
        self,
        cluster_types: List[str] = None,
        features: Dict[str, bool] = None,
        services: List[str] = None,
    ):
        self.cluster_types = cluster_types
        self.features = features
        self.services = services

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.cluster_types is not None:
            result['clusterTypes'] = self.cluster_types
        if self.features is not None:
            result['features'] = self.features
        if self.services is not None:
            result['services'] = self.services
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clusterTypes') is not None:
            self.cluster_types = m.get('clusterTypes')
        if m.get('features') is not None:
            self.features = m.get('features')
        if m.get('services') is not None:
            self.services = m.get('services')
        return self


class ListIntegrationPolicyAddonsResponseBodyAddonsEnvironmentsPoliciesMetricCheckRule(TeaModel):
    def __init__(
        self,
        prom_ql: List[str] = None,
    ):
        self.prom_ql = prom_ql

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.prom_ql is not None:
            result['promQl'] = self.prom_ql
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('promQl') is not None:
            self.prom_ql = m.get('promQl')
        return self


class ListIntegrationPolicyAddonsResponseBodyAddonsEnvironmentsPoliciesProtocols(TeaModel):
    def __init__(
        self,
        description: str = None,
        icon: str = None,
        label: str = None,
        name: str = None,
    ):
        self.description = description
        self.icon = icon
        self.label = label
        self.name = name

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.icon is not None:
            result['icon'] = self.icon
        if self.label is not None:
            result['label'] = self.label
        if self.name is not None:
            result['name'] = self.name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('icon') is not None:
            self.icon = m.get('icon')
        if m.get('label') is not None:
            self.label = m.get('label')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class ListIntegrationPolicyAddonsResponseBodyAddonsEnvironmentsPolicies(TeaModel):
    def __init__(
        self,
        alert_default_status: str = None,
        default_install: bool = None,
        enable_service_account: bool = None,
        metric_check_rule: ListIntegrationPolicyAddonsResponseBodyAddonsEnvironmentsPoliciesMetricCheckRule = None,
        need_restart_after_integration: bool = None,
        protocols: List[ListIntegrationPolicyAddonsResponseBodyAddonsEnvironmentsPoliciesProtocols] = None,
        target_addon_name: str = None,
    ):
        self.alert_default_status = alert_default_status
        self.default_install = default_install
        self.enable_service_account = enable_service_account
        self.metric_check_rule = metric_check_rule
        self.need_restart_after_integration = need_restart_after_integration
        self.protocols = protocols
        self.target_addon_name = target_addon_name

    def validate(self):
        if self.metric_check_rule:
            self.metric_check_rule.validate()
        if self.protocols:
            for k in self.protocols:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_default_status is not None:
            result['alertDefaultStatus'] = self.alert_default_status
        if self.default_install is not None:
            result['defaultInstall'] = self.default_install
        if self.enable_service_account is not None:
            result['enableServiceAccount'] = self.enable_service_account
        if self.metric_check_rule is not None:
            result['metricCheckRule'] = self.metric_check_rule.to_map()
        if self.need_restart_after_integration is not None:
            result['needRestartAfterIntegration'] = self.need_restart_after_integration
        result['protocols'] = []
        if self.protocols is not None:
            for k in self.protocols:
                result['protocols'].append(k.to_map() if k else None)
        if self.target_addon_name is not None:
            result['targetAddonName'] = self.target_addon_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertDefaultStatus') is not None:
            self.alert_default_status = m.get('alertDefaultStatus')
        if m.get('defaultInstall') is not None:
            self.default_install = m.get('defaultInstall')
        if m.get('enableServiceAccount') is not None:
            self.enable_service_account = m.get('enableServiceAccount')
        if m.get('metricCheckRule') is not None:
            temp_model = ListIntegrationPolicyAddonsResponseBodyAddonsEnvironmentsPoliciesMetricCheckRule()
            self.metric_check_rule = temp_model.from_map(m['metricCheckRule'])
        if m.get('needRestartAfterIntegration') is not None:
            self.need_restart_after_integration = m.get('needRestartAfterIntegration')
        self.protocols = []
        if m.get('protocols') is not None:
            for k in m.get('protocols'):
                temp_model = ListIntegrationPolicyAddonsResponseBodyAddonsEnvironmentsPoliciesProtocols()
                self.protocols.append(temp_model.from_map(k))
        if m.get('targetAddonName') is not None:
            self.target_addon_name = m.get('targetAddonName')
        return self


class ListIntegrationPolicyAddonsResponseBodyAddonsEnvironments(TeaModel):
    def __init__(
        self,
        dependencies: ListIntegrationPolicyAddonsResponseBodyAddonsEnvironmentsDependencies = None,
        description: str = None,
        enable: bool = None,
        label: str = None,
        name: str = None,
        policies: ListIntegrationPolicyAddonsResponseBodyAddonsEnvironmentsPolicies = None,
    ):
        self.dependencies = dependencies
        self.description = description
        self.enable = enable
        self.label = label
        self.name = name
        self.policies = policies

    def validate(self):
        if self.dependencies:
            self.dependencies.validate()
        if self.policies:
            self.policies.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.dependencies is not None:
            result['dependencies'] = self.dependencies.to_map()
        if self.description is not None:
            result['description'] = self.description
        if self.enable is not None:
            result['enable'] = self.enable
        if self.label is not None:
            result['label'] = self.label
        if self.name is not None:
            result['name'] = self.name
        if self.policies is not None:
            result['policies'] = self.policies.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dependencies') is not None:
            temp_model = ListIntegrationPolicyAddonsResponseBodyAddonsEnvironmentsDependencies()
            self.dependencies = temp_model.from_map(m['dependencies'])
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('label') is not None:
            self.label = m.get('label')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('policies') is not None:
            temp_model = ListIntegrationPolicyAddonsResponseBodyAddonsEnvironmentsPolicies()
            self.policies = temp_model.from_map(m['policies'])
        return self


class ListIntegrationPolicyAddonsResponseBodyAddons(TeaModel):
    def __init__(
        self,
        alias: str = None,
        categories: List[str] = None,
        dashboards: List[ListIntegrationPolicyAddonsResponseBodyAddonsDashboards] = None,
        description: str = None,
        environments: List[ListIntegrationPolicyAddonsResponseBodyAddonsEnvironments] = None,
        icon: str = None,
        keywords: List[str] = None,
        language: str = None,
        latest_release_create_time: str = None,
        name: str = None,
        once: bool = None,
        scene: str = None,
        version: str = None,
        weight: int = None,
    ):
        self.alias = alias
        self.categories = categories
        self.dashboards = dashboards
        self.description = description
        self.environments = environments
        self.icon = icon
        self.keywords = keywords
        self.language = language
        self.latest_release_create_time = latest_release_create_time
        self.name = name
        self.once = once
        self.scene = scene
        self.version = version
        self.weight = weight

    def validate(self):
        if self.dashboards:
            for k in self.dashboards:
                if k:
                    k.validate()
        if self.environments:
            for k in self.environments:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alias is not None:
            result['alias'] = self.alias
        if self.categories is not None:
            result['categories'] = self.categories
        result['dashboards'] = []
        if self.dashboards is not None:
            for k in self.dashboards:
                result['dashboards'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        result['environments'] = []
        if self.environments is not None:
            for k in self.environments:
                result['environments'].append(k.to_map() if k else None)
        if self.icon is not None:
            result['icon'] = self.icon
        if self.keywords is not None:
            result['keywords'] = self.keywords
        if self.language is not None:
            result['language'] = self.language
        if self.latest_release_create_time is not None:
            result['latestReleaseCreateTime'] = self.latest_release_create_time
        if self.name is not None:
            result['name'] = self.name
        if self.once is not None:
            result['once'] = self.once
        if self.scene is not None:
            result['scene'] = self.scene
        if self.version is not None:
            result['version'] = self.version
        if self.weight is not None:
            result['weight'] = self.weight
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alias') is not None:
            self.alias = m.get('alias')
        if m.get('categories') is not None:
            self.categories = m.get('categories')
        self.dashboards = []
        if m.get('dashboards') is not None:
            for k in m.get('dashboards'):
                temp_model = ListIntegrationPolicyAddonsResponseBodyAddonsDashboards()
                self.dashboards.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        self.environments = []
        if m.get('environments') is not None:
            for k in m.get('environments'):
                temp_model = ListIntegrationPolicyAddonsResponseBodyAddonsEnvironments()
                self.environments.append(temp_model.from_map(k))
        if m.get('icon') is not None:
            self.icon = m.get('icon')
        if m.get('keywords') is not None:
            self.keywords = m.get('keywords')
        if m.get('language') is not None:
            self.language = m.get('language')
        if m.get('latestReleaseCreateTime') is not None:
            self.latest_release_create_time = m.get('latestReleaseCreateTime')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('once') is not None:
            self.once = m.get('once')
        if m.get('scene') is not None:
            self.scene = m.get('scene')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class ListIntegrationPolicyAddonsResponseBody(TeaModel):
    def __init__(
        self,
        addons: List[ListIntegrationPolicyAddonsResponseBodyAddons] = None,
        request_id: str = None,
        total: int = None,
    ):
        self.addons = addons
        # Id of the request
        self.request_id = request_id
        self.total = total

    def validate(self):
        if self.addons:
            for k in self.addons:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['addons'] = []
        if self.addons is not None:
            for k in self.addons:
                result['addons'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.addons = []
        if m.get('addons') is not None:
            for k in m.get('addons'):
                temp_model = ListIntegrationPolicyAddonsResponseBodyAddons()
                self.addons.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListIntegrationPolicyAddonsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListIntegrationPolicyAddonsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListIntegrationPolicyAddonsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIntegrationPolicyAlertRulesRequest(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        scene: str = None,
    ):
        self.addon_name = addon_name
        self.scene = scene

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.scene is not None:
            result['scene'] = self.scene
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('scene') is not None:
            self.scene = m.get('scene')
        return self


class ListIntegrationPolicyAlertRulesResponseBodyRules(TeaModel):
    def __init__(
        self,
        alert_id: int = None,
        group: str = None,
        name: str = None,
        uuid: str = None,
    ):
        self.alert_id = alert_id
        self.group = group
        self.name = name
        self.uuid = uuid

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_id is not None:
            result['alertId'] = self.alert_id
        if self.group is not None:
            result['group'] = self.group
        if self.name is not None:
            result['name'] = self.name
        if self.uuid is not None:
            result['uuid'] = self.uuid
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertId') is not None:
            self.alert_id = m.get('alertId')
        if m.get('group') is not None:
            self.group = m.get('group')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('uuid') is not None:
            self.uuid = m.get('uuid')
        return self


class ListIntegrationPolicyAlertRulesResponseBody(TeaModel):
    def __init__(
        self,
        groups: List[str] = None,
        request_id: str = None,
        rules: List[ListIntegrationPolicyAlertRulesResponseBodyRules] = None,
        total: int = None,
    ):
        self.groups = groups
        # Id of the request
        self.request_id = request_id
        self.rules = rules
        self.total = total

    def validate(self):
        if self.rules:
            for k in self.rules:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.groups is not None:
            result['groups'] = self.groups
        if self.request_id is not None:
            result['requestId'] = self.request_id
        result['rules'] = []
        if self.rules is not None:
            for k in self.rules:
                result['rules'].append(k.to_map() if k else None)
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('groups') is not None:
            self.groups = m.get('groups')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        self.rules = []
        if m.get('rules') is not None:
            for k in m.get('rules'):
                temp_model = ListIntegrationPolicyAlertRulesResponseBodyRules()
                self.rules.append(temp_model.from_map(k))
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListIntegrationPolicyAlertRulesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListIntegrationPolicyAlertRulesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListIntegrationPolicyAlertRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIntegrationPolicyCollectorsRequest(TeaModel):
    def __init__(
        self,
        addon_release_name: str = None,
        collector_type: str = None,
        language: str = None,
    ):
        self.addon_release_name = addon_release_name
        # This parameter is required.
        self.collector_type = collector_type
        self.language = language

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_release_name is not None:
            result['addonReleaseName'] = self.addon_release_name
        if self.collector_type is not None:
            result['collectorType'] = self.collector_type
        if self.language is not None:
            result['language'] = self.language
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonReleaseName') is not None:
            self.addon_release_name = m.get('addonReleaseName')
        if m.get('collectorType') is not None:
            self.collector_type = m.get('collectorType')
        if m.get('language') is not None:
            self.language = m.get('language')
        return self


class ListIntegrationPolicyCollectorsResponseBodyCollectorsConditions(TeaModel):
    def __init__(
        self,
        first_transition_time: str = None,
        last_transition_time: str = None,
        message: str = None,
        reason: str = None,
        status: str = None,
        type: str = None,
    ):
        self.first_transition_time = first_transition_time
        self.last_transition_time = last_transition_time
        self.message = message
        self.reason = reason
        self.status = status
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.first_transition_time is not None:
            result['firstTransitionTime'] = self.first_transition_time
        if self.last_transition_time is not None:
            result['lastTransitionTime'] = self.last_transition_time
        if self.message is not None:
            result['message'] = self.message
        if self.reason is not None:
            result['reason'] = self.reason
        if self.status is not None:
            result['status'] = self.status
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('firstTransitionTime') is not None:
            self.first_transition_time = m.get('firstTransitionTime')
        if m.get('lastTransitionTime') is not None:
            self.last_transition_time = m.get('lastTransitionTime')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('reason') is not None:
            self.reason = m.get('reason')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ListIntegrationPolicyCollectorsResponseBodyCollectorsWorkloadsManagedInfo(TeaModel):
    def __init__(
        self,
        security_group_id: str = None,
        vswitch_id: str = None,
    ):
        self.security_group_id = security_group_id
        self.vswitch_id = vswitch_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.security_group_id is not None:
            result['securityGroupId'] = self.security_group_id
        if self.vswitch_id is not None:
            result['vswitchId'] = self.vswitch_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('securityGroupId') is not None:
            self.security_group_id = m.get('securityGroupId')
        if m.get('vswitchId') is not None:
            self.vswitch_id = m.get('vswitchId')
        return self


class ListIntegrationPolicyCollectorsResponseBodyCollectorsWorkloads(TeaModel):
    def __init__(
        self,
        host_ip: str = None,
        ip: str = None,
        managed: bool = None,
        managed_info: ListIntegrationPolicyCollectorsResponseBodyCollectorsWorkloadsManagedInfo = None,
        message: str = None,
        name: str = None,
        namespace: str = None,
        owner_reference_kind: str = None,
        owner_reference_name: str = None,
        start_time: str = None,
        status: str = None,
        version: str = None,
    ):
        self.host_ip = host_ip
        self.ip = ip
        self.managed = managed
        self.managed_info = managed_info
        self.message = message
        self.name = name
        self.namespace = namespace
        self.owner_reference_kind = owner_reference_kind
        self.owner_reference_name = owner_reference_name
        self.start_time = start_time
        self.status = status
        self.version = version

    def validate(self):
        if self.managed_info:
            self.managed_info.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.host_ip is not None:
            result['hostIp'] = self.host_ip
        if self.ip is not None:
            result['ip'] = self.ip
        if self.managed is not None:
            result['managed'] = self.managed
        if self.managed_info is not None:
            result['managedInfo'] = self.managed_info.to_map()
        if self.message is not None:
            result['message'] = self.message
        if self.name is not None:
            result['name'] = self.name
        if self.namespace is not None:
            result['namespace'] = self.namespace
        if self.owner_reference_kind is not None:
            result['ownerReferenceKind'] = self.owner_reference_kind
        if self.owner_reference_name is not None:
            result['ownerReferenceName'] = self.owner_reference_name
        if self.start_time is not None:
            result['startTime'] = self.start_time
        if self.status is not None:
            result['status'] = self.status
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('hostIp') is not None:
            self.host_ip = m.get('hostIp')
        if m.get('ip') is not None:
            self.ip = m.get('ip')
        if m.get('managed') is not None:
            self.managed = m.get('managed')
        if m.get('managedInfo') is not None:
            temp_model = ListIntegrationPolicyCollectorsResponseBodyCollectorsWorkloadsManagedInfo()
            self.managed_info = temp_model.from_map(m['managedInfo'])
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        if m.get('ownerReferenceKind') is not None:
            self.owner_reference_kind = m.get('ownerReferenceKind')
        if m.get('ownerReferenceName') is not None:
            self.owner_reference_name = m.get('ownerReferenceName')
        if m.get('startTime') is not None:
            self.start_time = m.get('startTime')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class ListIntegrationPolicyCollectorsResponseBodyCollectors(TeaModel):
    def __init__(
        self,
        addon_meta: AddonMeta = None,
        collector_name: str = None,
        collector_type: str = None,
        conditions: List[ListIntegrationPolicyCollectorsResponseBodyCollectorsConditions] = None,
        managed: bool = None,
        release_name: str = None,
        state: str = None,
        version: str = None,
        workloads: List[ListIntegrationPolicyCollectorsResponseBodyCollectorsWorkloads] = None,
    ):
        self.addon_meta = addon_meta
        self.collector_name = collector_name
        self.collector_type = collector_type
        self.conditions = conditions
        self.managed = managed
        self.release_name = release_name
        self.state = state
        self.version = version
        self.workloads = workloads

    def validate(self):
        if self.addon_meta:
            self.addon_meta.validate()
        if self.conditions:
            for k in self.conditions:
                if k:
                    k.validate()
        if self.workloads:
            for k in self.workloads:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_meta is not None:
            result['addonMeta'] = self.addon_meta.to_map()
        if self.collector_name is not None:
            result['collectorName'] = self.collector_name
        if self.collector_type is not None:
            result['collectorType'] = self.collector_type
        result['conditions'] = []
        if self.conditions is not None:
            for k in self.conditions:
                result['conditions'].append(k.to_map() if k else None)
        if self.managed is not None:
            result['managed'] = self.managed
        if self.release_name is not None:
            result['releaseName'] = self.release_name
        if self.state is not None:
            result['state'] = self.state
        if self.version is not None:
            result['version'] = self.version
        result['workloads'] = []
        if self.workloads is not None:
            for k in self.workloads:
                result['workloads'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonMeta') is not None:
            temp_model = AddonMeta()
            self.addon_meta = temp_model.from_map(m['addonMeta'])
        if m.get('collectorName') is not None:
            self.collector_name = m.get('collectorName')
        if m.get('collectorType') is not None:
            self.collector_type = m.get('collectorType')
        self.conditions = []
        if m.get('conditions') is not None:
            for k in m.get('conditions'):
                temp_model = ListIntegrationPolicyCollectorsResponseBodyCollectorsConditions()
                self.conditions.append(temp_model.from_map(k))
        if m.get('managed') is not None:
            self.managed = m.get('managed')
        if m.get('releaseName') is not None:
            self.release_name = m.get('releaseName')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('version') is not None:
            self.version = m.get('version')
        self.workloads = []
        if m.get('workloads') is not None:
            for k in m.get('workloads'):
                temp_model = ListIntegrationPolicyCollectorsResponseBodyCollectorsWorkloads()
                self.workloads.append(temp_model.from_map(k))
        return self


class ListIntegrationPolicyCollectorsResponseBody(TeaModel):
    def __init__(
        self,
        collectors: List[ListIntegrationPolicyCollectorsResponseBodyCollectors] = None,
        request_id: str = None,
    ):
        self.collectors = collectors
        self.request_id = request_id

    def validate(self):
        if self.collectors:
            for k in self.collectors:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['collectors'] = []
        if self.collectors is not None:
            for k in self.collectors:
                result['collectors'].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: dict = None):
        m = m or dict()
        self.collectors = []
        if m.get('collectors') is not None:
            for k in m.get('collectors'):
                temp_model = ListIntegrationPolicyCollectorsResponseBodyCollectors()
                self.collectors.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListIntegrationPolicyCollectorsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListIntegrationPolicyCollectorsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListIntegrationPolicyCollectorsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIntegrationPolicyCustomScrapeJobRulesRequest(TeaModel):
    def __init__(
        self,
        addon_release_name: str = None,
        encrypt_yaml: bool = None,
        namespace: str = None,
    ):
        # Addon Release name.
        self.addon_release_name = addon_release_name
        # Whether to encrypt Yaml.
        self.encrypt_yaml = encrypt_yaml
        # Namespace.
        self.namespace = namespace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_release_name is not None:
            result['addonReleaseName'] = self.addon_release_name
        if self.encrypt_yaml is not None:
            result['encryptYaml'] = self.encrypt_yaml
        if self.namespace is not None:
            result['namespace'] = self.namespace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonReleaseName') is not None:
            self.addon_release_name = m.get('addonReleaseName')
        if m.get('encryptYaml') is not None:
            self.encrypt_yaml = m.get('encryptYaml')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        return self


class ListIntegrationPolicyCustomScrapeJobRulesResponseBodyCustomScrapeJobRulesScrapeConfigs(TeaModel):
    def __init__(
        self,
        job_name: str = None,
        message: str = None,
        metrics_path: str = None,
        scheme: str = None,
        scrape_interval: str = None,
        scrape_timeout: str = None,
        service_discovery_configs: List[str] = None,
    ):
        # Scraping job name
        self.job_name = job_name
        # Detailed information.
        self.message = message
        # Metrics path
        self.metrics_path = metrics_path
        # Call method.
        self.scheme = scheme
        # Scrape interval
        self.scrape_interval = scrape_interval
        # Scrape timeout
        self.scrape_timeout = scrape_timeout
        # Service discovery configuration
        self.service_discovery_configs = service_discovery_configs

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.job_name is not None:
            result['jobName'] = self.job_name
        if self.message is not None:
            result['message'] = self.message
        if self.metrics_path is not None:
            result['metricsPath'] = self.metrics_path
        if self.scheme is not None:
            result['scheme'] = self.scheme
        if self.scrape_interval is not None:
            result['scrapeInterval'] = self.scrape_interval
        if self.scrape_timeout is not None:
            result['scrapeTimeout'] = self.scrape_timeout
        if self.service_discovery_configs is not None:
            result['serviceDiscoveryConfigs'] = self.service_discovery_configs
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('jobName') is not None:
            self.job_name = m.get('jobName')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('metricsPath') is not None:
            self.metrics_path = m.get('metricsPath')
        if m.get('scheme') is not None:
            self.scheme = m.get('scheme')
        if m.get('scrapeInterval') is not None:
            self.scrape_interval = m.get('scrapeInterval')
        if m.get('scrapeTimeout') is not None:
            self.scrape_timeout = m.get('scrapeTimeout')
        if m.get('serviceDiscoveryConfigs') is not None:
            self.service_discovery_configs = m.get('serviceDiscoveryConfigs')
        return self


class ListIntegrationPolicyCustomScrapeJobRulesResponseBodyCustomScrapeJobRules(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        addon_release_name: str = None,
        addon_version: str = None,
        config_yaml: str = None,
        enable_status: str = None,
        encrypt_yaml: bool = None,
        matched_pod_count: int = None,
        message: str = None,
        name: str = None,
        namespace: str = None,
        scrape_configs: List[ListIntegrationPolicyCustomScrapeJobRulesResponseBodyCustomScrapeJobRulesScrapeConfigs] = None,
    ):
        # Addon name.
        self.addon_name = addon_name
        # Addon Release name
        self.addon_release_name = addon_release_name
        # Addon version
        self.addon_version = addon_version
        # Configuration yaml
        self.config_yaml = config_yaml
        # Enable status
        self.enable_status = enable_status
        # Encrypt yaml
        self.encrypt_yaml = encrypt_yaml
        # Matched pod count
        self.matched_pod_count = matched_pod_count
        # Detailed information.
        self.message = message
        # Service name.
        self.name = name
        # Namespace
        self.namespace = namespace
        # Custom configurations
        self.scrape_configs = scrape_configs

    def validate(self):
        if self.scrape_configs:
            for k in self.scrape_configs:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.addon_release_name is not None:
            result['addonReleaseName'] = self.addon_release_name
        if self.addon_version is not None:
            result['addonVersion'] = self.addon_version
        if self.config_yaml is not None:
            result['configYaml'] = self.config_yaml
        if self.enable_status is not None:
            result['enableStatus'] = self.enable_status
        if self.encrypt_yaml is not None:
            result['encryptYaml'] = self.encrypt_yaml
        if self.matched_pod_count is not None:
            result['matchedPodCount'] = self.matched_pod_count
        if self.message is not None:
            result['message'] = self.message
        if self.name is not None:
            result['name'] = self.name
        if self.namespace is not None:
            result['namespace'] = self.namespace
        result['scrapeConfigs'] = []
        if self.scrape_configs is not None:
            for k in self.scrape_configs:
                result['scrapeConfigs'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('addonReleaseName') is not None:
            self.addon_release_name = m.get('addonReleaseName')
        if m.get('addonVersion') is not None:
            self.addon_version = m.get('addonVersion')
        if m.get('configYaml') is not None:
            self.config_yaml = m.get('configYaml')
        if m.get('enableStatus') is not None:
            self.enable_status = m.get('enableStatus')
        if m.get('encryptYaml') is not None:
            self.encrypt_yaml = m.get('encryptYaml')
        if m.get('matchedPodCount') is not None:
            self.matched_pod_count = m.get('matchedPodCount')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        self.scrape_configs = []
        if m.get('scrapeConfigs') is not None:
            for k in m.get('scrapeConfigs'):
                temp_model = ListIntegrationPolicyCustomScrapeJobRulesResponseBodyCustomScrapeJobRulesScrapeConfigs()
                self.scrape_configs.append(temp_model.from_map(k))
        return self


class ListIntegrationPolicyCustomScrapeJobRulesResponseBody(TeaModel):
    def __init__(
        self,
        cluster_id: str = None,
        custom_scrape_job_rules: List[ListIntegrationPolicyCustomScrapeJobRulesResponseBodyCustomScrapeJobRules] = None,
        policy_id: str = None,
        request_id: str = None,
    ):
        # Cluster ID.
        self.cluster_id = cluster_id
        # Custom scraping job rules
        self.custom_scrape_job_rules = custom_scrape_job_rules
        # Policy ID.
        self.policy_id = policy_id
        # ID of the request
        self.request_id = request_id

    def validate(self):
        if self.custom_scrape_job_rules:
            for k in self.custom_scrape_job_rules:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.cluster_id is not None:
            result['clusterId'] = self.cluster_id
        result['customScrapeJobRules'] = []
        if self.custom_scrape_job_rules is not None:
            for k in self.custom_scrape_job_rules:
                result['customScrapeJobRules'].append(k.to_map() if k else None)
        if self.policy_id is not None:
            result['policyId'] = self.policy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clusterId') is not None:
            self.cluster_id = m.get('clusterId')
        self.custom_scrape_job_rules = []
        if m.get('customScrapeJobRules') is not None:
            for k in m.get('customScrapeJobRules'):
                temp_model = ListIntegrationPolicyCustomScrapeJobRulesResponseBodyCustomScrapeJobRules()
                self.custom_scrape_job_rules.append(temp_model.from_map(k))
        if m.get('policyId') is not None:
            self.policy_id = m.get('policyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListIntegrationPolicyCustomScrapeJobRulesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListIntegrationPolicyCustomScrapeJobRulesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListIntegrationPolicyCustomScrapeJobRulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIntegrationPolicyDashboardsRequest(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        language: str = None,
        scene: str = None,
    ):
        # Addon Name.
        self.addon_name = addon_name
        # Query Language
        self.language = language
        # Component Scenario.
        self.scene = scene

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.language is not None:
            result['language'] = self.language
        if self.scene is not None:
            result['scene'] = self.scene
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('language') is not None:
            self.language = m.get('language')
        if m.get('scene') is not None:
            self.scene = m.get('scene')
        return self


class ListIntegrationPolicyDashboardsResponseBodyDashboards(TeaModel):
    def __init__(
        self,
        engine: str = None,
        folder_uid: str = None,
        name: str = None,
        region: str = None,
        tags: List[str] = None,
        title: str = None,
        uid: str = None,
        url: str = None,
    ):
        # Dashboard engine:
        # grafana: shared grafana.
        # cms: cms self-developed dashboard engine.
        self.engine = engine
        # UID of the dashboard folder.
        self.folder_uid = folder_uid
        # Dashboard name
        self.name = name
        # Region
        self.region = region
        # List of tags.
        self.tags = tags
        # Title of the UI module (not name)
        self.title = title
        # ID of the current Alibaba Cloud primary account, read-only
        self.uid = uid
        # pagerDuty integration webhook. Supports V1 and V2 versions
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.engine is not None:
            result['engine'] = self.engine
        if self.folder_uid is not None:
            result['folderUid'] = self.folder_uid
        if self.name is not None:
            result['name'] = self.name
        if self.region is not None:
            result['region'] = self.region
        if self.tags is not None:
            result['tags'] = self.tags
        if self.title is not None:
            result['title'] = self.title
        if self.uid is not None:
            result['uid'] = self.uid
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('engine') is not None:
            self.engine = m.get('engine')
        if m.get('folderUid') is not None:
            self.folder_uid = m.get('folderUid')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('tags') is not None:
            self.tags = m.get('tags')
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('uid') is not None:
            self.uid = m.get('uid')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class ListIntegrationPolicyDashboardsResponseBody(TeaModel):
    def __init__(
        self,
        dashboards: List[ListIntegrationPolicyDashboardsResponseBodyDashboards] = None,
        request_id: str = None,
        total: int = None,
    ):
        # List of dashboards.
        self.dashboards = dashboards
        # ID of the request
        self.request_id = request_id
        # Number of components.
        self.total = total

    def validate(self):
        if self.dashboards:
            for k in self.dashboards:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['dashboards'] = []
        if self.dashboards is not None:
            for k in self.dashboards:
                result['dashboards'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.dashboards = []
        if m.get('dashboards') is not None:
            for k in m.get('dashboards'):
                temp_model = ListIntegrationPolicyDashboardsResponseBodyDashboards()
                self.dashboards.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListIntegrationPolicyDashboardsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListIntegrationPolicyDashboardsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListIntegrationPolicyDashboardsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIntegrationPolicyPodMonitorsRequest(TeaModel):
    def __init__(
        self,
        addon_release_name: str = None,
        encrypt_yaml: bool = None,
        namespace: str = None,
    ):
        # Addon Release name.
        self.addon_release_name = addon_release_name
        # Whether to encrypt Yaml.
        self.encrypt_yaml = encrypt_yaml
        # Namespace.
        self.namespace = namespace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_release_name is not None:
            result['addonReleaseName'] = self.addon_release_name
        if self.encrypt_yaml is not None:
            result['encryptYaml'] = self.encrypt_yaml
        if self.namespace is not None:
            result['namespace'] = self.namespace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonReleaseName') is not None:
            self.addon_release_name = m.get('addonReleaseName')
        if m.get('encryptYaml') is not None:
            self.encrypt_yaml = m.get('encryptYaml')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        return self


class ListIntegrationPolicyPodMonitorsResponseBodyPodMonitorsEndpoints(TeaModel):
    def __init__(
        self,
        interval: str = None,
        matched_target_count: int = None,
        path: str = None,
        port: str = None,
        target_port: str = None,
    ):
        # Collection interval
        self.interval = interval
        # Number of matched targets
        self.matched_target_count = matched_target_count
        # Metric collection path
        self.path = path
        # Port number
        self.port = port
        # Target port
        self.target_port = target_port

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.interval is not None:
            result['interval'] = self.interval
        if self.matched_target_count is not None:
            result['matchedTargetCount'] = self.matched_target_count
        if self.path is not None:
            result['path'] = self.path
        if self.port is not None:
            result['port'] = self.port
        if self.target_port is not None:
            result['targetPort'] = self.target_port
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('matchedTargetCount') is not None:
            self.matched_target_count = m.get('matchedTargetCount')
        if m.get('path') is not None:
            self.path = m.get('path')
        if m.get('port') is not None:
            self.port = m.get('port')
        if m.get('targetPort') is not None:
            self.target_port = m.get('targetPort')
        return self


class ListIntegrationPolicyPodMonitorsResponseBodyPodMonitors(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        addon_release_name: str = None,
        addon_version: str = None,
        config_yaml: str = None,
        enable_status: str = None,
        encrypt_yaml: bool = None,
        endpoints: List[ListIntegrationPolicyPodMonitorsResponseBodyPodMonitorsEndpoints] = None,
        matched_pod_count: int = None,
        name: str = None,
        namespace: str = None,
    ):
        # Addon name.
        self.addon_name = addon_name
        # Addon Release name.
        self.addon_release_name = addon_release_name
        # Addon version.
        self.addon_version = addon_version
        # Configuration yaml.
        self.config_yaml = config_yaml
        # Enable status.
        self.enable_status = enable_status
        # Encrypt yaml.
        self.encrypt_yaml = encrypt_yaml
        # Instance endpoints.
        self.endpoints = endpoints
        # Number of matched pods
        self.matched_pod_count = matched_pod_count
        # Collection name.
        self.name = name
        # Namespace
        self.namespace = namespace

    def validate(self):
        if self.endpoints:
            for k in self.endpoints:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.addon_release_name is not None:
            result['addonReleaseName'] = self.addon_release_name
        if self.addon_version is not None:
            result['addonVersion'] = self.addon_version
        if self.config_yaml is not None:
            result['configYaml'] = self.config_yaml
        if self.enable_status is not None:
            result['enableStatus'] = self.enable_status
        if self.encrypt_yaml is not None:
            result['encryptYaml'] = self.encrypt_yaml
        result['endpoints'] = []
        if self.endpoints is not None:
            for k in self.endpoints:
                result['endpoints'].append(k.to_map() if k else None)
        if self.matched_pod_count is not None:
            result['matchedPodCount'] = self.matched_pod_count
        if self.name is not None:
            result['name'] = self.name
        if self.namespace is not None:
            result['namespace'] = self.namespace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('addonReleaseName') is not None:
            self.addon_release_name = m.get('addonReleaseName')
        if m.get('addonVersion') is not None:
            self.addon_version = m.get('addonVersion')
        if m.get('configYaml') is not None:
            self.config_yaml = m.get('configYaml')
        if m.get('enableStatus') is not None:
            self.enable_status = m.get('enableStatus')
        if m.get('encryptYaml') is not None:
            self.encrypt_yaml = m.get('encryptYaml')
        self.endpoints = []
        if m.get('endpoints') is not None:
            for k in m.get('endpoints'):
                temp_model = ListIntegrationPolicyPodMonitorsResponseBodyPodMonitorsEndpoints()
                self.endpoints.append(temp_model.from_map(k))
        if m.get('matchedPodCount') is not None:
            self.matched_pod_count = m.get('matchedPodCount')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        return self


class ListIntegrationPolicyPodMonitorsResponseBody(TeaModel):
    def __init__(
        self,
        cluster_id: str = None,
        pod_monitors: List[ListIntegrationPolicyPodMonitorsResponseBodyPodMonitors] = None,
        policy_id: str = None,
        request_id: str = None,
    ):
        # Cluster ID.
        self.cluster_id = cluster_id
        # PodMonitor list
        self.pod_monitors = pod_monitors
        # Policy ID.
        self.policy_id = policy_id
        # ID of the request
        self.request_id = request_id

    def validate(self):
        if self.pod_monitors:
            for k in self.pod_monitors:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.cluster_id is not None:
            result['clusterId'] = self.cluster_id
        result['podMonitors'] = []
        if self.pod_monitors is not None:
            for k in self.pod_monitors:
                result['podMonitors'].append(k.to_map() if k else None)
        if self.policy_id is not None:
            result['policyId'] = self.policy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clusterId') is not None:
            self.cluster_id = m.get('clusterId')
        self.pod_monitors = []
        if m.get('podMonitors') is not None:
            for k in m.get('podMonitors'):
                temp_model = ListIntegrationPolicyPodMonitorsResponseBodyPodMonitors()
                self.pod_monitors.append(temp_model.from_map(k))
        if m.get('policyId') is not None:
            self.policy_id = m.get('policyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListIntegrationPolicyPodMonitorsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListIntegrationPolicyPodMonitorsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListIntegrationPolicyPodMonitorsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIntegrationPolicyResourcesRequest(TeaModel):
    def __init__(
        self,
        kind: str = None,
        label_selectors: Dict[str, str] = None,
        namespace: str = None,
    ):
        self.kind = kind
        self.label_selectors = label_selectors
        self.namespace = namespace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.kind is not None:
            result['kind'] = self.kind
        if self.label_selectors is not None:
            result['labelSelectors'] = self.label_selectors
        if self.namespace is not None:
            result['namespace'] = self.namespace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('kind') is not None:
            self.kind = m.get('kind')
        if m.get('labelSelectors') is not None:
            self.label_selectors = m.get('labelSelectors')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        return self


class ListIntegrationPolicyResourcesShrinkRequest(TeaModel):
    def __init__(
        self,
        kind: str = None,
        label_selectors_shrink: str = None,
        namespace: str = None,
    ):
        self.kind = kind
        self.label_selectors_shrink = label_selectors_shrink
        self.namespace = namespace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.kind is not None:
            result['kind'] = self.kind
        if self.label_selectors_shrink is not None:
            result['labelSelectors'] = self.label_selectors_shrink
        if self.namespace is not None:
            result['namespace'] = self.namespace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('kind') is not None:
            self.kind = m.get('kind')
        if m.get('labelSelectors') is not None:
            self.label_selectors_shrink = m.get('labelSelectors')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        return self


class ListIntegrationPolicyResourcesResponseBodyResourcesMetadata(TeaModel):
    def __init__(
        self,
        annotations: Dict[str, str] = None,
        labels: Dict[str, str] = None,
        name: str = None,
        namespace: str = None,
    ):
        self.annotations = annotations
        self.labels = labels
        self.name = name
        self.namespace = namespace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.annotations is not None:
            result['annotations'] = self.annotations
        if self.labels is not None:
            result['labels'] = self.labels
        if self.name is not None:
            result['name'] = self.name
        if self.namespace is not None:
            result['namespace'] = self.namespace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('annotations') is not None:
            self.annotations = m.get('annotations')
        if m.get('labels') is not None:
            self.labels = m.get('labels')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        return self


class ListIntegrationPolicyResourcesResponseBodyResources(TeaModel):
    def __init__(
        self,
        api_version: str = None,
        kind: str = None,
        metadata: ListIntegrationPolicyResourcesResponseBodyResourcesMetadata = None,
        spec: Any = None,
        status: Any = None,
    ):
        self.api_version = api_version
        self.kind = kind
        self.metadata = metadata
        self.spec = spec
        self.status = status

    def validate(self):
        if self.metadata:
            self.metadata.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.api_version is not None:
            result['apiVersion'] = self.api_version
        if self.kind is not None:
            result['kind'] = self.kind
        if self.metadata is not None:
            result['metadata'] = self.metadata.to_map()
        if self.spec is not None:
            result['spec'] = self.spec
        if self.status is not None:
            result['status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('apiVersion') is not None:
            self.api_version = m.get('apiVersion')
        if m.get('kind') is not None:
            self.kind = m.get('kind')
        if m.get('metadata') is not None:
            temp_model = ListIntegrationPolicyResourcesResponseBodyResourcesMetadata()
            self.metadata = temp_model.from_map(m['metadata'])
        if m.get('spec') is not None:
            self.spec = m.get('spec')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class ListIntegrationPolicyResourcesResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        resources: List[ListIntegrationPolicyResourcesResponseBodyResources] = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.resources = resources

    def validate(self):
        if self.resources:
            for k in self.resources:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.request_id is not None:
            result['requestId'] = self.request_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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        self.resources = []
        if m.get('resources') is not None:
            for k in m.get('resources'):
                temp_model = ListIntegrationPolicyResourcesResponseBodyResources()
                self.resources.append(temp_model.from_map(k))
        return self


class ListIntegrationPolicyResourcesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListIntegrationPolicyResourcesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListIntegrationPolicyResourcesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIntegrationPolicyServiceMonitorsRequest(TeaModel):
    def __init__(
        self,
        addon_release_name: str = None,
        encrypt_yaml: bool = None,
        namespace: str = None,
    ):
        self.addon_release_name = addon_release_name
        self.encrypt_yaml = encrypt_yaml
        self.namespace = namespace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_release_name is not None:
            result['addonReleaseName'] = self.addon_release_name
        if self.encrypt_yaml is not None:
            result['encryptYaml'] = self.encrypt_yaml
        if self.namespace is not None:
            result['namespace'] = self.namespace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonReleaseName') is not None:
            self.addon_release_name = m.get('addonReleaseName')
        if m.get('encryptYaml') is not None:
            self.encrypt_yaml = m.get('encryptYaml')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        return self


class ListIntegrationPolicyServiceMonitorsResponseBodyServiceMonitorsEndpoints(TeaModel):
    def __init__(
        self,
        interval: str = None,
        matched_target_count: int = None,
        path: str = None,
        port: str = None,
        target_port: str = None,
    ):
        self.interval = interval
        self.matched_target_count = matched_target_count
        self.path = path
        self.port = port
        self.target_port = target_port

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.interval is not None:
            result['interval'] = self.interval
        if self.matched_target_count is not None:
            result['matchedTargetCount'] = self.matched_target_count
        if self.path is not None:
            result['path'] = self.path
        if self.port is not None:
            result['port'] = self.port
        if self.target_port is not None:
            result['targetPort'] = self.target_port
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('matchedTargetCount') is not None:
            self.matched_target_count = m.get('matchedTargetCount')
        if m.get('path') is not None:
            self.path = m.get('path')
        if m.get('port') is not None:
            self.port = m.get('port')
        if m.get('targetPort') is not None:
            self.target_port = m.get('targetPort')
        return self


class ListIntegrationPolicyServiceMonitorsResponseBodyServiceMonitors(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        addon_release_name: str = None,
        addon_version: str = None,
        config_yaml: str = None,
        enable_status: str = None,
        encrypt_yaml: bool = None,
        endpoints: List[ListIntegrationPolicyServiceMonitorsResponseBodyServiceMonitorsEndpoints] = None,
        matched_service_count: int = None,
        name: str = None,
        namespace: str = None,
    ):
        self.addon_name = addon_name
        self.addon_release_name = addon_release_name
        self.addon_version = addon_version
        self.config_yaml = config_yaml
        self.enable_status = enable_status
        self.encrypt_yaml = encrypt_yaml
        self.endpoints = endpoints
        self.matched_service_count = matched_service_count
        self.name = name
        self.namespace = namespace

    def validate(self):
        if self.endpoints:
            for k in self.endpoints:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.addon_release_name is not None:
            result['addonReleaseName'] = self.addon_release_name
        if self.addon_version is not None:
            result['addonVersion'] = self.addon_version
        if self.config_yaml is not None:
            result['configYaml'] = self.config_yaml
        if self.enable_status is not None:
            result['enableStatus'] = self.enable_status
        if self.encrypt_yaml is not None:
            result['encryptYaml'] = self.encrypt_yaml
        result['endpoints'] = []
        if self.endpoints is not None:
            for k in self.endpoints:
                result['endpoints'].append(k.to_map() if k else None)
        if self.matched_service_count is not None:
            result['matchedServiceCount'] = self.matched_service_count
        if self.name is not None:
            result['name'] = self.name
        if self.namespace is not None:
            result['namespace'] = self.namespace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('addonReleaseName') is not None:
            self.addon_release_name = m.get('addonReleaseName')
        if m.get('addonVersion') is not None:
            self.addon_version = m.get('addonVersion')
        if m.get('configYaml') is not None:
            self.config_yaml = m.get('configYaml')
        if m.get('enableStatus') is not None:
            self.enable_status = m.get('enableStatus')
        if m.get('encryptYaml') is not None:
            self.encrypt_yaml = m.get('encryptYaml')
        self.endpoints = []
        if m.get('endpoints') is not None:
            for k in m.get('endpoints'):
                temp_model = ListIntegrationPolicyServiceMonitorsResponseBodyServiceMonitorsEndpoints()
                self.endpoints.append(temp_model.from_map(k))
        if m.get('matchedServiceCount') is not None:
            self.matched_service_count = m.get('matchedServiceCount')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        return self


class ListIntegrationPolicyServiceMonitorsResponseBody(TeaModel):
    def __init__(
        self,
        cluster_id: str = None,
        policy_id: str = None,
        request_id: str = None,
        service_monitors: List[ListIntegrationPolicyServiceMonitorsResponseBodyServiceMonitors] = None,
    ):
        self.cluster_id = cluster_id
        self.policy_id = policy_id
        self.request_id = request_id
        self.service_monitors = service_monitors

    def validate(self):
        if self.service_monitors:
            for k in self.service_monitors:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.cluster_id is not None:
            result['clusterId'] = self.cluster_id
        if self.policy_id is not None:
            result['policyId'] = self.policy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        result['serviceMonitors'] = []
        if self.service_monitors is not None:
            for k in self.service_monitors:
                result['serviceMonitors'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clusterId') is not None:
            self.cluster_id = m.get('clusterId')
        if m.get('policyId') is not None:
            self.policy_id = m.get('policyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        self.service_monitors = []
        if m.get('serviceMonitors') is not None:
            for k in m.get('serviceMonitors'):
                temp_model = ListIntegrationPolicyServiceMonitorsResponseBodyServiceMonitors()
                self.service_monitors.append(temp_model.from_map(k))
        return self


class ListIntegrationPolicyServiceMonitorsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListIntegrationPolicyServiceMonitorsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListIntegrationPolicyServiceMonitorsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListIntegrationPolicyStorageRequirementsRequest(TeaModel):
    def __init__(
        self,
        addon_name: str = None,
        addon_release_name: str = None,
        storage_type: str = None,
    ):
        # Addon Release Name
        self.addon_name = addon_name
        # Name of AddonRelease.
        self.addon_release_name = addon_release_name
        # Storage Type, LogStore/Prometheus/TraceStore/EventStore/EntityStore.
        self.storage_type = storage_type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_name is not None:
            result['addonName'] = self.addon_name
        if self.addon_release_name is not None:
            result['addonReleaseName'] = self.addon_release_name
        if self.storage_type is not None:
            result['storageType'] = self.storage_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonName') is not None:
            self.addon_name = m.get('addonName')
        if m.get('addonReleaseName') is not None:
            self.addon_release_name = m.get('addonReleaseName')
        if m.get('storageType') is not None:
            self.storage_type = m.get('storageType')
        return self


class ListIntegrationPolicyStorageRequirementsResponseBodyStorageRequirementsMetadata(TeaModel):
    def __init__(
        self,
        annotations: Dict[str, str] = None,
        labels: Dict[str, str] = None,
        name: str = None,
        namespace: str = None,
    ):
        # Annotations
        self.annotations = annotations
        # Resource labels
        self.labels = labels
        # Resource name
        self.name = name
        # Namespace
        self.namespace = namespace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.annotations is not None:
            result['annotations'] = self.annotations
        if self.labels is not None:
            result['labels'] = self.labels
        if self.name is not None:
            result['name'] = self.name
        if self.namespace is not None:
            result['namespace'] = self.namespace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('annotations') is not None:
            self.annotations = m.get('annotations')
        if m.get('labels') is not None:
            self.labels = m.get('labels')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        return self


class ListIntegrationPolicyStorageRequirementsResponseBodyStorageRequirementsSpec(TeaModel):
    def __init__(
        self,
        entity_id: str = None,
        instance: str = None,
        instance_name: str = None,
        project: str = None,
        region: str = None,
        share_scope: str = None,
        storage_type: str = None,
        system_tags: Dict[str, str] = None,
        tags: Dict[str, str] = None,
        user_id: str = None,
        workspace: str = None,
    ):
        # Instance ID, which can be specified if you need to pinpoint to the instance level. It depends on the data in EntityStore.
        self.entity_id = entity_id
        # Prom Instance ID.
        self.instance = instance
        # Prom instance name
        self.instance_name = instance_name
        # Optional parameter, determined based on the current environment type
        self.project = project
        # Region
        self.region = region
        # Storage sharing scope: Environment | Region | Workspace | Custom
        self.share_scope = share_scope
        # Instance storage type
        self.storage_type = storage_type
        # Tags to be applied to the target storage (injected as system tags)
        self.system_tags = system_tags
        # Tags to be applied to the target storage (injected as regular tags)
        self.tags = tags
        # User ID
        self.user_id = user_id
        # Workspace
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.entity_id is not None:
            result['entityId'] = self.entity_id
        if self.instance is not None:
            result['instance'] = self.instance
        if self.instance_name is not None:
            result['instanceName'] = self.instance_name
        if self.project is not None:
            result['project'] = self.project
        if self.region is not None:
            result['region'] = self.region
        if self.share_scope is not None:
            result['shareScope'] = self.share_scope
        if self.storage_type is not None:
            result['storageType'] = self.storage_type
        if self.system_tags is not None:
            result['systemTags'] = self.system_tags
        if self.tags is not None:
            result['tags'] = self.tags
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('entityId') is not None:
            self.entity_id = m.get('entityId')
        if m.get('instance') is not None:
            self.instance = m.get('instance')
        if m.get('instanceName') is not None:
            self.instance_name = m.get('instanceName')
        if m.get('project') is not None:
            self.project = m.get('project')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('shareScope') is not None:
            self.share_scope = m.get('shareScope')
        if m.get('storageType') is not None:
            self.storage_type = m.get('storageType')
        if m.get('systemTags') is not None:
            self.system_tags = m.get('systemTags')
        if m.get('tags') is not None:
            self.tags = m.get('tags')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListIntegrationPolicyStorageRequirementsResponseBodyStorageRequirementsStatus(TeaModel):
    def __init__(
        self,
        instance_id: str = None,
        inter_url: str = None,
        intra_url: str = None,
        name: str = None,
        project: str = None,
        prom_metric_store: str = None,
        region: str = None,
        storage_type: str = None,
        workspace: str = None,
    ):
        # Instance ID
        self.instance_id = instance_id
        # Internal URL
        self.inter_url = inter_url
        # External URL
        self.intra_url = intra_url
        # 存储需求名称
        self.name = name
        # 存储需求项目
        self.project = project
        # Prom\\"s metric center
        self.prom_metric_store = prom_metric_store
        # Region
        self.region = region
        # Instance storage type
        self.storage_type = storage_type
        # Workspace.
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.instance_id is not None:
            result['instanceId'] = self.instance_id
        if self.inter_url is not None:
            result['interUrl'] = self.inter_url
        if self.intra_url is not None:
            result['intraUrl'] = self.intra_url
        if self.name is not None:
            result['name'] = self.name
        if self.project is not None:
            result['project'] = self.project
        if self.prom_metric_store is not None:
            result['promMetricStore'] = self.prom_metric_store
        if self.region is not None:
            result['region'] = self.region
        if self.storage_type is not None:
            result['storageType'] = self.storage_type
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('instanceId') is not None:
            self.instance_id = m.get('instanceId')
        if m.get('interUrl') is not None:
            self.inter_url = m.get('interUrl')
        if m.get('intraUrl') is not None:
            self.intra_url = m.get('intraUrl')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('project') is not None:
            self.project = m.get('project')
        if m.get('promMetricStore') is not None:
            self.prom_metric_store = m.get('promMetricStore')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('storageType') is not None:
            self.storage_type = m.get('storageType')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListIntegrationPolicyStorageRequirementsResponseBodyStorageRequirements(TeaModel):
    def __init__(
        self,
        addon_release_names: List[str] = None,
        api_version: str = None,
        kind: str = None,
        metadata: ListIntegrationPolicyStorageRequirementsResponseBodyStorageRequirementsMetadata = None,
        spec: ListIntegrationPolicyStorageRequirementsResponseBodyStorageRequirementsSpec = None,
        status: ListIntegrationPolicyStorageRequirementsResponseBodyStorageRequirementsStatus = None,
    ):
        # Collection of AddonReleases.
        self.addon_release_names = addon_release_names
        # API Version
        self.api_version = api_version
        # Resource kind
        self.kind = kind
        # Metadata
        self.metadata = metadata
        # Resource spec
        self.spec = spec
        # Storage requirement status
        self.status = status

    def validate(self):
        if self.metadata:
            self.metadata.validate()
        if self.spec:
            self.spec.validate()
        if self.status:
            self.status.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_release_names is not None:
            result['addonReleaseNames'] = self.addon_release_names
        if self.api_version is not None:
            result['apiVersion'] = self.api_version
        if self.kind is not None:
            result['kind'] = self.kind
        if self.metadata is not None:
            result['metadata'] = self.metadata.to_map()
        if self.spec is not None:
            result['spec'] = self.spec.to_map()
        if self.status is not None:
            result['status'] = self.status.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonReleaseNames') is not None:
            self.addon_release_names = m.get('addonReleaseNames')
        if m.get('apiVersion') is not None:
            self.api_version = m.get('apiVersion')
        if m.get('kind') is not None:
            self.kind = m.get('kind')
        if m.get('metadata') is not None:
            temp_model = ListIntegrationPolicyStorageRequirementsResponseBodyStorageRequirementsMetadata()
            self.metadata = temp_model.from_map(m['metadata'])
        if m.get('spec') is not None:
            temp_model = ListIntegrationPolicyStorageRequirementsResponseBodyStorageRequirementsSpec()
            self.spec = temp_model.from_map(m['spec'])
        if m.get('status') is not None:
            temp_model = ListIntegrationPolicyStorageRequirementsResponseBodyStorageRequirementsStatus()
            self.status = temp_model.from_map(m['status'])
        return self


class ListIntegrationPolicyStorageRequirementsResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        storage_requirements: List[ListIntegrationPolicyStorageRequirementsResponseBodyStorageRequirements] = None,
    ):
        # ID of the request
        self.request_id = request_id
        # List of storage requirements
        self.storage_requirements = storage_requirements

    def validate(self):
        if self.storage_requirements:
            for k in self.storage_requirements:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        result['storageRequirements'] = []
        if self.storage_requirements is not None:
            for k in self.storage_requirements:
                result['storageRequirements'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        self.storage_requirements = []
        if m.get('storageRequirements') is not None:
            for k in m.get('storageRequirements'):
                temp_model = ListIntegrationPolicyStorageRequirementsResponseBodyStorageRequirements()
                self.storage_requirements.append(temp_model.from_map(k))
        return self


class ListIntegrationPolicyStorageRequirementsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListIntegrationPolicyStorageRequirementsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListIntegrationPolicyStorageRequirementsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListMaintainWindowsRequest(TeaModel):
    def __init__(
        self,
        direction: str = None,
        enable: bool = None,
        maintain_window_id: str = None,
        maintain_window_name: str = None,
        max_results: int = None,
        next_token: str = None,
        order_by: str = None,
        workspace: str = None,
    ):
        self.direction = direction
        self.enable = enable
        self.maintain_window_id = maintain_window_id
        self.maintain_window_name = maintain_window_name
        self.max_results = max_results
        self.next_token = next_token
        self.order_by = order_by
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.direction is not None:
            result['direction'] = self.direction
        if self.enable is not None:
            result['enable'] = self.enable
        if self.maintain_window_id is not None:
            result['maintainWindowId'] = self.maintain_window_id
        if self.maintain_window_name is not None:
            result['maintainWindowName'] = self.maintain_window_name
        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.order_by is not None:
            result['orderBy'] = self.order_by
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('direction') is not None:
            self.direction = m.get('direction')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('maintainWindowId') is not None:
            self.maintain_window_id = m.get('maintainWindowId')
        if m.get('maintainWindowName') is not None:
            self.maintain_window_name = m.get('maintainWindowName')
        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('orderBy') is not None:
            self.order_by = m.get('orderBy')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListMaintainWindowsResponseBody(TeaModel):
    def __init__(
        self,
        maintain_window_list: List[MaintainWindowForView] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
    ):
        self.maintain_window_list = maintain_window_list
        self.max_results = max_results
        self.next_token = next_token
        # Id of the request
        self.request_id = request_id

    def validate(self):
        if self.maintain_window_list:
            for k in self.maintain_window_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['maintainWindowList'] = []
        if self.maintain_window_list is not None:
            for k in self.maintain_window_list:
                result['maintainWindowList'].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.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.maintain_window_list = []
        if m.get('maintainWindowList') is not None:
            for k in m.get('maintainWindowList'):
                temp_model = MaintainWindowForView()
                self.maintain_window_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('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListMaintainWindowsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListMaintainWindowsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListMaintainWindowsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListMemoryStoresRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        memory_store_name: str = None,
        next_token: str = None,
    ):
        self.max_results = max_results
        self.memory_store_name = memory_store_name
        self.next_token = next_token

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.memory_store_name is not None:
            result['memoryStoreName'] = self.memory_store_name
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        if m.get('memoryStoreName') is not None:
            self.memory_store_name = m.get('memoryStoreName')
        if m.get('nextToken') is not None:
            self.next_token = m.get('nextToken')
        return self


class ListMemoryStoresResponseBodyMemoryStores(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        description: str = None,
        memory_store_name: str = None,
        region_id: str = None,
        update_time: str = None,
        workspace: str = None,
    ):
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        self.description = description
        self.memory_store_name = memory_store_name
        self.region_id = region_id
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.update_time = update_time
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.memory_store_name is not None:
            result['memoryStoreName'] = self.memory_store_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('memoryStoreName') is not None:
            self.memory_store_name = m.get('memoryStoreName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListMemoryStoresResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        memory_stores: List[ListMemoryStoresResponseBodyMemoryStores] = None,
        next_token: str = None,
        request_id: str = None,
    ):
        self.max_results = max_results
        self.memory_stores = memory_stores
        self.next_token = next_token
        self.request_id = request_id

    def validate(self):
        if self.memory_stores:
            for k in self.memory_stores:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        result['memoryStores'] = []
        if self.memory_stores is not None:
            for k in self.memory_stores:
                result['memoryStores'].append(k.to_map() if k else None)
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        self.memory_stores = []
        if m.get('memoryStores') is not None:
            for k in m.get('memoryStores'):
                temp_model = ListMemoryStoresResponseBodyMemoryStores()
                self.memory_stores.append(temp_model.from_map(k))
        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')
        return self


class ListMemoryStoresResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListMemoryStoresResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListMemoryStoresResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListNotifyStrategiesRequest(TeaModel):
    def __init__(
        self,
        direction: str = None,
        enable: bool = None,
        max_results: int = None,
        next_token: str = None,
        notify_strategy_id: str = None,
        notify_strategy_ids: str = None,
        notify_strategy_name: str = None,
        order_by: str = None,
        workspace: str = None,
    ):
        self.direction = direction
        self.enable = enable
        self.max_results = max_results
        self.next_token = next_token
        self.notify_strategy_id = notify_strategy_id
        self.notify_strategy_ids = notify_strategy_ids
        self.notify_strategy_name = notify_strategy_name
        self.order_by = order_by
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.direction is not None:
            result['direction'] = self.direction
        if self.enable is not None:
            result['enable'] = self.enable
        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.notify_strategy_id is not None:
            result['notifyStrategyId'] = self.notify_strategy_id
        if self.notify_strategy_ids is not None:
            result['notifyStrategyIds'] = self.notify_strategy_ids
        if self.notify_strategy_name is not None:
            result['notifyStrategyName'] = self.notify_strategy_name
        if self.order_by is not None:
            result['orderBy'] = self.order_by
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('direction') is not None:
            self.direction = m.get('direction')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        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('notifyStrategyId') is not None:
            self.notify_strategy_id = m.get('notifyStrategyId')
        if m.get('notifyStrategyIds') is not None:
            self.notify_strategy_ids = m.get('notifyStrategyIds')
        if m.get('notifyStrategyName') is not None:
            self.notify_strategy_name = m.get('notifyStrategyName')
        if m.get('orderBy') is not None:
            self.order_by = m.get('orderBy')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListNotifyStrategiesResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        notify_strategy_list: List[NotifyStrategyForView] = None,
        request_id: str = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.notify_strategy_list = notify_strategy_list
        # Id of the request
        self.request_id = request_id

    def validate(self):
        if self.notify_strategy_list:
            for k in self.notify_strategy_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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['notifyStrategyList'] = []
        if self.notify_strategy_list is not None:
            for k in self.notify_strategy_list:
                result['notifyStrategyList'].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: dict = 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.notify_strategy_list = []
        if m.get('notifyStrategyList') is not None:
            for k in m.get('notifyStrategyList'):
                temp_model = NotifyStrategyForView()
                self.notify_strategy_list.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListNotifyStrategiesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListNotifyStrategiesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListNotifyStrategiesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListOncallContactsRequest(TeaModel):
    def __init__(
        self,
        source: str = None,
        timestamp: str = None,
    ):
        self.source = source
        self.timestamp = timestamp

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.source is not None:
            result['source'] = self.source
        if self.timestamp is not None:
            result['timestamp'] = self.timestamp
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('timestamp') is not None:
            self.timestamp = m.get('timestamp')
        return self


class ListOncallContactsResponseBody(TeaModel):
    def __init__(
        self,
        contact_ids: List[str] = None,
        request_id: str = None,
    ):
        self.contact_ids = contact_ids
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.contact_ids is not None:
            result['contactIds'] = self.contact_ids
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactIds') is not None:
            self.contact_ids = m.get('contactIds')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListOncallContactsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListOncallContactsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListOncallContactsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListOncallSchedulesRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        oncall_schedule_ids: List[str] = None,
        oncall_schedule_name: str = None,
        page_number: int = None,
        page_size: int = None,
        source: str = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.oncall_schedule_ids = oncall_schedule_ids
        self.oncall_schedule_name = oncall_schedule_name
        self.page_number = page_number
        self.page_size = page_size
        self.source = source

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.oncall_schedule_ids is not None:
            result['oncallScheduleIds'] = self.oncall_schedule_ids
        if self.oncall_schedule_name is not None:
            result['oncallScheduleName'] = self.oncall_schedule_name
        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.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = 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('oncallScheduleIds') is not None:
            self.oncall_schedule_ids = m.get('oncallScheduleIds')
        if m.get('oncallScheduleName') is not None:
            self.oncall_schedule_name = m.get('oncallScheduleName')
        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('source') is not None:
            self.source = m.get('source')
        return self


class ListOncallSchedulesShrinkRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        oncall_schedule_ids_shrink: str = None,
        oncall_schedule_name: str = None,
        page_number: int = None,
        page_size: int = None,
        source: str = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.oncall_schedule_ids_shrink = oncall_schedule_ids_shrink
        self.oncall_schedule_name = oncall_schedule_name
        self.page_number = page_number
        self.page_size = page_size
        self.source = source

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.oncall_schedule_ids_shrink is not None:
            result['oncallScheduleIds'] = self.oncall_schedule_ids_shrink
        if self.oncall_schedule_name is not None:
            result['oncallScheduleName'] = self.oncall_schedule_name
        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.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = 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('oncallScheduleIds') is not None:
            self.oncall_schedule_ids_shrink = m.get('oncallScheduleIds')
        if m.get('oncallScheduleName') is not None:
            self.oncall_schedule_name = m.get('oncallScheduleName')
        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('source') is not None:
            self.source = m.get('source')
        return self


class ListOncallSchedulesResponseBodyOncallSchedulesRotations(TeaModel):
    def __init__(
        self,
        active_days: List[int] = None,
        contacts: List[str] = None,
        rotation_end_time: str = None,
        rotation_name: str = None,
        rotation_start_time: str = None,
        shift_length: int = None,
        shift_recurrence_frequency: str = None,
        start_date: str = None,
        time_zone: str = None,
    ):
        self.active_days = active_days
        self.contacts = contacts
        self.rotation_end_time = rotation_end_time
        self.rotation_name = rotation_name
        self.rotation_start_time = rotation_start_time
        self.shift_length = shift_length
        self.shift_recurrence_frequency = shift_recurrence_frequency
        self.start_date = start_date
        self.time_zone = time_zone

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.active_days is not None:
            result['activeDays'] = self.active_days
        if self.contacts is not None:
            result['contacts'] = self.contacts
        if self.rotation_end_time is not None:
            result['rotationEndTime'] = self.rotation_end_time
        if self.rotation_name is not None:
            result['rotationName'] = self.rotation_name
        if self.rotation_start_time is not None:
            result['rotationStartTime'] = self.rotation_start_time
        if self.shift_length is not None:
            result['shiftLength'] = self.shift_length
        if self.shift_recurrence_frequency is not None:
            result['shiftRecurrenceFrequency'] = self.shift_recurrence_frequency
        if self.start_date is not None:
            result['startDate'] = self.start_date
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('activeDays') is not None:
            self.active_days = m.get('activeDays')
        if m.get('contacts') is not None:
            self.contacts = m.get('contacts')
        if m.get('rotationEndTime') is not None:
            self.rotation_end_time = m.get('rotationEndTime')
        if m.get('rotationName') is not None:
            self.rotation_name = m.get('rotationName')
        if m.get('rotationStartTime') is not None:
            self.rotation_start_time = m.get('rotationStartTime')
        if m.get('shiftLength') is not None:
            self.shift_length = m.get('shiftLength')
        if m.get('shiftRecurrenceFrequency') is not None:
            self.shift_recurrence_frequency = m.get('shiftRecurrenceFrequency')
        if m.get('startDate') is not None:
            self.start_date = m.get('startDate')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        return self


class ListOncallSchedulesResponseBodyOncallSchedules(TeaModel):
    def __init__(
        self,
        oncall_schedule_id: str = None,
        oncall_schedule_name: str = None,
        rotations: List[ListOncallSchedulesResponseBodyOncallSchedulesRotations] = None,
        shift_robot_id: str = None,
    ):
        self.oncall_schedule_id = oncall_schedule_id
        self.oncall_schedule_name = oncall_schedule_name
        self.rotations = rotations
        self.shift_robot_id = shift_robot_id

    def validate(self):
        if self.rotations:
            for k in self.rotations:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.oncall_schedule_id is not None:
            result['oncallScheduleId'] = self.oncall_schedule_id
        if self.oncall_schedule_name is not None:
            result['oncallScheduleName'] = self.oncall_schedule_name
        result['rotations'] = []
        if self.rotations is not None:
            for k in self.rotations:
                result['rotations'].append(k.to_map() if k else None)
        if self.shift_robot_id is not None:
            result['shiftRobotId'] = self.shift_robot_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('oncallScheduleId') is not None:
            self.oncall_schedule_id = m.get('oncallScheduleId')
        if m.get('oncallScheduleName') is not None:
            self.oncall_schedule_name = m.get('oncallScheduleName')
        self.rotations = []
        if m.get('rotations') is not None:
            for k in m.get('rotations'):
                temp_model = ListOncallSchedulesResponseBodyOncallSchedulesRotations()
                self.rotations.append(temp_model.from_map(k))
        if m.get('shiftRobotId') is not None:
            self.shift_robot_id = m.get('shiftRobotId')
        return self


class ListOncallSchedulesResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        oncall_schedules: List[ListOncallSchedulesResponseBodyOncallSchedules] = None,
        request_id: str = None,
        total: int = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.oncall_schedules = oncall_schedules
        self.request_id = request_id
        self.total = total

    def validate(self):
        if self.oncall_schedules:
            for k in self.oncall_schedules:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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['oncallSchedules'] = []
        if self.oncall_schedules is not None:
            for k in self.oncall_schedules:
                result['oncallSchedules'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = 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.oncall_schedules = []
        if m.get('oncallSchedules') is not None:
            for k in m.get('oncallSchedules'):
                temp_model = ListOncallSchedulesResponseBodyOncallSchedules()
                self.oncall_schedules.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListOncallSchedulesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListOncallSchedulesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListOncallSchedulesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListPipelinesRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        pipeline_name: str = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.pipeline_name = pipeline_name

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.pipeline_name is not None:
            result['pipelineName'] = self.pipeline_name
        return result

    def from_map(self, m: dict = 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('pipelineName') is not None:
            self.pipeline_name = m.get('pipelineName')
        return self


class ListPipelinesResponseBodyPipelines(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        description: str = None,
        pipeline_name: str = None,
        region_id: str = None,
        update_time: str = None,
        workspace: str = None,
    ):
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        self.description = description
        self.pipeline_name = pipeline_name
        self.region_id = region_id
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.update_time = update_time
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.pipeline_name is not None:
            result['pipelineName'] = self.pipeline_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('pipelineName') is not None:
            self.pipeline_name = m.get('pipelineName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListPipelinesResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        pipelines: List[ListPipelinesResponseBodyPipelines] = None,
        request_id: str = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.pipelines = pipelines
        self.request_id = request_id

    def validate(self):
        if self.pipelines:
            for k in self.pipelines:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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['pipelines'] = []
        if self.pipelines is not None:
            for k in self.pipelines:
                result['pipelines'].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: dict = 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.pipelines = []
        if m.get('pipelines') is not None:
            for k in m.get('pipelines'):
                temp_model = ListPipelinesResponseBodyPipelines()
                self.pipelines.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListPipelinesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListPipelinesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListPipelinesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListPrometheusClustersRequestTag(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        self.key = key
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 ListPrometheusClustersRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        prometheus_cluster_name: str = None,
        region_id: str = None,
        resource_group_id: str = None,
        tag: List[ListPrometheusClustersRequestTag] = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.prometheus_cluster_name = prometheus_cluster_name
        self.region_id = region_id
        self.resource_group_id = resource_group_id
        self.tag = tag

    def validate(self):
        if self.tag:
            for k in self.tag:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.prometheus_cluster_name is not None:
            result['prometheusClusterName'] = self.prometheus_cluster_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        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: dict = 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('prometheusClusterName') is not None:
            self.prometheus_cluster_name = m.get('prometheusClusterName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.tag = []
        if m.get('tag') is not None:
            for k in m.get('tag'):
                temp_model = ListPrometheusClustersRequestTag()
                self.tag.append(temp_model.from_map(k))
        return self


class ListPrometheusClustersShrinkRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        prometheus_cluster_name: str = None,
        region_id: str = None,
        resource_group_id: str = None,
        tag_shrink: str = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.prometheus_cluster_name = prometheus_cluster_name
        self.region_id = region_id
        self.resource_group_id = resource_group_id
        self.tag_shrink = tag_shrink

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.prometheus_cluster_name is not None:
            result['prometheusClusterName'] = self.prometheus_cluster_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.tag_shrink is not None:
            result['tag'] = self.tag_shrink
        return result

    def from_map(self, m: dict = 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('prometheusClusterName') is not None:
            self.prometheus_cluster_name = m.get('prometheusClusterName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('tag') is not None:
            self.tag_shrink = m.get('tag')
        return self


class ListPrometheusClustersResponseBodyPrometheusClusters(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        payment_type: str = None,
        prometheus_cluster_name: str = None,
        region_id: str = None,
        replicas: int = None,
        user_id: str = None,
    ):
        self.create_time = create_time
        self.payment_type = payment_type
        self.prometheus_cluster_name = prometheus_cluster_name
        self.region_id = region_id
        self.replicas = replicas
        self.user_id = user_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.payment_type is not None:
            result['paymentType'] = self.payment_type
        if self.prometheus_cluster_name is not None:
            result['prometheusClusterName'] = self.prometheus_cluster_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.replicas is not None:
            result['replicas'] = self.replicas
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('paymentType') is not None:
            self.payment_type = m.get('paymentType')
        if m.get('prometheusClusterName') is not None:
            self.prometheus_cluster_name = m.get('prometheusClusterName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('replicas') is not None:
            self.replicas = m.get('replicas')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class ListPrometheusClustersResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        prometheus_clusters: List[ListPrometheusClustersResponseBodyPrometheusClusters] = None,
        request_id: str = None,
        total_count: int = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.prometheus_clusters = prometheus_clusters
        # Id of the request
        self.request_id = request_id
        self.total_count = total_count

    def validate(self):
        if self.prometheus_clusters:
            for k in self.prometheus_clusters:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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['prometheusClusters'] = []
        if self.prometheus_clusters is not None:
            for k in self.prometheus_clusters:
                result['prometheusClusters'].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: dict = 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.prometheus_clusters = []
        if m.get('prometheusClusters') is not None:
            for k in m.get('prometheusClusters'):
                temp_model = ListPrometheusClustersResponseBodyPrometheusClusters()
                self.prometheus_clusters.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 ListPrometheusClustersResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListPrometheusClustersResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListPrometheusClustersResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListPrometheusDashboardsRequest(TeaModel):
    def __init__(
        self,
        aliyun_lang: str = None,
        resource_group_id: str = None,
    ):
        # Language environment, default is Chinese zh | en
        self.aliyun_lang = aliyun_lang
        # Resource Group ID.
        self.resource_group_id = resource_group_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aliyun_lang is not None:
            result['aliyunLang'] = self.aliyun_lang
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aliyunLang') is not None:
            self.aliyun_lang = m.get('aliyunLang')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        return self


class ListPrometheusDashboardsResponseBodyPrometheusDashboards(TeaModel):
    def __init__(
        self,
        id: str = None,
        name: str = None,
        tags: List[str] = None,
        title: str = None,
        uid: str = None,
        url: str = None,
    ):
        # Dashboard ID.
        self.id = id
        # Dashboard name.
        self.name = name
        # Tags.
        self.tags = tags
        # Dashboard title.
        self.title = title
        # Dashboard UID.
        self.uid = uid
        # Dashboard URL address.
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        if self.tags is not None:
            result['tags'] = self.tags
        if self.title is not None:
            result['title'] = self.title
        if self.uid is not None:
            result['uid'] = self.uid
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('tags') is not None:
            self.tags = m.get('tags')
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('uid') is not None:
            self.uid = m.get('uid')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class ListPrometheusDashboardsResponseBody(TeaModel):
    def __init__(
        self,
        prometheus_dashboards: List[ListPrometheusDashboardsResponseBodyPrometheusDashboards] = None,
        request_id: str = None,
        total_count: int = None,
    ):
        # List of Prometheus instance dashboards.
        self.prometheus_dashboards = prometheus_dashboards
        # ID of the request
        self.request_id = request_id
        # Total number of instances
        self.total_count = total_count

    def validate(self):
        if self.prometheus_dashboards:
            for k in self.prometheus_dashboards:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['prometheusDashboards'] = []
        if self.prometheus_dashboards is not None:
            for k in self.prometheus_dashboards:
                result['prometheusDashboards'].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: dict = None):
        m = m or dict()
        self.prometheus_dashboards = []
        if m.get('prometheusDashboards') is not None:
            for k in m.get('prometheusDashboards'):
                temp_model = ListPrometheusDashboardsResponseBodyPrometheusDashboards()
                self.prometheus_dashboards.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 ListPrometheusDashboardsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListPrometheusDashboardsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListPrometheusDashboardsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListPrometheusInstancesRequestTag(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # Tag key
        self.key = key
        # Tag value.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 ListPrometheusInstancesRequest(TeaModel):
    def __init__(
        self,
        filter_region_ids: str = None,
        max_results: int = None,
        next_token: str = None,
        prometheus_instance_ids: str = None,
        prometheus_instance_name: str = None,
        query_scene: str = None,
        resource_group_id: str = None,
        resource_type: str = None,
        sls_project: str = None,
        sls_store: str = None,
        tag: List[ListPrometheusInstancesRequestTag] = None,
        version: str = None,
        workspace: str = None,
    ):
        # Specified list of regionIds to filter (comma-separated).
        self.filter_region_ids = filter_region_ids
        # Maximum number of records to return.
        self.max_results = max_results
        # Query token.
        self.next_token = next_token
        # List of instance IDs (comma-separated)
        self.prometheus_instance_ids = prometheus_instance_ids
        # Instance name (partial match supported)
        self.prometheus_instance_name = prometheus_instance_name
        self.query_scene = query_scene
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Resource type of the instance.
        self.resource_type = resource_type
        self.sls_project = sls_project
        self.sls_store = sls_store
        # List of tags.
        self.tag = tag
        # Instance version: V1 or V2
        self.version = version
        self.workspace = workspace

    def validate(self):
        if self.tag:
            for k in self.tag:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.filter_region_ids is not None:
            result['filterRegionIds'] = self.filter_region_ids
        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.prometheus_instance_ids is not None:
            result['prometheusInstanceIds'] = self.prometheus_instance_ids
        if self.prometheus_instance_name is not None:
            result['prometheusInstanceName'] = self.prometheus_instance_name
        if self.query_scene is not None:
            result['queryScene'] = self.query_scene
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.resource_type is not None:
            result['resourceType'] = self.resource_type
        if self.sls_project is not None:
            result['slsProject'] = self.sls_project
        if self.sls_store is not None:
            result['slsStore'] = self.sls_store
        result['tag'] = []
        if self.tag is not None:
            for k in self.tag:
                result['tag'].append(k.to_map() if k else None)
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('filterRegionIds') is not None:
            self.filter_region_ids = m.get('filterRegionIds')
        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('prometheusInstanceIds') is not None:
            self.prometheus_instance_ids = m.get('prometheusInstanceIds')
        if m.get('prometheusInstanceName') is not None:
            self.prometheus_instance_name = m.get('prometheusInstanceName')
        if m.get('queryScene') is not None:
            self.query_scene = m.get('queryScene')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('resourceType') is not None:
            self.resource_type = m.get('resourceType')
        if m.get('slsProject') is not None:
            self.sls_project = m.get('slsProject')
        if m.get('slsStore') is not None:
            self.sls_store = m.get('slsStore')
        self.tag = []
        if m.get('tag') is not None:
            for k in m.get('tag'):
                temp_model = ListPrometheusInstancesRequestTag()
                self.tag.append(temp_model.from_map(k))
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListPrometheusInstancesShrinkRequest(TeaModel):
    def __init__(
        self,
        filter_region_ids: str = None,
        max_results: int = None,
        next_token: str = None,
        prometheus_instance_ids: str = None,
        prometheus_instance_name: str = None,
        query_scene: str = None,
        resource_group_id: str = None,
        resource_type: str = None,
        sls_project: str = None,
        sls_store: str = None,
        tag_shrink: str = None,
        version: str = None,
        workspace: str = None,
    ):
        # Specified list of regionIds to filter (comma-separated).
        self.filter_region_ids = filter_region_ids
        # Maximum number of records to return.
        self.max_results = max_results
        # Query token.
        self.next_token = next_token
        # List of instance IDs (comma-separated)
        self.prometheus_instance_ids = prometheus_instance_ids
        # Instance name (partial match supported)
        self.prometheus_instance_name = prometheus_instance_name
        self.query_scene = query_scene
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Resource type of the instance.
        self.resource_type = resource_type
        self.sls_project = sls_project
        self.sls_store = sls_store
        # List of tags.
        self.tag_shrink = tag_shrink
        # Instance version: V1 or V2
        self.version = version
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.filter_region_ids is not None:
            result['filterRegionIds'] = self.filter_region_ids
        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.prometheus_instance_ids is not None:
            result['prometheusInstanceIds'] = self.prometheus_instance_ids
        if self.prometheus_instance_name is not None:
            result['prometheusInstanceName'] = self.prometheus_instance_name
        if self.query_scene is not None:
            result['queryScene'] = self.query_scene
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.resource_type is not None:
            result['resourceType'] = self.resource_type
        if self.sls_project is not None:
            result['slsProject'] = self.sls_project
        if self.sls_store is not None:
            result['slsStore'] = self.sls_store
        if self.tag_shrink is not None:
            result['tag'] = self.tag_shrink
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('filterRegionIds') is not None:
            self.filter_region_ids = m.get('filterRegionIds')
        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('prometheusInstanceIds') is not None:
            self.prometheus_instance_ids = m.get('prometheusInstanceIds')
        if m.get('prometheusInstanceName') is not None:
            self.prometheus_instance_name = m.get('prometheusInstanceName')
        if m.get('queryScene') is not None:
            self.query_scene = m.get('queryScene')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('resourceType') is not None:
            self.resource_type = m.get('resourceType')
        if m.get('slsProject') is not None:
            self.sls_project = m.get('slsProject')
        if m.get('slsStore') is not None:
            self.sls_store = m.get('slsStore')
        if m.get('tag') is not None:
            self.tag_shrink = m.get('tag')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListPrometheusInstancesResponseBodyPrometheusInstances(TeaModel):
    def __init__(
        self,
        access_type: str = None,
        create_time: str = None,
        instance_type: str = None,
        payment_type: str = None,
        product: str = None,
        prometheus_instance_id: str = None,
        prometheus_instance_name: str = None,
        region_id: str = None,
        resource_type: str = None,
        status: str = None,
        support_auth_types: List[str] = None,
        user_id: str = None,
        version: str = None,
        workspace: str = None,
    ):
        # Access type:
        # readWrite, readOnly, httpReadOnly
        self.access_type = access_type
        # Instance creation time, using UTC+0 time, formatted as yyyy-MM-ddTHH:mmZ
        self.create_time = create_time
        # Instance type.
        self.instance_type = instance_type
        # POSTPAY: Postpaid by metric.
        # POSTPAY_GB: Postpaid by write volume.
        # PREPAY: Prepaid.
        # FREE: Free.
        self.payment_type = payment_type
        # Product to which the prom instance belongs
        self.product = product
        # Instance ID.
        self.prometheus_instance_id = prometheus_instance_id
        # Instance name.
        self.prometheus_instance_name = prometheus_instance_name
        # Region ID
        self.region_id = region_id
        # Resource type.
        self.resource_type = resource_type
        # Backend data storage status
        self.status = status
        # Supported authentication types.
        self.support_auth_types = support_auth_types
        # User ID.
        self.user_id = user_id
        # Version
        self.version = version
        # Workspace to which the Prometheus instance belongs
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.access_type is not None:
            result['accessType'] = self.access_type
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.instance_type is not None:
            result['instanceType'] = self.instance_type
        if self.payment_type is not None:
            result['paymentType'] = self.payment_type
        if self.product is not None:
            result['product'] = self.product
        if self.prometheus_instance_id is not None:
            result['prometheusInstanceId'] = self.prometheus_instance_id
        if self.prometheus_instance_name is not None:
            result['prometheusInstanceName'] = self.prometheus_instance_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.resource_type is not None:
            result['resourceType'] = self.resource_type
        if self.status is not None:
            result['status'] = self.status
        if self.support_auth_types is not None:
            result['supportAuthTypes'] = self.support_auth_types
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('accessType') is not None:
            self.access_type = m.get('accessType')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('instanceType') is not None:
            self.instance_type = m.get('instanceType')
        if m.get('paymentType') is not None:
            self.payment_type = m.get('paymentType')
        if m.get('product') is not None:
            self.product = m.get('product')
        if m.get('prometheusInstanceId') is not None:
            self.prometheus_instance_id = m.get('prometheusInstanceId')
        if m.get('prometheusInstanceName') is not None:
            self.prometheus_instance_name = m.get('prometheusInstanceName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('resourceType') is not None:
            self.resource_type = m.get('resourceType')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('supportAuthTypes') is not None:
            self.support_auth_types = m.get('supportAuthTypes')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListPrometheusInstancesResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        prometheus_instances: List[ListPrometheusInstancesResponseBodyPrometheusInstances] = None,
        request_id: str = None,
        total_count: int = None,
    ):
        # Maximum number of records to return.
        self.max_results = max_results
        # Token for the next query.
        self.next_token = next_token
        # List of Prometheus instances.
        self.prometheus_instances = prometheus_instances
        # ID of the request
        self.request_id = request_id
        # Total number of instances
        self.total_count = total_count

    def validate(self):
        if self.prometheus_instances:
            for k in self.prometheus_instances:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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['prometheusInstances'] = []
        if self.prometheus_instances is not None:
            for k in self.prometheus_instances:
                result['prometheusInstances'].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: dict = 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.prometheus_instances = []
        if m.get('prometheusInstances') is not None:
            for k in m.get('prometheusInstances'):
                temp_model = ListPrometheusInstancesResponseBodyPrometheusInstances()
                self.prometheus_instances.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 ListPrometheusInstancesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListPrometheusInstancesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListPrometheusInstancesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListPrometheusMetricsRequest(TeaModel):
    def __init__(
        self,
        aliyun_lang: str = None,
        end_time: int = None,
        max_results: int = None,
        resource_group_id: str = None,
        start_time: int = None,
    ):
        self.aliyun_lang = aliyun_lang
        self.end_time = end_time
        self.max_results = max_results
        self.resource_group_id = resource_group_id
        self.start_time = start_time

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.aliyun_lang is not None:
            result['aliyunLang'] = self.aliyun_lang
        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.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.start_time is not None:
            result['startTime'] = self.start_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aliyunLang') is not None:
            self.aliyun_lang = m.get('aliyunLang')
        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('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('startTime') is not None:
            self.start_time = m.get('startTime')
        return self


class ListPrometheusMetricsResponseBodyPrometheusMetrics(TeaModel):
    def __init__(
        self,
        count: str = None,
        fee_type: str = None,
        job: str = None,
        metric: str = None,
        percent: str = None,
    ):
        self.count = count
        self.fee_type = fee_type
        self.job = job
        self.metric = metric
        self.percent = percent

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.count is not None:
            result['count'] = self.count
        if self.fee_type is not None:
            result['feeType'] = self.fee_type
        if self.job is not None:
            result['job'] = self.job
        if self.metric is not None:
            result['metric'] = self.metric
        if self.percent is not None:
            result['percent'] = self.percent
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('count') is not None:
            self.count = m.get('count')
        if m.get('feeType') is not None:
            self.fee_type = m.get('feeType')
        if m.get('job') is not None:
            self.job = m.get('job')
        if m.get('metric') is not None:
            self.metric = m.get('metric')
        if m.get('percent') is not None:
            self.percent = m.get('percent')
        return self


class ListPrometheusMetricsResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        prometheus_metrics: List[ListPrometheusMetricsResponseBodyPrometheusMetrics] = None,
        request_id: str = None,
        total_count: int = None,
    ):
        self.max_results = max_results
        self.prometheus_metrics = prometheus_metrics
        self.request_id = request_id
        self.total_count = total_count

    def validate(self):
        if self.prometheus_metrics:
            for k in self.prometheus_metrics:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        result['prometheusMetrics'] = []
        if self.prometheus_metrics is not None:
            for k in self.prometheus_metrics:
                result['prometheusMetrics'].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: dict = None):
        m = m or dict()
        if m.get('maxResults') is not None:
            self.max_results = m.get('maxResults')
        self.prometheus_metrics = []
        if m.get('prometheusMetrics') is not None:
            for k in m.get('prometheusMetrics'):
                temp_model = ListPrometheusMetricsResponseBodyPrometheusMetrics()
                self.prometheus_metrics.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 ListPrometheusMetricsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListPrometheusMetricsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListPrometheusMetricsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListPrometheusViewsRequestTag(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # Tag key
        self.key = key
        # Match value.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 ListPrometheusViewsRequest(TeaModel):
    def __init__(
        self,
        filter_region_ids: str = None,
        max_results: int = None,
        next_token: str = None,
        prometheus_view_ids: str = None,
        prometheus_view_name: str = None,
        resource_group_id: str = None,
        resource_type: str = None,
        tag: List[ListPrometheusViewsRequestTag] = None,
        version: str = None,
        workspace: str = None,
    ):
        # Filter by RegionID.
        self.filter_region_ids = filter_region_ids
        # Maximum number of records to return.
        self.max_results = max_results
        # Query token.
        self.next_token = next_token
        # List of Prometheus view instance IDs.
        self.prometheus_view_ids = prometheus_view_ids
        # Prometheus view name.
        self.prometheus_view_name = prometheus_view_name
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Resource type.
        self.resource_type = resource_type
        # List of tags.
        self.tag = tag
        # Instance version: V1 or V2
        self.version = version
        # Workspace name
        self.workspace = workspace

    def validate(self):
        if self.tag:
            for k in self.tag:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.filter_region_ids is not None:
            result['filterRegionIds'] = self.filter_region_ids
        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.prometheus_view_ids is not None:
            result['prometheusViewIds'] = self.prometheus_view_ids
        if self.prometheus_view_name is not None:
            result['prometheusViewName'] = self.prometheus_view_name
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_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)
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('filterRegionIds') is not None:
            self.filter_region_ids = m.get('filterRegionIds')
        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('prometheusViewIds') is not None:
            self.prometheus_view_ids = m.get('prometheusViewIds')
        if m.get('prometheusViewName') is not None:
            self.prometheus_view_name = m.get('prometheusViewName')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        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 = ListPrometheusViewsRequestTag()
                self.tag.append(temp_model.from_map(k))
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListPrometheusViewsShrinkRequest(TeaModel):
    def __init__(
        self,
        filter_region_ids: str = None,
        max_results: int = None,
        next_token: str = None,
        prometheus_view_ids: str = None,
        prometheus_view_name: str = None,
        resource_group_id: str = None,
        resource_type: str = None,
        tag_shrink: str = None,
        version: str = None,
        workspace: str = None,
    ):
        # Filter by RegionID.
        self.filter_region_ids = filter_region_ids
        # Maximum number of records to return.
        self.max_results = max_results
        # Query token.
        self.next_token = next_token
        # List of Prometheus view instance IDs.
        self.prometheus_view_ids = prometheus_view_ids
        # Prometheus view name.
        self.prometheus_view_name = prometheus_view_name
        # Resource group ID.
        self.resource_group_id = resource_group_id
        # Resource type.
        self.resource_type = resource_type
        # List of tags.
        self.tag_shrink = tag_shrink
        # Instance version: V1 or V2
        self.version = version
        # Workspace name
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.filter_region_ids is not None:
            result['filterRegionIds'] = self.filter_region_ids
        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.prometheus_view_ids is not None:
            result['prometheusViewIds'] = self.prometheus_view_ids
        if self.prometheus_view_name is not None:
            result['prometheusViewName'] = self.prometheus_view_name
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_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
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('filterRegionIds') is not None:
            self.filter_region_ids = m.get('filterRegionIds')
        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('prometheusViewIds') is not None:
            self.prometheus_view_ids = m.get('prometheusViewIds')
        if m.get('prometheusViewName') is not None:
            self.prometheus_view_name = m.get('prometheusViewName')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        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')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListPrometheusViewsResponseBodyPrometheusViewsPrometheusInstances(TeaModel):
    def __init__(
        self,
        prometheus_instance_id: str = None,
        region_id: str = None,
        user_id: str = None,
    ):
        self.prometheus_instance_id = prometheus_instance_id
        self.region_id = region_id
        self.user_id = user_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.prometheus_instance_id is not None:
            result['prometheusInstanceId'] = self.prometheus_instance_id
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusInstanceId') is not None:
            self.prometheus_instance_id = m.get('prometheusInstanceId')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class ListPrometheusViewsResponseBodyPrometheusViews(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        instance_type: str = None,
        payment_type: str = None,
        product: str = None,
        prometheus_instance_count: int = None,
        prometheus_instances: List[ListPrometheusViewsResponseBodyPrometheusViewsPrometheusInstances] = None,
        prometheus_view_id: str = None,
        prometheus_view_name: str = None,
        region_id: str = None,
        resource_type: str = None,
        status: str = None,
        user_id: str = None,
        version: str = None,
        workspace: str = None,
    ):
        # Instance creation time, using UTC+0 time, formatted as yyyy-MM-ddTHH:mmZ
        self.create_time = create_time
        # Instance type:
        # prom-view: new version aggregated view
        # global-view: old version aggregated view
        self.instance_type = instance_type
        # Payment type. Currently, the fixed value is FREE (free).
        self.payment_type = payment_type
        # Product that the prom instance belongs to (arms or cms).
        self.product = product
        # Number of Prometheus instances in the view.
        self.prometheus_instance_count = prometheus_instance_count
        self.prometheus_instances = prometheus_instances
        # Prometheus view ID.
        self.prometheus_view_id = prometheus_view_id
        # Prometheus view name.
        self.prometheus_view_name = prometheus_view_name
        # Region ID.
        self.region_id = region_id
        # Fixed value: PrometheusView.
        self.resource_type = resource_type
        # Backend data storage status.
        self.status = status
        # User ID.
        self.user_id = user_id
        # Version.
        self.version = version
        # Workspace that the prom instance belongs to.
        self.workspace = workspace

    def validate(self):
        if self.prometheus_instances:
            for k in self.prometheus_instances:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.instance_type is not None:
            result['instanceType'] = self.instance_type
        if self.payment_type is not None:
            result['paymentType'] = self.payment_type
        if self.product is not None:
            result['product'] = self.product
        if self.prometheus_instance_count is not None:
            result['prometheusInstanceCount'] = self.prometheus_instance_count
        result['prometheusInstances'] = []
        if self.prometheus_instances is not None:
            for k in self.prometheus_instances:
                result['prometheusInstances'].append(k.to_map() if k else None)
        if self.prometheus_view_id is not None:
            result['prometheusViewId'] = self.prometheus_view_id
        if self.prometheus_view_name is not None:
            result['prometheusViewName'] = self.prometheus_view_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.resource_type is not None:
            result['resourceType'] = self.resource_type
        if self.status is not None:
            result['status'] = self.status
        if self.user_id is not None:
            result['userId'] = self.user_id
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('instanceType') is not None:
            self.instance_type = m.get('instanceType')
        if m.get('paymentType') is not None:
            self.payment_type = m.get('paymentType')
        if m.get('product') is not None:
            self.product = m.get('product')
        if m.get('prometheusInstanceCount') is not None:
            self.prometheus_instance_count = m.get('prometheusInstanceCount')
        self.prometheus_instances = []
        if m.get('prometheusInstances') is not None:
            for k in m.get('prometheusInstances'):
                temp_model = ListPrometheusViewsResponseBodyPrometheusViewsPrometheusInstances()
                self.prometheus_instances.append(temp_model.from_map(k))
        if m.get('prometheusViewId') is not None:
            self.prometheus_view_id = m.get('prometheusViewId')
        if m.get('prometheusViewName') is not None:
            self.prometheus_view_name = m.get('prometheusViewName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('resourceType') is not None:
            self.resource_type = m.get('resourceType')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListPrometheusViewsResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        prometheus_views: List[ListPrometheusViewsResponseBodyPrometheusViews] = None,
        request_id: str = None,
        total_count: int = None,
    ):
        # Maximum number of records to return.
        self.max_results = max_results
        # Token for the next query.
        self.next_token = next_token
        # List of Prometheus view instances.
        self.prometheus_views = prometheus_views
        # ID of the request
        self.request_id = request_id
        # Total number of instances
        self.total_count = total_count

    def validate(self):
        if self.prometheus_views:
            for k in self.prometheus_views:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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['prometheusViews'] = []
        if self.prometheus_views is not None:
            for k in self.prometheus_views:
                result['prometheusViews'].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: dict = 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.prometheus_views = []
        if m.get('prometheusViews') is not None:
            for k in m.get('prometheusViews'):
                temp_model = ListPrometheusViewsResponseBodyPrometheusViews()
                self.prometheus_views.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 ListPrometheusViewsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListPrometheusViewsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListPrometheusViewsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListPrometheusVirtualInstancesRequest(TeaModel):
    def __init__(
        self,
        namespace: str = None,
    ):
        # Optional cloud product
        self.namespace = namespace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.namespace is not None:
            result['namespace'] = self.namespace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        return self


class ListPrometheusVirtualInstancesResponseBodyInstances(TeaModel):
    def __init__(
        self,
        created_at: str = None,
        http_api_url: str = None,
        instance_id: str = None,
        namespace: str = None,
        region_id: str = None,
        user_id: str = None,
    ):
        # Creation time
        self.created_at = created_at
        # HTTP API URL.
        self.http_api_url = http_api_url
        # Applicable data source type: PROMETHEUS_DS
        # 
        # Prometheus instance ID
        self.instance_id = instance_id
        # Applicable query type: CMS_BASIC_QUERY.
        # 
        # Namespace of the metric
        self.namespace = namespace
        # Region ID.
        self.region_id = region_id
        # User ID.
        self.user_id = user_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.created_at is not None:
            result['createdAt'] = self.created_at
        if self.http_api_url is not None:
            result['httpApiUrl'] = self.http_api_url
        if self.instance_id is not None:
            result['instanceId'] = self.instance_id
        if self.namespace is not None:
            result['namespace'] = self.namespace
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createdAt') is not None:
            self.created_at = m.get('createdAt')
        if m.get('httpApiUrl') is not None:
            self.http_api_url = m.get('httpApiUrl')
        if m.get('instanceId') is not None:
            self.instance_id = m.get('instanceId')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class ListPrometheusVirtualInstancesResponseBody(TeaModel):
    def __init__(
        self,
        instances: List[ListPrometheusVirtualInstancesResponseBodyInstances] = None,
        request_id: str = None,
    ):
        # Instance information.
        self.instances = instances
        # ID of the request
        self.request_id = request_id

    def validate(self):
        if self.instances:
            for k in self.instances:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['instances'] = []
        if self.instances is not None:
            for k in self.instances:
                result['instances'].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: dict = None):
        m = m or dict()
        self.instances = []
        if m.get('instances') is not None:
            for k in m.get('instances'):
                temp_model = ListPrometheusVirtualInstancesResponseBodyInstances()
                self.instances.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ListPrometheusVirtualInstancesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListPrometheusVirtualInstancesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListPrometheusVirtualInstancesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListRcaTasksRequest(TeaModel):
    def __init__(
        self,
        alert_rule_id: str = None,
        incident_uuid: str = None,
        max_results: int = None,
        next_token: str = None,
        task_id: str = None,
        trans_id: str = None,
        workspace: str = None,
    ):
        self.alert_rule_id = alert_rule_id
        self.incident_uuid = incident_uuid
        self.max_results = max_results
        self.next_token = next_token
        self.task_id = task_id
        self.trans_id = trans_id
        # This parameter is required.
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_rule_id is not None:
            result['alertRuleId'] = self.alert_rule_id
        if self.incident_uuid is not None:
            result['incidentUuid'] = self.incident_uuid
        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.task_id is not None:
            result['taskId'] = self.task_id
        if self.trans_id is not None:
            result['transId'] = self.trans_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleId') is not None:
            self.alert_rule_id = m.get('alertRuleId')
        if m.get('incidentUuid') is not None:
            self.incident_uuid = m.get('incidentUuid')
        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('taskId') is not None:
            self.task_id = m.get('taskId')
        if m.get('transId') is not None:
            self.trans_id = m.get('transId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListRcaTasksResponseBodyTaskList(TeaModel):
    def __init__(
        self,
        alert_id: str = None,
        analysis_result: str = None,
        digital_employee_name: str = None,
        error_message: str = None,
        incident_uuid: str = None,
        region_id: str = None,
        status: str = None,
        task_id: str = None,
        thread_id: str = None,
        time: int = None,
        trigger_source: str = None,
        workspace: str = None,
    ):
        self.alert_id = alert_id
        self.analysis_result = analysis_result
        self.digital_employee_name = digital_employee_name
        self.error_message = error_message
        self.incident_uuid = incident_uuid
        self.region_id = region_id
        self.status = status
        self.task_id = task_id
        self.thread_id = thread_id
        self.time = time
        self.trigger_source = trigger_source
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_id is not None:
            result['alertId'] = self.alert_id
        if self.analysis_result is not None:
            result['analysisResult'] = self.analysis_result
        if self.digital_employee_name is not None:
            result['digitalEmployeeName'] = self.digital_employee_name
        if self.error_message is not None:
            result['errorMessage'] = self.error_message
        if self.incident_uuid is not None:
            result['incidentUuid'] = self.incident_uuid
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.status is not None:
            result['status'] = self.status
        if self.task_id is not None:
            result['taskId'] = self.task_id
        if self.thread_id is not None:
            result['threadId'] = self.thread_id
        if self.time is not None:
            result['time'] = self.time
        if self.trigger_source is not None:
            result['triggerSource'] = self.trigger_source
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertId') is not None:
            self.alert_id = m.get('alertId')
        if m.get('analysisResult') is not None:
            self.analysis_result = m.get('analysisResult')
        if m.get('digitalEmployeeName') is not None:
            self.digital_employee_name = m.get('digitalEmployeeName')
        if m.get('errorMessage') is not None:
            self.error_message = m.get('errorMessage')
        if m.get('incidentUuid') is not None:
            self.incident_uuid = m.get('incidentUuid')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('taskId') is not None:
            self.task_id = m.get('taskId')
        if m.get('threadId') is not None:
            self.thread_id = m.get('threadId')
        if m.get('time') is not None:
            self.time = m.get('time')
        if m.get('triggerSource') is not None:
            self.trigger_source = m.get('triggerSource')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListRcaTasksResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        task_list: List[ListRcaTasksResponseBodyTaskList] = None,
        total: int = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.task_list = task_list
        self.total = total

    def validate(self):
        if self.task_list:
            for k in self.task_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.request_id is not None:
            result['requestId'] = self.request_id
        result['taskList'] = []
        if self.task_list is not None:
            for k in self.task_list:
                result['taskList'].append(k.to_map() if k else None)
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = 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('requestId') is not None:
            self.request_id = m.get('requestId')
        self.task_list = []
        if m.get('taskList') is not None:
            for k in m.get('taskList'):
                temp_model = ListRcaTasksResponseBodyTaskList()
                self.task_list.append(temp_model.from_map(k))
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListRcaTasksResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListRcaTasksResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListRcaTasksResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListServiceTaskRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        search_condition: str = None,
        type: str = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.search_condition = search_condition
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.search_condition is not None:
            result['searchCondition'] = self.search_condition
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = 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('searchCondition') is not None:
            self.search_condition = m.get('searchCondition')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ListServiceTaskResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        service_tasks: List[Dict[str, Any]] = None,
        total_count: int = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.service_tasks = service_tasks
        self.total_count = total_count

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.request_id is not None:
            result['requestId'] = self.request_id
        if self.service_tasks is not None:
            result['serviceTasks'] = self.service_tasks
        if self.total_count is not None:
            result['totalCount'] = self.total_count
        return result

    def from_map(self, m: dict = 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('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('serviceTasks') is not None:
            self.service_tasks = m.get('serviceTasks')
        if m.get('totalCount') is not None:
            self.total_count = m.get('totalCount')
        return self


class ListServiceTaskResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListServiceTaskResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListServiceTaskResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListServicesRequestTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        self.key = key
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 ListServicesRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        resource_group_id: str = None,
        service_name: str = None,
        service_type: str = None,
        tags: List[ListServicesRequestTags] = None,
    ):
        # The maximum number of records to return in this request.
        self.max_results = max_results
        # Token for the next query, an empty value indicates the last page.
        self.next_token = next_token
        self.resource_group_id = resource_group_id
        self.service_name = service_name
        # Service type
        self.service_type = service_type
        self.tags = tags

    def validate(self):
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.service_name is not None:
            result['serviceName'] = self.service_name
        if self.service_type is not None:
            result['serviceType'] = self.service_type
        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: dict = 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('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('serviceName') is not None:
            self.service_name = m.get('serviceName')
        if m.get('serviceType') is not None:
            self.service_type = m.get('serviceType')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = ListServicesRequestTags()
                self.tags.append(temp_model.from_map(k))
        return self


class ListServicesShrinkRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        resource_group_id: str = None,
        service_name: str = None,
        service_type: str = None,
        tags_shrink: str = None,
    ):
        # The maximum number of records to return in this request.
        self.max_results = max_results
        # Token for the next query, an empty value indicates the last page.
        self.next_token = next_token
        self.resource_group_id = resource_group_id
        self.service_name = service_name
        # Service type
        self.service_type = service_type
        self.tags_shrink = tags_shrink

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.service_name is not None:
            result['serviceName'] = self.service_name
        if self.service_type is not None:
            result['serviceType'] = self.service_type
        if self.tags_shrink is not None:
            result['tags'] = self.tags_shrink
        return result

    def from_map(self, m: dict = 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('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('serviceName') is not None:
            self.service_name = m.get('serviceName')
        if m.get('serviceType') is not None:
            self.service_type = m.get('serviceType')
        if m.get('tags') is not None:
            self.tags_shrink = m.get('tags')
        return self


class ListServicesResponseBodyServices(TeaModel):
    def __init__(
        self,
        attributes: str = None,
        create_time: str = None,
        description: str = None,
        display_name: str = None,
        pid: str = None,
        resource_group_id: str = None,
        service_id: str = None,
        service_name: str = None,
        service_status: str = None,
        service_type: str = None,
        workspace: str = None,
    ):
        # Extended information.
        self.attributes = attributes
        # Creation time
        self.create_time = create_time
        # Service description, valid only when serviceType=RUM.
        self.description = description
        # Display name, valid only when serviceType=RUM.
        self.display_name = display_name
        # Historical compatible ARMS application ID
        self.pid = pid
        self.resource_group_id = resource_group_id
        # Service ID
        self.service_id = service_id
        # Service name
        self.service_name = service_name
        # Service status, valid only when serviceType=RUM.
        self.service_status = service_status
        # Service type
        self.service_type = service_type
        # Workspace.
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.attributes is not None:
            result['attributes'] = self.attributes
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.pid is not None:
            result['pid'] = self.pid
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.service_id is not None:
            result['serviceId'] = self.service_id
        if self.service_name is not None:
            result['serviceName'] = self.service_name
        if self.service_status is not None:
            result['serviceStatus'] = self.service_status
        if self.service_type is not None:
            result['serviceType'] = self.service_type
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('attributes') is not None:
            self.attributes = m.get('attributes')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('pid') is not None:
            self.pid = m.get('pid')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('serviceId') is not None:
            self.service_id = m.get('serviceId')
        if m.get('serviceName') is not None:
            self.service_name = m.get('serviceName')
        if m.get('serviceStatus') is not None:
            self.service_status = m.get('serviceStatus')
        if m.get('serviceType') is not None:
            self.service_type = m.get('serviceType')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListServicesResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        services: List[ListServicesResponseBodyServices] = None,
        total_count: int = None,
    ):
        # Maximum number of results to return, with a maximum value of 200
        self.max_results = max_results
        # Pagination token
        self.next_token = next_token
        # Request ID
        self.request_id = request_id
        # List of service information.
        self.services = services
        # Total count
        self.total_count = total_count

    def validate(self):
        if self.services:
            for k in self.services:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.request_id is not None:
            result['requestId'] = self.request_id
        result['services'] = []
        if self.services is not None:
            for k in self.services:
                result['services'].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: dict = 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('requestId') is not None:
            self.request_id = m.get('requestId')
        self.services = []
        if m.get('services') is not None:
            for k in m.get('services'):
                temp_model = ListServicesResponseBodyServices()
                self.services.append(temp_model.from_map(k))
        if m.get('totalCount') is not None:
            self.total_count = m.get('totalCount')
        return self


class ListServicesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListServicesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListServicesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListSiteMonitorsRequest(TeaModel):
    def __init__(
        self,
        keyword: str = None,
        max_results: int = None,
        next_token: str = None,
        task_id: str = None,
        task_labels: str = None,
        task_state: int = None,
        task_type: str = None,
    ):
        self.keyword = keyword
        self.max_results = max_results
        self.next_token = next_token
        self.task_id = task_id
        self.task_labels = task_labels
        self.task_state = task_state
        self.task_type = task_type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.keyword is not None:
            result['keyword'] = self.keyword
        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.task_id is not None:
            result['taskId'] = self.task_id
        if self.task_labels is not None:
            result['taskLabels'] = self.task_labels
        if self.task_state is not None:
            result['taskState'] = self.task_state
        if self.task_type is not None:
            result['taskType'] = self.task_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('keyword') is not None:
            self.keyword = m.get('keyword')
        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('taskId') is not None:
            self.task_id = m.get('taskId')
        if m.get('taskLabels') is not None:
            self.task_labels = m.get('taskLabels')
        if m.get('taskState') is not None:
            self.task_state = m.get('taskState')
        if m.get('taskType') is not None:
            self.task_type = m.get('taskType')
        return self


class ListSiteMonitorsResponseBodySiteMonitors(TeaModel):
    def __init__(
        self,
        address: str = None,
        agent_group: str = None,
        create_time: str = None,
        end_time: str = None,
        interval: int = None,
        option: str = None,
        task_id: str = None,
        task_name: str = None,
        task_state: int = None,
        task_type: str = None,
        update_time: str = None,
    ):
        self.address = address
        self.agent_group = agent_group
        self.create_time = create_time
        self.end_time = end_time
        self.interval = interval
        self.option = option
        self.task_id = task_id
        self.task_name = task_name
        self.task_state = task_state
        self.task_type = task_type
        self.update_time = update_time

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.address is not None:
            result['address'] = self.address
        if self.agent_group is not None:
            result['agentGroup'] = self.agent_group
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.end_time is not None:
            result['endTime'] = self.end_time
        if self.interval is not None:
            result['interval'] = self.interval
        if self.option is not None:
            result['option'] = self.option
        if self.task_id is not None:
            result['taskId'] = self.task_id
        if self.task_name is not None:
            result['taskName'] = self.task_name
        if self.task_state is not None:
            result['taskState'] = self.task_state
        if self.task_type is not None:
            result['taskType'] = self.task_type
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('address') is not None:
            self.address = m.get('address')
        if m.get('agentGroup') is not None:
            self.agent_group = m.get('agentGroup')
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('endTime') is not None:
            self.end_time = m.get('endTime')
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('option') is not None:
            self.option = m.get('option')
        if m.get('taskId') is not None:
            self.task_id = m.get('taskId')
        if m.get('taskName') is not None:
            self.task_name = m.get('taskName')
        if m.get('taskState') is not None:
            self.task_state = m.get('taskState')
        if m.get('taskType') is not None:
            self.task_type = m.get('taskType')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        return self


class ListSiteMonitorsResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        page_number: str = None,
        request_id: str = None,
        site_monitors: List[ListSiteMonitorsResponseBodySiteMonitors] = None,
        total_count: int = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.page_number = page_number
        self.request_id = request_id
        self.site_monitors = site_monitors
        self.total_count = total_count

    def validate(self):
        if self.site_monitors:
            for k in self.site_monitors:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.request_id is not None:
            result['requestId'] = self.request_id
        result['siteMonitors'] = []
        if self.site_monitors is not None:
            for k in self.site_monitors:
                result['siteMonitors'].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: dict = 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('pageNumber') is not None:
            self.page_number = m.get('pageNumber')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        self.site_monitors = []
        if m.get('siteMonitors') is not None:
            for k in m.get('siteMonitors'):
                temp_model = ListSiteMonitorsResponseBodySiteMonitors()
                self.site_monitors.append(temp_model.from_map(k))
        if m.get('totalCount') is not None:
            self.total_count = m.get('totalCount')
        return self


class ListSiteMonitorsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListSiteMonitorsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListSiteMonitorsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListSubscriptionsRequest(TeaModel):
    def __init__(
        self,
        direction: str = None,
        enable: bool = None,
        max_results: int = None,
        next_token: str = None,
        order_by: str = None,
        subscription_id: str = None,
        subscription_name: str = None,
        workspace: str = None,
    ):
        self.direction = direction
        self.enable = enable
        self.max_results = max_results
        self.next_token = next_token
        self.order_by = order_by
        self.subscription_id = subscription_id
        self.subscription_name = subscription_name
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.direction is not None:
            result['direction'] = self.direction
        if self.enable is not None:
            result['enable'] = self.enable
        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.order_by is not None:
            result['orderBy'] = self.order_by
        if self.subscription_id is not None:
            result['subscriptionId'] = self.subscription_id
        if self.subscription_name is not None:
            result['subscriptionName'] = self.subscription_name
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('direction') is not None:
            self.direction = m.get('direction')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        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('orderBy') is not None:
            self.order_by = m.get('orderBy')
        if m.get('subscriptionId') is not None:
            self.subscription_id = m.get('subscriptionId')
        if m.get('subscriptionName') is not None:
            self.subscription_name = m.get('subscriptionName')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListSubscriptionsResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        subscription_list: List[SubscriptionForView] = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        # Id of the request
        self.request_id = request_id
        self.subscription_list = subscription_list

    def validate(self):
        if self.subscription_list:
            for k in self.subscription_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.request_id is not None:
            result['requestId'] = self.request_id
        result['subscriptionList'] = []
        if self.subscription_list is not None:
            for k in self.subscription_list:
                result['subscriptionList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = 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('requestId') is not None:
            self.request_id = m.get('requestId')
        self.subscription_list = []
        if m.get('subscriptionList') is not None:
            for k in m.get('subscriptionList'):
                temp_model = SubscriptionForView()
                self.subscription_list.append(temp_model.from_map(k))
        return self


class ListSubscriptionsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListSubscriptionsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListSubscriptionsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListTagResourcesRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        resource_id: List[str] = None,
        resource_type: str = None,
        tag: List[Tag] = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.resource_id = resource_id
        # This parameter is required.
        self.resource_type = resource_type
        self.tag = tag

    def validate(self):
        if self.tag:
            for k in self.tag:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.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: dict = 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('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 = Tag()
                self.tag.append(temp_model.from_map(k))
        return self


class ListTagResourcesShrinkRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        resource_id_shrink: str = None,
        resource_type: str = None,
        tag_shrink: str = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.resource_id_shrink = resource_id_shrink
        # This parameter is required.
        self.resource_type = resource_type
        self.tag_shrink = tag_shrink

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.resource_id_shrink is not None:
            result['resourceId'] = self.resource_id_shrink
        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: dict = 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('resourceId') is not None:
            self.resource_id_shrink = 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 ListTagResourcesResponseBodyTagResources(TeaModel):
    def __init__(
        self,
        resource_id: str = None,
        resource_type: str = None,
        tag_key: str = None,
        tag_value: str = None,
    ):
        self.resource_id = resource_id
        self.resource_type = resource_type
        self.tag_key = tag_key
        self.tag_value = tag_value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 ListTagResourcesResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        tag_resources: List[ListTagResourcesResponseBodyTagResources] = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.tag_resources = tag_resources

    def validate(self):
        if self.tag_resources:
            for k in self.tag_resources:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.request_id is not None:
            result['requestId'] = self.request_id
        result['tagResources'] = []
        if self.tag_resources is not None:
            for k in self.tag_resources:
                result['tagResources'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = 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('requestId') is not None:
            self.request_id = m.get('requestId')
        self.tag_resources = []
        if m.get('tagResources') is not None:
            for k in m.get('tagResources'):
                temp_model = ListTagResourcesResponseBodyTagResources()
                self.tag_resources.append(temp_model.from_map(k))
        return self


class ListTagResourcesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListTagResourcesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 ListThreadsRequestFilter(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # This parameter is required.
        self.key = key
        # This parameter is required.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 ListThreadsRequest(TeaModel):
    def __init__(
        self,
        filter: List[ListThreadsRequestFilter] = None,
        max_results: int = None,
        next_token: str = None,
        status: str = None,
        thread_id: str = None,
    ):
        self.filter = filter
        self.max_results = max_results
        self.next_token = next_token
        self.status = status
        self.thread_id = thread_id

    def validate(self):
        if self.filter:
            for k in self.filter:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['filter'] = []
        if self.filter is not None:
            for k in self.filter:
                result['filter'].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.status is not None:
            result['status'] = self.status
        if self.thread_id is not None:
            result['threadId'] = self.thread_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.filter = []
        if m.get('filter') is not None:
            for k in m.get('filter'):
                temp_model = ListThreadsRequestFilter()
                self.filter.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('status') is not None:
            self.status = m.get('status')
        if m.get('threadId') is not None:
            self.thread_id = m.get('threadId')
        return self


class ListThreadsShrinkRequest(TeaModel):
    def __init__(
        self,
        filter_shrink: str = None,
        max_results: int = None,
        next_token: str = None,
        status: str = None,
        thread_id: str = None,
    ):
        self.filter_shrink = filter_shrink
        self.max_results = max_results
        self.next_token = next_token
        self.status = status
        self.thread_id = thread_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.filter_shrink is not None:
            result['filter'] = self.filter_shrink
        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.status is not None:
            result['status'] = self.status
        if self.thread_id is not None:
            result['threadId'] = self.thread_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('filter') is not None:
            self.filter_shrink = m.get('filter')
        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('status') is not None:
            self.status = m.get('status')
        if m.get('threadId') is not None:
            self.thread_id = m.get('threadId')
        return self


class ListThreadsResponseBodyThreadsVariables(TeaModel):
    def __init__(
        self,
        project: str = None,
        workspace: str = None,
    ):
        # SLS project。
        self.project = project
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.project is not None:
            result['project'] = self.project
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('project') is not None:
            self.project = m.get('project')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListThreadsResponseBodyThreads(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        digital_employee_name: str = None,
        status: str = None,
        thread_id: str = None,
        title: str = None,
        update_time: str = None,
        variables: ListThreadsResponseBodyThreadsVariables = None,
        version: int = None,
    ):
        self.create_time = create_time
        self.digital_employee_name = digital_employee_name
        self.status = status
        self.thread_id = thread_id
        self.title = title
        self.update_time = update_time
        self.variables = variables
        self.version = version

    def validate(self):
        if self.variables:
            self.variables.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.digital_employee_name is not None:
            result['digitalEmployeeName'] = self.digital_employee_name
        if self.status is not None:
            result['status'] = self.status
        if self.thread_id is not None:
            result['threadId'] = self.thread_id
        if self.title is not None:
            result['title'] = self.title
        if self.update_time is not None:
            result['updateTime'] = self.update_time
        if self.variables is not None:
            result['variables'] = self.variables.to_map()
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('digitalEmployeeName') is not None:
            self.digital_employee_name = m.get('digitalEmployeeName')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('threadId') is not None:
            self.thread_id = m.get('threadId')
        if m.get('title') is not None:
            self.title = m.get('title')
        if m.get('updateTime') is not None:
            self.update_time = m.get('updateTime')
        if m.get('variables') is not None:
            temp_model = ListThreadsResponseBodyThreadsVariables()
            self.variables = temp_model.from_map(m['variables'])
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class ListThreadsResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        thread_id: str = None,
        threads: List[ListThreadsResponseBodyThreads] = None,
        total: int = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        # Id of the request
        self.request_id = request_id
        self.thread_id = thread_id
        self.threads = threads
        self.total = total

    def validate(self):
        if self.threads:
            for k in self.threads:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.request_id is not None:
            result['requestId'] = self.request_id
        if self.thread_id is not None:
            result['threadId'] = self.thread_id
        result['threads'] = []
        if self.threads is not None:
            for k in self.threads:
                result['threads'].append(k.to_map() if k else None)
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = 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('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('threadId') is not None:
            self.thread_id = m.get('threadId')
        self.threads = []
        if m.get('threads') is not None:
            for k in m.get('threads'):
                temp_model = ListThreadsResponseBodyThreads()
                self.threads.append(temp_model.from_map(k))
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListThreadsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListThreadsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListThreadsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListTransformersRequest(TeaModel):
    def __init__(
        self,
        direction: str = None,
        enable: bool = None,
        max_results: int = None,
        next_token: str = None,
        order_by: str = None,
        transformer_id: str = None,
        transformer_name: str = None,
        workspace: str = None,
    ):
        self.direction = direction
        self.enable = enable
        self.max_results = max_results
        self.next_token = next_token
        self.order_by = order_by
        self.transformer_id = transformer_id
        self.transformer_name = transformer_name
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.direction is not None:
            result['direction'] = self.direction
        if self.enable is not None:
            result['enable'] = self.enable
        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.order_by is not None:
            result['orderBy'] = self.order_by
        if self.transformer_id is not None:
            result['transformerId'] = self.transformer_id
        if self.transformer_name is not None:
            result['transformerName'] = self.transformer_name
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('direction') is not None:
            self.direction = m.get('direction')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        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('orderBy') is not None:
            self.order_by = m.get('orderBy')
        if m.get('transformerId') is not None:
            self.transformer_id = m.get('transformerId')
        if m.get('transformerName') is not None:
            self.transformer_name = m.get('transformerName')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListTransformersResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        transformer_list: List[TransformerForView] = None,
    ):
        self.max_results = max_results
        self.next_token = next_token
        # Id of the request
        self.request_id = request_id
        self.transformer_list = transformer_list

    def validate(self):
        if self.transformer_list:
            for k in self.transformer_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.request_id is not None:
            result['requestId'] = self.request_id
        result['transformerList'] = []
        if self.transformer_list is not None:
            for k in self.transformer_list:
                result['transformerList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = 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('requestId') is not None:
            self.request_id = m.get('requestId')
        self.transformer_list = []
        if m.get('transformerList') is not None:
            for k in m.get('transformerList'):
                temp_model = TransformerForView()
                self.transformer_list.append(temp_model.from_map(k))
        return self


class ListTransformersResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListTransformersResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListTransformersResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListUserNotifyHistoriesRequest(TeaModel):
    def __init__(
        self,
        batch_id: str = None,
        channel: str = None,
        channel_category: str = None,
        from_: int = None,
        group: str = None,
        incident_id: str = None,
        include_no_channel: bool = None,
        is_desc: bool = None,
        max_results: int = None,
        next_token: str = None,
        notify_strategy_id: str = None,
        notify_strategy_name: str = None,
        query_criteria_list: str = None,
        receiver: str = None,
        rule_id: str = None,
        rule_name: str = None,
        send_type: str = None,
        severity: str = None,
        subscription_id: str = None,
        subscription_name: str = None,
        success: bool = None,
        to: int = None,
        workspace: str = None,
    ):
        self.batch_id = batch_id
        self.channel = channel
        self.channel_category = channel_category
        self.from_ = from_
        self.group = group
        self.incident_id = incident_id
        self.include_no_channel = include_no_channel
        self.is_desc = is_desc
        self.max_results = max_results
        self.next_token = next_token
        self.notify_strategy_id = notify_strategy_id
        self.notify_strategy_name = notify_strategy_name
        self.query_criteria_list = query_criteria_list
        self.receiver = receiver
        self.rule_id = rule_id
        self.rule_name = rule_name
        self.send_type = send_type
        self.severity = severity
        self.subscription_id = subscription_id
        self.subscription_name = subscription_name
        self.success = success
        self.to = to
        # This parameter is required.
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.batch_id is not None:
            result['batchId'] = self.batch_id
        if self.channel is not None:
            result['channel'] = self.channel
        if self.channel_category is not None:
            result['channelCategory'] = self.channel_category
        if self.from_ is not None:
            result['from'] = self.from_
        if self.group is not None:
            result['group'] = self.group
        if self.incident_id is not None:
            result['incidentId'] = self.incident_id
        if self.include_no_channel is not None:
            result['includeNoChannel'] = self.include_no_channel
        if self.is_desc is not None:
            result['isDesc'] = self.is_desc
        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.notify_strategy_id is not None:
            result['notifyStrategyId'] = self.notify_strategy_id
        if self.notify_strategy_name is not None:
            result['notifyStrategyName'] = self.notify_strategy_name
        if self.query_criteria_list is not None:
            result['queryCriteriaList'] = self.query_criteria_list
        if self.receiver is not None:
            result['receiver'] = self.receiver
        if self.rule_id is not None:
            result['ruleId'] = self.rule_id
        if self.rule_name is not None:
            result['ruleName'] = self.rule_name
        if self.send_type is not None:
            result['sendType'] = self.send_type
        if self.severity is not None:
            result['severity'] = self.severity
        if self.subscription_id is not None:
            result['subscriptionId'] = self.subscription_id
        if self.subscription_name is not None:
            result['subscriptionName'] = self.subscription_name
        if self.success is not None:
            result['success'] = self.success
        if self.to is not None:
            result['to'] = self.to
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('batchId') is not None:
            self.batch_id = m.get('batchId')
        if m.get('channel') is not None:
            self.channel = m.get('channel')
        if m.get('channelCategory') is not None:
            self.channel_category = m.get('channelCategory')
        if m.get('from') is not None:
            self.from_ = m.get('from')
        if m.get('group') is not None:
            self.group = m.get('group')
        if m.get('incidentId') is not None:
            self.incident_id = m.get('incidentId')
        if m.get('includeNoChannel') is not None:
            self.include_no_channel = m.get('includeNoChannel')
        if m.get('isDesc') is not None:
            self.is_desc = m.get('isDesc')
        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('notifyStrategyId') is not None:
            self.notify_strategy_id = m.get('notifyStrategyId')
        if m.get('notifyStrategyName') is not None:
            self.notify_strategy_name = m.get('notifyStrategyName')
        if m.get('queryCriteriaList') is not None:
            self.query_criteria_list = m.get('queryCriteriaList')
        if m.get('receiver') is not None:
            self.receiver = m.get('receiver')
        if m.get('ruleId') is not None:
            self.rule_id = m.get('ruleId')
        if m.get('ruleName') is not None:
            self.rule_name = m.get('ruleName')
        if m.get('sendType') is not None:
            self.send_type = m.get('sendType')
        if m.get('severity') is not None:
            self.severity = m.get('severity')
        if m.get('subscriptionId') is not None:
            self.subscription_id = m.get('subscriptionId')
        if m.get('subscriptionName') is not None:
            self.subscription_name = m.get('subscriptionName')
        if m.get('success') is not None:
            self.success = m.get('success')
        if m.get('to') is not None:
            self.to = m.get('to')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListUserNotifyHistoriesResponseBodyHistoryList(TeaModel):
    def __init__(
        self,
        channel: str = None,
        contacts: str = None,
        groups: str = None,
        incident_id: str = None,
        job_id: str = None,
        no_channel: bool = None,
        notify_strategy_id: str = None,
        notify_strategy_name: str = None,
        receiver: str = None,
        result: str = None,
        rule_id: str = None,
        rule_name: str = None,
        send_type: str = None,
        severity: str = None,
        status: str = None,
        subscription_id: str = None,
        subscription_name: str = None,
        success: bool = None,
        timestamp: int = None,
        user_id: str = None,
    ):
        self.channel = channel
        self.contacts = contacts
        self.groups = groups
        self.incident_id = incident_id
        self.job_id = job_id
        self.no_channel = no_channel
        self.notify_strategy_id = notify_strategy_id
        self.notify_strategy_name = notify_strategy_name
        self.receiver = receiver
        self.result = result
        self.rule_id = rule_id
        self.rule_name = rule_name
        self.send_type = send_type
        self.severity = severity
        self.status = status
        self.subscription_id = subscription_id
        self.subscription_name = subscription_name
        self.success = success
        self.timestamp = timestamp
        self.user_id = user_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.channel is not None:
            result['channel'] = self.channel
        if self.contacts is not None:
            result['contacts'] = self.contacts
        if self.groups is not None:
            result['groups'] = self.groups
        if self.incident_id is not None:
            result['incidentId'] = self.incident_id
        if self.job_id is not None:
            result['jobId'] = self.job_id
        if self.no_channel is not None:
            result['noChannel'] = self.no_channel
        if self.notify_strategy_id is not None:
            result['notifyStrategyId'] = self.notify_strategy_id
        if self.notify_strategy_name is not None:
            result['notifyStrategyName'] = self.notify_strategy_name
        if self.receiver is not None:
            result['receiver'] = self.receiver
        if self.result is not None:
            result['result'] = self.result
        if self.rule_id is not None:
            result['ruleId'] = self.rule_id
        if self.rule_name is not None:
            result['ruleName'] = self.rule_name
        if self.send_type is not None:
            result['sendType'] = self.send_type
        if self.severity is not None:
            result['severity'] = self.severity
        if self.status is not None:
            result['status'] = self.status
        if self.subscription_id is not None:
            result['subscriptionId'] = self.subscription_id
        if self.subscription_name is not None:
            result['subscriptionName'] = self.subscription_name
        if self.success is not None:
            result['success'] = self.success
        if self.timestamp is not None:
            result['timestamp'] = self.timestamp
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('channel') is not None:
            self.channel = m.get('channel')
        if m.get('contacts') is not None:
            self.contacts = m.get('contacts')
        if m.get('groups') is not None:
            self.groups = m.get('groups')
        if m.get('incidentId') is not None:
            self.incident_id = m.get('incidentId')
        if m.get('jobId') is not None:
            self.job_id = m.get('jobId')
        if m.get('noChannel') is not None:
            self.no_channel = m.get('noChannel')
        if m.get('notifyStrategyId') is not None:
            self.notify_strategy_id = m.get('notifyStrategyId')
        if m.get('notifyStrategyName') is not None:
            self.notify_strategy_name = m.get('notifyStrategyName')
        if m.get('receiver') is not None:
            self.receiver = m.get('receiver')
        if m.get('result') is not None:
            self.result = m.get('result')
        if m.get('ruleId') is not None:
            self.rule_id = m.get('ruleId')
        if m.get('ruleName') is not None:
            self.rule_name = m.get('ruleName')
        if m.get('sendType') is not None:
            self.send_type = m.get('sendType')
        if m.get('severity') is not None:
            self.severity = m.get('severity')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('subscriptionId') is not None:
            self.subscription_id = m.get('subscriptionId')
        if m.get('subscriptionName') is not None:
            self.subscription_name = m.get('subscriptionName')
        if m.get('success') is not None:
            self.success = m.get('success')
        if m.get('timestamp') is not None:
            self.timestamp = m.get('timestamp')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class ListUserNotifyHistoriesResponseBody(TeaModel):
    def __init__(
        self,
        history_list: List[ListUserNotifyHistoriesResponseBodyHistoryList] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total: int = None,
    ):
        self.history_list = history_list
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.total = total

    def validate(self):
        if self.history_list:
            for k in self.history_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['historyList'] = []
        if self.history_list is not None:
            for k in self.history_list:
                result['historyList'].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.request_id is not None:
            result['requestId'] = self.request_id
        if self.total is not None:
            result['total'] = self.total
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.history_list = []
        if m.get('historyList') is not None:
            for k in m.get('historyList'):
                temp_model = ListUserNotifyHistoriesResponseBodyHistoryList()
                self.history_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('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ListUserNotifyHistoriesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListUserNotifyHistoriesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListUserNotifyHistoriesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ListWorkspacesRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        region: str = None,
        workspace_name: str = None,
        workspace_name_list: List[str] = None,
    ):
        # Page size
        # Default value:
        # 	50
        # Maximum value:
        # 	50
        self.max_results = max_results
        # Pagination Token
        self.next_token = next_token
        # Region
        self.region = region
        # Workspace name, fuzzy search
        self.workspace_name = workspace_name
        # Workspace name, exact match
        self.workspace_name_list = workspace_name_list

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.workspace_name is not None:
            result['workspaceName'] = self.workspace_name
        if self.workspace_name_list is not None:
            result['workspaceNameList'] = self.workspace_name_list
        return result

    def from_map(self, m: dict = 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('workspaceName') is not None:
            self.workspace_name = m.get('workspaceName')
        if m.get('workspaceNameList') is not None:
            self.workspace_name_list = m.get('workspaceNameList')
        return self


class ListWorkspacesShrinkRequest(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        region: str = None,
        workspace_name: str = None,
        workspace_name_list_shrink: str = None,
    ):
        # Page size
        # Default value:
        # 	50
        # Maximum value:
        # 	50
        self.max_results = max_results
        # Pagination Token
        self.next_token = next_token
        # Region
        self.region = region
        # Workspace name, fuzzy search
        self.workspace_name = workspace_name
        # Workspace name, exact match
        self.workspace_name_list_shrink = workspace_name_list_shrink

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.workspace_name is not None:
            result['workspaceName'] = self.workspace_name
        if self.workspace_name_list_shrink is not None:
            result['workspaceNameList'] = self.workspace_name_list_shrink
        return result

    def from_map(self, m: dict = 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('workspaceName') is not None:
            self.workspace_name = m.get('workspaceName')
        if m.get('workspaceNameList') is not None:
            self.workspace_name_list_shrink = m.get('workspaceNameList')
        return self


class ListWorkspacesResponseBodyWorkspaces(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        description: str = None,
        display_name: str = None,
        last_modify_time: str = None,
        region_id: str = None,
        sls_project: str = None,
        workspace_name: str = None,
    ):
        # Creation time
        # 
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.create_time = create_time
        # Workspace description
        self.description = description
        # Workspace display name
        self.display_name = display_name
        # Last modified time
        # 
        # Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ
        self.last_modify_time = last_modify_time
        # Region ID
        self.region_id = region_id
        # Log Service project name
        self.sls_project = sls_project
        # Workspace name
        # 
        # This parameter is required.
        self.workspace_name = workspace_name

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.create_time is not None:
            result['createTime'] = self.create_time
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.last_modify_time is not None:
            result['lastModifyTime'] = self.last_modify_time
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.sls_project is not None:
            result['slsProject'] = self.sls_project
        if self.workspace_name is not None:
            result['workspaceName'] = self.workspace_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTime') is not None:
            self.create_time = m.get('createTime')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('lastModifyTime') is not None:
            self.last_modify_time = m.get('lastModifyTime')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('slsProject') is not None:
            self.sls_project = m.get('slsProject')
        if m.get('workspaceName') is not None:
            self.workspace_name = m.get('workspaceName')
        return self


class ListWorkspacesResponseBody(TeaModel):
    def __init__(
        self,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total: int = None,
        workspaces: List[ListWorkspacesResponseBodyWorkspaces] = None,
    ):
        # Page size
        # Default value:
        # 	50
        # Maximum value:
        # 	50
        self.max_results = max_results
        # Pagination Token
        self.next_token = next_token
        # Request ID
        self.request_id = request_id
        # Total count
        self.total = total
        # List of workspaces
        self.workspaces = workspaces

    def validate(self):
        if self.workspaces:
            for k in self.workspaces:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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.request_id is not None:
            result['requestId'] = self.request_id
        if self.total is not None:
            result['total'] = self.total
        result['workspaces'] = []
        if self.workspaces is not None:
            for k in self.workspaces:
                result['workspaces'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = 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('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('total') is not None:
            self.total = m.get('total')
        self.workspaces = []
        if m.get('workspaces') is not None:
            for k in m.get('workspaces'):
                temp_model = ListWorkspacesResponseBodyWorkspaces()
                self.workspaces.append(temp_model.from_map(k))
        return self


class ListWorkspacesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ListWorkspacesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ListWorkspacesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class MockSystemEventRequest(TeaModel):
    def __init__(
        self,
        body: str = None,
    ):
        self.body = body

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.body is not None:
            result['body'] = self.body
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            self.body = m.get('body')
        return self


class MockSystemEventResponseBody(TeaModel):
    def __init__(
        self,
        data: str = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 MockSystemEventResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: MockSystemEventResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = MockSystemEventResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class OpenCmsServiceResponseBody(TeaModel):
    def __init__(
        self,
        enabled: bool = None,
        request_id: str = None,
    ):
        self.enabled = enabled
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class OpenCmsServiceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: OpenCmsServiceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = OpenCmsServiceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class PatchAlertRuleRequest(TeaModel):
    def __init__(
        self,
        alert_metric_input: AlertRuleAlertMetricInput = None,
        annotations: Dict[str, str] = None,
        condition: AlertRuleCondition = None,
        display_name: str = None,
        interval: int = None,
        labels: Dict[str, str] = None,
        level: str = None,
        message: str = None,
        query: AlertRuleQuery = None,
        send: AlertRuleSend = None,
        call_source: str = None,
    ):
        self.alert_metric_input = alert_metric_input
        # 规则注解，允许设置长文本
        self.annotations = annotations
        self.condition = condition
        # 代表资源名称的资源属性字段
        self.display_name = display_name
        self.interval = interval
        self.labels = labels
        # 告警级别，CRITICAL,ERROR,WARNING,INFO，默认INFO，
        self.level = level
        # 告警规则的通知消息内容
        self.message = message
        self.query = query
        self.send = send
        self.call_source = call_source

    def validate(self):
        if self.alert_metric_input:
            self.alert_metric_input.validate()
        if self.condition:
            self.condition.validate()
        if self.query:
            self.query.validate()
        if self.send:
            self.send.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_metric_input is not None:
            result['alertMetricInput'] = self.alert_metric_input.to_map()
        if self.annotations is not None:
            result['annotations'] = self.annotations
        if self.condition is not None:
            result['condition'] = self.condition.to_map()
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.interval is not None:
            result['interval'] = self.interval
        if self.labels is not None:
            result['labels'] = self.labels
        if self.level is not None:
            result['level'] = self.level
        if self.message is not None:
            result['message'] = self.message
        if self.query is not None:
            result['query'] = self.query.to_map()
        if self.send is not None:
            result['send'] = self.send.to_map()
        if self.call_source is not None:
            result['callSource'] = self.call_source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertMetricInput') is not None:
            temp_model = AlertRuleAlertMetricInput()
            self.alert_metric_input = temp_model.from_map(m['alertMetricInput'])
        if m.get('annotations') is not None:
            self.annotations = m.get('annotations')
        if m.get('condition') is not None:
            temp_model = AlertRuleCondition()
            self.condition = temp_model.from_map(m['condition'])
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('labels') is not None:
            self.labels = m.get('labels')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('query') is not None:
            temp_model = AlertRuleQuery()
            self.query = temp_model.from_map(m['query'])
        if m.get('send') is not None:
            temp_model = AlertRuleSend()
            self.send = temp_model.from_map(m['send'])
        if m.get('callSource') is not None:
            self.call_source = m.get('callSource')
        return self


class PatchAlertRuleResponseBody(TeaModel):
    def __init__(
        self,
        data: int = None,
        request_id: str = None,
    ):
        self.data = data
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 PatchAlertRuleResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: PatchAlertRuleResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = PatchAlertRuleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ProxyApiForMemberAccountRequest(TeaModel):
    def __init__(
        self,
        body: str = None,
    ):
        self.body = body

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.body is not None:
            result['body'] = self.body
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            self.body = m.get('body')
        return self


class ProxyApiForMemberAccountResponseBody(TeaModel):
    def __init__(
        self,
        data: str = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 ProxyApiForMemberAccountResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ProxyApiForMemberAccountResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ProxyApiForMemberAccountResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class PutIncidentCommandRequest(TeaModel):
    def __init__(
        self,
        command_content: str = None,
        session: str = None,
        token: str = None,
        workspace: str = None,
    ):
        # This parameter is required.
        self.command_content = command_content
        self.session = session
        # This parameter is required.
        self.token = token
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.command_content is not None:
            result['commandContent'] = self.command_content
        if self.session is not None:
            result['session'] = self.session
        if self.token is not None:
            result['token'] = self.token
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('commandContent') is not None:
            self.command_content = m.get('commandContent')
        if m.get('session') is not None:
            self.session = m.get('session')
        if m.get('token') is not None:
            self.token = m.get('token')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class PutIncidentCommandResponseBody(TeaModel):
    def __init__(
        self,
        data: Any = None,
        data_list: List[Any] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total_long: int = None,
    ):
        self.data = data
        self.data_list = data_list
        self.max_results = max_results
        self.next_token = next_token
        self.request_id = request_id
        self.total_long = total_long

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.data is not None:
            result['data'] = self.data
        if self.data_list is not None:
            result['dataList'] = self.data_list
        if self.max_results is not None:
            result['maxResults'] = self.max_results
        if self.next_token is not None:
            result['nextToken'] = self.next_token
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.total_long is not None:
            result['totalLong'] = self.total_long
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('dataList') is not None:
            self.data_list = m.get('dataList')
        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('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('totalLong') is not None:
            self.total_long = m.get('totalLong')
        return self


class PutIncidentCommandResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: PutIncidentCommandResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = PutIncidentCommandResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class PutResourceLifecycleEventRequest(TeaModel):
    def __init__(
        self,
        resource_change_type: str = None,
        resource_id: str = None,
        resource_properties: str = None,
        resource_region: str = None,
        resource_type: str = None,
        resource_user_id: str = None,
    ):
        self.resource_change_type = resource_change_type
        self.resource_id = resource_id
        self.resource_properties = resource_properties
        self.resource_region = resource_region
        self.resource_type = resource_type
        self.resource_user_id = resource_user_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.resource_change_type is not None:
            result['resourceChangeType'] = self.resource_change_type
        if self.resource_id is not None:
            result['resourceId'] = self.resource_id
        if self.resource_properties is not None:
            result['resourceProperties'] = self.resource_properties
        if self.resource_region is not None:
            result['resourceRegion'] = self.resource_region
        if self.resource_type is not None:
            result['resourceType'] = self.resource_type
        if self.resource_user_id is not None:
            result['resourceUserId'] = self.resource_user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('resourceChangeType') is not None:
            self.resource_change_type = m.get('resourceChangeType')
        if m.get('resourceId') is not None:
            self.resource_id = m.get('resourceId')
        if m.get('resourceProperties') is not None:
            self.resource_properties = m.get('resourceProperties')
        if m.get('resourceRegion') is not None:
            self.resource_region = m.get('resourceRegion')
        if m.get('resourceType') is not None:
            self.resource_type = m.get('resourceType')
        if m.get('resourceUserId') is not None:
            self.resource_user_id = m.get('resourceUserId')
        return self


class PutResourceLifecycleEventResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: str = None,
        message: str = None,
        request_id: str = None,
    ):
        self.code = code
        self.data = data
        self.message = message
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['code'] = self.code
        if self.data is not None:
            result['data'] = self.data
        if self.message is not None:
            result['message'] = self.message
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('code') is not None:
            self.code = m.get('code')
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class PutResourceLifecycleEventResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: PutResourceLifecycleEventResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = PutResourceLifecycleEventResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class PutWorkspaceRequest(TeaModel):
    def __init__(
        self,
        description: str = None,
        display_name: str = None,
        sls_project: str = None,
    ):
        # Description of the workspace
        self.description = description
        # Display name of the workspace
        self.display_name = display_name
        # Name of the Log Service project
        # 
        # This parameter is required.
        self.sls_project = sls_project

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.sls_project is not None:
            result['slsProject'] = self.sls_project
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('slsProject') is not None:
            self.sls_project = m.get('slsProject')
        return self


class PutWorkspaceResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        workspace_name: str = None,
    ):
        # ID of the request
        self.request_id = request_id
        # Name of the workspace.
        self.workspace_name = workspace_name

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.workspace_name is not None:
            result['workspaceName'] = self.workspace_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('workspaceName') is not None:
            self.workspace_name = m.get('workspaceName')
        return self


class PutWorkspaceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: PutWorkspaceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = PutWorkspaceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class RenderAlertMetricRequest(TeaModel):
    def __init__(
        self,
        filter_values: List[AlertRuleAlertMetricInputFilterValue] = None,
        param_values: List[AlertRuleAlertMetricInputParamValue] = None,
    ):
        self.filter_values = filter_values
        self.param_values = param_values

    def validate(self):
        if self.filter_values:
            for k in self.filter_values:
                if k:
                    k.validate()
        if self.param_values:
            for k in self.param_values:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['filterValues'] = []
        if self.filter_values is not None:
            for k in self.filter_values:
                result['filterValues'].append(k.to_map() if k else None)
        result['paramValues'] = []
        if self.param_values is not None:
            for k in self.param_values:
                result['paramValues'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.filter_values = []
        if m.get('filterValues') is not None:
            for k in m.get('filterValues'):
                temp_model = AlertRuleAlertMetricInputFilterValue()
                self.filter_values.append(temp_model.from_map(k))
        self.param_values = []
        if m.get('paramValues') is not None:
            for k in m.get('paramValues'):
                temp_model = AlertRuleAlertMetricInputParamValue()
                self.param_values.append(temp_model.from_map(k))
        return self


class RenderAlertMetricShrinkRequest(TeaModel):
    def __init__(
        self,
        filter_values_shrink: str = None,
        param_values_shrink: str = None,
    ):
        self.filter_values_shrink = filter_values_shrink
        self.param_values_shrink = param_values_shrink

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.filter_values_shrink is not None:
            result['filterValues'] = self.filter_values_shrink
        if self.param_values_shrink is not None:
            result['paramValues'] = self.param_values_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('filterValues') is not None:
            self.filter_values_shrink = m.get('filterValues')
        if m.get('paramValues') is not None:
            self.param_values_shrink = m.get('paramValues')
        return self


class RenderAlertMetricResponseBody(TeaModel):
    def __init__(
        self,
        alert_metric_id: str = None,
        expr: str = None,
        request_id: str = None,
    ):
        self.alert_metric_id = alert_metric_id
        self.expr = expr
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_metric_id is not None:
            result['alertMetricId'] = self.alert_metric_id
        if self.expr is not None:
            result['expr'] = self.expr
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertMetricId') is not None:
            self.alert_metric_id = m.get('alertMetricId')
        if m.get('expr') is not None:
            self.expr = m.get('expr')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class RenderAlertMetricResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: RenderAlertMetricResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = RenderAlertMetricResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ResendVerifyActivateRequest(TeaModel):
    def __init__(
        self,
        channel_type: str = None,
    ):
        self.channel_type = channel_type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.channel_type is not None:
            result['channelType'] = self.channel_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('channelType') is not None:
            self.channel_type = m.get('channelType')
        return self


class ResendVerifyActivateResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class ResendVerifyActivateResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ResendVerifyActivateResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ResendVerifyActivateResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class SearchMemoriesRequest(TeaModel):
    def __init__(
        self,
        agent_id: str = None,
        app_id: str = None,
        metadata: Dict[str, Any] = None,
        query: str = None,
        rerank: bool = None,
        run_id: str = None,
        top_k: int = None,
        user_id: str = None,
    ):
        self.agent_id = agent_id
        self.app_id = app_id
        self.metadata = metadata
        self.query = query
        self.rerank = rerank
        self.run_id = run_id
        self.top_k = top_k
        self.user_id = user_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.agent_id is not None:
            result['agentId'] = self.agent_id
        if self.app_id is not None:
            result['appId'] = self.app_id
        if self.metadata is not None:
            result['metadata'] = self.metadata
        if self.query is not None:
            result['query'] = self.query
        if self.rerank is not None:
            result['rerank'] = self.rerank
        if self.run_id is not None:
            result['runId'] = self.run_id
        if self.top_k is not None:
            result['topK'] = self.top_k
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('agentId') is not None:
            self.agent_id = m.get('agentId')
        if m.get('appId') is not None:
            self.app_id = m.get('appId')
        if m.get('metadata') is not None:
            self.metadata = m.get('metadata')
        if m.get('query') is not None:
            self.query = m.get('query')
        if m.get('rerank') is not None:
            self.rerank = m.get('rerank')
        if m.get('runId') is not None:
            self.run_id = m.get('runId')
        if m.get('topK') is not None:
            self.top_k = m.get('topK')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class SearchMemoriesResponseBodyRelations(TeaModel):
    def __init__(
        self,
        destination: str = None,
        relationship: str = None,
        source: str = None,
    ):
        self.destination = destination
        self.relationship = relationship
        self.source = source

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.destination is not None:
            result['destination'] = self.destination
        if self.relationship is not None:
            result['relationship'] = self.relationship
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('destination') is not None:
            self.destination = m.get('destination')
        if m.get('relationship') is not None:
            self.relationship = m.get('relationship')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class SearchMemoriesResponseBodyResults(TeaModel):
    def __init__(
        self,
        actor_id: str = None,
        agent_id: str = None,
        created_at: str = None,
        hash: str = None,
        id: str = None,
        memory: str = None,
        metadata: str = None,
        role: str = None,
        run_id: str = None,
        score: float = None,
        updated_at: str = None,
        user_id: str = None,
    ):
        self.actor_id = actor_id
        self.agent_id = agent_id
        self.created_at = created_at
        self.hash = hash
        self.id = id
        self.memory = memory
        self.metadata = metadata
        self.role = role
        self.run_id = run_id
        self.score = score
        self.updated_at = updated_at
        self.user_id = user_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.actor_id is not None:
            result['actorId'] = self.actor_id
        if self.agent_id is not None:
            result['agentId'] = self.agent_id
        if self.created_at is not None:
            result['createdAt'] = self.created_at
        if self.hash is not None:
            result['hash'] = self.hash
        if self.id is not None:
            result['id'] = self.id
        if self.memory is not None:
            result['memory'] = self.memory
        if self.metadata is not None:
            result['metadata'] = self.metadata
        if self.role is not None:
            result['role'] = self.role
        if self.run_id is not None:
            result['runId'] = self.run_id
        if self.score is not None:
            result['score'] = self.score
        if self.updated_at is not None:
            result['updatedAt'] = self.updated_at
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('actorId') is not None:
            self.actor_id = m.get('actorId')
        if m.get('agentId') is not None:
            self.agent_id = m.get('agentId')
        if m.get('createdAt') is not None:
            self.created_at = m.get('createdAt')
        if m.get('hash') is not None:
            self.hash = m.get('hash')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('memory') is not None:
            self.memory = m.get('memory')
        if m.get('metadata') is not None:
            self.metadata = m.get('metadata')
        if m.get('role') is not None:
            self.role = m.get('role')
        if m.get('runId') is not None:
            self.run_id = m.get('runId')
        if m.get('score') is not None:
            self.score = m.get('score')
        if m.get('updatedAt') is not None:
            self.updated_at = m.get('updatedAt')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class SearchMemoriesResponseBody(TeaModel):
    def __init__(
        self,
        relations: List[SearchMemoriesResponseBodyRelations] = None,
        request_id: str = None,
        results: List[SearchMemoriesResponseBodyResults] = None,
    ):
        self.relations = relations
        self.request_id = request_id
        self.results = results

    def validate(self):
        if self.relations:
            for k in self.relations:
                if k:
                    k.validate()
        if self.results:
            for k in self.results:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['relations'] = []
        if self.relations is not None:
            for k in self.relations:
                result['relations'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['requestId'] = self.request_id
        result['results'] = []
        if self.results is not None:
            for k in self.results:
                result['results'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.relations = []
        if m.get('relations') is not None:
            for k in m.get('relations'):
                temp_model = SearchMemoriesResponseBodyRelations()
                self.relations.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        self.results = []
        if m.get('results') is not None:
            for k in m.get('results'):
                temp_model = SearchMemoriesResponseBodyResults()
                self.results.append(temp_model.from_map(k))
        return self


class SearchMemoriesResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: SearchMemoriesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = SearchMemoriesResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class SendItsmVerifyCodeRequest(TeaModel):
    def __init__(
        self,
        contact_id: str = None,
        phone: str = None,
        session: str = None,
        workspace: str = None,
    ):
        self.contact_id = contact_id
        self.phone = phone
        self.session = session
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.contact_id is not None:
            result['contactId'] = self.contact_id
        if self.phone is not None:
            result['phone'] = self.phone
        if self.session is not None:
            result['session'] = self.session
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contactId') is not None:
            self.contact_id = m.get('contactId')
        if m.get('phone') is not None:
            self.phone = m.get('phone')
        if m.get('session') is not None:
            self.session = m.get('session')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SendItsmVerifyCodeResponseBody(TeaModel):
    def __init__(
        self,
        message: str = None,
        request_id: str = None,
    ):
        self.message = message
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.message is not None:
            result['message'] = self.message
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class SendItsmVerifyCodeResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: SendItsmVerifyCodeResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = SendItsmVerifyCodeResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class SyncAlertRulesByGroupRequestRules(TeaModel):
    def __init__(
        self,
        annotations: Dict[str, str] = None,
        condition: AlertRuleCondition = None,
        datasource: AlertRuleDataSource = None,
        display_name: str = None,
        enabled: bool = None,
        interval: int = None,
        labels: Dict[str, str] = None,
        level: str = None,
        message: str = None,
        query: AlertRuleQuery = None,
        send: AlertRuleSend = None,
    ):
        self.annotations = annotations
        self.condition = condition
        self.datasource = datasource
        # This parameter is required.
        self.display_name = display_name
        self.enabled = enabled
        self.interval = interval
        self.labels = labels
        self.level = level
        self.message = message
        # This parameter is required.
        self.query = query
        self.send = send

    def validate(self):
        if self.condition:
            self.condition.validate()
        if self.datasource:
            self.datasource.validate()
        if self.query:
            self.query.validate()
        if self.send:
            self.send.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.annotations is not None:
            result['annotations'] = self.annotations
        if self.condition is not None:
            result['condition'] = self.condition.to_map()
        if self.datasource is not None:
            result['datasource'] = self.datasource.to_map()
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.interval is not None:
            result['interval'] = self.interval
        if self.labels is not None:
            result['labels'] = self.labels
        if self.level is not None:
            result['level'] = self.level
        if self.message is not None:
            result['message'] = self.message
        if self.query is not None:
            result['query'] = self.query.to_map()
        if self.send is not None:
            result['send'] = self.send.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('annotations') is not None:
            self.annotations = m.get('annotations')
        if m.get('condition') is not None:
            temp_model = AlertRuleCondition()
            self.condition = temp_model.from_map(m['condition'])
        if m.get('datasource') is not None:
            temp_model = AlertRuleDataSource()
            self.datasource = temp_model.from_map(m['datasource'])
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('labels') is not None:
            self.labels = m.get('labels')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('query') is not None:
            temp_model = AlertRuleQuery()
            self.query = temp_model.from_map(m['query'])
        if m.get('send') is not None:
            temp_model = AlertRuleSend()
            self.send = temp_model.from_map(m['send'])
        return self


class SyncAlertRulesByGroupRequest(TeaModel):
    def __init__(
        self,
        biz_source: str = None,
        datasource: AlertRuleDataSource = None,
        group: str = None,
        rules: List[SyncAlertRulesByGroupRequestRules] = None,
        workspace: str = None,
    ):
        self.biz_source = biz_source
        self.datasource = datasource
        # This parameter is required.
        self.group = group
        self.rules = rules
        self.workspace = workspace

    def validate(self):
        if self.datasource:
            self.datasource.validate()
        if self.rules:
            for k in self.rules:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.biz_source is not None:
            result['bizSource'] = self.biz_source
        if self.datasource is not None:
            result['datasource'] = self.datasource.to_map()
        if self.group is not None:
            result['group'] = self.group
        result['rules'] = []
        if self.rules is not None:
            for k in self.rules:
                result['rules'].append(k.to_map() if k else None)
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('bizSource') is not None:
            self.biz_source = m.get('bizSource')
        if m.get('datasource') is not None:
            temp_model = AlertRuleDataSource()
            self.datasource = temp_model.from_map(m['datasource'])
        if m.get('group') is not None:
            self.group = m.get('group')
        self.rules = []
        if m.get('rules') is not None:
            for k in m.get('rules'):
                temp_model = SyncAlertRulesByGroupRequestRules()
                self.rules.append(temp_model.from_map(k))
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SyncAlertRulesByGroupResponseBodyData(TeaModel):
    def __init__(
        self,
        alert_rule_id: str = None,
        display_name: str = None,
        enabled: bool = None,
        group: str = None,
        level: str = None,
        status: str = None,
    ):
        self.alert_rule_id = alert_rule_id
        self.display_name = display_name
        self.enabled = enabled
        self.group = group
        self.level = level
        self.status = status

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_rule_id is not None:
            result['alertRuleId'] = self.alert_rule_id
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.group is not None:
            result['group'] = self.group
        if self.level is not None:
            result['level'] = self.level
        if self.status is not None:
            result['status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleId') is not None:
            self.alert_rule_id = m.get('alertRuleId')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('group') is not None:
            self.group = m.get('group')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class SyncAlertRulesByGroupResponseBody(TeaModel):
    def __init__(
        self,
        data: List[SyncAlertRulesByGroupResponseBodyData] = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

    def validate(self):
        if self.data:
            for k in self.data:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = SyncAlertRulesByGroupResponseBodyData()
                self.data.append(temp_model.from_map(k))
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class SyncAlertRulesByGroupResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: SyncAlertRulesByGroupResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = SyncAlertRulesByGroupResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class SyncNotifyTargetFromV1Request(TeaModel):
    def __init__(
        self,
        merge_strategy: str = None,
    ):
        self.merge_strategy = merge_strategy

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.merge_strategy is not None:
            result['mergeStrategy'] = self.merge_strategy
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('mergeStrategy') is not None:
            self.merge_strategy = m.get('mergeStrategy')
        return self


class SyncNotifyTargetFromV1ResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class SyncNotifyTargetFromV1Response(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: SyncNotifyTargetFromV1ResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = SyncNotifyTargetFromV1ResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class SyncNotifyTargetFromV1ManuallyResponseBodyData(TeaModel):
    def __init__(
        self,
        conflict_contact_groups: Dict[str, List[MergeContactGroup]] = None,
        conflict_contacts: Dict[str, List[MergeContact]] = None,
        conflict_robots: Dict[str, List[MergeRobot]] = None,
        conflict_webhooks: Dict[str, List[MergeWebhook]] = None,
        merged_contact_groups: List[MergeContactGroup] = None,
        merged_contacts: List[MergeContact] = None,
        merged_robots: List[MergeRobot] = None,
        merged_webhooks: List[MergeWebhook] = None,
    ):
        self.conflict_contact_groups = conflict_contact_groups
        self.conflict_contacts = conflict_contacts
        self.conflict_robots = conflict_robots
        self.conflict_webhooks = conflict_webhooks
        self.merged_contact_groups = merged_contact_groups
        self.merged_contacts = merged_contacts
        self.merged_robots = merged_robots
        self.merged_webhooks = merged_webhooks

    def validate(self):
        if self.conflict_contact_groups:
            for v in self.conflict_contact_groups.values():
                for k1 in v:
                    if k1:
                        k1.validate()
        if self.conflict_contacts:
            for v in self.conflict_contacts.values():
                for k1 in v:
                    if k1:
                        k1.validate()
        if self.conflict_robots:
            for v in self.conflict_robots.values():
                for k1 in v:
                    if k1:
                        k1.validate()
        if self.conflict_webhooks:
            for v in self.conflict_webhooks.values():
                for k1 in v:
                    if k1:
                        k1.validate()
        if self.merged_contact_groups:
            for k in self.merged_contact_groups:
                if k:
                    k.validate()
        if self.merged_contacts:
            for k in self.merged_contacts:
                if k:
                    k.validate()
        if self.merged_robots:
            for k in self.merged_robots:
                if k:
                    k.validate()
        if self.merged_webhooks:
            for k in self.merged_webhooks:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['conflictContactGroups'] = {}
        if self.conflict_contact_groups is not None:
            for k, v in self.conflict_contact_groups.items():
                l1 = []
                for k1 in v:
                    l1.append(k1.to_map() if k1 else None)
                result['conflictContactGroups'][k] = l1
        result['conflictContacts'] = {}
        if self.conflict_contacts is not None:
            for k, v in self.conflict_contacts.items():
                l1 = []
                for k1 in v:
                    l1.append(k1.to_map() if k1 else None)
                result['conflictContacts'][k] = l1
        result['conflictRobots'] = {}
        if self.conflict_robots is not None:
            for k, v in self.conflict_robots.items():
                l1 = []
                for k1 in v:
                    l1.append(k1.to_map() if k1 else None)
                result['conflictRobots'][k] = l1
        result['conflictWebhooks'] = {}
        if self.conflict_webhooks is not None:
            for k, v in self.conflict_webhooks.items():
                l1 = []
                for k1 in v:
                    l1.append(k1.to_map() if k1 else None)
                result['conflictWebhooks'][k] = l1
        result['mergedContactGroups'] = []
        if self.merged_contact_groups is not None:
            for k in self.merged_contact_groups:
                result['mergedContactGroups'].append(k.to_map() if k else None)
        result['mergedContacts'] = []
        if self.merged_contacts is not None:
            for k in self.merged_contacts:
                result['mergedContacts'].append(k.to_map() if k else None)
        result['mergedRobots'] = []
        if self.merged_robots is not None:
            for k in self.merged_robots:
                result['mergedRobots'].append(k.to_map() if k else None)
        result['mergedWebhooks'] = []
        if self.merged_webhooks is not None:
            for k in self.merged_webhooks:
                result['mergedWebhooks'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.conflict_contact_groups = {}
        if m.get('conflictContactGroups') is not None:
            for k, v in m.get('conflictContactGroups').items():
                l1 = []
                for k1 in v:
                    temp_model = MergeContactGroup()
                    l1.append(temp_model.from_map(k1))
                self.conflict_contact_groups['k'] = l1
        self.conflict_contacts = {}
        if m.get('conflictContacts') is not None:
            for k, v in m.get('conflictContacts').items():
                l1 = []
                for k1 in v:
                    temp_model = MergeContact()
                    l1.append(temp_model.from_map(k1))
                self.conflict_contacts['k'] = l1
        self.conflict_robots = {}
        if m.get('conflictRobots') is not None:
            for k, v in m.get('conflictRobots').items():
                l1 = []
                for k1 in v:
                    temp_model = MergeRobot()
                    l1.append(temp_model.from_map(k1))
                self.conflict_robots['k'] = l1
        self.conflict_webhooks = {}
        if m.get('conflictWebhooks') is not None:
            for k, v in m.get('conflictWebhooks').items():
                l1 = []
                for k1 in v:
                    temp_model = MergeWebhook()
                    l1.append(temp_model.from_map(k1))
                self.conflict_webhooks['k'] = l1
        self.merged_contact_groups = []
        if m.get('mergedContactGroups') is not None:
            for k in m.get('mergedContactGroups'):
                temp_model = MergeContactGroup()
                self.merged_contact_groups.append(temp_model.from_map(k))
        self.merged_contacts = []
        if m.get('mergedContacts') is not None:
            for k in m.get('mergedContacts'):
                temp_model = MergeContact()
                self.merged_contacts.append(temp_model.from_map(k))
        self.merged_robots = []
        if m.get('mergedRobots') is not None:
            for k in m.get('mergedRobots'):
                temp_model = MergeRobot()
                self.merged_robots.append(temp_model.from_map(k))
        self.merged_webhooks = []
        if m.get('mergedWebhooks') is not None:
            for k in m.get('mergedWebhooks'):
                temp_model = MergeWebhook()
                self.merged_webhooks.append(temp_model.from_map(k))
        return self


class SyncNotifyTargetFromV1ManuallyResponseBody(TeaModel):
    def __init__(
        self,
        data: SyncNotifyTargetFromV1ManuallyResponseBodyData = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.data is not None:
            result['data'] = self.data.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('data') is not None:
            temp_model = SyncNotifyTargetFromV1ManuallyResponseBodyData()
            self.data = temp_model.from_map(m['data'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class SyncNotifyTargetFromV1ManuallyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: SyncNotifyTargetFromV1ManuallyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = SyncNotifyTargetFromV1ManuallyResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class TagResourcesRequest(TeaModel):
    def __init__(
        self,
        resource_id: List[str] = None,
        resource_type: str = None,
        tag: List[Tag] = None,
    ):
        # This parameter is required.
        self.resource_id = resource_id
        # This parameter is required.
        self.resource_type = resource_type
        self.tag = tag

    def validate(self):
        if self.tag:
            for k in self.tag:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.resource_id is not None:
            result['resourceId'] = self.resource_id
        if self.resource_type is not None:
            result['resourceType'] = self.resource_type
        result['tag'] = []
        if self.tag is not None:
            for k in self.tag:
                result['tag'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('resourceId') is not None:
            self.resource_id = m.get('resourceId')
        if m.get('resourceType') is not None:
            self.resource_type = m.get('resourceType')
        self.tag = []
        if m.get('tag') is not None:
            for k in m.get('tag'):
                temp_model = Tag()
                self.tag.append(temp_model.from_map(k))
        return self


class TagResourcesResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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: Dict[str, str] = None,
        status_code: int = None,
        body: TagResourcesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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: bool = None,
        resource_id: List[str] = None,
        resource_type: str = None,
        tag_key: List[str] = None,
    ):
        self.all = all
        # This parameter is required.
        self.resource_id = resource_id
        # This parameter is required.
        self.resource_type = resource_type
        self.tag_key = tag_key

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.all is not None:
            result['all'] = self.all
        if self.resource_id is not None:
            result['resourceId'] = self.resource_id
        if self.resource_type is not None:
            result['resourceType'] = self.resource_type
        if self.tag_key is not None:
            result['tagKey'] = self.tag_key
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('all') is not None:
            self.all = m.get('all')
        if m.get('resourceId') is not None:
            self.resource_id = m.get('resourceId')
        if m.get('resourceType') is not None:
            self.resource_type = m.get('resourceType')
        if m.get('tagKey') is not None:
            self.tag_key = m.get('tagKey')
        return self


class UntagResourcesShrinkRequest(TeaModel):
    def __init__(
        self,
        all: bool = None,
        resource_id_shrink: str = None,
        resource_type: str = None,
        tag_key_shrink: str = None,
    ):
        self.all = all
        # This parameter is required.
        self.resource_id_shrink = resource_id_shrink
        # This parameter is required.
        self.resource_type = resource_type
        self.tag_key_shrink = tag_key_shrink

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.all is not None:
            result['all'] = self.all
        if self.resource_id_shrink is not None:
            result['resourceId'] = self.resource_id_shrink
        if self.resource_type is not None:
            result['resourceType'] = self.resource_type
        if self.tag_key_shrink is not None:
            result['tagKey'] = self.tag_key_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('all') is not None:
            self.all = m.get('all')
        if m.get('resourceId') is not None:
            self.resource_id_shrink = 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_shrink = m.get('tagKey')
        return self


class UntagResourcesResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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: Dict[str, str] = None,
        status_code: int = None,
        body: UntagResourcesResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 UpdateAddonReleaseRequest(TeaModel):
    def __init__(
        self,
        addon_version: str = None,
        dry_run: bool = None,
        entity_rules: EntityDiscoverRule = None,
        values: str = None,
    ):
        # Addon version information.
        self.addon_version = addon_version
        # Whether to pre-check this request.
        self.dry_run = dry_run
        # Entity discovery rules.
        self.entity_rules = entity_rules
        # Metadata information.
        self.values = values

    def validate(self):
        if self.entity_rules:
            self.entity_rules.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.addon_version is not None:
            result['addonVersion'] = self.addon_version
        if self.dry_run is not None:
            result['dryRun'] = self.dry_run
        if self.entity_rules is not None:
            result['entityRules'] = self.entity_rules.to_map()
        if self.values is not None:
            result['values'] = self.values
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addonVersion') is not None:
            self.addon_version = m.get('addonVersion')
        if m.get('dryRun') is not None:
            self.dry_run = m.get('dryRun')
        if m.get('entityRules') is not None:
            temp_model = EntityDiscoverRule()
            self.entity_rules = temp_model.from_map(m['entityRules'])
        if m.get('values') is not None:
            self.values = m.get('values')
        return self


class UpdateAddonReleaseResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Request ID.
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateAddonReleaseResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateAddonReleaseResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateAddonReleaseResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAggTaskGroupRequestTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # Key of the resource group tag.
        self.key = key
        # Value of the resource group tag.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 UpdateAggTaskGroupRequest(TeaModel):
    def __init__(
        self,
        agg_task_group_config: str = None,
        agg_task_group_config_type: str = None,
        agg_task_group_name: str = None,
        cron_expr: str = None,
        delay: int = None,
        description: str = None,
        from_time: int = None,
        max_retries: int = None,
        max_run_time_in_seconds: int = None,
        precheck_string: str = None,
        schedule_mode: str = None,
        schedule_time_expr: str = None,
        status: str = None,
        tags: List[UpdateAggTaskGroupRequestTags] = None,
        target_prometheus_id: str = None,
        to_time: int = None,
    ):
        # Aggregation task group configuration. Currently, only the “RecordingRuleYaml” format is supported, and it must comply with the format requirements of open-source Prometheus RecordingRules.
        # 
        # This parameter is required.
        self.agg_task_group_config = agg_task_group_config
        # Aggregation task group configuration type, default is “RecordingRuleYaml” (open-source Prometheus RecordingRule format).
        self.agg_task_group_config_type = agg_task_group_config_type
        # Aggregation task group name.
        self.agg_task_group_name = agg_task_group_name
        # When the scheduling mode is set to “Cron”, this is the specific scheduling expression. For example, “0/1 * * * *” means starting from 0 minutes, schedule every 1 minute.
        self.cron_expr = cron_expr
        # Fixed delay time for scheduling, in seconds, default is 30.
        self.delay = delay
        # Description of the aggregation task group.
        self.description = description
        # The second-level timestamp corresponding to the start time of the scheduling.
        self.from_time = from_time
        # Maximum number of retries for executing the aggregation task, default is 20.
        self.max_retries = max_retries
        # Maximum retry time for executing the aggregation task, in seconds, default is 600.
        self.max_run_time_in_seconds = max_run_time_in_seconds
        # Pre-check configuration, no configuration by default. The input string needs to be correctly parsed as JSON.
        self.precheck_string = precheck_string
        # Scheduling mode, either “Cron” or “FixedRate”, default is “FixedRate”.
        self.schedule_mode = schedule_mode
        # Scheduling time expression, recommended values are “@s” or “@m”, indicating the granularity of the scheduling time window alignment, default is “@m”.
        self.schedule_time_expr = schedule_time_expr
        # Status of the aggregation task group, either “Running” or “Stopped”. Default is Running.
        self.status = status
        # Resource group tags.
        self.tags = tags
        # Target Prometheus instance ID of the aggregation task group.
        # 
        # This parameter is required.
        self.target_prometheus_id = target_prometheus_id
        # The second-level timestamp corresponding to the end time of the scheduling, 0 indicates that the scheduling does not stop.
        self.to_time = to_time

    def validate(self):
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.agg_task_group_config is not None:
            result['aggTaskGroupConfig'] = self.agg_task_group_config
        if self.agg_task_group_config_type is not None:
            result['aggTaskGroupConfigType'] = self.agg_task_group_config_type
        if self.agg_task_group_name is not None:
            result['aggTaskGroupName'] = self.agg_task_group_name
        if self.cron_expr is not None:
            result['cronExpr'] = self.cron_expr
        if self.delay is not None:
            result['delay'] = self.delay
        if self.description is not None:
            result['description'] = self.description
        if self.from_time is not None:
            result['fromTime'] = self.from_time
        if self.max_retries is not None:
            result['maxRetries'] = self.max_retries
        if self.max_run_time_in_seconds is not None:
            result['maxRunTimeInSeconds'] = self.max_run_time_in_seconds
        if self.precheck_string is not None:
            result['precheckString'] = self.precheck_string
        if self.schedule_mode is not None:
            result['scheduleMode'] = self.schedule_mode
        if self.schedule_time_expr is not None:
            result['scheduleTimeExpr'] = self.schedule_time_expr
        if self.status is not None:
            result['status'] = self.status
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.target_prometheus_id is not None:
            result['targetPrometheusId'] = self.target_prometheus_id
        if self.to_time is not None:
            result['toTime'] = self.to_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aggTaskGroupConfig') is not None:
            self.agg_task_group_config = m.get('aggTaskGroupConfig')
        if m.get('aggTaskGroupConfigType') is not None:
            self.agg_task_group_config_type = m.get('aggTaskGroupConfigType')
        if m.get('aggTaskGroupName') is not None:
            self.agg_task_group_name = m.get('aggTaskGroupName')
        if m.get('cronExpr') is not None:
            self.cron_expr = m.get('cronExpr')
        if m.get('delay') is not None:
            self.delay = m.get('delay')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('fromTime') is not None:
            self.from_time = m.get('fromTime')
        if m.get('maxRetries') is not None:
            self.max_retries = m.get('maxRetries')
        if m.get('maxRunTimeInSeconds') is not None:
            self.max_run_time_in_seconds = m.get('maxRunTimeInSeconds')
        if m.get('precheckString') is not None:
            self.precheck_string = m.get('precheckString')
        if m.get('scheduleMode') is not None:
            self.schedule_mode = m.get('scheduleMode')
        if m.get('scheduleTimeExpr') is not None:
            self.schedule_time_expr = m.get('scheduleTimeExpr')
        if m.get('status') is not None:
            self.status = m.get('status')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = UpdateAggTaskGroupRequestTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('targetPrometheusId') is not None:
            self.target_prometheus_id = m.get('targetPrometheusId')
        if m.get('toTime') is not None:
            self.to_time = m.get('toTime')
        return self


class UpdateAggTaskGroupResponseBody(TeaModel):
    def __init__(
        self,
        agg_task_group_config_hash: str = None,
        agg_task_group_id: str = None,
        agg_task_group_name: str = None,
        request_id: str = None,
        source_prometheus_id: str = None,
        status: str = None,
    ):
        # Summary of the aggregation task group configuration.
        self.agg_task_group_config_hash = agg_task_group_config_hash
        # Aggregation task group ID
        self.agg_task_group_id = agg_task_group_id
        # Aggregation task group name
        self.agg_task_group_name = agg_task_group_name
        # Request ID
        self.request_id = request_id
        # Source Prometheus instance ID of the aggregation task group
        self.source_prometheus_id = source_prometheus_id
        # Current status of the aggregation task group
        self.status = status

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.agg_task_group_config_hash is not None:
            result['aggTaskGroupConfigHash'] = self.agg_task_group_config_hash
        if self.agg_task_group_id is not None:
            result['aggTaskGroupId'] = self.agg_task_group_id
        if self.agg_task_group_name is not None:
            result['aggTaskGroupName'] = self.agg_task_group_name
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.source_prometheus_id is not None:
            result['sourcePrometheusId'] = self.source_prometheus_id
        if self.status is not None:
            result['status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aggTaskGroupConfigHash') is not None:
            self.agg_task_group_config_hash = m.get('aggTaskGroupConfigHash')
        if m.get('aggTaskGroupId') is not None:
            self.agg_task_group_id = m.get('aggTaskGroupId')
        if m.get('aggTaskGroupName') is not None:
            self.agg_task_group_name = m.get('aggTaskGroupName')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('sourcePrometheusId') is not None:
            self.source_prometheus_id = m.get('sourcePrometheusId')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class UpdateAggTaskGroupResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateAggTaskGroupResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateAggTaskGroupResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAggTaskGroupStatusRequest(TeaModel):
    def __init__(
        self,
        status: str = None,
    ):
        # Status of the aggregation task group, either “Running” or “Stopped”. Default is Running.
        # 
        # This parameter is required.
        self.status = status

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.status is not None:
            result['status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class UpdateAggTaskGroupStatusResponseBody(TeaModel):
    def __init__(
        self,
        agg_task_group_config_hash: str = None,
        agg_task_group_id: str = None,
        agg_task_group_name: str = None,
        request_id: str = None,
        source_prometheus_id: str = None,
        status: str = None,
    ):
        # Summary of the aggregation task group configuration.
        self.agg_task_group_config_hash = agg_task_group_config_hash
        # Aggregation task group ID.
        self.agg_task_group_id = agg_task_group_id
        # Aggregation task group name.
        self.agg_task_group_name = agg_task_group_name
        # Request ID.
        self.request_id = request_id
        # Source Prometheus instance ID of the aggregation task group.
        self.source_prometheus_id = source_prometheus_id
        # The current status of the aggregated task group.
        self.status = status

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.agg_task_group_config_hash is not None:
            result['aggTaskGroupConfigHash'] = self.agg_task_group_config_hash
        if self.agg_task_group_id is not None:
            result['aggTaskGroupId'] = self.agg_task_group_id
        if self.agg_task_group_name is not None:
            result['aggTaskGroupName'] = self.agg_task_group_name
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.source_prometheus_id is not None:
            result['sourcePrometheusId'] = self.source_prometheus_id
        if self.status is not None:
            result['status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aggTaskGroupConfigHash') is not None:
            self.agg_task_group_config_hash = m.get('aggTaskGroupConfigHash')
        if m.get('aggTaskGroupId') is not None:
            self.agg_task_group_id = m.get('aggTaskGroupId')
        if m.get('aggTaskGroupName') is not None:
            self.agg_task_group_name = m.get('aggTaskGroupName')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('sourcePrometheusId') is not None:
            self.source_prometheus_id = m.get('sourcePrometheusId')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class UpdateAggTaskGroupStatusResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateAggTaskGroupStatusResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateAggTaskGroupStatusResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAlertActionRequestEbParam(TeaModel):
    def __init__(
        self,
        eb_source: str = None,
        event_bus_name: str = None,
        region_id: str = None,
        subject: str = None,
    ):
        self.eb_source = eb_source
        self.event_bus_name = event_bus_name
        self.region_id = region_id
        self.subject = subject

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.eb_source is not None:
            result['ebSource'] = self.eb_source
        if self.event_bus_name is not None:
            result['eventBusName'] = self.event_bus_name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.subject is not None:
            result['subject'] = self.subject
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ebSource') is not None:
            self.eb_source = m.get('ebSource')
        if m.get('eventBusName') is not None:
            self.event_bus_name = m.get('eventBusName')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('subject') is not None:
            self.subject = m.get('subject')
        return self


class UpdateAlertActionRequestEssParam(TeaModel):
    def __init__(
        self,
        ess_group_id: str = None,
        ess_rule_id: str = None,
        region_id: str = None,
    ):
        self.ess_group_id = ess_group_id
        self.ess_rule_id = ess_rule_id
        self.region_id = region_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.ess_group_id is not None:
            result['essGroupId'] = self.ess_group_id
        if self.ess_rule_id is not None:
            result['essRuleId'] = self.ess_rule_id
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('essGroupId') is not None:
            self.ess_group_id = m.get('essGroupId')
        if m.get('essRuleId') is not None:
            self.ess_rule_id = m.get('essRuleId')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class UpdateAlertActionRequestFc3Param(TeaModel):
    def __init__(
        self,
        function: str = None,
        qualifier: str = None,
        region_id: str = None,
    ):
        self.function = function
        self.qualifier = qualifier
        self.region_id = region_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.function is not None:
            result['function'] = self.function
        if self.qualifier is not None:
            result['qualifier'] = self.qualifier
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('function') is not None:
            self.function = m.get('function')
        if m.get('qualifier') is not None:
            self.qualifier = m.get('qualifier')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class UpdateAlertActionRequestFcParam(TeaModel):
    def __init__(
        self,
        function: str = None,
        region_id: str = None,
        service: str = None,
    ):
        self.function = function
        self.region_id = region_id
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.function is not None:
            result['function'] = self.function
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.service is not None:
            result['service'] = self.service
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('function') is not None:
            self.function = m.get('function')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class UpdateAlertActionRequestMnsParam(TeaModel):
    def __init__(
        self,
        mns_type: str = None,
        name: str = None,
        region_id: str = None,
    ):
        self.mns_type = mns_type
        self.name = name
        self.region_id = region_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.mns_type is not None:
            result['mnsType'] = self.mns_type
        if self.name is not None:
            result['name'] = self.name
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('mnsType') is not None:
            self.mns_type = m.get('mnsType')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class UpdateAlertActionRequestPagerDutyParam(TeaModel):
    def __init__(
        self,
        key: str = None,
        url: str = None,
    ):
        self.key = key
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.key is not None:
            result['key'] = self.key
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class UpdateAlertActionRequestSlsParam(TeaModel):
    def __init__(
        self,
        logstore: str = None,
        project: str = None,
        region_id: str = None,
    ):
        self.logstore = logstore
        self.project = project
        self.region_id = region_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.logstore is not None:
            result['logstore'] = self.logstore
        if self.project is not None:
            result['project'] = self.project
        if self.region_id is not None:
            result['regionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('logstore') is not None:
            self.logstore = m.get('logstore')
        if m.get('project') is not None:
            self.project = m.get('project')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        return self


class UpdateAlertActionRequestWebhookParam(TeaModel):
    def __init__(
        self,
        content_type: str = None,
        headers: Dict[str, str] = None,
        method: str = None,
        url: str = None,
    ):
        self.content_type = content_type
        self.headers = headers
        self.method = method
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.content_type is not None:
            result['contentType'] = self.content_type
        if self.headers is not None:
            result['headers'] = self.headers
        if self.method is not None:
            result['method'] = self.method
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contentType') is not None:
            self.content_type = m.get('contentType')
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('method') is not None:
            self.method = m.get('method')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class UpdateAlertActionRequest(TeaModel):
    def __init__(
        self,
        alert_action_name: str = None,
        eb_param: UpdateAlertActionRequestEbParam = None,
        ess_param: UpdateAlertActionRequestEssParam = None,
        fc_3param: UpdateAlertActionRequestFc3Param = None,
        fc_param: UpdateAlertActionRequestFcParam = None,
        mns_param: UpdateAlertActionRequestMnsParam = None,
        pager_duty_param: UpdateAlertActionRequestPagerDutyParam = None,
        sls_param: UpdateAlertActionRequestSlsParam = None,
        source: str = None,
        type: str = None,
        webhook_param: UpdateAlertActionRequestWebhookParam = None,
    ):
        self.alert_action_name = alert_action_name
        self.eb_param = eb_param
        self.ess_param = ess_param
        self.fc_3param = fc_3param
        self.fc_param = fc_param
        self.mns_param = mns_param
        self.pager_duty_param = pager_duty_param
        self.sls_param = sls_param
        self.source = source
        self.type = type
        self.webhook_param = webhook_param

    def validate(self):
        if self.eb_param:
            self.eb_param.validate()
        if self.ess_param:
            self.ess_param.validate()
        if self.fc_3param:
            self.fc_3param.validate()
        if self.fc_param:
            self.fc_param.validate()
        if self.mns_param:
            self.mns_param.validate()
        if self.pager_duty_param:
            self.pager_duty_param.validate()
        if self.sls_param:
            self.sls_param.validate()
        if self.webhook_param:
            self.webhook_param.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_action_name is not None:
            result['alertActionName'] = self.alert_action_name
        if self.eb_param is not None:
            result['ebParam'] = self.eb_param.to_map()
        if self.ess_param is not None:
            result['essParam'] = self.ess_param.to_map()
        if self.fc_3param is not None:
            result['fc3Param'] = self.fc_3param.to_map()
        if self.fc_param is not None:
            result['fcParam'] = self.fc_param.to_map()
        if self.mns_param is not None:
            result['mnsParam'] = self.mns_param.to_map()
        if self.pager_duty_param is not None:
            result['pagerDutyParam'] = self.pager_duty_param.to_map()
        if self.sls_param is not None:
            result['slsParam'] = self.sls_param.to_map()
        if self.source is not None:
            result['source'] = self.source
        if self.type is not None:
            result['type'] = self.type
        if self.webhook_param is not None:
            result['webhookParam'] = self.webhook_param.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertActionName') is not None:
            self.alert_action_name = m.get('alertActionName')
        if m.get('ebParam') is not None:
            temp_model = UpdateAlertActionRequestEbParam()
            self.eb_param = temp_model.from_map(m['ebParam'])
        if m.get('essParam') is not None:
            temp_model = UpdateAlertActionRequestEssParam()
            self.ess_param = temp_model.from_map(m['essParam'])
        if m.get('fc3Param') is not None:
            temp_model = UpdateAlertActionRequestFc3Param()
            self.fc_3param = temp_model.from_map(m['fc3Param'])
        if m.get('fcParam') is not None:
            temp_model = UpdateAlertActionRequestFcParam()
            self.fc_param = temp_model.from_map(m['fcParam'])
        if m.get('mnsParam') is not None:
            temp_model = UpdateAlertActionRequestMnsParam()
            self.mns_param = temp_model.from_map(m['mnsParam'])
        if m.get('pagerDutyParam') is not None:
            temp_model = UpdateAlertActionRequestPagerDutyParam()
            self.pager_duty_param = temp_model.from_map(m['pagerDutyParam'])
        if m.get('slsParam') is not None:
            temp_model = UpdateAlertActionRequestSlsParam()
            self.sls_param = temp_model.from_map(m['slsParam'])
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('webhookParam') is not None:
            temp_model = UpdateAlertActionRequestWebhookParam()
            self.webhook_param = temp_model.from_map(m['webhookParam'])
        return self


class UpdateAlertActionResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateAlertActionResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateAlertActionResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateAlertActionResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAlertEventIntegrationPolicyRequest(TeaModel):
    def __init__(
        self,
        body: AlertEventIntegrationPolicyForModify = None,
        client_token: str = None,
        workspace: str = None,
    ):
        self.body = body
        self.client_token = client_token
        self.workspace = workspace

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.body is not None:
            result['body'] = self.body.to_map()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            temp_model = AlertEventIntegrationPolicyForModify()
            self.body = temp_model.from_map(m['body'])
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateAlertEventIntegrationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        alert_event_integration_policy_id: str = None,
        request_id: str = None,
    ):
        self.alert_event_integration_policy_id = alert_event_integration_policy_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_event_integration_policy_id is not None:
            result['alertEventIntegrationPolicyId'] = self.alert_event_integration_policy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertEventIntegrationPolicyId') is not None:
            self.alert_event_integration_policy_id = m.get('alertEventIntegrationPolicyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateAlertEventIntegrationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateAlertEventIntegrationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateAlertEventIntegrationPolicyResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAlertEventIntegrationPolicyTokenRequest(TeaModel):
    def __init__(
        self,
        workspace: str = None,
    ):
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateAlertEventIntegrationPolicyTokenResponseBody(TeaModel):
    def __init__(
        self,
        alert_event_integration_policy_id: str = None,
        request_id: str = None,
    ):
        self.alert_event_integration_policy_id = alert_event_integration_policy_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_event_integration_policy_id is not None:
            result['alertEventIntegrationPolicyId'] = self.alert_event_integration_policy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertEventIntegrationPolicyId') is not None:
            self.alert_event_integration_policy_id = m.get('alertEventIntegrationPolicyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateAlertEventIntegrationPolicyTokenResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateAlertEventIntegrationPolicyTokenResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateAlertEventIntegrationPolicyTokenResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAlertNotifyTemplateRequest(TeaModel):
    def __init__(
        self,
        alert_notify_template_name: str = None,
        templates: Dict[str, dict] = None,
    ):
        self.alert_notify_template_name = alert_notify_template_name
        self.templates = templates

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_notify_template_name is not None:
            result['alertNotifyTemplateName'] = self.alert_notify_template_name
        if self.templates is not None:
            result['templates'] = self.templates
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertNotifyTemplateName') is not None:
            self.alert_notify_template_name = m.get('alertNotifyTemplateName')
        if m.get('templates') is not None:
            self.templates = m.get('templates')
        return self


class UpdateAlertNotifyTemplateResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateAlertNotifyTemplateResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateAlertNotifyTemplateResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateAlertNotifyTemplateResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAlertRobotRequest(TeaModel):
    def __init__(
        self,
        is_custom: str = None,
        lang: str = None,
        name: str = None,
        source: str = None,
        type: str = None,
        url: str = None,
    ):
        self.is_custom = is_custom
        self.lang = lang
        self.name = name
        self.source = source
        self.type = type
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.is_custom is not None:
            result['isCustom'] = self.is_custom
        if self.lang is not None:
            result['lang'] = self.lang
        if self.name is not None:
            result['name'] = self.name
        if self.source is not None:
            result['source'] = self.source
        if self.type is not None:
            result['type'] = self.type
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('isCustom') is not None:
            self.is_custom = m.get('isCustom')
        if m.get('lang') is not None:
            self.lang = m.get('lang')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class UpdateAlertRobotResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateAlertRobotResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateAlertRobotResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateAlertRobotResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAlertRuleRequest(TeaModel):
    def __init__(
        self,
        alert_metric_input: AlertRuleAlertMetricInput = None,
        annotations: Dict[str, str] = None,
        condition: AlertRuleCondition = None,
        display_name: str = None,
        interval: int = None,
        labels: Dict[str, str] = None,
        level: str = None,
        message: str = None,
        query: AlertRuleQuery = None,
        send: AlertRuleSend = None,
        call_source: str = None,
    ):
        self.alert_metric_input = alert_metric_input
        # 规则注解，允许设置长文本
        self.annotations = annotations
        self.condition = condition
        # 代表资源名称的资源属性字段
        # 
        # This parameter is required.
        self.display_name = display_name
        self.interval = interval
        self.labels = labels
        # 告警级别，CRITICAL,ERROR,WARNING,INFO，默认INFO，
        self.level = level
        # 告警规则的通知消息内容
        self.message = message
        # This parameter is required.
        self.query = query
        self.send = send
        self.call_source = call_source

    def validate(self):
        if self.alert_metric_input:
            self.alert_metric_input.validate()
        if self.condition:
            self.condition.validate()
        if self.query:
            self.query.validate()
        if self.send:
            self.send.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_metric_input is not None:
            result['alertMetricInput'] = self.alert_metric_input.to_map()
        if self.annotations is not None:
            result['annotations'] = self.annotations
        if self.condition is not None:
            result['condition'] = self.condition.to_map()
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.interval is not None:
            result['interval'] = self.interval
        if self.labels is not None:
            result['labels'] = self.labels
        if self.level is not None:
            result['level'] = self.level
        if self.message is not None:
            result['message'] = self.message
        if self.query is not None:
            result['query'] = self.query.to_map()
        if self.send is not None:
            result['send'] = self.send.to_map()
        if self.call_source is not None:
            result['callSource'] = self.call_source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertMetricInput') is not None:
            temp_model = AlertRuleAlertMetricInput()
            self.alert_metric_input = temp_model.from_map(m['alertMetricInput'])
        if m.get('annotations') is not None:
            self.annotations = m.get('annotations')
        if m.get('condition') is not None:
            temp_model = AlertRuleCondition()
            self.condition = temp_model.from_map(m['condition'])
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('labels') is not None:
            self.labels = m.get('labels')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('query') is not None:
            temp_model = AlertRuleQuery()
            self.query = temp_model.from_map(m['query'])
        if m.get('send') is not None:
            temp_model = AlertRuleSend()
            self.send = temp_model.from_map(m['send'])
        if m.get('callSource') is not None:
            self.call_source = m.get('callSource')
        return self


class UpdateAlertRuleResponseBody(TeaModel):
    def __init__(
        self,
        data: int = None,
        request_id: str = None,
    ):
        self.data = data
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 UpdateAlertRuleResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateAlertRuleResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateAlertRuleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAlertRuleKvsRequest(TeaModel):
    def __init__(
        self,
        alert_rule_ids: List[str] = None,
        put_annotations: Dict[str, str] = None,
        put_labels: Dict[str, str] = None,
        remove_annotations: List[str] = None,
        remove_labels: List[str] = None,
        call_source: str = None,
    ):
        # This parameter is required.
        self.alert_rule_ids = alert_rule_ids
        self.put_annotations = put_annotations
        self.put_labels = put_labels
        self.remove_annotations = remove_annotations
        self.remove_labels = remove_labels
        self.call_source = call_source

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.alert_rule_ids is not None:
            result['alertRuleIds'] = self.alert_rule_ids
        if self.put_annotations is not None:
            result['putAnnotations'] = self.put_annotations
        if self.put_labels is not None:
            result['putLabels'] = self.put_labels
        if self.remove_annotations is not None:
            result['removeAnnotations'] = self.remove_annotations
        if self.remove_labels is not None:
            result['removeLabels'] = self.remove_labels
        if self.call_source is not None:
            result['callSource'] = self.call_source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alertRuleIds') is not None:
            self.alert_rule_ids = m.get('alertRuleIds')
        if m.get('putAnnotations') is not None:
            self.put_annotations = m.get('putAnnotations')
        if m.get('putLabels') is not None:
            self.put_labels = m.get('putLabels')
        if m.get('removeAnnotations') is not None:
            self.remove_annotations = m.get('removeAnnotations')
        if m.get('removeLabels') is not None:
            self.remove_labels = m.get('removeLabels')
        if m.get('callSource') is not None:
            self.call_source = m.get('callSource')
        return self


class UpdateAlertRuleKvsResponseBody(TeaModel):
    def __init__(
        self,
        data: int = None,
        request_id: str = None,
    ):
        self.data = data
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 UpdateAlertRuleKvsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateAlertRuleKvsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateAlertRuleKvsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateAlertWebhookRequest(TeaModel):
    def __init__(
        self,
        content_type: str = None,
        headers: Dict[str, str] = None,
        is_custom: str = None,
        lang: str = None,
        method: str = None,
        name: str = None,
        source: str = None,
        url: str = None,
    ):
        self.content_type = content_type
        # headers
        self.headers = headers
        self.is_custom = is_custom
        self.lang = lang
        self.method = method
        self.name = name
        self.source = source
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.content_type is not None:
            result['contentType'] = self.content_type
        if self.headers is not None:
            result['headers'] = self.headers
        if self.is_custom is not None:
            result['isCustom'] = self.is_custom
        if self.lang is not None:
            result['lang'] = self.lang
        if self.method is not None:
            result['method'] = self.method
        if self.name is not None:
            result['name'] = self.name
        if self.source is not None:
            result['source'] = self.source
        if self.url is not None:
            result['url'] = self.url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contentType') is not None:
            self.content_type = m.get('contentType')
        if m.get('headers') is not None:
            self.headers = m.get('headers')
        if m.get('isCustom') is not None:
            self.is_custom = m.get('isCustom')
        if m.get('lang') is not None:
            self.lang = m.get('lang')
        if m.get('method') is not None:
            self.method = m.get('method')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class UpdateAlertWebhookResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateAlertWebhookResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateAlertWebhookResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateAlertWebhookResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateBizTraceRequest(TeaModel):
    def __init__(
        self,
        advanced_config: str = None,
        biz_trace_name: str = None,
        rule_config: str = None,
        workspace: str = None,
    ):
        self.advanced_config = advanced_config
        self.biz_trace_name = biz_trace_name
        self.rule_config = rule_config
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.advanced_config is not None:
            result['advancedConfig'] = self.advanced_config
        if self.biz_trace_name is not None:
            result['bizTraceName'] = self.biz_trace_name
        if self.rule_config is not None:
            result['ruleConfig'] = self.rule_config
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('advancedConfig') is not None:
            self.advanced_config = m.get('advancedConfig')
        if m.get('bizTraceName') is not None:
            self.biz_trace_name = m.get('bizTraceName')
        if m.get('ruleConfig') is not None:
            self.rule_config = m.get('ruleConfig')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateBizTraceResponseBody(TeaModel):
    def __init__(
        self,
        biz_trace_id: str = None,
        request_id: str = None,
    ):
        self.biz_trace_id = biz_trace_id
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.biz_trace_id is not None:
            result['bizTraceId'] = self.biz_trace_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('bizTraceId') is not None:
            self.biz_trace_id = m.get('bizTraceId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateBizTraceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateBizTraceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateBizTraceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateContactRequest(TeaModel):
    def __init__(
        self,
        email: str = None,
        im_user_ids: Dict[str, str] = None,
        is_inner_call: bool = None,
        lang: str = None,
        name: str = None,
        phone: str = None,
        phone_code: str = None,
        source: str = None,
    ):
        self.email = email
        self.im_user_ids = im_user_ids
        self.is_inner_call = is_inner_call
        self.lang = lang
        self.name = name
        self.phone = phone
        self.phone_code = phone_code
        self.source = source

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.email is not None:
            result['email'] = self.email
        if self.im_user_ids is not None:
            result['imUserIds'] = self.im_user_ids
        if self.is_inner_call is not None:
            result['isInnerCall'] = self.is_inner_call
        if self.lang is not None:
            result['lang'] = self.lang
        if self.name is not None:
            result['name'] = self.name
        if self.phone is not None:
            result['phone'] = self.phone
        if self.phone_code is not None:
            result['phoneCode'] = self.phone_code
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('email') is not None:
            self.email = m.get('email')
        if m.get('imUserIds') is not None:
            self.im_user_ids = m.get('imUserIds')
        if m.get('isInnerCall') is not None:
            self.is_inner_call = m.get('isInnerCall')
        if m.get('lang') is not None:
            self.lang = m.get('lang')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('phone') is not None:
            self.phone = m.get('phone')
        if m.get('phoneCode') is not None:
            self.phone_code = m.get('phoneCode')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class UpdateContactResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateContactResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateContactResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateContactResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateContactGroupRequest(TeaModel):
    def __init__(
        self,
        contacts: List[str] = None,
        name: str = None,
        source: str = None,
    ):
        self.contacts = contacts
        self.name = name
        self.source = source

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.contacts is not None:
            result['contacts'] = self.contacts
        if self.name is not None:
            result['name'] = self.name
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contacts') is not None:
            self.contacts = m.get('contacts')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class UpdateContactGroupResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateContactGroupResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateContactGroupResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateContactGroupResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateDatasetRequest(TeaModel):
    def __init__(
        self,
        description: str = None,
    ):
        self.description = description

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        return self


class UpdateDatasetResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateDatasetResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateDatasetResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateDatasetResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateDeliveryTaskRequestSinkList(TeaModel):
    def __init__(
        self,
        sink_configs: Dict[str, str] = None,
        sink_type: str = None,
    ):
        self.sink_configs = sink_configs
        self.sink_type = sink_type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.sink_configs is not None:
            result['sinkConfigs'] = self.sink_configs
        if self.sink_type is not None:
            result['sinkType'] = self.sink_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('sinkConfigs') is not None:
            self.sink_configs = m.get('sinkConfigs')
        if m.get('sinkType') is not None:
            self.sink_type = m.get('sinkType')
        return self


class UpdateDeliveryTaskRequest(TeaModel):
    def __init__(
        self,
        data_source_id: str = None,
        external_labels: Dict[str, str] = None,
        label_filters: Dict[str, str] = None,
        label_filters_type: str = None,
        resource_group_id: str = None,
        sink_list: List[UpdateDeliveryTaskRequestSinkList] = None,
        status: str = None,
        task_description: str = None,
        task_name: str = None,
    ):
        self.data_source_id = data_source_id
        self.external_labels = external_labels
        self.label_filters = label_filters
        self.label_filters_type = label_filters_type
        self.resource_group_id = resource_group_id
        self.sink_list = sink_list
        self.status = status
        self.task_description = task_description
        self.task_name = task_name

    def validate(self):
        if self.sink_list:
            for k in self.sink_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.data_source_id is not None:
            result['dataSourceId'] = self.data_source_id
        if self.external_labels is not None:
            result['externalLabels'] = self.external_labels
        if self.label_filters is not None:
            result['labelFilters'] = self.label_filters
        if self.label_filters_type is not None:
            result['labelFiltersType'] = self.label_filters_type
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        result['sinkList'] = []
        if self.sink_list is not None:
            for k in self.sink_list:
                result['sinkList'].append(k.to_map() if k else None)
        if self.status is not None:
            result['status'] = self.status
        if self.task_description is not None:
            result['taskDescription'] = self.task_description
        if self.task_name is not None:
            result['taskName'] = self.task_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dataSourceId') is not None:
            self.data_source_id = m.get('dataSourceId')
        if m.get('externalLabels') is not None:
            self.external_labels = m.get('externalLabels')
        if m.get('labelFilters') is not None:
            self.label_filters = m.get('labelFilters')
        if m.get('labelFiltersType') is not None:
            self.label_filters_type = m.get('labelFiltersType')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.sink_list = []
        if m.get('sinkList') is not None:
            for k in m.get('sinkList'):
                temp_model = UpdateDeliveryTaskRequestSinkList()
                self.sink_list.append(temp_model.from_map(k))
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('taskDescription') is not None:
            self.task_description = m.get('taskDescription')
        if m.get('taskName') is not None:
            self.task_name = m.get('taskName')
        return self


class UpdateDeliveryTaskResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateDeliveryTaskResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateDeliveryTaskResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateDeliveryTaskResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateDigitalEmployeeRequestKnowledgesBailian(TeaModel):
    def __init__(
        self,
        attributes: str = None,
        index_id: str = None,
        region: str = None,
        workspace_id: str = None,
    ):
        self.attributes = attributes
        self.index_id = index_id
        self.region = region
        self.workspace_id = workspace_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.attributes is not None:
            result['attributes'] = self.attributes
        if self.index_id is not None:
            result['indexId'] = self.index_id
        if self.region is not None:
            result['region'] = self.region
        if self.workspace_id is not None:
            result['workspaceId'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('attributes') is not None:
            self.attributes = m.get('attributes')
        if m.get('indexId') is not None:
            self.index_id = m.get('indexId')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('workspaceId') is not None:
            self.workspace_id = m.get('workspaceId')
        return self


class UpdateDigitalEmployeeRequestKnowledges(TeaModel):
    def __init__(
        self,
        bailian: List[UpdateDigitalEmployeeRequestKnowledgesBailian] = None,
        sop: List[Dict[str, Any]] = None,
    ):
        self.bailian = bailian
        self.sop = sop

    def validate(self):
        if self.bailian:
            for k in self.bailian:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['bailian'] = []
        if self.bailian is not None:
            for k in self.bailian:
                result['bailian'].append(k.to_map() if k else None)
        if self.sop is not None:
            result['sop'] = self.sop
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.bailian = []
        if m.get('bailian') is not None:
            for k in m.get('bailian'):
                temp_model = UpdateDigitalEmployeeRequestKnowledgesBailian()
                self.bailian.append(temp_model.from_map(k))
        if m.get('sop') is not None:
            self.sop = m.get('sop')
        return self


class UpdateDigitalEmployeeRequest(TeaModel):
    def __init__(
        self,
        default_rule: str = None,
        description: str = None,
        display_name: str = None,
        knowledges: UpdateDigitalEmployeeRequestKnowledges = None,
        role_arn: str = None,
    ):
        self.default_rule = default_rule
        self.description = description
        self.display_name = display_name
        self.knowledges = knowledges
        self.role_arn = role_arn

    def validate(self):
        if self.knowledges:
            self.knowledges.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.default_rule is not None:
            result['defaultRule'] = self.default_rule
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.knowledges is not None:
            result['knowledges'] = self.knowledges.to_map()
        if self.role_arn is not None:
            result['roleArn'] = self.role_arn
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('defaultRule') is not None:
            self.default_rule = m.get('defaultRule')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('knowledges') is not None:
            temp_model = UpdateDigitalEmployeeRequestKnowledges()
            self.knowledges = temp_model.from_map(m['knowledges'])
        if m.get('roleArn') is not None:
            self.role_arn = m.get('roleArn')
        return self


class UpdateDigitalEmployeeResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateDigitalEmployeeResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateDigitalEmployeeResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateDigitalEmployeeResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateDigitalEmployeeSkillRequestFiles(TeaModel):
    def __init__(
        self,
        content: str = None,
        name: str = None,
    ):
        self.content = content
        self.name = name

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.content is not None:
            result['content'] = self.content
        if self.name is not None:
            result['name'] = self.name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('content') is not None:
            self.content = m.get('content')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class UpdateDigitalEmployeeSkillRequest(TeaModel):
    def __init__(
        self,
        description: str = None,
        display_name: str = None,
        enable: bool = None,
        files: List[UpdateDigitalEmployeeSkillRequestFiles] = None,
        remark: str = None,
    ):
        self.description = description
        self.display_name = display_name
        # This parameter is required.
        self.enable = enable
        # This parameter is required.
        self.files = files
        self.remark = remark

    def validate(self):
        if self.files:
            for k in self.files:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.enable is not None:
            result['enable'] = self.enable
        result['files'] = []
        if self.files is not None:
            for k in self.files:
                result['files'].append(k.to_map() if k else None)
        if self.remark is not None:
            result['remark'] = self.remark
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        self.files = []
        if m.get('files') is not None:
            for k in m.get('files'):
                temp_model = UpdateDigitalEmployeeSkillRequestFiles()
                self.files.append(temp_model.from_map(k))
        if m.get('remark') is not None:
            self.remark = m.get('remark')
        return self


class UpdateDigitalEmployeeSkillResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateDigitalEmployeeSkillResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateDigitalEmployeeSkillResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateDigitalEmployeeSkillResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateDigitalEmployeeToolsRequestMcpServicesMcpServiceListToolList(TeaModel):
    def __init__(
        self,
        confirm: bool = None,
        description: str = None,
        display_name: str = None,
        enable: bool = None,
        input_schema: str = None,
        name: str = None,
        output_schema: str = None,
        required: List[str] = None,
    ):
        self.confirm = confirm
        self.description = description
        self.display_name = display_name
        self.enable = enable
        self.input_schema = input_schema
        self.name = name
        self.output_schema = output_schema
        self.required = required

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.confirm is not None:
            result['confirm'] = self.confirm
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.enable is not None:
            result['enable'] = self.enable
        if self.input_schema is not None:
            result['inputSchema'] = self.input_schema
        if self.name is not None:
            result['name'] = self.name
        if self.output_schema is not None:
            result['outputSchema'] = self.output_schema
        if self.required is not None:
            result['required'] = self.required
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('confirm') is not None:
            self.confirm = m.get('confirm')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('inputSchema') is not None:
            self.input_schema = m.get('inputSchema')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('outputSchema') is not None:
            self.output_schema = m.get('outputSchema')
        if m.get('required') is not None:
            self.required = m.get('required')
        return self


class UpdateDigitalEmployeeToolsRequestMcpServicesMcpServiceList(TeaModel):
    def __init__(
        self,
        connection: Dict[str, Any] = None,
        description: str = None,
        display_name: str = None,
        enable: bool = None,
        name: str = None,
        network: Dict[str, Any] = None,
        region: str = None,
        tool_list: List[UpdateDigitalEmployeeToolsRequestMcpServicesMcpServiceListToolList] = None,
    ):
        self.connection = connection
        self.description = description
        self.display_name = display_name
        self.enable = enable
        self.name = name
        self.network = network
        self.region = region
        self.tool_list = tool_list

    def validate(self):
        if self.tool_list:
            for k in self.tool_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.connection is not None:
            result['connection'] = self.connection
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.enable is not None:
            result['enable'] = self.enable
        if self.name is not None:
            result['name'] = self.name
        if self.network is not None:
            result['network'] = self.network
        if self.region is not None:
            result['region'] = self.region
        result['toolList'] = []
        if self.tool_list is not None:
            for k in self.tool_list:
                result['toolList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('connection') is not None:
            self.connection = m.get('connection')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('network') is not None:
            self.network = m.get('network')
        if m.get('region') is not None:
            self.region = m.get('region')
        self.tool_list = []
        if m.get('toolList') is not None:
            for k in m.get('toolList'):
                temp_model = UpdateDigitalEmployeeToolsRequestMcpServicesMcpServiceListToolList()
                self.tool_list.append(temp_model.from_map(k))
        return self


class UpdateDigitalEmployeeToolsRequestMcpServices(TeaModel):
    def __init__(
        self,
        mcp_service_list: List[UpdateDigitalEmployeeToolsRequestMcpServicesMcpServiceList] = None,
    ):
        self.mcp_service_list = mcp_service_list

    def validate(self):
        if self.mcp_service_list:
            for k in self.mcp_service_list:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['mcpServiceList'] = []
        if self.mcp_service_list is not None:
            for k in self.mcp_service_list:
                result['mcpServiceList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.mcp_service_list = []
        if m.get('mcpServiceList') is not None:
            for k in m.get('mcpServiceList'):
                temp_model = UpdateDigitalEmployeeToolsRequestMcpServicesMcpServiceList()
                self.mcp_service_list.append(temp_model.from_map(k))
        return self


class UpdateDigitalEmployeeToolsRequest(TeaModel):
    def __init__(
        self,
        mcp_services: UpdateDigitalEmployeeToolsRequestMcpServices = None,
    ):
        self.mcp_services = mcp_services

    def validate(self):
        if self.mcp_services:
            self.mcp_services.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.mcp_services is not None:
            result['mcpServices'] = self.mcp_services.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('mcpServices') is not None:
            temp_model = UpdateDigitalEmployeeToolsRequestMcpServices()
            self.mcp_services = temp_model.from_map(m['mcpServices'])
        return self


class UpdateDigitalEmployeeToolsResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateDigitalEmployeeToolsResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateDigitalEmployeeToolsResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateDigitalEmployeeToolsResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateEscalationPolicyRequest(TeaModel):
    def __init__(
        self,
        body: IncidentEscalationPolicyForModify = None,
        client_token: str = None,
        workspace: str = None,
    ):
        self.body = body
        self.client_token = client_token
        # This parameter is required.
        self.workspace = workspace

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.body is not None:
            result['body'] = self.body.to_map()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            temp_model = IncidentEscalationPolicyForModify()
            self.body = temp_model.from_map(m['body'])
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateEscalationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        uuid: str = None,
    ):
        self.request_id = request_id
        self.uuid = uuid

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.uuid is not None:
            result['uuid'] = self.uuid
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('uuid') is not None:
            self.uuid = m.get('uuid')
        return self


class UpdateEscalationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateEscalationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateEscalationPolicyResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateExperimentPlanRequest(TeaModel):
    def __init__(
        self,
        dataset_id: str = None,
        dataset_project: str = None,
        description: str = None,
        experiments: List[ExperimentConfig] = None,
        plan_name: str = None,
    ):
        self.dataset_id = dataset_id
        self.dataset_project = dataset_project
        self.description = description
        self.experiments = experiments
        self.plan_name = plan_name

    def validate(self):
        if self.experiments:
            for k in self.experiments:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.dataset_id is not None:
            result['datasetId'] = self.dataset_id
        if self.dataset_project is not None:
            result['datasetProject'] = self.dataset_project
        if self.description is not None:
            result['description'] = self.description
        result['experiments'] = []
        if self.experiments is not None:
            for k in self.experiments:
                result['experiments'].append(k.to_map() if k else None)
        if self.plan_name is not None:
            result['planName'] = self.plan_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('datasetId') is not None:
            self.dataset_id = m.get('datasetId')
        if m.get('datasetProject') is not None:
            self.dataset_project = m.get('datasetProject')
        if m.get('description') is not None:
            self.description = m.get('description')
        self.experiments = []
        if m.get('experiments') is not None:
            for k in m.get('experiments'):
                temp_model = ExperimentConfig()
                self.experiments.append(temp_model.from_map(k))
        if m.get('planName') is not None:
            self.plan_name = m.get('planName')
        return self


class UpdateExperimentPlanResponseBody(TeaModel):
    def __init__(
        self,
        message: str = None,
        plan_id: str = None,
        request_id: str = None,
        status: str = None,
    ):
        self.message = message
        self.plan_id = plan_id
        self.request_id = request_id
        self.status = status

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.message is not None:
            result['message'] = self.message
        if self.plan_id is not None:
            result['planId'] = self.plan_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        if self.status is not None:
            result['status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('message') is not None:
            self.message = m.get('message')
        if m.get('planId') is not None:
            self.plan_id = m.get('planId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class UpdateExperimentPlanResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateExperimentPlanResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateExperimentPlanResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateIntegrationPolicyRequestTags(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # Tag `key` value.
        self.key = key
        # Tag `value` value.
        self.value = value

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = 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 UpdateIntegrationPolicyRequest(TeaModel):
    def __init__(
        self,
        fee_package: str = None,
        policy_name: str = None,
        resource_group_id: str = None,
        tags: List[UpdateIntegrationPolicyRequestTags] = None,
    ):
        # Fee package type, CS_Pro/CS_Basic/empty.
        self.fee_package = fee_package
        # Rule name, minimum 3 characters, maximum 63 characters, must start with a letter.
        self.policy_name = policy_name
        # Resource group ID of the instance.
        self.resource_group_id = resource_group_id
        # Resource tags.
        self.tags = tags

    def validate(self):
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.fee_package is not None:
            result['feePackage'] = self.fee_package
        if self.policy_name is not None:
            result['policyName'] = self.policy_name
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        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: dict = None):
        m = m or dict()
        if m.get('feePackage') is not None:
            self.fee_package = m.get('feePackage')
        if m.get('policyName') is not None:
            self.policy_name = m.get('policyName')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = UpdateIntegrationPolicyRequestTags()
                self.tags.append(temp_model.from_map(k))
        return self


class UpdateIntegrationPolicyResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # ID of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateIntegrationPolicyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateIntegrationPolicyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateIntegrationPolicyResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateMaintainWindowRequest(TeaModel):
    def __init__(
        self,
        body: MaintainWindowForModify = None,
        client_token: str = None,
        workspace: str = None,
    ):
        self.body = body
        self.client_token = client_token
        self.workspace = workspace

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.body is not None:
            result['body'] = self.body.to_map()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            temp_model = MaintainWindowForModify()
            self.body = temp_model.from_map(m['body'])
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateMaintainWindowResponseBody(TeaModel):
    def __init__(
        self,
        maintain_window_id: str = None,
        request_id: str = None,
    ):
        self.maintain_window_id = maintain_window_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.maintain_window_id is not None:
            result['maintainWindowId'] = self.maintain_window_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('maintainWindowId') is not None:
            self.maintain_window_id = m.get('maintainWindowId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateMaintainWindowResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateMaintainWindowResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateMaintainWindowResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateMemoryRequest(TeaModel):
    def __init__(
        self,
        metadata: Dict[str, Any] = None,
        text: str = None,
    ):
        self.metadata = metadata
        self.text = text

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.metadata is not None:
            result['metadata'] = self.metadata
        if self.text is not None:
            result['text'] = self.text
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('metadata') is not None:
            self.metadata = m.get('metadata')
        if m.get('text') is not None:
            self.text = m.get('text')
        return self


class UpdateMemoryResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateMemoryResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateMemoryResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateMemoryResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateMemoryStoreRequest(TeaModel):
    def __init__(
        self,
        custom_extraction_strategies: List[CustomExtractionStrategy] = None,
        description: str = None,
        enable_graph: bool = None,
        extraction_strategies: List[str] = None,
        short_term_ttl: int = None,
    ):
        self.custom_extraction_strategies = custom_extraction_strategies
        self.description = description
        self.enable_graph = enable_graph
        self.extraction_strategies = extraction_strategies
        self.short_term_ttl = short_term_ttl

    def validate(self):
        if self.custom_extraction_strategies:
            for k in self.custom_extraction_strategies:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['customExtractionStrategies'] = []
        if self.custom_extraction_strategies is not None:
            for k in self.custom_extraction_strategies:
                result['customExtractionStrategies'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.enable_graph is not None:
            result['enableGraph'] = self.enable_graph
        if self.extraction_strategies is not None:
            result['extractionStrategies'] = self.extraction_strategies
        if self.short_term_ttl is not None:
            result['shortTermTtl'] = self.short_term_ttl
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.custom_extraction_strategies = []
        if m.get('customExtractionStrategies') is not None:
            for k in m.get('customExtractionStrategies'):
                temp_model = CustomExtractionStrategy()
                self.custom_extraction_strategies.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enableGraph') is not None:
            self.enable_graph = m.get('enableGraph')
        if m.get('extractionStrategies') is not None:
            self.extraction_strategies = m.get('extractionStrategies')
        if m.get('shortTermTtl') is not None:
            self.short_term_ttl = m.get('shortTermTtl')
        return self


class UpdateMemoryStoreResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateMemoryStoreResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateMemoryStoreResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateMemoryStoreResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateNotifyStrategyRequest(TeaModel):
    def __init__(
        self,
        body: NotifyStrategyForModify = None,
        client_token: str = None,
        workspace: str = None,
    ):
        self.body = body
        self.client_token = client_token
        self.workspace = workspace

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.body is not None:
            result['body'] = self.body.to_map()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            temp_model = NotifyStrategyForModify()
            self.body = temp_model.from_map(m['body'])
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateNotifyStrategyResponseBody(TeaModel):
    def __init__(
        self,
        notify_strategy_id: str = None,
        request_id: str = None,
    ):
        self.notify_strategy_id = notify_strategy_id
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.notify_strategy_id is not None:
            result['notifyStrategyId'] = self.notify_strategy_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('notifyStrategyId') is not None:
            self.notify_strategy_id = m.get('notifyStrategyId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateNotifyStrategyResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateNotifyStrategyResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateNotifyStrategyResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateOncallScheduleRequestRotations(TeaModel):
    def __init__(
        self,
        active_days: List[int] = None,
        contacts: List[str] = None,
        rotation_end_time: str = None,
        rotation_name: str = None,
        rotation_start_time: str = None,
        shift_length: int = None,
        shift_recurrence_frequency: str = None,
        start_date: str = None,
        time_zone: str = None,
    ):
        # This parameter is required.
        self.active_days = active_days
        # This parameter is required.
        self.contacts = contacts
        # This parameter is required.
        self.rotation_end_time = rotation_end_time
        # This parameter is required.
        self.rotation_name = rotation_name
        # This parameter is required.
        self.rotation_start_time = rotation_start_time
        self.shift_length = shift_length
        # This parameter is required.
        self.shift_recurrence_frequency = shift_recurrence_frequency
        # This parameter is required.
        self.start_date = start_date
        # This parameter is required.
        self.time_zone = time_zone

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.active_days is not None:
            result['activeDays'] = self.active_days
        if self.contacts is not None:
            result['contacts'] = self.contacts
        if self.rotation_end_time is not None:
            result['rotationEndTime'] = self.rotation_end_time
        if self.rotation_name is not None:
            result['rotationName'] = self.rotation_name
        if self.rotation_start_time is not None:
            result['rotationStartTime'] = self.rotation_start_time
        if self.shift_length is not None:
            result['shiftLength'] = self.shift_length
        if self.shift_recurrence_frequency is not None:
            result['shiftRecurrenceFrequency'] = self.shift_recurrence_frequency
        if self.start_date is not None:
            result['startDate'] = self.start_date
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('activeDays') is not None:
            self.active_days = m.get('activeDays')
        if m.get('contacts') is not None:
            self.contacts = m.get('contacts')
        if m.get('rotationEndTime') is not None:
            self.rotation_end_time = m.get('rotationEndTime')
        if m.get('rotationName') is not None:
            self.rotation_name = m.get('rotationName')
        if m.get('rotationStartTime') is not None:
            self.rotation_start_time = m.get('rotationStartTime')
        if m.get('shiftLength') is not None:
            self.shift_length = m.get('shiftLength')
        if m.get('shiftRecurrenceFrequency') is not None:
            self.shift_recurrence_frequency = m.get('shiftRecurrenceFrequency')
        if m.get('startDate') is not None:
            self.start_date = m.get('startDate')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        return self


class UpdateOncallScheduleRequest(TeaModel):
    def __init__(
        self,
        oncall_schedule_name: str = None,
        rotations: List[UpdateOncallScheduleRequestRotations] = None,
        shift_robot_id: str = None,
        source: str = None,
    ):
        self.oncall_schedule_name = oncall_schedule_name
        self.rotations = rotations
        self.shift_robot_id = shift_robot_id
        self.source = source

    def validate(self):
        if self.rotations:
            for k in self.rotations:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.oncall_schedule_name is not None:
            result['oncallScheduleName'] = self.oncall_schedule_name
        result['rotations'] = []
        if self.rotations is not None:
            for k in self.rotations:
                result['rotations'].append(k.to_map() if k else None)
        if self.shift_robot_id is not None:
            result['shiftRobotId'] = self.shift_robot_id
        if self.source is not None:
            result['source'] = self.source
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('oncallScheduleName') is not None:
            self.oncall_schedule_name = m.get('oncallScheduleName')
        self.rotations = []
        if m.get('rotations') is not None:
            for k in m.get('rotations'):
                temp_model = UpdateOncallScheduleRequestRotations()
                self.rotations.append(temp_model.from_map(k))
        if m.get('shiftRobotId') is not None:
            self.shift_robot_id = m.get('shiftRobotId')
        if m.get('source') is not None:
            self.source = m.get('source')
        return self


class UpdateOncallScheduleResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateOncallScheduleResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateOncallScheduleResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateOncallScheduleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdatePipelineRequestExecutePolicyRunOnce(TeaModel):
    def __init__(
        self,
        from_time: int = None,
        to_time: int = None,
    ):
        self.from_time = from_time
        self.to_time = to_time

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.from_time is not None:
            result['fromTime'] = self.from_time
        if self.to_time is not None:
            result['toTime'] = self.to_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('fromTime') is not None:
            self.from_time = m.get('fromTime')
        if m.get('toTime') is not None:
            self.to_time = m.get('toTime')
        return self


class UpdatePipelineRequestExecutePolicyScheduled(TeaModel):
    def __init__(
        self,
        interval: str = None,
    ):
        self.interval = interval

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.interval is not None:
            result['interval'] = self.interval
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        return self


class UpdatePipelineRequestExecutePolicy(TeaModel):
    def __init__(
        self,
        mode: str = None,
        run_once: UpdatePipelineRequestExecutePolicyRunOnce = None,
        scheduled: UpdatePipelineRequestExecutePolicyScheduled = None,
    ):
        self.mode = mode
        self.run_once = run_once
        self.scheduled = scheduled

    def validate(self):
        if self.run_once:
            self.run_once.validate()
        if self.scheduled:
            self.scheduled.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.mode is not None:
            result['mode'] = self.mode
        if self.run_once is not None:
            result['runOnce'] = self.run_once.to_map()
        if self.scheduled is not None:
            result['scheduled'] = self.scheduled.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('mode') is not None:
            self.mode = m.get('mode')
        if m.get('runOnce') is not None:
            temp_model = UpdatePipelineRequestExecutePolicyRunOnce()
            self.run_once = temp_model.from_map(m['runOnce'])
        if m.get('scheduled') is not None:
            temp_model = UpdatePipelineRequestExecutePolicyScheduled()
            self.scheduled = temp_model.from_map(m['scheduled'])
        return self


class UpdatePipelineRequestPipelineNodes(TeaModel):
    def __init__(
        self,
        id: str = None,
        parameters: Dict[str, Any] = None,
        type: str = None,
    ):
        self.id = id
        self.parameters = parameters
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.parameters is not None:
            result['parameters'] = self.parameters
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('parameters') is not None:
            self.parameters = m.get('parameters')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class UpdatePipelineRequestPipeline(TeaModel):
    def __init__(
        self,
        nodes: List[UpdatePipelineRequestPipelineNodes] = None,
    ):
        self.nodes = nodes

    def validate(self):
        if self.nodes:
            for k in self.nodes:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['nodes'] = []
        if self.nodes is not None:
            for k in self.nodes:
                result['nodes'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.nodes = []
        if m.get('nodes') is not None:
            for k in m.get('nodes'):
                temp_model = UpdatePipelineRequestPipelineNodes()
                self.nodes.append(temp_model.from_map(k))
        return self


class UpdatePipelineRequestSinkDataset(TeaModel):
    def __init__(
        self,
        dataset: str = None,
        workspace: str = None,
    ):
        self.dataset = dataset
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.dataset is not None:
            result['dataset'] = self.dataset
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dataset') is not None:
            self.dataset = m.get('dataset')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdatePipelineRequestSink(TeaModel):
    def __init__(
        self,
        dataset: UpdatePipelineRequestSinkDataset = None,
        type: str = None,
    ):
        self.dataset = dataset
        self.type = type

    def validate(self):
        if self.dataset:
            self.dataset.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.dataset is not None:
            result['dataset'] = self.dataset.to_map()
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dataset') is not None:
            temp_model = UpdatePipelineRequestSinkDataset()
            self.dataset = temp_model.from_map(m['dataset'])
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class UpdatePipelineRequestSourceLogstore(TeaModel):
    def __init__(
        self,
        logstore: str = None,
    ):
        self.logstore = logstore

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.logstore is not None:
            result['logstore'] = self.logstore
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('logstore') is not None:
            self.logstore = m.get('logstore')
        return self


class UpdatePipelineRequestSource(TeaModel):
    def __init__(
        self,
        logstore: UpdatePipelineRequestSourceLogstore = None,
        type: str = None,
    ):
        self.logstore = logstore
        self.type = type

    def validate(self):
        if self.logstore:
            self.logstore.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.logstore is not None:
            result['logstore'] = self.logstore.to_map()
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('logstore') is not None:
            temp_model = UpdatePipelineRequestSourceLogstore()
            self.logstore = temp_model.from_map(m['logstore'])
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class UpdatePipelineRequest(TeaModel):
    def __init__(
        self,
        description: str = None,
        execute_policy: UpdatePipelineRequestExecutePolicy = None,
        pipeline: UpdatePipelineRequestPipeline = None,
        sink: UpdatePipelineRequestSink = None,
        source: UpdatePipelineRequestSource = None,
    ):
        self.description = description
        self.execute_policy = execute_policy
        self.pipeline = pipeline
        self.sink = sink
        self.source = source

    def validate(self):
        if self.execute_policy:
            self.execute_policy.validate()
        if self.pipeline:
            self.pipeline.validate()
        if self.sink:
            self.sink.validate()
        if self.source:
            self.source.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.execute_policy is not None:
            result['executePolicy'] = self.execute_policy.to_map()
        if self.pipeline is not None:
            result['pipeline'] = self.pipeline.to_map()
        if self.sink is not None:
            result['sink'] = self.sink.to_map()
        if self.source is not None:
            result['source'] = self.source.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('executePolicy') is not None:
            temp_model = UpdatePipelineRequestExecutePolicy()
            self.execute_policy = temp_model.from_map(m['executePolicy'])
        if m.get('pipeline') is not None:
            temp_model = UpdatePipelineRequestPipeline()
            self.pipeline = temp_model.from_map(m['pipeline'])
        if m.get('sink') is not None:
            temp_model = UpdatePipelineRequestSink()
            self.sink = temp_model.from_map(m['sink'])
        if m.get('source') is not None:
            temp_model = UpdatePipelineRequestSource()
            self.source = temp_model.from_map(m['source'])
        return self


class UpdatePipelineResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdatePipelineResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdatePipelineResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdatePipelineResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdatePrometheusClusterRequest(TeaModel):
    def __init__(
        self,
        auth_free_write_policy: str = None,
        enable_auth_free_write: bool = None,
        payment_type: str = None,
        storage_duration: int = None,
    ):
        self.auth_free_write_policy = auth_free_write_policy
        self.enable_auth_free_write = enable_auth_free_write
        self.payment_type = payment_type
        self.storage_duration = storage_duration

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.auth_free_write_policy is not None:
            result['authFreeWritePolicy'] = self.auth_free_write_policy
        if self.enable_auth_free_write is not None:
            result['enableAuthFreeWrite'] = self.enable_auth_free_write
        if self.payment_type is not None:
            result['paymentType'] = self.payment_type
        if self.storage_duration is not None:
            result['storageDuration'] = self.storage_duration
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('authFreeWritePolicy') is not None:
            self.auth_free_write_policy = m.get('authFreeWritePolicy')
        if m.get('enableAuthFreeWrite') is not None:
            self.enable_auth_free_write = m.get('enableAuthFreeWrite')
        if m.get('paymentType') is not None:
            self.payment_type = m.get('paymentType')
        if m.get('storageDuration') is not None:
            self.storage_duration = m.get('storageDuration')
        return self


class UpdatePrometheusClusterResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdatePrometheusClusterResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdatePrometheusClusterResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdatePrometheusClusterResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdatePrometheusInstanceRequest(TeaModel):
    def __init__(
        self,
        archive_duration: int = None,
        auth_free_read_policy: str = None,
        auth_free_write_policy: str = None,
        basic_metric_query_limit: bool = None,
        enable_auth_free_read: bool = None,
        enable_auth_free_write: bool = None,
        enable_auth_token: bool = None,
        payment_type: str = None,
        prometheus_instance_name: str = None,
        status: str = None,
        storage_duration: int = None,
        version: str = None,
        workspace: str = None,
    ):
        # The number of days to automatically archive and save after the storage expires, 0 means no archiving. The range of archiving days:
        # V1: 1~365 days. Only supported for metric write volume.
        # V2: 1~3650 days (3650 indicates permanent storage).
        self.archive_duration = archive_duration
        # Password-free read policy (supports IP segments and VpcId).
        self.auth_free_read_policy = auth_free_read_policy
        # Password-free write policy (supports IP segments and VpcId).
        self.auth_free_write_policy = auth_free_write_policy
        self.basic_metric_query_limit = basic_metric_query_limit
        # Whether to enable password-free read.
        self.enable_auth_free_read = enable_auth_free_read
        # Whether to enable password-free write.
        self.enable_auth_free_write = enable_auth_free_write
        # Whether to enable access token authentication.
        self.enable_auth_token = enable_auth_token
        # Billing method (can only be modified once during the instance\\"s lifecycle):
        # POSTPAY: Postpaid by metric reporting volume.
        # POSTPAY_GB: Postpaid by metric write volume.
        self.payment_type = payment_type
        # Instance name.
        self.prometheus_instance_name = prometheus_instance_name
        # Instance storage DB status (only supports RUNNING). If empty, the storage DB status will not be changed.
        self.status = status
        # Storage duration (days):
        # By write volume: 90, 180.
        # By metric reporting volume: 15, 30, 60, 90, 180.
        self.storage_duration = storage_duration
        self.version = version
        # Belonging workspace.
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.archive_duration is not None:
            result['archiveDuration'] = self.archive_duration
        if self.auth_free_read_policy is not None:
            result['authFreeReadPolicy'] = self.auth_free_read_policy
        if self.auth_free_write_policy is not None:
            result['authFreeWritePolicy'] = self.auth_free_write_policy
        if self.basic_metric_query_limit is not None:
            result['basicMetricQueryLimit'] = self.basic_metric_query_limit
        if self.enable_auth_free_read is not None:
            result['enableAuthFreeRead'] = self.enable_auth_free_read
        if self.enable_auth_free_write is not None:
            result['enableAuthFreeWrite'] = self.enable_auth_free_write
        if self.enable_auth_token is not None:
            result['enableAuthToken'] = self.enable_auth_token
        if self.payment_type is not None:
            result['paymentType'] = self.payment_type
        if self.prometheus_instance_name is not None:
            result['prometheusInstanceName'] = self.prometheus_instance_name
        if self.status is not None:
            result['status'] = self.status
        if self.storage_duration is not None:
            result['storageDuration'] = self.storage_duration
        if self.version is not None:
            result['version'] = self.version
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('archiveDuration') is not None:
            self.archive_duration = m.get('archiveDuration')
        if m.get('authFreeReadPolicy') is not None:
            self.auth_free_read_policy = m.get('authFreeReadPolicy')
        if m.get('authFreeWritePolicy') is not None:
            self.auth_free_write_policy = m.get('authFreeWritePolicy')
        if m.get('basicMetricQueryLimit') is not None:
            self.basic_metric_query_limit = m.get('basicMetricQueryLimit')
        if m.get('enableAuthFreeRead') is not None:
            self.enable_auth_free_read = m.get('enableAuthFreeRead')
        if m.get('enableAuthFreeWrite') is not None:
            self.enable_auth_free_write = m.get('enableAuthFreeWrite')
        if m.get('enableAuthToken') is not None:
            self.enable_auth_token = m.get('enableAuthToken')
        if m.get('paymentType') is not None:
            self.payment_type = m.get('paymentType')
        if m.get('prometheusInstanceName') is not None:
            self.prometheus_instance_name = m.get('prometheusInstanceName')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('storageDuration') is not None:
            self.storage_duration = m.get('storageDuration')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdatePrometheusInstanceResponseBody(TeaModel):
    def __init__(
        self,
        prometheus_instance_id: str = None,
        request_id: str = None,
    ):
        # Instance ID.
        self.prometheus_instance_id = prometheus_instance_id
        # ID of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.prometheus_instance_id is not None:
            result['prometheusInstanceId'] = self.prometheus_instance_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusInstanceId') is not None:
            self.prometheus_instance_id = m.get('prometheusInstanceId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdatePrometheusInstanceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdatePrometheusInstanceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdatePrometheusInstanceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdatePrometheusUserSettingRequest(TeaModel):
    def __init__(
        self,
        setting_value: str = None,
    ):
        # This parameter is required.
        self.setting_value = setting_value

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.setting_value is not None:
            result['settingValue'] = self.setting_value
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('settingValue') is not None:
            self.setting_value = m.get('settingValue')
        return self


class UpdatePrometheusUserSettingResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdatePrometheusUserSettingResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdatePrometheusUserSettingResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdatePrometheusUserSettingResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdatePrometheusViewRequestPrometheusInstances(TeaModel):
    def __init__(
        self,
        prometheus_instance_id: str = None,
        region_id: str = None,
        user_id: str = None,
    ):
        # Instance ID.
        self.prometheus_instance_id = prometheus_instance_id
        # Region.
        self.region_id = region_id
        # User ID.
        self.user_id = user_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.prometheus_instance_id is not None:
            result['prometheusInstanceId'] = self.prometheus_instance_id
        if self.region_id is not None:
            result['regionId'] = self.region_id
        if self.user_id is not None:
            result['userId'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusInstanceId') is not None:
            self.prometheus_instance_id = m.get('prometheusInstanceId')
        if m.get('regionId') is not None:
            self.region_id = m.get('regionId')
        if m.get('userId') is not None:
            self.user_id = m.get('userId')
        return self


class UpdatePrometheusViewRequest(TeaModel):
    def __init__(
        self,
        auth_free_read_policy: str = None,
        enable_auth_free_read: bool = None,
        enable_auth_token: bool = None,
        prometheus_instances: List[UpdatePrometheusViewRequestPrometheusInstances] = None,
        prometheus_view_name: str = None,
        status: str = None,
        workspace: str = None,
    ):
        # Password-free read policy (supports IP segments and VpcId).
        self.auth_free_read_policy = auth_free_read_policy
        # Whether to support password-free read.
        self.enable_auth_free_read = enable_auth_free_read
        # Whether to support authToken.
        self.enable_auth_token = enable_auth_token
        # List of Prometheus instances.
        self.prometheus_instances = prometheus_instances
        # Prometheus view name.
        self.prometheus_view_name = prometheus_view_name
        # Running status.
        self.status = status
        # Belonging workspace.
        self.workspace = workspace

    def validate(self):
        if self.prometheus_instances:
            for k in self.prometheus_instances:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.auth_free_read_policy is not None:
            result['authFreeReadPolicy'] = self.auth_free_read_policy
        if self.enable_auth_free_read is not None:
            result['enableAuthFreeRead'] = self.enable_auth_free_read
        if self.enable_auth_token is not None:
            result['enableAuthToken'] = self.enable_auth_token
        result['prometheusInstances'] = []
        if self.prometheus_instances is not None:
            for k in self.prometheus_instances:
                result['prometheusInstances'].append(k.to_map() if k else None)
        if self.prometheus_view_name is not None:
            result['prometheusViewName'] = self.prometheus_view_name
        if self.status is not None:
            result['status'] = self.status
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('authFreeReadPolicy') is not None:
            self.auth_free_read_policy = m.get('authFreeReadPolicy')
        if m.get('enableAuthFreeRead') is not None:
            self.enable_auth_free_read = m.get('enableAuthFreeRead')
        if m.get('enableAuthToken') is not None:
            self.enable_auth_token = m.get('enableAuthToken')
        self.prometheus_instances = []
        if m.get('prometheusInstances') is not None:
            for k in m.get('prometheusInstances'):
                temp_model = UpdatePrometheusViewRequestPrometheusInstances()
                self.prometheus_instances.append(temp_model.from_map(k))
        if m.get('prometheusViewName') is not None:
            self.prometheus_view_name = m.get('prometheusViewName')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdatePrometheusViewResponseBody(TeaModel):
    def __init__(
        self,
        prometheus_view_id: str = None,
        request_id: str = None,
    ):
        # Prometheus view instance ID.
        self.prometheus_view_id = prometheus_view_id
        # ID of the request.
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.prometheus_view_id is not None:
            result['prometheusViewId'] = self.prometheus_view_id
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('prometheusViewId') is not None:
            self.prometheus_view_id = m.get('prometheusViewId')
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdatePrometheusViewResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdatePrometheusViewResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdatePrometheusViewResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateServiceRequest(TeaModel):
    def __init__(
        self,
        attributes: str = None,
        description: str = None,
        display_name: str = None,
        service_status: str = None,
    ):
        # Extended attributes.
        self.attributes = attributes
        # Service description, only valid when serviceType=RUM.
        self.description = description
        # Display name, only valid when serviceType=RUM.
        self.display_name = display_name
        # Service status, only valid when serviceType=RUM.
        self.service_status = service_status

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.attributes is not None:
            result['attributes'] = self.attributes
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['displayName'] = self.display_name
        if self.service_status is not None:
            result['serviceStatus'] = self.service_status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('attributes') is not None:
            self.attributes = m.get('attributes')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('displayName') is not None:
            self.display_name = m.get('displayName')
        if m.get('serviceStatus') is not None:
            self.service_status = m.get('serviceStatus')
        return self


class UpdateServiceResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        service_id: str = None,
    ):
        # Request ID.
        self.request_id = request_id
        # Service ID.
        self.service_id = service_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.service_id is not None:
            result['serviceId'] = self.service_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('serviceId') is not None:
            self.service_id = m.get('serviceId')
        return self


class UpdateServiceResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateServiceResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateServiceResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateServiceObservabilityRequest(TeaModel):
    def __init__(
        self,
        fee_type: str = None,
        quotas: Dict[str, str] = None,
        settings: Dict[str, Any] = None,
        status: str = None,
    ):
        self.fee_type = fee_type
        self.quotas = quotas
        self.settings = settings
        self.status = status

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.fee_type is not None:
            result['feeType'] = self.fee_type
        if self.quotas is not None:
            result['quotas'] = self.quotas
        if self.settings is not None:
            result['settings'] = self.settings
        if self.status is not None:
            result['status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('feeType') is not None:
            self.fee_type = m.get('feeType')
        if m.get('quotas') is not None:
            self.quotas = m.get('quotas')
        if m.get('settings') is not None:
            self.settings = m.get('settings')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class UpdateServiceObservabilityResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateServiceObservabilityResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateServiceObservabilityResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateServiceObservabilityResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateSiteMonitorRequestCustomSchedule(TeaModel):
    def __init__(
        self,
        days: List[int] = None,
        end_hour: int = None,
        start_hour: int = None,
        time_zone: str = None,
    ):
        self.days = days
        self.end_hour = end_hour
        self.start_hour = start_hour
        self.time_zone = time_zone

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.days is not None:
            result['days'] = self.days
        if self.end_hour is not None:
            result['endHour'] = self.end_hour
        if self.start_hour is not None:
            result['startHour'] = self.start_hour
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('days') is not None:
            self.days = m.get('days')
        if m.get('endHour') is not None:
            self.end_hour = m.get('endHour')
        if m.get('startHour') is not None:
            self.start_hour = m.get('startHour')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        return self


class UpdateSiteMonitorRequestIspCities(TeaModel):
    def __init__(
        self,
        city: str = None,
        isp: str = None,
        type: str = None,
    ):
        self.city = city
        self.isp = isp
        self.type = type

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.city is not None:
            result['city'] = self.city
        if self.isp is not None:
            result['isp'] = self.isp
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('city') is not None:
            self.city = m.get('city')
        if m.get('isp') is not None:
            self.isp = m.get('isp')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class UpdateSiteMonitorRequest(TeaModel):
    def __init__(
        self,
        address: str = None,
        custom_schedule: UpdateSiteMonitorRequestCustomSchedule = None,
        interval: int = None,
        interval_unit: str = None,
        isp_cities: List[UpdateSiteMonitorRequestIspCities] = None,
        option: str = None,
        task_labels: str = None,
        task_name: str = None,
        update_label: bool = None,
        client_token: str = None,
    ):
        self.address = address
        self.custom_schedule = custom_schedule
        self.interval = interval
        self.interval_unit = interval_unit
        self.isp_cities = isp_cities
        self.option = option
        self.task_labels = task_labels
        self.task_name = task_name
        self.update_label = update_label
        self.client_token = client_token

    def validate(self):
        if self.custom_schedule:
            self.custom_schedule.validate()
        if self.isp_cities:
            for k in self.isp_cities:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.address is not None:
            result['address'] = self.address
        if self.custom_schedule is not None:
            result['customSchedule'] = self.custom_schedule.to_map()
        if self.interval is not None:
            result['interval'] = self.interval
        if self.interval_unit is not None:
            result['intervalUnit'] = self.interval_unit
        result['ispCities'] = []
        if self.isp_cities is not None:
            for k in self.isp_cities:
                result['ispCities'].append(k.to_map() if k else None)
        if self.option is not None:
            result['option'] = self.option
        if self.task_labels is not None:
            result['taskLabels'] = self.task_labels
        if self.task_name is not None:
            result['taskName'] = self.task_name
        if self.update_label is not None:
            result['updateLabel'] = self.update_label
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('address') is not None:
            self.address = m.get('address')
        if m.get('customSchedule') is not None:
            temp_model = UpdateSiteMonitorRequestCustomSchedule()
            self.custom_schedule = temp_model.from_map(m['customSchedule'])
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('intervalUnit') is not None:
            self.interval_unit = m.get('intervalUnit')
        self.isp_cities = []
        if m.get('ispCities') is not None:
            for k in m.get('ispCities'):
                temp_model = UpdateSiteMonitorRequestIspCities()
                self.isp_cities.append(temp_model.from_map(k))
        if m.get('option') is not None:
            self.option = m.get('option')
        if m.get('taskLabels') is not None:
            self.task_labels = m.get('taskLabels')
        if m.get('taskName') is not None:
            self.task_name = m.get('taskName')
        if m.get('updateLabel') is not None:
            self.update_label = m.get('updateLabel')
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        return self


class UpdateSiteMonitorResponseBodyData(TeaModel):
    def __init__(
        self,
        count: int = None,
    ):
        self.count = count

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.count is not None:
            result['count'] = self.count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('count') is not None:
            self.count = m.get('count')
        return self


class UpdateSiteMonitorResponseBody(TeaModel):
    def __init__(
        self,
        data: UpdateSiteMonitorResponseBodyData = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.data is not None:
            result['data'] = self.data.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('data') is not None:
            temp_model = UpdateSiteMonitorResponseBodyData()
            self.data = temp_model.from_map(m['data'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpdateSiteMonitorResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateSiteMonitorResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateSiteMonitorResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateSubscriptionRequest(TeaModel):
    def __init__(
        self,
        body: SubscriptionForModify = None,
        client_token: str = None,
        workspace: str = None,
    ):
        self.body = body
        self.client_token = client_token
        self.workspace = workspace

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.body is not None:
            result['body'] = self.body.to_map()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            temp_model = SubscriptionForModify()
            self.body = temp_model.from_map(m['body'])
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateSubscriptionResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        subscription_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.subscription_id = subscription_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.subscription_id is not None:
            result['subscriptionId'] = self.subscription_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('subscriptionId') is not None:
            self.subscription_id = m.get('subscriptionId')
        return self


class UpdateSubscriptionResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateSubscriptionResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateSubscriptionResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateThreadRequest(TeaModel):
    def __init__(
        self,
        status: str = None,
        title: str = None,
    ):
        self.status = status
        self.title = title

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.status is not None:
            result['status'] = self.status
        if self.title is not None:
            result['title'] = self.title
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('title') is not None:
            self.title = m.get('title')
        return self


class UpdateThreadResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        thread_id: str = None,
        version: int = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.thread_id = thread_id
        self.version = version

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.thread_id is not None:
            result['threadId'] = self.thread_id
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('threadId') is not None:
            self.thread_id = m.get('threadId')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class UpdateThreadResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateThreadResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateThreadResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateTransformerRequest(TeaModel):
    def __init__(
        self,
        body: TransformerForModify = None,
        client_token: str = None,
        workspace: str = None,
    ):
        self.body = body
        self.client_token = client_token
        self.workspace = workspace

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.body is not None:
            result['body'] = self.body.to_map()
        if self.client_token is not None:
            result['clientToken'] = self.client_token
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            temp_model = TransformerForModify()
            self.body = temp_model.from_map(m['body'])
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateTransformerResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        transformer_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.transformer_id = transformer_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.transformer_id is not None:
            result['transformerId'] = self.transformer_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('transformerId') is not None:
            self.transformer_id = m.get('transformerId')
        return self


class UpdateTransformerResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateTransformerResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateTransformerResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateTransformerSortIdRequest(TeaModel):
    def __init__(
        self,
        client_token: str = None,
        sort_id: int = None,
        workspace: str = None,
    ):
        self.client_token = client_token
        self.sort_id = sort_id
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.sort_id is not None:
            result['sortId'] = self.sort_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('clientToken') is not None:
            self.client_token = m.get('clientToken')
        if m.get('sortId') is not None:
            self.sort_id = m.get('sortId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateTransformerSortIdResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        transformer_id: str = None,
    ):
        # Id of the request
        self.request_id = request_id
        self.transformer_id = transformer_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.transformer_id is not None:
            result['transformerId'] = self.transformer_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('transformerId') is not None:
            self.transformer_id = m.get('transformerId')
        return self


class UpdateTransformerSortIdResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateTransformerSortIdResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateTransformerSortIdResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpdateUmodelHeaders(TeaModel):
    def __init__(
        self,
        common_headers: Dict[str, str] = None,
        log_version: str = None,
    ):
        self.common_headers = common_headers
        self.log_version = log_version

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.common_headers is not None:
            result['commonHeaders'] = self.common_headers
        if self.log_version is not None:
            result['logVersion'] = self.log_version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('commonHeaders') is not None:
            self.common_headers = m.get('commonHeaders')
        if m.get('logVersion') is not None:
            self.log_version = m.get('logVersion')
        return self


class UpdateUmodelRequest(TeaModel):
    def __init__(
        self,
        description: str = None,
    ):
        # Description.
        self.description = description

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('description') is not None:
            self.description = m.get('description')
        return self


class UpdateUmodelResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        workspace: str = None,
    ):
        # Request ID
        self.request_id = request_id
        # Workspace name
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().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.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateUmodelResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpdateUmodelResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpdateUmodelResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpsertUmodelCommonSchemaRefHeaders(TeaModel):
    def __init__(
        self,
        common_headers: Dict[str, str] = None,
        log_version: str = None,
    ):
        self.common_headers = common_headers
        self.log_version = log_version

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.common_headers is not None:
            result['commonHeaders'] = self.common_headers
        if self.log_version is not None:
            result['logVersion'] = self.log_version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('commonHeaders') is not None:
            self.common_headers = m.get('commonHeaders')
        if m.get('logVersion') is not None:
            self.log_version = m.get('logVersion')
        return self


class UpsertUmodelCommonSchemaRefRequest(TeaModel):
    def __init__(
        self,
        group: str = None,
        version: str = None,
    ):
        # This parameter is required.
        self.group = group
        # This parameter is required.
        self.version = version

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.group is not None:
            result['group'] = self.group
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('group') is not None:
            self.group = m.get('group')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class UpsertUmodelCommonSchemaRefResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpsertUmodelCommonSchemaRefResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpsertUmodelCommonSchemaRefResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpsertUmodelCommonSchemaRefResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class UpsertUmodelDataRequest(TeaModel):
    def __init__(
        self,
        elements: List[Any] = None,
        method: str = None,
    ):
        # Element content
        self.elements = elements
        # Method
        self.method = method

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.elements is not None:
            result['elements'] = self.elements
        if self.method is not None:
            result['method'] = self.method
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('elements') is not None:
            self.elements = m.get('elements')
        if m.get('method') is not None:
            self.method = m.get('method')
        return self


class UpsertUmodelDataResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Request ID.
        self.request_id = request_id

    def validate(self):
        pass

    def to_map(self):
        _map = super().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: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class UpsertUmodelDataResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: UpsertUmodelDataResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = UpsertUmodelDataResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class VerifyItsmOperatorRequest(TeaModel):
    def __init__(
        self,
        code: str = None,
        contact_id: str = None,
        phone: str = None,
        session: str = None,
        workspace: str = None,
    ):
        self.code = code
        self.contact_id = contact_id
        self.phone = phone
        self.session = session
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.code is not None:
            result['code'] = self.code
        if self.contact_id is not None:
            result['contactId'] = self.contact_id
        if self.phone is not None:
            result['phone'] = self.phone
        if self.session is not None:
            result['session'] = self.session
        if self.workspace is not None:
            result['workspace'] = self.workspace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('code') is not None:
            self.code = m.get('code')
        if m.get('contactId') is not None:
            self.contact_id = m.get('contactId')
        if m.get('phone') is not None:
            self.phone = m.get('phone')
        if m.get('session') is not None:
            self.session = m.get('session')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class VerifyItsmOperatorResponseBodyData(TeaModel):
    def __init__(
        self,
        operator: str = None,
        token: str = None,
    ):
        self.operator = operator
        self.token = token

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.operator is not None:
            result['operator'] = self.operator
        if self.token is not None:
            result['token'] = self.token
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('operator') is not None:
            self.operator = m.get('operator')
        if m.get('token') is not None:
            self.token = m.get('token')
        return self


class VerifyItsmOperatorResponseBody(TeaModel):
    def __init__(
        self,
        data: VerifyItsmOperatorResponseBodyData = None,
        request_id: str = None,
    ):
        self.data = data
        self.request_id = request_id

    def validate(self):
        if self.data:
            self.data.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.data is not None:
            result['data'] = self.data.to_map()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('data') is not None:
            temp_model = VerifyItsmOperatorResponseBodyData()
            self.data = temp_model.from_map(m['data'])
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        return self


class VerifyItsmOperatorResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: VerifyItsmOperatorResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = VerifyItsmOperatorResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


class ViewOncallScheduleRequestUnSavedScheduleRotations(TeaModel):
    def __init__(
        self,
        active_days: List[int] = None,
        contacts: List[str] = None,
        rotation_end_time: str = None,
        rotation_name: str = None,
        rotation_start_time: str = None,
        shift_length: int = None,
        shift_recurrence_frequency: str = None,
        start_date: str = None,
        time_zone: str = None,
    ):
        self.active_days = active_days
        self.contacts = contacts
        self.rotation_end_time = rotation_end_time
        self.rotation_name = rotation_name
        self.rotation_start_time = rotation_start_time
        self.shift_length = shift_length
        self.shift_recurrence_frequency = shift_recurrence_frequency
        self.start_date = start_date
        self.time_zone = time_zone

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.active_days is not None:
            result['activeDays'] = self.active_days
        if self.contacts is not None:
            result['contacts'] = self.contacts
        if self.rotation_end_time is not None:
            result['rotationEndTime'] = self.rotation_end_time
        if self.rotation_name is not None:
            result['rotationName'] = self.rotation_name
        if self.rotation_start_time is not None:
            result['rotationStartTime'] = self.rotation_start_time
        if self.shift_length is not None:
            result['shiftLength'] = self.shift_length
        if self.shift_recurrence_frequency is not None:
            result['shiftRecurrenceFrequency'] = self.shift_recurrence_frequency
        if self.start_date is not None:
            result['startDate'] = self.start_date
        if self.time_zone is not None:
            result['timeZone'] = self.time_zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('activeDays') is not None:
            self.active_days = m.get('activeDays')
        if m.get('contacts') is not None:
            self.contacts = m.get('contacts')
        if m.get('rotationEndTime') is not None:
            self.rotation_end_time = m.get('rotationEndTime')
        if m.get('rotationName') is not None:
            self.rotation_name = m.get('rotationName')
        if m.get('rotationStartTime') is not None:
            self.rotation_start_time = m.get('rotationStartTime')
        if m.get('shiftLength') is not None:
            self.shift_length = m.get('shiftLength')
        if m.get('shiftRecurrenceFrequency') is not None:
            self.shift_recurrence_frequency = m.get('shiftRecurrenceFrequency')
        if m.get('startDate') is not None:
            self.start_date = m.get('startDate')
        if m.get('timeZone') is not None:
            self.time_zone = m.get('timeZone')
        return self


class ViewOncallScheduleRequestUnSavedSchedule(TeaModel):
    def __init__(
        self,
        rotations: List[ViewOncallScheduleRequestUnSavedScheduleRotations] = None,
    ):
        self.rotations = rotations

    def validate(self):
        if self.rotations:
            for k in self.rotations:
                if k:
                    k.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        result['rotations'] = []
        if self.rotations is not None:
            for k in self.rotations:
                result['rotations'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.rotations = []
        if m.get('rotations') is not None:
            for k in m.get('rotations'):
                temp_model = ViewOncallScheduleRequestUnSavedScheduleRotations()
                self.rotations.append(temp_model.from_map(k))
        return self


class ViewOncallScheduleRequest(TeaModel):
    def __init__(
        self,
        end_date: str = None,
        source: str = None,
        start_date: str = None,
        un_saved_schedule: ViewOncallScheduleRequestUnSavedSchedule = None,
    ):
        self.end_date = end_date
        self.source = source
        self.start_date = start_date
        self.un_saved_schedule = un_saved_schedule

    def validate(self):
        if self.un_saved_schedule:
            self.un_saved_schedule.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.end_date is not None:
            result['endDate'] = self.end_date
        if self.source is not None:
            result['source'] = self.source
        if self.start_date is not None:
            result['startDate'] = self.start_date
        if self.un_saved_schedule is not None:
            result['unSavedSchedule'] = self.un_saved_schedule.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('endDate') is not None:
            self.end_date = m.get('endDate')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('startDate') is not None:
            self.start_date = m.get('startDate')
        if m.get('unSavedSchedule') is not None:
            temp_model = ViewOncallScheduleRequestUnSavedSchedule()
            self.un_saved_schedule = temp_model.from_map(m['unSavedSchedule'])
        return self


class ViewOncallScheduleShrinkRequest(TeaModel):
    def __init__(
        self,
        end_date: str = None,
        source: str = None,
        start_date: str = None,
        un_saved_schedule_shrink: str = None,
    ):
        self.end_date = end_date
        self.source = source
        self.start_date = start_date
        self.un_saved_schedule_shrink = un_saved_schedule_shrink

    def validate(self):
        pass

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.end_date is not None:
            result['endDate'] = self.end_date
        if self.source is not None:
            result['source'] = self.source
        if self.start_date is not None:
            result['startDate'] = self.start_date
        if self.un_saved_schedule_shrink is not None:
            result['unSavedSchedule'] = self.un_saved_schedule_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('endDate') is not None:
            self.end_date = m.get('endDate')
        if m.get('source') is not None:
            self.source = m.get('source')
        if m.get('startDate') is not None:
            self.start_date = m.get('startDate')
        if m.get('unSavedSchedule') is not None:
            self.un_saved_schedule_shrink = m.get('unSavedSchedule')
        return self


class ViewOncallScheduleResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        schedule: Dict[str, List[ScheduleValue]] = None,
    ):
        self.request_id = request_id
        self.schedule = schedule

    def validate(self):
        if self.schedule:
            for v in self.schedule.values():
                for k1 in v:
                    if k1:
                        k1.validate()

    def to_map(self):
        _map = super().to_map()
        if _map is not None:
            return _map

        result = dict()
        if self.request_id is not None:
            result['requestId'] = self.request_id
        result['schedule'] = {}
        if self.schedule is not None:
            for k, v in self.schedule.items():
                l1 = []
                for k1 in v:
                    l1.append(k1.to_map() if k1 else None)
                result['schedule'][k] = l1
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('requestId') is not None:
            self.request_id = m.get('requestId')
        self.schedule = {}
        if m.get('schedule') is not None:
            for k, v in m.get('schedule').items():
                l1 = []
                for k1 in v:
                    temp_model = ScheduleValue()
                    l1.append(temp_model.from_map(k1))
                self.schedule['k'] = l1
        return self


class ViewOncallScheduleResponse(TeaModel):
    def __init__(
        self,
        headers: Dict[str, str] = None,
        status_code: int = None,
        body: ViewOncallScheduleResponseBody = None,
    ):
        self.headers = headers
        self.status_code = status_code
        self.body = body

    def validate(self):
        if self.body:
            self.body.validate()

    def to_map(self):
        _map = super().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: dict = 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 = ViewOncallScheduleResponseBody()
            self.body = temp_model.from_map(m['body'])
        return self


