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


class Config(TeaModel):
    """
    Model for initing client
    """
    def __init__(
        self,
        access_key_id: str = None,
        access_key_secret: str = None,
        security_token: str = None,
        protocol: str = None,
        read_timeout: int = None,
        connect_timeout: int = None,
        http_proxy: str = None,
        https_proxy: str = None,
        endpoint: str = None,
        no_proxy: str = None,
        max_idle_conns: int = None,
        user_agent: str = None,
        socks_5proxy: str = None,
        socks_5net_work: str = None,
        max_idle_time_millis: int = None,
        keep_alive_duration_millis: int = None,
        max_requests: int = None,
        max_requests_per_host: int = None,
    ):
        # accesskey id
        self.access_key_id = access_key_id
        # accesskey secret
        self.access_key_secret = access_key_secret
        # security token
        self.security_token = security_token
        # http protocol
        self.protocol = protocol
        # read timeout
        self.read_timeout = read_timeout
        # connect timeout
        self.connect_timeout = connect_timeout
        # http proxy
        self.http_proxy = http_proxy
        # https proxy
        self.https_proxy = https_proxy
        # endpoint
        self.endpoint = endpoint
        # proxy white list
        self.no_proxy = no_proxy
        # max idle conns
        self.max_idle_conns = max_idle_conns
        # user agent
        self.user_agent = user_agent
        # socks5 proxy
        self.socks_5proxy = socks_5proxy
        # socks5 network
        self.socks_5net_work = socks_5net_work
        # 长链接最大空闲时长
        self.max_idle_time_millis = max_idle_time_millis
        # 长链接最大连接时长
        self.keep_alive_duration_millis = keep_alive_duration_millis
        # 最大连接数（长链接最大总数）
        self.max_requests = max_requests
        # 每个目标主机的最大连接数（分主机域名的长链接最大总数
        self.max_requests_per_host = max_requests_per_host

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.access_key_id is not None:
            result['accessKeyId'] = self.access_key_id
        if self.access_key_secret is not None:
            result['accessKeySecret'] = self.access_key_secret
        if self.security_token is not None:
            result['securityToken'] = self.security_token
        if self.protocol is not None:
            result['protocol'] = self.protocol
        if self.read_timeout is not None:
            result['readTimeout'] = self.read_timeout
        if self.connect_timeout is not None:
            result['connectTimeout'] = self.connect_timeout
        if self.http_proxy is not None:
            result['httpProxy'] = self.http_proxy
        if self.https_proxy is not None:
            result['httpsProxy'] = self.https_proxy
        if self.endpoint is not None:
            result['endpoint'] = self.endpoint
        if self.no_proxy is not None:
            result['noProxy'] = self.no_proxy
        if self.max_idle_conns is not None:
            result['maxIdleConns'] = self.max_idle_conns
        if self.user_agent is not None:
            result['userAgent'] = self.user_agent
        if self.socks_5proxy is not None:
            result['socks5Proxy'] = self.socks_5proxy
        if self.socks_5net_work is not None:
            result['socks5NetWork'] = self.socks_5net_work
        if self.max_idle_time_millis is not None:
            result['maxIdleTimeMillis'] = self.max_idle_time_millis
        if self.keep_alive_duration_millis is not None:
            result['keepAliveDurationMillis'] = self.keep_alive_duration_millis
        if self.max_requests is not None:
            result['maxRequests'] = self.max_requests
        if self.max_requests_per_host is not None:
            result['maxRequestsPerHost'] = self.max_requests_per_host
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('accessKeyId') is not None:
            self.access_key_id = m.get('accessKeyId')
        if m.get('accessKeySecret') is not None:
            self.access_key_secret = m.get('accessKeySecret')
        if m.get('securityToken') is not None:
            self.security_token = m.get('securityToken')
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        if m.get('readTimeout') is not None:
            self.read_timeout = m.get('readTimeout')
        if m.get('connectTimeout') is not None:
            self.connect_timeout = m.get('connectTimeout')
        if m.get('httpProxy') is not None:
            self.http_proxy = m.get('httpProxy')
        if m.get('httpsProxy') is not None:
            self.https_proxy = m.get('httpsProxy')
        if m.get('endpoint') is not None:
            self.endpoint = m.get('endpoint')
        if m.get('noProxy') is not None:
            self.no_proxy = m.get('noProxy')
        if m.get('maxIdleConns') is not None:
            self.max_idle_conns = m.get('maxIdleConns')
        if m.get('userAgent') is not None:
            self.user_agent = m.get('userAgent')
        if m.get('socks5Proxy') is not None:
            self.socks_5proxy = m.get('socks5Proxy')
        if m.get('socks5NetWork') is not None:
            self.socks_5net_work = m.get('socks5NetWork')
        if m.get('maxIdleTimeMillis') is not None:
            self.max_idle_time_millis = m.get('maxIdleTimeMillis')
        if m.get('keepAliveDurationMillis') is not None:
            self.keep_alive_duration_millis = m.get('keepAliveDurationMillis')
        if m.get('maxRequests') is not None:
            self.max_requests = m.get('maxRequests')
        if m.get('maxRequestsPerHost') is not None:
            self.max_requests_per_host = m.get('maxRequestsPerHost')
        return self


class Pair(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # 键
        self.key = key
        # 值
        self.value = value

    def validate(self):
        self.validate_required(self.key, 'key')
        self.validate_required(self.value, 'value')

    def to_map(self):
        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 OpsActionPolicy(TeaModel):
    def __init__(
        self,
        ops_action_type: str = None,
        timeout: int = None,
        check_interval: int = None,
        retry_times: int = None,
    ):
        # 运维动作类型
        self.ops_action_type = ops_action_type
        # 超时时间
        self.timeout = timeout
        # 检查间隔
        self.check_interval = check_interval
        # 重试次数
        self.retry_times = retry_times

    def validate(self):
        self.validate_required(self.ops_action_type, 'ops_action_type')
        self.validate_required(self.timeout, 'timeout')
        self.validate_required(self.check_interval, 'check_interval')
        self.validate_required(self.retry_times, 'retry_times')

    def to_map(self):
        result = dict()
        if self.ops_action_type is not None:
            result['ops_action_type'] = self.ops_action_type
        if self.timeout is not None:
            result['timeout'] = self.timeout
        if self.check_interval is not None:
            result['check_interval'] = self.check_interval
        if self.retry_times is not None:
            result['retry_times'] = self.retry_times
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ops_action_type') is not None:
            self.ops_action_type = m.get('ops_action_type')
        if m.get('timeout') is not None:
            self.timeout = m.get('timeout')
        if m.get('check_interval') is not None:
            self.check_interval = m.get('check_interval')
        if m.get('retry_times') is not None:
            self.retry_times = m.get('retry_times')
        return self


class GrayTrafficConfig(TeaModel):
    def __init__(
        self,
        gray_traffic_type: str = None,
        hostname: str = None,
        match_patterns: str = None,
        port: int = None,
        proportion: str = None,
        target_uri: str = None,
    ):
        # 灰度流量类型
        self.gray_traffic_type = gray_traffic_type
        # 主机名
        self.hostname = hostname
        # 匹配规则
        self.match_patterns = match_patterns
        # 端口号
        self.port = port
        # 比例
        self.proportion = proportion
        # 目标 uri
        self.target_uri = target_uri

    def validate(self):
        self.validate_required(self.gray_traffic_type, 'gray_traffic_type')
        self.validate_required(self.hostname, 'hostname')
        self.validate_required(self.match_patterns, 'match_patterns')
        self.validate_required(self.port, 'port')
        self.validate_required(self.proportion, 'proportion')
        self.validate_required(self.target_uri, 'target_uri')

    def to_map(self):
        result = dict()
        if self.gray_traffic_type is not None:
            result['gray_traffic_type'] = self.gray_traffic_type
        if self.hostname is not None:
            result['hostname'] = self.hostname
        if self.match_patterns is not None:
            result['match_patterns'] = self.match_patterns
        if self.port is not None:
            result['port'] = self.port
        if self.proportion is not None:
            result['proportion'] = self.proportion
        if self.target_uri is not None:
            result['target_uri'] = self.target_uri
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('gray_traffic_type') is not None:
            self.gray_traffic_type = m.get('gray_traffic_type')
        if m.get('hostname') is not None:
            self.hostname = m.get('hostname')
        if m.get('match_patterns') is not None:
            self.match_patterns = m.get('match_patterns')
        if m.get('port') is not None:
            self.port = m.get('port')
        if m.get('proportion') is not None:
            self.proportion = m.get('proportion')
        if m.get('target_uri') is not None:
            self.target_uri = m.get('target_uri')
        return self


class AppService(TeaModel):
    def __init__(
        self,
        application_name: str = None,
        cell_ids: List[str] = None,
        description: str = None,
        extra_infos: str = None,
        latest_operation_id: str = None,
        latest_operation_type: str = None,
        latest_version_no: str = None,
        service_name: str = None,
        workspace: str = None,
    ):
        # 应用名称
        self.application_name = application_name
        # 关联的部署单元
        self.cell_ids = cell_ids
        # 服务实例描述
        self.description = description
        # 用户自定义的扩展属性
        self.extra_infos = extra_infos
        # 最近一次执行的运维操作单号
        self.latest_operation_id = latest_operation_id
        # 最近一次执行的运维操作类型。取值列表：
        # DEPLOYMENT：部署操作
        # 
        self.latest_operation_type = latest_operation_type
        # 最近成功部署的版本号
        self.latest_version_no = latest_version_no
        # 服务实例名称
        self.service_name = service_name
        # 环境名称
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.cell_ids is not None:
            result['cell_ids'] = self.cell_ids
        if self.description is not None:
            result['description'] = self.description
        if self.extra_infos is not None:
            result['extra_infos'] = self.extra_infos
        if self.latest_operation_id is not None:
            result['latest_operation_id'] = self.latest_operation_id
        if self.latest_operation_type is not None:
            result['latest_operation_type'] = self.latest_operation_type
        if self.latest_version_no is not None:
            result['latest_version_no'] = self.latest_version_no
        if self.service_name is not None:
            result['service_name'] = self.service_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('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('cell_ids') is not None:
            self.cell_ids = m.get('cell_ids')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('extra_infos') is not None:
            self.extra_infos = m.get('extra_infos')
        if m.get('latest_operation_id') is not None:
            self.latest_operation_id = m.get('latest_operation_id')
        if m.get('latest_operation_type') is not None:
            self.latest_operation_type = m.get('latest_operation_type')
        if m.get('latest_version_no') is not None:
            self.latest_version_no = m.get('latest_version_no')
        if m.get('service_name') is not None:
            self.service_name = m.get('service_name')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CloudPlatform(TeaModel):
    def __init__(
        self,
        name: str = None,
        host: str = None,
        login_name: str = None,
        password: str = None,
    ):
        # name
        self.name = name
        # host
        self.host = host
        # loginName
        self.login_name = login_name
        # password
        self.password = password

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.host is not None:
            result['host'] = self.host
        if self.login_name is not None:
            result['login_name'] = self.login_name
        if self.password is not None:
            result['password'] = self.password
        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('host') is not None:
            self.host = m.get('host')
        if m.get('login_name') is not None:
            self.login_name = m.get('login_name')
        if m.get('password') is not None:
            self.password = m.get('password')
        return self


class ArrangementInfo(TeaModel):
    def __init__(
        self,
        arrangement_type: str = None,
        env_config: List[Pair] = None,
        name: str = None,
        process_definition_id: str = None,
        workspace_id: str = None,
        ops_action_policies: List[OpsActionPolicy] = None,
    ):
        # 类型
        self.arrangement_type = arrangement_type
        # 环境变量
        self.env_config = env_config
        # 发布概览名称
        self.name = name
        # 发布进程ID
        self.process_definition_id = process_definition_id
        # 环境 ID
        self.workspace_id = workspace_id
        # 策略
        self.ops_action_policies = ops_action_policies

    def validate(self):
        self.validate_required(self.arrangement_type, 'arrangement_type')
        self.validate_required(self.env_config, 'env_config')
        if self.env_config:
            for k in self.env_config:
                if k:
                    k.validate()
        self.validate_required(self.name, 'name')
        self.validate_required(self.process_definition_id, 'process_definition_id')
        self.validate_required(self.workspace_id, 'workspace_id')
        self.validate_required(self.ops_action_policies, 'ops_action_policies')
        if self.ops_action_policies:
            for k in self.ops_action_policies:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.arrangement_type is not None:
            result['arrangement_type'] = self.arrangement_type
        result['env_config'] = []
        if self.env_config is not None:
            for k in self.env_config:
                result['env_config'].append(k.to_map() if k else None)
        if self.name is not None:
            result['name'] = self.name
        if self.process_definition_id is not None:
            result['process_definition_id'] = self.process_definition_id
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        result['ops_action_policies'] = []
        if self.ops_action_policies is not None:
            for k in self.ops_action_policies:
                result['ops_action_policies'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('arrangement_type') is not None:
            self.arrangement_type = m.get('arrangement_type')
        self.env_config = []
        if m.get('env_config') is not None:
            for k in m.get('env_config'):
                temp_model = Pair()
                self.env_config.append(temp_model.from_map(k))
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('process_definition_id') is not None:
            self.process_definition_id = m.get('process_definition_id')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        self.ops_action_policies = []
        if m.get('ops_action_policies') is not None:
            for k in m.get('ops_action_policies'):
                temp_model = OpsActionPolicy()
                self.ops_action_policies.append(temp_model.from_map(k))
        return self


class TaskExecutionProgress(TeaModel):
    def __init__(
        self,
        name: str = None,
        show_name: str = None,
        business_entity_code: str = None,
        error_code: str = None,
        state: str = None,
        execution_count: str = None,
        detail_msg: str = None,
        started_time: str = None,
        finished_time: str = None,
        standalone_executable: bool = None,
        id: str = None,
    ):
        # 任务名
        self.name = name
        # 显示名
        self.show_name = show_name
        # 业务类型
        self.business_entity_code = business_entity_code
        # 错误代码
        self.error_code = error_code
        # 状态
        self.state = state
        # 执行次数
        self.execution_count = execution_count
        # 详细信息
        self.detail_msg = detail_msg
        # 开始时间
        self.started_time = started_time
        # 结束时间
        self.finished_time = finished_time
        # 是否可独立执行
        self.standalone_executable = standalone_executable
        # ID
        self.id = id

    def validate(self):
        self.validate_required(self.name, 'name')
        self.validate_required(self.show_name, 'show_name')
        self.validate_required(self.business_entity_code, 'business_entity_code')
        self.validate_required(self.error_code, 'error_code')
        self.validate_required(self.state, 'state')
        self.validate_required(self.execution_count, 'execution_count')
        self.validate_required(self.detail_msg, 'detail_msg')
        self.validate_required(self.started_time, 'started_time')
        if self.started_time is not None:
            self.validate_pattern(self.started_time, 'started_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.finished_time, 'finished_time')
        if self.finished_time is not None:
            self.validate_pattern(self.finished_time, 'finished_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.standalone_executable, 'standalone_executable')
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.show_name is not None:
            result['show_name'] = self.show_name
        if self.business_entity_code is not None:
            result['business_entity_code'] = self.business_entity_code
        if self.error_code is not None:
            result['error_code'] = self.error_code
        if self.state is not None:
            result['state'] = self.state
        if self.execution_count is not None:
            result['execution_count'] = self.execution_count
        if self.detail_msg is not None:
            result['detail_msg'] = self.detail_msg
        if self.started_time is not None:
            result['started_time'] = self.started_time
        if self.finished_time is not None:
            result['finished_time'] = self.finished_time
        if self.standalone_executable is not None:
            result['standalone_executable'] = self.standalone_executable
        if self.id is not None:
            result['id'] = self.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('show_name') is not None:
            self.show_name = m.get('show_name')
        if m.get('business_entity_code') is not None:
            self.business_entity_code = m.get('business_entity_code')
        if m.get('error_code') is not None:
            self.error_code = m.get('error_code')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('execution_count') is not None:
            self.execution_count = m.get('execution_count')
        if m.get('detail_msg') is not None:
            self.detail_msg = m.get('detail_msg')
        if m.get('started_time') is not None:
            self.started_time = m.get('started_time')
        if m.get('finished_time') is not None:
            self.finished_time = m.get('finished_time')
        if m.get('standalone_executable') is not None:
            self.standalone_executable = m.get('standalone_executable')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class ResourceGroupExecutionProgress(TeaModel):
    def __init__(
        self,
        finished_time: bool = None,
        id: str = None,
        paas_id: str = None,
        resource_count: int = None,
        resource_states: List[Pair] = None,
        standalone_executable: bool = None,
        started_time: str = None,
        state: str = None,
        refer_key: str = None,
    ):
        # finished_time
        self.finished_time = finished_time
        # id
        self.id = id
        # paas_id
        self.paas_id = paas_id
        # resource_count
        self.resource_count = resource_count
        # resource_states
        self.resource_states = resource_states
        # standalone_executable
        self.standalone_executable = standalone_executable
        # started_time
        self.started_time = started_time
        # state
        self.state = state
        # refer_key
        self.refer_key = refer_key

    def validate(self):
        self.validate_required(self.finished_time, 'finished_time')
        self.validate_required(self.id, 'id')
        self.validate_required(self.paas_id, 'paas_id')
        self.validate_required(self.resource_count, 'resource_count')
        self.validate_required(self.resource_states, 'resource_states')
        if self.resource_states:
            for k in self.resource_states:
                if k:
                    k.validate()
        self.validate_required(self.started_time, 'started_time')
        if self.started_time is not None:
            self.validate_pattern(self.started_time, 'started_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.state, 'state')
        self.validate_required(self.refer_key, 'refer_key')

    def to_map(self):
        result = dict()
        if self.finished_time is not None:
            result['finished_time'] = self.finished_time
        if self.id is not None:
            result['id'] = self.id
        if self.paas_id is not None:
            result['paas_id'] = self.paas_id
        if self.resource_count is not None:
            result['resource_count'] = self.resource_count
        result['resource_states'] = []
        if self.resource_states is not None:
            for k in self.resource_states:
                result['resource_states'].append(k.to_map() if k else None)
        if self.standalone_executable is not None:
            result['standalone_executable'] = self.standalone_executable
        if self.started_time is not None:
            result['started_time'] = self.started_time
        if self.state is not None:
            result['state'] = self.state
        if self.refer_key is not None:
            result['refer_key'] = self.refer_key
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('finished_time') is not None:
            self.finished_time = m.get('finished_time')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('paas_id') is not None:
            self.paas_id = m.get('paas_id')
        if m.get('resource_count') is not None:
            self.resource_count = m.get('resource_count')
        self.resource_states = []
        if m.get('resource_states') is not None:
            for k in m.get('resource_states'):
                temp_model = Pair()
                self.resource_states.append(temp_model.from_map(k))
        if m.get('standalone_executable') is not None:
            self.standalone_executable = m.get('standalone_executable')
        if m.get('started_time') is not None:
            self.started_time = m.get('started_time')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('refer_key') is not None:
            self.refer_key = m.get('refer_key')
        return self


class OpsComputerTask(TeaModel):
    def __init__(
        self,
        description: str = None,
        execute_details: str = None,
        finish_time: str = None,
        name: str = None,
        start_time: str = None,
        status: str = None,
    ):
        # 任务描述
        self.description = description
        # 执行详情。如果任务成功，为执行日志；如果任务失败，为错误信息
        self.execute_details = execute_details
        # 任务结束时间
        self.finish_time = finish_time
        # 任务名称
        self.name = name
        # 任务开始时间
        self.start_time = start_time
        # 任务状态。取值列表：
        # EXECUTING：执行中；
        # SUCCESS：执行成功；
        # FAILED：执行失败
        # 
        self.status = status

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.execute_details is not None:
            result['execute_details'] = self.execute_details
        if self.finish_time is not None:
            result['finish_time'] = self.finish_time
        if self.name is not None:
            result['name'] = self.name
        if self.start_time is not None:
            result['start_time'] = self.start_time
        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('description') is not None:
            self.description = m.get('description')
        if m.get('execute_details') is not None:
            self.execute_details = m.get('execute_details')
        if m.get('finish_time') is not None:
            self.finish_time = m.get('finish_time')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('start_time') is not None:
            self.start_time = m.get('start_time')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class OpsApplication(TeaModel):
    def __init__(
        self,
        name: str = None,
        status: str = None,
        type: str = None,
    ):
        # 应用（服务）名称
        self.name = name
        # 应用（服务）当前运维状态。取值列表：
        # INITING：初始化中；
        # INIT_FAILED：初始化失败；
        # INITED：初始化完成；
        # EXECUTING：执行中；
        # SUCCESS：执行成功；
        # FAILED：执行失败；
        # ROLLBACKED：已回滚；
        # CANCELED：已取消
        # 
        self.status = status
        # APPLICATION和APP_SERVICE。设置为APPLICATION表示该实例描述对象为应用; APP_SERVICE表示该实例描述对象为应用服务。
        self.type = type

    def validate(self):
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        if self.name is not None:
            result['name'] = self.name
        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('name') is not None:
            self.name = m.get('name')
        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 CellView(TeaModel):
    def __init__(
        self,
        deployment_zone_id: str = None,
        description: str = None,
        display_name: str = None,
        id: str = None,
        identity: str = None,
        master_zone_id: str = None,
        status: str = None,
        workspace_id: str = None,
        workspace_group_id: str = None,
    ):
        # 扩展部署机房id
        self.deployment_zone_id = deployment_zone_id
        # 部署单元描述
        self.description = description
        # 显示名称
        self.display_name = display_name
        # table id
        self.id = id
        # 标识
        self.identity = identity
        # master zone id
        self.master_zone_id = master_zone_id
        # 部署单元状态
        self.status = status
        # 工作空间 id
        self.workspace_id = workspace_id
        # 工作空间组 id
        self.workspace_group_id = workspace_group_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.deployment_zone_id is not None:
            result['deployment_zone_id'] = self.deployment_zone_id
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.id is not None:
            result['id'] = self.id
        if self.identity is not None:
            result['identity'] = self.identity
        if self.master_zone_id is not None:
            result['master_zone_id'] = self.master_zone_id
        if self.status is not None:
            result['status'] = self.status
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        if self.workspace_group_id is not None:
            result['workspace_group_id'] = self.workspace_group_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('deployment_zone_id') is not None:
            self.deployment_zone_id = m.get('deployment_zone_id')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        if m.get('master_zone_id') is not None:
            self.master_zone_id = m.get('master_zone_id')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        if m.get('workspace_group_id') is not None:
            self.workspace_group_id = m.get('workspace_group_id')
        return self


class SlbExecutionProgress(TeaModel):
    def __init__(
        self,
        id: str = None,
        name: str = None,
        state: str = None,
        mount_weights: List[Pair] = None,
    ):
        # 进度 ID
        self.id = id
        # 进度名称
        self.name = name
        # 状态
        self.state = state
        # 挂载权重
        self.mount_weights = mount_weights

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.name, 'name')
        self.validate_required(self.state, 'state')
        self.validate_required(self.mount_weights, 'mount_weights')
        if self.mount_weights:
            for k in self.mount_weights:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        if self.state is not None:
            result['state'] = self.state
        result['mount_weights'] = []
        if self.mount_weights is not None:
            for k in self.mount_weights:
                result['mount_weights'].append(k.to_map() if k else None)
        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('state') is not None:
            self.state = m.get('state')
        self.mount_weights = []
        if m.get('mount_weights') is not None:
            for k in m.get('mount_weights'):
                temp_model = Pair()
                self.mount_weights.append(temp_model.from_map(k))
        return self


class Region(TeaModel):
    def __init__(
        self,
        description: str = None,
        iaas_provider_id: str = None,
        id: str = None,
        identity: str = None,
        name: str = None,
        network_type: str = None,
        state: str = None,
        utc_create: str = None,
        utc_modified: str = None,
        zone_dtos: str = None,
        buildpack_id: str = None,
        file_status: str = None,
        file_location: str = None,
        object_name: str = None,
        file_size: int = None,
        readable_file_size: str = None,
        file_checksum: str = None,
        original_file_name: str = None,
        buildpack_tenant_id: str = None,
        from_region_id: str = None,
        creation_time: str = None,
        modification_time: str = None,
    ):
        # description
        self.description = description
        # iaasProviderId
        self.iaas_provider_id = iaas_provider_id
        # region名称
        self.id = id
        # identity
        self.identity = identity
        # region显示名称
        self.name = name
        # networkType
        self.network_type = network_type
        # state
        self.state = state
        # utcCreate
        self.utc_create = utc_create
        # utcModified
        self.utc_modified = utc_modified
        # zoneDtos
        self.zone_dtos = zone_dtos
        # buildpackId
        self.buildpack_id = buildpack_id
        # fileStatus
        self.file_status = file_status
        # fileLocation
        self.file_location = file_location
        # objectName
        self.object_name = object_name
        # fileSize
        self.file_size = file_size
        # readableFileSize
        self.readable_file_size = readable_file_size
        # fileChecksum
        self.file_checksum = file_checksum
        # originalFileName
        self.original_file_name = original_file_name
        # buildpackTenantId
        self.buildpack_tenant_id = buildpack_tenant_id
        # fromRegionId
        self.from_region_id = from_region_id
        # creationTime
        self.creation_time = creation_time
        # modificationTime
        self.modification_time = modification_time

    def validate(self):
        if self.utc_create is not None:
            self.validate_pattern(self.utc_create, 'utc_create', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.utc_modified is not None:
            self.validate_pattern(self.utc_modified, 'utc_modified', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.creation_time is not None:
            self.validate_pattern(self.creation_time, 'creation_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time is not None:
            self.validate_pattern(self.modification_time, 'modification_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.iaas_provider_id is not None:
            result['iaas_provider_id'] = self.iaas_provider_id
        if self.id is not None:
            result['id'] = self.id
        if self.identity is not None:
            result['identity'] = self.identity
        if self.name is not None:
            result['name'] = self.name
        if self.network_type is not None:
            result['network_type'] = self.network_type
        if self.state is not None:
            result['state'] = self.state
        if self.utc_create is not None:
            result['utc_create'] = self.utc_create
        if self.utc_modified is not None:
            result['utc_modified'] = self.utc_modified
        if self.zone_dtos is not None:
            result['zone_dtos'] = self.zone_dtos
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        if self.file_status is not None:
            result['file_status'] = self.file_status
        if self.file_location is not None:
            result['file_location'] = self.file_location
        if self.object_name is not None:
            result['object_name'] = self.object_name
        if self.file_size is not None:
            result['file_size'] = self.file_size
        if self.readable_file_size is not None:
            result['readable_file_size'] = self.readable_file_size
        if self.file_checksum is not None:
            result['file_checksum'] = self.file_checksum
        if self.original_file_name is not None:
            result['original_file_name'] = self.original_file_name
        if self.buildpack_tenant_id is not None:
            result['buildpack_tenant_id'] = self.buildpack_tenant_id
        if self.from_region_id is not None:
            result['from_region_id'] = self.from_region_id
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.modification_time is not None:
            result['modification_time'] = self.modification_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('iaas_provider_id') is not None:
            self.iaas_provider_id = m.get('iaas_provider_id')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('network_type') is not None:
            self.network_type = m.get('network_type')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('utc_create') is not None:
            self.utc_create = m.get('utc_create')
        if m.get('utc_modified') is not None:
            self.utc_modified = m.get('utc_modified')
        if m.get('zone_dtos') is not None:
            self.zone_dtos = m.get('zone_dtos')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        if m.get('file_status') is not None:
            self.file_status = m.get('file_status')
        if m.get('file_location') is not None:
            self.file_location = m.get('file_location')
        if m.get('object_name') is not None:
            self.object_name = m.get('object_name')
        if m.get('file_size') is not None:
            self.file_size = m.get('file_size')
        if m.get('readable_file_size') is not None:
            self.readable_file_size = m.get('readable_file_size')
        if m.get('file_checksum') is not None:
            self.file_checksum = m.get('file_checksum')
        if m.get('original_file_name') is not None:
            self.original_file_name = m.get('original_file_name')
        if m.get('buildpack_tenant_id') is not None:
            self.buildpack_tenant_id = m.get('buildpack_tenant_id')
        if m.get('from_region_id') is not None:
            self.from_region_id = m.get('from_region_id')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('modification_time') is not None:
            self.modification_time = m.get('modification_time')
        return self


class ServiceInfo(TeaModel):
    def __init__(
        self,
        app_name: str = None,
        cell_ids: List[str] = None,
        default_execute_account: str = None,
        env_config: List[Pair] = None,
        force_executable: bool = None,
        gray_traffic_configs: List[GrayTrafficConfig] = None,
        group_amount: int = None,
        group_strategy_type: str = None,
        install_from_cache: bool = None,
        name: str = None,
        need_beta: bool = None,
        need_gray_traffic: bool = None,
        post_arrangement_info: List[ArrangementInfo] = None,
        pre_arrangement_info: List[ArrangementInfo] = None,
        service_arrangement: ArrangementInfo = None,
        service_id: str = None,
        static_resource_download_url: str = None,
        static_resource_target_file: str = None,
        type: str = None,
        version: str = None,
        workspace_id: str = None,
        update_buildpack_version: str = None,
        update_buildpack_id: str = None,
        custom_params: str = None,
    ):
        # 应用名
        self.app_name = app_name
        # 部署单元 ID 列表
        self.cell_ids = cell_ids
        # 默认执行账号
        self.default_execute_account = default_execute_account
        # 环境变量
        self.env_config = env_config
        # 是否可以强制执行
        self.force_executable = force_executable
        # 灰度规则配置
        self.gray_traffic_configs = gray_traffic_configs
        # 分组数
        self.group_amount = group_amount
        # 分组策略
        self.group_strategy_type = group_strategy_type
        # 从缓存安装
        self.install_from_cache = install_from_cache
        # 应用发布名
        self.name = name
        # 是否需要 beta
        self.need_beta = need_beta
        # 是否需要灰度
        self.need_gray_traffic = need_gray_traffic
        # 后置任务列表
        self.post_arrangement_info = post_arrangement_info
        # 前置任务列表
        self.pre_arrangement_info = pre_arrangement_info
        # 发布概览
        self.service_arrangement = service_arrangement
        # 发布应用 ID
        self.service_id = service_id
        # 静态资源下载链接
        self.static_resource_download_url = static_resource_download_url
        # 静态资源目标文件
        self.static_resource_target_file = static_resource_target_file
        # 类型
        self.type = type
        # 版本
        self.version = version
        # 环境 ID
        self.workspace_id = workspace_id
        # update_buildpack_version
        self.update_buildpack_version = update_buildpack_version
        # update_buildpack_id
        self.update_buildpack_id = update_buildpack_id
        # custom_params
        self.custom_params = custom_params

    def validate(self):
        self.validate_required(self.app_name, 'app_name')
        self.validate_required(self.cell_ids, 'cell_ids')
        self.validate_required(self.default_execute_account, 'default_execute_account')
        self.validate_required(self.env_config, 'env_config')
        if self.env_config:
            for k in self.env_config:
                if k:
                    k.validate()
        self.validate_required(self.force_executable, 'force_executable')
        self.validate_required(self.gray_traffic_configs, 'gray_traffic_configs')
        if self.gray_traffic_configs:
            for k in self.gray_traffic_configs:
                if k:
                    k.validate()
        self.validate_required(self.group_amount, 'group_amount')
        self.validate_required(self.group_strategy_type, 'group_strategy_type')
        self.validate_required(self.install_from_cache, 'install_from_cache')
        self.validate_required(self.need_beta, 'need_beta')
        self.validate_required(self.need_gray_traffic, 'need_gray_traffic')
        self.validate_required(self.post_arrangement_info, 'post_arrangement_info')
        if self.post_arrangement_info:
            for k in self.post_arrangement_info:
                if k:
                    k.validate()
        self.validate_required(self.pre_arrangement_info, 'pre_arrangement_info')
        if self.pre_arrangement_info:
            for k in self.pre_arrangement_info:
                if k:
                    k.validate()
        self.validate_required(self.service_arrangement, 'service_arrangement')
        if self.service_arrangement:
            self.service_arrangement.validate()
        self.validate_required(self.service_id, 'service_id')
        self.validate_required(self.static_resource_download_url, 'static_resource_download_url')
        self.validate_required(self.static_resource_target_file, 'static_resource_target_file')
        self.validate_required(self.type, 'type')
        self.validate_required(self.version, 'version')
        self.validate_required(self.workspace_id, 'workspace_id')
        self.validate_required(self.update_buildpack_version, 'update_buildpack_version')
        self.validate_required(self.update_buildpack_id, 'update_buildpack_id')
        self.validate_required(self.custom_params, 'custom_params')

    def to_map(self):
        result = dict()
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.cell_ids is not None:
            result['cell_ids'] = self.cell_ids
        if self.default_execute_account is not None:
            result['default_execute_account'] = self.default_execute_account
        result['env_config'] = []
        if self.env_config is not None:
            for k in self.env_config:
                result['env_config'].append(k.to_map() if k else None)
        if self.force_executable is not None:
            result['force_executable'] = self.force_executable
        result['gray_traffic_configs'] = []
        if self.gray_traffic_configs is not None:
            for k in self.gray_traffic_configs:
                result['gray_traffic_configs'].append(k.to_map() if k else None)
        if self.group_amount is not None:
            result['group_amount'] = self.group_amount
        if self.group_strategy_type is not None:
            result['group_strategy_type'] = self.group_strategy_type
        if self.install_from_cache is not None:
            result['install_from_cache'] = self.install_from_cache
        if self.name is not None:
            result['name'] = self.name
        if self.need_beta is not None:
            result['need_beta'] = self.need_beta
        if self.need_gray_traffic is not None:
            result['need_gray_traffic'] = self.need_gray_traffic
        result['post_arrangement_info'] = []
        if self.post_arrangement_info is not None:
            for k in self.post_arrangement_info:
                result['post_arrangement_info'].append(k.to_map() if k else None)
        result['pre_arrangement_info'] = []
        if self.pre_arrangement_info is not None:
            for k in self.pre_arrangement_info:
                result['pre_arrangement_info'].append(k.to_map() if k else None)
        if self.service_arrangement is not None:
            result['service_arrangement'] = self.service_arrangement.to_map()
        if self.service_id is not None:
            result['service_id'] = self.service_id
        if self.static_resource_download_url is not None:
            result['static_resource_download_url'] = self.static_resource_download_url
        if self.static_resource_target_file is not None:
            result['static_resource_target_file'] = self.static_resource_target_file
        if self.type is not None:
            result['type'] = self.type
        if self.version is not None:
            result['version'] = self.version
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        if self.update_buildpack_version is not None:
            result['update_buildpack_version'] = self.update_buildpack_version
        if self.update_buildpack_id is not None:
            result['update_buildpack_id'] = self.update_buildpack_id
        if self.custom_params is not None:
            result['custom_params'] = self.custom_params
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('cell_ids') is not None:
            self.cell_ids = m.get('cell_ids')
        if m.get('default_execute_account') is not None:
            self.default_execute_account = m.get('default_execute_account')
        self.env_config = []
        if m.get('env_config') is not None:
            for k in m.get('env_config'):
                temp_model = Pair()
                self.env_config.append(temp_model.from_map(k))
        if m.get('force_executable') is not None:
            self.force_executable = m.get('force_executable')
        self.gray_traffic_configs = []
        if m.get('gray_traffic_configs') is not None:
            for k in m.get('gray_traffic_configs'):
                temp_model = GrayTrafficConfig()
                self.gray_traffic_configs.append(temp_model.from_map(k))
        if m.get('group_amount') is not None:
            self.group_amount = m.get('group_amount')
        if m.get('group_strategy_type') is not None:
            self.group_strategy_type = m.get('group_strategy_type')
        if m.get('install_from_cache') is not None:
            self.install_from_cache = m.get('install_from_cache')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('need_beta') is not None:
            self.need_beta = m.get('need_beta')
        if m.get('need_gray_traffic') is not None:
            self.need_gray_traffic = m.get('need_gray_traffic')
        self.post_arrangement_info = []
        if m.get('post_arrangement_info') is not None:
            for k in m.get('post_arrangement_info'):
                temp_model = ArrangementInfo()
                self.post_arrangement_info.append(temp_model.from_map(k))
        self.pre_arrangement_info = []
        if m.get('pre_arrangement_info') is not None:
            for k in m.get('pre_arrangement_info'):
                temp_model = ArrangementInfo()
                self.pre_arrangement_info.append(temp_model.from_map(k))
        if m.get('service_arrangement') is not None:
            temp_model = ArrangementInfo()
            self.service_arrangement = temp_model.from_map(m['service_arrangement'])
        if m.get('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('static_resource_download_url') is not None:
            self.static_resource_download_url = m.get('static_resource_download_url')
        if m.get('static_resource_target_file') is not None:
            self.static_resource_target_file = m.get('static_resource_target_file')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        if m.get('update_buildpack_version') is not None:
            self.update_buildpack_version = m.get('update_buildpack_version')
        if m.get('update_buildpack_id') is not None:
            self.update_buildpack_id = m.get('update_buildpack_id')
        if m.get('custom_params') is not None:
            self.custom_params = m.get('custom_params')
        return self


class CodeCommit(TeaModel):
    def __init__(
        self,
        author: str = None,
        branch: str = None,
        code_version: str = None,
        date: str = None,
        id: str = None,
        msg: str = None,
        repo_name: str = None,
        utc_create: str = None,
        utc_modified: str = None,
    ):
        # 作者
        self.author = author
        # 分支
        self.branch = branch
        # 代码版本
        self.code_version = code_version
        # 时间
        self.date = date
        # id
        self.id = id
        # 消息
        self.msg = msg
        # 仓库名称
        self.repo_name = repo_name
        # 创建时间
        self.utc_create = utc_create
        # 修改时间
        self.utc_modified = utc_modified

    def validate(self):
        if self.utc_create is not None:
            self.validate_pattern(self.utc_create, 'utc_create', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.utc_modified is not None:
            self.validate_pattern(self.utc_modified, 'utc_modified', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.author is not None:
            result['author'] = self.author
        if self.branch is not None:
            result['branch'] = self.branch
        if self.code_version is not None:
            result['code_version'] = self.code_version
        if self.date is not None:
            result['date'] = self.date
        if self.id is not None:
            result['id'] = self.id
        if self.msg is not None:
            result['msg'] = self.msg
        if self.repo_name is not None:
            result['repo_name'] = self.repo_name
        if self.utc_create is not None:
            result['utc_create'] = self.utc_create
        if self.utc_modified is not None:
            result['utc_modified'] = self.utc_modified
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('author') is not None:
            self.author = m.get('author')
        if m.get('branch') is not None:
            self.branch = m.get('branch')
        if m.get('code_version') is not None:
            self.code_version = m.get('code_version')
        if m.get('date') is not None:
            self.date = m.get('date')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('msg') is not None:
            self.msg = m.get('msg')
        if m.get('repo_name') is not None:
            self.repo_name = m.get('repo_name')
        if m.get('utc_create') is not None:
            self.utc_create = m.get('utc_create')
        if m.get('utc_modified') is not None:
            self.utc_modified = m.get('utc_modified')
        return self


class Cloud(TeaModel):
    def __init__(
        self,
        id: int = None,
        identity: str = None,
        name: str = None,
        platforms: List[CloudPlatform] = None,
    ):
        # id
        self.id = id
        # identity
        self.identity = identity
        # name
        self.name = name
        # platforms
        self.platforms = platforms

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

    def to_map(self):
        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.identity is not None:
            result['identity'] = self.identity
        if self.name is not None:
            result['name'] = self.name
        result['platforms'] = []
        if self.platforms is not None:
            for k in self.platforms:
                result['platforms'].append(k.to_map() if k else None)
        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('identity') is not None:
            self.identity = m.get('identity')
        if m.get('name') is not None:
            self.name = m.get('name')
        self.platforms = []
        if m.get('platforms') is not None:
            for k in m.get('platforms'):
                temp_model = CloudPlatform()
                self.platforms.append(temp_model.from_map(k))
        return self


class OpsComputer(TeaModel):
    def __init__(
        self,
        id: str = None,
        inner_ip: str = None,
        name: str = None,
        status: str = None,
        tasks: List[OpsComputerTask] = None,
    ):
        # 计算容器id
        self.id = id
        # 计算容器内网ip
        self.inner_ip = inner_ip
        # 计算容器名称
        self.name = name
        # 计算容器当前运维状态。取值列表：
        # INITED：初始化完成；
        # EXECUTING：执行中；
        # SUCCESS：执行成功；
        # FAILED：执行失败；
        # CANCELED：已取消；
        # IGNORED：已忽略
        # 
        self.status = status
        # 计算容器上执行的任务信息。任务信息列表中包含正在执行和执行完成的任务。
        self.tasks = tasks

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

    def to_map(self):
        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.inner_ip is not None:
            result['inner_ip'] = self.inner_ip
        if self.name is not None:
            result['name'] = self.name
        if self.status is not None:
            result['status'] = self.status
        result['tasks'] = []
        if self.tasks is not None:
            for k in self.tasks:
                result['tasks'].append(k.to_map() if k else None)
        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('inner_ip') is not None:
            self.inner_ip = m.get('inner_ip')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('status') is not None:
            self.status = m.get('status')
        self.tasks = []
        if m.get('tasks') is not None:
            for k in m.get('tasks'):
                temp_model = OpsComputerTask()
                self.tasks.append(temp_model.from_map(k))
        return self


class DepsDatabase(TeaModel):
    def __init__(
        self,
        app_services: List[AppService] = None,
        connection_address: str = None,
        cpu: int = None,
        engine: str = None,
        engine_version: str = None,
        iaas_id: str = None,
        id: str = None,
        max_connections: int = None,
        max_iops: int = None,
        memory: int = None,
        name: str = None,
        network_type: str = None,
        net_type: str = None,
        port: int = None,
        region: str = None,
        spec_iaas_id: str = None,
        status: str = None,
        storage: int = None,
    ):
        # 服务实例列表
        self.app_services = app_services
        # 连接地址
        self.connection_address = connection_address
        # CPU
        self.cpu = cpu
        # 数据库类型，取值 MYSQL, OCEANBASE
        self.engine = engine
        # 数据库版本，取值 MYSQL5, MYSQL6, MYSQL7, OCEANBASE1_4, 分别对应Mysql5.5, 5.6, 5.7, Ocea
        self.engine_version = engine_version
        # iaaS在创建该资源时为其分配的唯一标示，创建中或创建失败时为空
        self.iaas_id = iaas_id
        # 资源唯一标识
        self.id = id
        # 最大连接数
        self.max_connections = max_connections
        # 最大IOPS
        self.max_iops = max_iops
        # 内存大小，单位：MB
        self.memory = memory
        # 资源名称
        self.name = name
        # 网络类型，Classic或VPC
        self.network_type = network_type
        # 网络连接类型，取值 Internet：外网，Intranet：内网
        self.net_type = net_type
        # 连接端口
        self.port = port
        # 资源所属的地域id
        self.region = region
        # 数据库实例规格
        self.spec_iaas_id = spec_iaas_id
        # 
        # 
        # 资源状态，取值 CREATING：正在创建，CREATEFAILED：创建失败，RUNNING: 运行中，REBOOTING: 重启，REBOOT_FAILED: 重启失败，
        # DELETING：正在删除，DELETED：删除成功，DELETE_FAILED：删除失败，RESOURCE_IMPORTING：资源导入中，RESOURCE_IMPORT_FAILED：资源导入失败，
        # RESOURCE_REMOVING：资源删除中，RESOURCE_REMOVE_FAILED：资源删除失败，DBINSTANCECLASSCHANGING：修改规格中，
        # MODIFY_SPEC_FAILED：修改规格失败
        # 
        self.status = status
        # 存储空间GB
        self.storage = storage

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

    def to_map(self):
        result = dict()
        result['app_services'] = []
        if self.app_services is not None:
            for k in self.app_services:
                result['app_services'].append(k.to_map() if k else None)
        if self.connection_address is not None:
            result['connection_address'] = self.connection_address
        if self.cpu is not None:
            result['cpu'] = self.cpu
        if self.engine is not None:
            result['engine'] = self.engine
        if self.engine_version is not None:
            result['engine_version'] = self.engine_version
        if self.iaas_id is not None:
            result['iaas_id'] = self.iaas_id
        if self.id is not None:
            result['id'] = self.id
        if self.max_connections is not None:
            result['max_connections'] = self.max_connections
        if self.max_iops is not None:
            result['max_iops'] = self.max_iops
        if self.memory is not None:
            result['memory'] = self.memory
        if self.name is not None:
            result['name'] = self.name
        if self.network_type is not None:
            result['network_type'] = self.network_type
        if self.net_type is not None:
            result['net_type'] = self.net_type
        if self.port is not None:
            result['port'] = self.port
        if self.region is not None:
            result['region'] = self.region
        if self.spec_iaas_id is not None:
            result['spec_iaas_id'] = self.spec_iaas_id
        if self.status is not None:
            result['status'] = self.status
        if self.storage is not None:
            result['storage'] = self.storage
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.app_services = []
        if m.get('app_services') is not None:
            for k in m.get('app_services'):
                temp_model = AppService()
                self.app_services.append(temp_model.from_map(k))
        if m.get('connection_address') is not None:
            self.connection_address = m.get('connection_address')
        if m.get('cpu') is not None:
            self.cpu = m.get('cpu')
        if m.get('engine') is not None:
            self.engine = m.get('engine')
        if m.get('engine_version') is not None:
            self.engine_version = m.get('engine_version')
        if m.get('iaas_id') is not None:
            self.iaas_id = m.get('iaas_id')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('max_connections') is not None:
            self.max_connections = m.get('max_connections')
        if m.get('max_iops') is not None:
            self.max_iops = m.get('max_iops')
        if m.get('memory') is not None:
            self.memory = m.get('memory')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('network_type') is not None:
            self.network_type = m.get('network_type')
        if m.get('net_type') is not None:
            self.net_type = m.get('net_type')
        if m.get('port') is not None:
            self.port = m.get('port')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('spec_iaas_id') is not None:
            self.spec_iaas_id = m.get('spec_iaas_id')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('storage') is not None:
            self.storage = m.get('storage')
        return self


class AppServiceExecutionProgress(TeaModel):
    def __init__(
        self,
        base_progress: ResourceGroupExecutionProgress = None,
        group_count: int = None,
        pre_deployment_execution_progresses: List[TaskExecutionProgress] = None,
        post_deployment_execution_progresses: List[TaskExecutionProgress] = None,
        group_execution_progresses: List[ResourceGroupExecutionProgress] = None,
    ):
        # base_progress
        self.base_progress = base_progress
        # group_count
        self.group_count = group_count
        # pre_deployment_execution_progresses
        self.pre_deployment_execution_progresses = pre_deployment_execution_progresses
        # post_deployment_execution_progresses
        self.post_deployment_execution_progresses = post_deployment_execution_progresses
        # group_execution_progresses
        self.group_execution_progresses = group_execution_progresses

    def validate(self):
        self.validate_required(self.base_progress, 'base_progress')
        if self.base_progress:
            self.base_progress.validate()
        self.validate_required(self.group_count, 'group_count')
        self.validate_required(self.pre_deployment_execution_progresses, 'pre_deployment_execution_progresses')
        if self.pre_deployment_execution_progresses:
            for k in self.pre_deployment_execution_progresses:
                if k:
                    k.validate()
        self.validate_required(self.post_deployment_execution_progresses, 'post_deployment_execution_progresses')
        if self.post_deployment_execution_progresses:
            for k in self.post_deployment_execution_progresses:
                if k:
                    k.validate()
        self.validate_required(self.group_execution_progresses, 'group_execution_progresses')
        if self.group_execution_progresses:
            for k in self.group_execution_progresses:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.base_progress is not None:
            result['base_progress'] = self.base_progress.to_map()
        if self.group_count is not None:
            result['group_count'] = self.group_count
        result['pre_deployment_execution_progresses'] = []
        if self.pre_deployment_execution_progresses is not None:
            for k in self.pre_deployment_execution_progresses:
                result['pre_deployment_execution_progresses'].append(k.to_map() if k else None)
        result['post_deployment_execution_progresses'] = []
        if self.post_deployment_execution_progresses is not None:
            for k in self.post_deployment_execution_progresses:
                result['post_deployment_execution_progresses'].append(k.to_map() if k else None)
        result['group_execution_progresses'] = []
        if self.group_execution_progresses is not None:
            for k in self.group_execution_progresses:
                result['group_execution_progresses'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('base_progress') is not None:
            temp_model = ResourceGroupExecutionProgress()
            self.base_progress = temp_model.from_map(m['base_progress'])
        if m.get('group_count') is not None:
            self.group_count = m.get('group_count')
        self.pre_deployment_execution_progresses = []
        if m.get('pre_deployment_execution_progresses') is not None:
            for k in m.get('pre_deployment_execution_progresses'):
                temp_model = TaskExecutionProgress()
                self.pre_deployment_execution_progresses.append(temp_model.from_map(k))
        self.post_deployment_execution_progresses = []
        if m.get('post_deployment_execution_progresses') is not None:
            for k in m.get('post_deployment_execution_progresses'):
                temp_model = TaskExecutionProgress()
                self.post_deployment_execution_progresses.append(temp_model.from_map(k))
        self.group_execution_progresses = []
        if m.get('group_execution_progresses') is not None:
            for k in m.get('group_execution_progresses'):
                temp_model = ResourceGroupExecutionProgress()
                self.group_execution_progresses.append(temp_model.from_map(k))
        return self


class Computer(TeaModel):
    def __init__(
        self,
        app_services: List[AppService] = None,
        cell_id: str = None,
        computer_type: str = None,
        cpu: int = None,
        elastic_ip: str = None,
        iaas_id: str = None,
        id: str = None,
        inner_ip: str = None,
        memory: int = None,
        name: str = None,
        public_ip: str = None,
        region: str = None,
        status: str = None,
        zone: str = None,
        deploy_mode: str = None,
    ):
        # 服务实例列表
        self.app_services = app_services
        # 服务器所属的cell ID
        self.cell_id = cell_id
        # 类型:POD/DOCKER_VM
        self.computer_type = computer_type
        # CPU核数
        self.cpu = cpu
        # 弹性ip地址
        self.elastic_ip = elastic_ip
        # iaas_id
        self.iaas_id = iaas_id
        # 计算资源唯一标识
        self.id = id
        # 内网ip地址
        self.inner_ip = inner_ip
        # 内存大小，单位：MB
        self.memory = memory
        # 资源名称
        self.name = name
        # 公网ip地址
        self.public_ip = public_ip
        # 资源所属的地域id
        self.region = region
        # 资源状态，取值：
        # CREATING：创建中；
        # CREATE_FAILED：创建失败；
        # CREATED：已创建；
        # STARTING：开机中；
        # START_FAILED：开机失败；
        # UNALLOCATED：待分配；
        # INITIALIZING：初始化中；
        # INITIALIZE_FAILED：初始化失败；
        # OFFLINE：已下线；
        # READY：待部署；
        # DEPLOYING：部署中；
        # DEPLOY_FAILED：部署失败；
        # DEPLOYED：已部署；
        # RELEASING：释放中；
        # RELEASE_FAILED：释放失败；
        # STOPPING：关机中；
        # STOP_FAILED：关机失败；
        # STOPPED：已关机；
        # REBOOTING：重启中；
        # REBOOT_FAILED：重启失败；
        # DISK_INITIALIZING：初始化磁盘中；
        # SPEC_CHANGING：变配中；
        # LOCKED：被锁定；
        # EXPIRED：已过期；
        # TO_EXPIR：即将过期；
        # DELETING：删除中；
        # DELETE_FAILED：删除失败；
        # DELETED：删除成功
        # 
        self.status = status
        # 资源所属的可用区id
        self.zone = zone
        # 机器是否镜像化
        self.deploy_mode = deploy_mode

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

    def to_map(self):
        result = dict()
        result['app_services'] = []
        if self.app_services is not None:
            for k in self.app_services:
                result['app_services'].append(k.to_map() if k else None)
        if self.cell_id is not None:
            result['cell_id'] = self.cell_id
        if self.computer_type is not None:
            result['computer_type'] = self.computer_type
        if self.cpu is not None:
            result['cpu'] = self.cpu
        if self.elastic_ip is not None:
            result['elastic_ip'] = self.elastic_ip
        if self.iaas_id is not None:
            result['iaas_id'] = self.iaas_id
        if self.id is not None:
            result['id'] = self.id
        if self.inner_ip is not None:
            result['inner_ip'] = self.inner_ip
        if self.memory is not None:
            result['memory'] = self.memory
        if self.name is not None:
            result['name'] = self.name
        if self.public_ip is not None:
            result['public_ip'] = self.public_ip
        if self.region is not None:
            result['region'] = self.region
        if self.status is not None:
            result['status'] = self.status
        if self.zone is not None:
            result['zone'] = self.zone
        if self.deploy_mode is not None:
            result['deploy_mode'] = self.deploy_mode
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.app_services = []
        if m.get('app_services') is not None:
            for k in m.get('app_services'):
                temp_model = AppService()
                self.app_services.append(temp_model.from_map(k))
        if m.get('cell_id') is not None:
            self.cell_id = m.get('cell_id')
        if m.get('computer_type') is not None:
            self.computer_type = m.get('computer_type')
        if m.get('cpu') is not None:
            self.cpu = m.get('cpu')
        if m.get('elastic_ip') is not None:
            self.elastic_ip = m.get('elastic_ip')
        if m.get('iaas_id') is not None:
            self.iaas_id = m.get('iaas_id')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('inner_ip') is not None:
            self.inner_ip = m.get('inner_ip')
        if m.get('memory') is not None:
            self.memory = m.get('memory')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('public_ip') is not None:
            self.public_ip = m.get('public_ip')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('zone') is not None:
            self.zone = m.get('zone')
        if m.get('deploy_mode') is not None:
            self.deploy_mode = m.get('deploy_mode')
        return self


class SLBInfo(TeaModel):
    def __init__(
        self,
        name: str = None,
        machine_id: str = None,
        port: int = None,
        paas_id: str = None,
        iaas_id: str = None,
        v_server_group_id: str = None,
        v_server_group_name: str = None,
        computer_id: str = None,
        app_id: str = None,
        app_svc_id: str = None,
        vip_addresses: List[str] = None,
        weight: int = None,
        state: str = None,
        id: str = None,
    ):
        # 名称
        self.name = name
        # 机器ID
        self.machine_id = machine_id
        # 端口
        self.port = port
        # paas id
        self.paas_id = paas_id
        # iaas id
        self.iaas_id = iaas_id
        # 虚拟服务器组 id
        self.v_server_group_id = v_server_group_id
        # 虚拟服务器组名
        self.v_server_group_name = v_server_group_name
        # 计算资源 ID
        self.computer_id = computer_id
        # 应用 ID
        self.app_id = app_id
        # 应用服务 ID
        self.app_svc_id = app_svc_id
        # vip 地址列表
        self.vip_addresses = vip_addresses
        # 权重
        self.weight = weight
        # 状态
        self.state = state
        # ID
        self.id = id

    def validate(self):
        self.validate_required(self.name, 'name')
        self.validate_required(self.machine_id, 'machine_id')
        self.validate_required(self.port, 'port')
        self.validate_required(self.paas_id, 'paas_id')
        self.validate_required(self.iaas_id, 'iaas_id')
        self.validate_required(self.v_server_group_id, 'v_server_group_id')
        self.validate_required(self.v_server_group_name, 'v_server_group_name')
        self.validate_required(self.computer_id, 'computer_id')
        self.validate_required(self.app_id, 'app_id')
        self.validate_required(self.app_svc_id, 'app_svc_id')
        self.validate_required(self.vip_addresses, 'vip_addresses')
        self.validate_required(self.weight, 'weight')
        self.validate_required(self.state, 'state')
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.machine_id is not None:
            result['machine_id'] = self.machine_id
        if self.port is not None:
            result['port'] = self.port
        if self.paas_id is not None:
            result['paas_id'] = self.paas_id
        if self.iaas_id is not None:
            result['iaas_id'] = self.iaas_id
        if self.v_server_group_id is not None:
            result['v_server_group_id'] = self.v_server_group_id
        if self.v_server_group_name is not None:
            result['v_server_group_name'] = self.v_server_group_name
        if self.computer_id is not None:
            result['computer_id'] = self.computer_id
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.app_svc_id is not None:
            result['app_svc_id'] = self.app_svc_id
        if self.vip_addresses is not None:
            result['vip_addresses'] = self.vip_addresses
        if self.weight is not None:
            result['weight'] = self.weight
        if self.state is not None:
            result['state'] = self.state
        if self.id is not None:
            result['id'] = self.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('machine_id') is not None:
            self.machine_id = m.get('machine_id')
        if m.get('port') is not None:
            self.port = m.get('port')
        if m.get('paas_id') is not None:
            self.paas_id = m.get('paas_id')
        if m.get('iaas_id') is not None:
            self.iaas_id = m.get('iaas_id')
        if m.get('v_server_group_id') is not None:
            self.v_server_group_id = m.get('v_server_group_id')
        if m.get('v_server_group_name') is not None:
            self.v_server_group_name = m.get('v_server_group_name')
        if m.get('computer_id') is not None:
            self.computer_id = m.get('computer_id')
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('app_svc_id') is not None:
            self.app_svc_id = m.get('app_svc_id')
        if m.get('vip_addresses') is not None:
            self.vip_addresses = m.get('vip_addresses')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class MountWeight(TeaModel):
    def __init__(
        self,
        mount_target_id: str = None,
        port: int = None,
        weight: int = None,
    ):
        # 挂载目标 ID
        self.mount_target_id = mount_target_id
        # 端口
        self.port = port
        # 权重
        self.weight = weight

    def validate(self):
        self.validate_required(self.mount_target_id, 'mount_target_id')
        self.validate_required(self.port, 'port')
        self.validate_required(self.weight, 'weight')
        if self.weight is not None:
            self.validate_maximum(self.weight, 'weight', 100)
            self.validate_minimum(self.weight, 'weight', 0)

    def to_map(self):
        result = dict()
        if self.mount_target_id is not None:
            result['mount_target_id'] = self.mount_target_id
        if self.port is not None:
            result['port'] = self.port
        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('mount_target_id') is not None:
            self.mount_target_id = m.get('mount_target_id')
        if m.get('port') is not None:
            self.port = m.get('port')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class OpsApplicationGroup(TeaModel):
    def __init__(
        self,
        applications: List[OpsApplication] = None,
    ):
        # 此运维应用（服务）组中包含的应用（服务）列表
        self.applications = applications

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

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

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


class OpsApplicationChain(TeaModel):
    def __init__(
        self,
        groups: List[OpsApplicationGroup] = None,
    ):
        # 此运维应用链中包含的应用（服务）组列表
        self.groups = groups

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

    def to_map(self):
        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)
        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 = OpsApplicationGroup()
                self.groups.append(temp_model.from_map(k))
        return self


class UserDTO(TeaModel):
    def __init__(
        self,
        customer_id: str = None,
        name: str = None,
        real_name: str = None,
        type: str = None,
        id: str = None,
        login_name: str = None,
        email: str = None,
        mobile: str = None,
    ):
        # customerId
        self.customer_id = customer_id
        # name
        self.name = name
        # realName
        self.real_name = real_name
        # type
        self.type = type
        # 用户id
        self.id = id
        # 登录名称
        self.login_name = login_name
        # 邮箱
        self.email = email
        # 手机号
        self.mobile = mobile

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.customer_id is not None:
            result['customer_id'] = self.customer_id
        if self.name is not None:
            result['name'] = self.name
        if self.real_name is not None:
            result['real_name'] = self.real_name
        if self.type is not None:
            result['type'] = self.type
        if self.id is not None:
            result['id'] = self.id
        if self.login_name is not None:
            result['login_name'] = self.login_name
        if self.email is not None:
            result['email'] = self.email
        if self.mobile is not None:
            result['mobile'] = self.mobile
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('customer_id') is not None:
            self.customer_id = m.get('customer_id')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('real_name') is not None:
            self.real_name = m.get('real_name')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('login_name') is not None:
            self.login_name = m.get('login_name')
        if m.get('email') is not None:
            self.email = m.get('email')
        if m.get('mobile') is not None:
            self.mobile = m.get('mobile')
        return self


class OpsCmdArg(TeaModel):
    def __init__(
        self,
        name: str = None,
        value: str = None,
    ):
        # 指令参数名称
        self.name = name
        # 指令参数值
        self.value = value

    def validate(self):
        self.validate_required(self.name, 'name')
        self.validate_required(self.value, 'value')

    def to_map(self):
        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 Machine(TeaModel):
    def __init__(
        self,
        name: str = None,
        service_id: str = None,
        service_package_version: str = None,
        service_group_collection_id: str = None,
        service_group_id: str = None,
        arrangement_id: str = None,
        service_type: str = None,
        paas_service_id: str = None,
        paas_state: str = None,
        ref_target_id: str = None,
        target_iaas_id: str = None,
        inner_ip: str = None,
        public_ip: str = None,
        host_name: str = None,
        host_domain: str = None,
        security_domain_id: str = None,
        security_domain_creator_id: str = None,
        security_domain_name: str = None,
        default_execute_account: str = None,
        zone_id: str = None,
        cell_id: str = None,
        username: str = None,
        encoded_pwd: str = None,
        encoded_secrey_key: str = None,
        public_key: str = None,
        star_manager_ip: str = None,
        star_manager_port: int = None,
        script_url: str = None,
        special_script_url: str = None,
        agent_url: str = None,
        agent_setup_url: str = None,
        machine_init_url: str = None,
        special_machine_init_url: str = None,
        control_type: str = None,
        control_target: str = None,
        need_initialize: bool = None,
        slb_info_list: List[SLBInfo] = None,
        task_ids: List[str] = None,
        env_config: List[Pair] = None,
        process_definition_id: str = None,
        parent_id: str = None,
        parent_entity_type: str = None,
        node_id: str = None,
        state: str = None,
        started_time: str = None,
        finished_time: str = None,
        standalone_executable: bool = None,
        id: str = None,
    ):
        # 机器名
        self.name = name
        # 所属发布服务id
        self.service_id = service_id
        # 包版本
        self.service_package_version = service_package_version
        # 应用服务分组集合 ID
        self.service_group_collection_id = service_group_collection_id
        # 发布分组 ID
        self.service_group_id = service_group_id
        # 概览 ID
        self.arrangement_id = arrangement_id
        # 服务类型
        self.service_type = service_type
        # paas 服务 ID
        self.paas_service_id = paas_service_id
        # paas 状态
        self.paas_state = paas_state
        # 关联目标 ID
        self.ref_target_id = ref_target_id
        # 目标 iaas id
        self.target_iaas_id = target_iaas_id
        # 内网 IP
        self.inner_ip = inner_ip
        # 公网 IP
        self.public_ip = public_ip
        # 主机名
        self.host_name = host_name
        # 主机域名
        self.host_domain = host_domain
        # 安全组ID
        self.security_domain_id = security_domain_id
        # 安全组创建人 ID
        self.security_domain_creator_id = security_domain_creator_id
        # 安全组名
        self.security_domain_name = security_domain_name
        # 默认执行账号
        self.default_execute_account = default_execute_account
        # 可用区 ID
        self.zone_id = zone_id
        # 部署单元 ID
        self.cell_id = cell_id
        # 用户名
        self.username = username
        # 加密密码
        self.encoded_pwd = encoded_pwd
        # 加密秘钥
        self.encoded_secrey_key = encoded_secrey_key
        # 公钥
        self.public_key = public_key
        # star manage ip
        self.star_manager_ip = star_manager_ip
        # star manager port
        self.star_manager_port = star_manager_port
        # 初始化脚本 url
        self.script_url = script_url
        # 特殊初始化脚本 url
        self.special_script_url = special_script_url
        # 代理 url
        self.agent_url = agent_url
        # 代理设置 url
        self.agent_setup_url = agent_setup_url
        # 机器初始 url
        self.machine_init_url = machine_init_url
        # 特殊机器初始 url
        self.special_machine_init_url = special_machine_init_url
        # 控制类型
        self.control_type = control_type
        # 控制对象
        self.control_target = control_target
        # 是否需要初始化
        self.need_initialize = need_initialize
        # SLB 信息
        self.slb_info_list = slb_info_list
        # 子任务 id
        self.task_ids = task_ids
        # 环境变量
        self.env_config = env_config
        # pd id
        self.process_definition_id = process_definition_id
        # 父节点 id
        self.parent_id = parent_id
        # 父节点类型
        self.parent_entity_type = parent_entity_type
        # 流程节点 ID
        self.node_id = node_id
        # 状态
        self.state = state
        # 开始时间
        self.started_time = started_time
        # 结束时间
        self.finished_time = finished_time
        # 是否可独立执行
        self.standalone_executable = standalone_executable
        # ID
        self.id = id

    def validate(self):
        self.validate_required(self.name, 'name')
        self.validate_required(self.service_id, 'service_id')
        self.validate_required(self.service_package_version, 'service_package_version')
        self.validate_required(self.service_group_collection_id, 'service_group_collection_id')
        self.validate_required(self.service_group_id, 'service_group_id')
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.service_type, 'service_type')
        self.validate_required(self.paas_service_id, 'paas_service_id')
        self.validate_required(self.paas_state, 'paas_state')
        self.validate_required(self.ref_target_id, 'ref_target_id')
        self.validate_required(self.target_iaas_id, 'target_iaas_id')
        self.validate_required(self.inner_ip, 'inner_ip')
        self.validate_required(self.public_ip, 'public_ip')
        self.validate_required(self.host_name, 'host_name')
        self.validate_required(self.host_domain, 'host_domain')
        self.validate_required(self.security_domain_id, 'security_domain_id')
        self.validate_required(self.security_domain_creator_id, 'security_domain_creator_id')
        self.validate_required(self.security_domain_name, 'security_domain_name')
        self.validate_required(self.default_execute_account, 'default_execute_account')
        self.validate_required(self.zone_id, 'zone_id')
        self.validate_required(self.cell_id, 'cell_id')
        self.validate_required(self.username, 'username')
        self.validate_required(self.encoded_pwd, 'encoded_pwd')
        self.validate_required(self.encoded_secrey_key, 'encoded_secrey_key')
        self.validate_required(self.public_key, 'public_key')
        self.validate_required(self.star_manager_ip, 'star_manager_ip')
        self.validate_required(self.star_manager_port, 'star_manager_port')
        self.validate_required(self.script_url, 'script_url')
        self.validate_required(self.special_script_url, 'special_script_url')
        self.validate_required(self.agent_url, 'agent_url')
        self.validate_required(self.agent_setup_url, 'agent_setup_url')
        self.validate_required(self.machine_init_url, 'machine_init_url')
        self.validate_required(self.special_machine_init_url, 'special_machine_init_url')
        self.validate_required(self.control_type, 'control_type')
        self.validate_required(self.control_target, 'control_target')
        self.validate_required(self.need_initialize, 'need_initialize')
        self.validate_required(self.slb_info_list, 'slb_info_list')
        if self.slb_info_list:
            for k in self.slb_info_list:
                if k:
                    k.validate()
        self.validate_required(self.task_ids, 'task_ids')
        self.validate_required(self.env_config, 'env_config')
        if self.env_config:
            for k in self.env_config:
                if k:
                    k.validate()
        self.validate_required(self.process_definition_id, 'process_definition_id')
        self.validate_required(self.parent_id, 'parent_id')
        self.validate_required(self.parent_entity_type, 'parent_entity_type')
        self.validate_required(self.node_id, 'node_id')
        self.validate_required(self.state, 'state')
        self.validate_required(self.started_time, 'started_time')
        if self.started_time is not None:
            self.validate_pattern(self.started_time, 'started_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.finished_time, 'finished_time')
        if self.finished_time is not None:
            self.validate_pattern(self.finished_time, 'finished_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.standalone_executable, 'standalone_executable')
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.service_id is not None:
            result['service_id'] = self.service_id
        if self.service_package_version is not None:
            result['service_package_version'] = self.service_package_version
        if self.service_group_collection_id is not None:
            result['service_group_collection_id'] = self.service_group_collection_id
        if self.service_group_id is not None:
            result['service_group_id'] = self.service_group_id
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.service_type is not None:
            result['service_type'] = self.service_type
        if self.paas_service_id is not None:
            result['paas_service_id'] = self.paas_service_id
        if self.paas_state is not None:
            result['paas_state'] = self.paas_state
        if self.ref_target_id is not None:
            result['ref_target_id'] = self.ref_target_id
        if self.target_iaas_id is not None:
            result['target_iaas_id'] = self.target_iaas_id
        if self.inner_ip is not None:
            result['inner_ip'] = self.inner_ip
        if self.public_ip is not None:
            result['public_ip'] = self.public_ip
        if self.host_name is not None:
            result['host_name'] = self.host_name
        if self.host_domain is not None:
            result['host_domain'] = self.host_domain
        if self.security_domain_id is not None:
            result['security_domain_id'] = self.security_domain_id
        if self.security_domain_creator_id is not None:
            result['security_domain_creator_id'] = self.security_domain_creator_id
        if self.security_domain_name is not None:
            result['security_domain_name'] = self.security_domain_name
        if self.default_execute_account is not None:
            result['default_execute_account'] = self.default_execute_account
        if self.zone_id is not None:
            result['zone_id'] = self.zone_id
        if self.cell_id is not None:
            result['cell_id'] = self.cell_id
        if self.username is not None:
            result['username'] = self.username
        if self.encoded_pwd is not None:
            result['encoded_pwd'] = self.encoded_pwd
        if self.encoded_secrey_key is not None:
            result['encoded_secrey_key'] = self.encoded_secrey_key
        if self.public_key is not None:
            result['public_key'] = self.public_key
        if self.star_manager_ip is not None:
            result['star_manager_ip'] = self.star_manager_ip
        if self.star_manager_port is not None:
            result['star_manager_port'] = self.star_manager_port
        if self.script_url is not None:
            result['script_url'] = self.script_url
        if self.special_script_url is not None:
            result['special_script_url'] = self.special_script_url
        if self.agent_url is not None:
            result['agent_url'] = self.agent_url
        if self.agent_setup_url is not None:
            result['agent_setup_url'] = self.agent_setup_url
        if self.machine_init_url is not None:
            result['machine_init_url'] = self.machine_init_url
        if self.special_machine_init_url is not None:
            result['special_machine_init_url'] = self.special_machine_init_url
        if self.control_type is not None:
            result['control_type'] = self.control_type
        if self.control_target is not None:
            result['control_target'] = self.control_target
        if self.need_initialize is not None:
            result['need_initialize'] = self.need_initialize
        result['slb_info_list'] = []
        if self.slb_info_list is not None:
            for k in self.slb_info_list:
                result['slb_info_list'].append(k.to_map() if k else None)
        if self.task_ids is not None:
            result['task_ids'] = self.task_ids
        result['env_config'] = []
        if self.env_config is not None:
            for k in self.env_config:
                result['env_config'].append(k.to_map() if k else None)
        if self.process_definition_id is not None:
            result['process_definition_id'] = self.process_definition_id
        if self.parent_id is not None:
            result['parent_id'] = self.parent_id
        if self.parent_entity_type is not None:
            result['parent_entity_type'] = self.parent_entity_type
        if self.node_id is not None:
            result['node_id'] = self.node_id
        if self.state is not None:
            result['state'] = self.state
        if self.started_time is not None:
            result['started_time'] = self.started_time
        if self.finished_time is not None:
            result['finished_time'] = self.finished_time
        if self.standalone_executable is not None:
            result['standalone_executable'] = self.standalone_executable
        if self.id is not None:
            result['id'] = self.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('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('service_package_version') is not None:
            self.service_package_version = m.get('service_package_version')
        if m.get('service_group_collection_id') is not None:
            self.service_group_collection_id = m.get('service_group_collection_id')
        if m.get('service_group_id') is not None:
            self.service_group_id = m.get('service_group_id')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('service_type') is not None:
            self.service_type = m.get('service_type')
        if m.get('paas_service_id') is not None:
            self.paas_service_id = m.get('paas_service_id')
        if m.get('paas_state') is not None:
            self.paas_state = m.get('paas_state')
        if m.get('ref_target_id') is not None:
            self.ref_target_id = m.get('ref_target_id')
        if m.get('target_iaas_id') is not None:
            self.target_iaas_id = m.get('target_iaas_id')
        if m.get('inner_ip') is not None:
            self.inner_ip = m.get('inner_ip')
        if m.get('public_ip') is not None:
            self.public_ip = m.get('public_ip')
        if m.get('host_name') is not None:
            self.host_name = m.get('host_name')
        if m.get('host_domain') is not None:
            self.host_domain = m.get('host_domain')
        if m.get('security_domain_id') is not None:
            self.security_domain_id = m.get('security_domain_id')
        if m.get('security_domain_creator_id') is not None:
            self.security_domain_creator_id = m.get('security_domain_creator_id')
        if m.get('security_domain_name') is not None:
            self.security_domain_name = m.get('security_domain_name')
        if m.get('default_execute_account') is not None:
            self.default_execute_account = m.get('default_execute_account')
        if m.get('zone_id') is not None:
            self.zone_id = m.get('zone_id')
        if m.get('cell_id') is not None:
            self.cell_id = m.get('cell_id')
        if m.get('username') is not None:
            self.username = m.get('username')
        if m.get('encoded_pwd') is not None:
            self.encoded_pwd = m.get('encoded_pwd')
        if m.get('encoded_secrey_key') is not None:
            self.encoded_secrey_key = m.get('encoded_secrey_key')
        if m.get('public_key') is not None:
            self.public_key = m.get('public_key')
        if m.get('star_manager_ip') is not None:
            self.star_manager_ip = m.get('star_manager_ip')
        if m.get('star_manager_port') is not None:
            self.star_manager_port = m.get('star_manager_port')
        if m.get('script_url') is not None:
            self.script_url = m.get('script_url')
        if m.get('special_script_url') is not None:
            self.special_script_url = m.get('special_script_url')
        if m.get('agent_url') is not None:
            self.agent_url = m.get('agent_url')
        if m.get('agent_setup_url') is not None:
            self.agent_setup_url = m.get('agent_setup_url')
        if m.get('machine_init_url') is not None:
            self.machine_init_url = m.get('machine_init_url')
        if m.get('special_machine_init_url') is not None:
            self.special_machine_init_url = m.get('special_machine_init_url')
        if m.get('control_type') is not None:
            self.control_type = m.get('control_type')
        if m.get('control_target') is not None:
            self.control_target = m.get('control_target')
        if m.get('need_initialize') is not None:
            self.need_initialize = m.get('need_initialize')
        self.slb_info_list = []
        if m.get('slb_info_list') is not None:
            for k in m.get('slb_info_list'):
                temp_model = SLBInfo()
                self.slb_info_list.append(temp_model.from_map(k))
        if m.get('task_ids') is not None:
            self.task_ids = m.get('task_ids')
        self.env_config = []
        if m.get('env_config') is not None:
            for k in m.get('env_config'):
                temp_model = Pair()
                self.env_config.append(temp_model.from_map(k))
        if m.get('process_definition_id') is not None:
            self.process_definition_id = m.get('process_definition_id')
        if m.get('parent_id') is not None:
            self.parent_id = m.get('parent_id')
        if m.get('parent_entity_type') is not None:
            self.parent_entity_type = m.get('parent_entity_type')
        if m.get('node_id') is not None:
            self.node_id = m.get('node_id')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('started_time') is not None:
            self.started_time = m.get('started_time')
        if m.get('finished_time') is not None:
            self.finished_time = m.get('finished_time')
        if m.get('standalone_executable') is not None:
            self.standalone_executable = m.get('standalone_executable')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class ErrorTaskExecutionNode(TeaModel):
    def __init__(
        self,
        node_id: str = None,
        node_name: str = None,
        code: str = None,
        message: str = None,
    ):
        # 节点 ID
        self.node_id = node_id
        # 节点名
        self.node_name = node_name
        # 错误码
        self.code = code
        # 错误信息
        self.message = message

    def validate(self):
        self.validate_required(self.node_id, 'node_id')
        self.validate_required(self.node_name, 'node_name')
        self.validate_required(self.code, 'code')
        self.validate_required(self.message, 'message')

    def to_map(self):
        result = dict()
        if self.node_id is not None:
            result['node_id'] = self.node_id
        if self.node_name is not None:
            result['node_name'] = self.node_name
        if self.code is not None:
            result['code'] = self.code
        if self.message is not None:
            result['message'] = self.message
        return result

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


class AppManifest(TeaModel):
    def __init__(
        self,
        id: str = None,
        workspace_id: str = None,
        app_id: str = None,
        app_version: str = None,
        name: str = None,
        store_location: str = None,
        location: str = None,
        etag: str = None,
        remark: str = None,
        code_commit: CodeCommit = None,
        utc_create: str = None,
        utc_modified: str = None,
    ):
        # id
        self.id = id
        # workspaceId
        self.workspace_id = workspace_id
        # appId
        self.app_id = app_id
        # version
        self.app_version = app_version
        # name
        self.name = name
        # storeLocation
        self.store_location = store_location
        # location
        self.location = location
        # etag
        self.etag = etag
        # remark
        self.remark = remark
        # 代码提交
        self.code_commit = code_commit
        # 创建时间
        self.utc_create = utc_create
        # 修改时间
        self.utc_modified = utc_modified

    def validate(self):
        if self.code_commit:
            self.code_commit.validate()
        if self.utc_create is not None:
            self.validate_pattern(self.utc_create, 'utc_create', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.utc_modified is not None:
            self.validate_pattern(self.utc_modified, 'utc_modified', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.app_version is not None:
            result['app_version'] = self.app_version
        if self.name is not None:
            result['name'] = self.name
        if self.store_location is not None:
            result['store_location'] = self.store_location
        if self.location is not None:
            result['location'] = self.location
        if self.etag is not None:
            result['etag'] = self.etag
        if self.remark is not None:
            result['remark'] = self.remark
        if self.code_commit is not None:
            result['code_commit'] = self.code_commit.to_map()
        if self.utc_create is not None:
            result['utc_create'] = self.utc_create
        if self.utc_modified is not None:
            result['utc_modified'] = self.utc_modified
        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('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('app_version') is not None:
            self.app_version = m.get('app_version')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('store_location') is not None:
            self.store_location = m.get('store_location')
        if m.get('location') is not None:
            self.location = m.get('location')
        if m.get('etag') is not None:
            self.etag = m.get('etag')
        if m.get('remark') is not None:
            self.remark = m.get('remark')
        if m.get('code_commit') is not None:
            temp_model = CodeCommit()
            self.code_commit = temp_model.from_map(m['code_commit'])
        if m.get('utc_create') is not None:
            self.utc_create = m.get('utc_create')
        if m.get('utc_modified') is not None:
            self.utc_modified = m.get('utc_modified')
        return self


class SidecarParamsConfig(TeaModel):
    def __init__(
        self,
        type: str = None,
        params: str = None,
    ):
        # 类型：默认、透明劫持
        self.type = type
        # 环境参数内容
        self.params = params

    def validate(self):
        self.validate_required(self.type, 'type')
        self.validate_required(self.params, 'params')

    def to_map(self):
        result = dict()
        if self.type is not None:
            result['type'] = self.type
        if self.params is not None:
            result['params'] = self.params
        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('params') is not None:
            self.params = m.get('params')
        return self


class DeployCell(TeaModel):
    def __init__(
        self,
        cell_group: str = None,
        cluster: str = None,
        color: str = None,
        created_time: str = None,
        display_name: str = None,
        identity: str = None,
        is_gray: bool = None,
        name: str = None,
        press_weight: int = None,
        type: str = None,
        weight: int = None,
        workspace: str = None,
        zone: str = None,
        id: str = None,
    ):
        # 所属逻辑单元名称[单元化模式特有]
        self.cell_group = cell_group
        # 所属集群
        # 
        self.cluster = cluster
        # 蓝绿着色信息[单元化模式特有]
        self.color = color
        # 创建时间
        self.created_time = created_time
        # cell名称，与name一样，为了兼容已有代码
        self.display_name = display_name
        # 部署单元标识，创建之后不允许修改
        self.identity = identity
        # 是否灰度[单元化模式特有]
        self.is_gray = is_gray
        # 部署单元名称，主要用作页面展示
        self.name = name
        # 压测权重
        self.press_weight = press_weight
        # 部署单元类型[单元化模式特有]
        self.type = type
        # 默认权重[单元化模式特有]
        self.weight = weight
        # 所属工作空间名称
        self.workspace = workspace
        # 所属机房名称
        self.zone = zone
        # cell id
        self.id = id

    def validate(self):
        self.validate_required(self.created_time, 'created_time')
        if self.created_time is not None:
            self.validate_pattern(self.created_time, 'created_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.display_name, 'display_name')
        self.validate_required(self.identity, 'identity')
        self.validate_required(self.name, 'name')
        self.validate_required(self.workspace, 'workspace')
        self.validate_required(self.zone, 'zone')
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.cell_group is not None:
            result['cell_group'] = self.cell_group
        if self.cluster is not None:
            result['cluster'] = self.cluster
        if self.color is not None:
            result['color'] = self.color
        if self.created_time is not None:
            result['created_time'] = self.created_time
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.identity is not None:
            result['identity'] = self.identity
        if self.is_gray is not None:
            result['is_gray'] = self.is_gray
        if self.name is not None:
            result['name'] = self.name
        if self.press_weight is not None:
            result['press_weight'] = self.press_weight
        if self.type is not None:
            result['type'] = self.type
        if self.weight is not None:
            result['weight'] = self.weight
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.zone is not None:
            result['zone'] = self.zone
        if self.id is not None:
            result['id'] = self.id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('cell_group') is not None:
            self.cell_group = m.get('cell_group')
        if m.get('cluster') is not None:
            self.cluster = m.get('cluster')
        if m.get('color') is not None:
            self.color = m.get('color')
        if m.get('created_time') is not None:
            self.created_time = m.get('created_time')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        if m.get('is_gray') is not None:
            self.is_gray = m.get('is_gray')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('press_weight') is not None:
            self.press_weight = m.get('press_weight')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        if m.get('zone') is not None:
            self.zone = m.get('zone')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class BuildCommandParams(TeaModel):
    def __init__(
        self,
        buildpack_id: str = None,
        description: str = None,
        key: str = None,
        value: str = None,
    ):
        # buildpackId
        self.buildpack_id = buildpack_id
        # description
        self.description = description
        # key
        self.key = key
        # value
        self.value = value

    def validate(self):
        self.validate_required(self.buildpack_id, 'buildpack_id')

    def to_map(self):
        result = dict()
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        if self.description is not None:
            result['description'] = self.description
        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('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        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('value') is not None:
            self.value = m.get('value')
        return self


class NotificationReceiver(TeaModel):
    def __init__(
        self,
        config_id: str = None,
        receiver: str = None,
        description: str = None,
        id: str = None,
    ):
        # config id
        self.config_id = config_id
        # receiver
        self.receiver = receiver
        # description
        self.description = description
        # id
        self.id = id

    def validate(self):
        self.validate_required(self.config_id, 'config_id')
        self.validate_required(self.receiver, 'receiver')
        self.validate_required(self.description, 'description')
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.config_id is not None:
            result['config_id'] = self.config_id
        if self.receiver is not None:
            result['receiver'] = self.receiver
        if self.description is not None:
            result['description'] = self.description
        if self.id is not None:
            result['id'] = self.id
        return result

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


class UploadEndpoint(TeaModel):
    def __init__(
        self,
        access_key_id: str = None,
        bucket: str = None,
        encoded_policy: str = None,
        expiration: str = None,
        file_path: str = None,
        host: str = None,
        region_id: str = None,
        signature: str = None,
        storage_type: str = None,
        url: str = None,
    ):
        # 对象存储的access_key_id
        self.access_key_id = access_key_id
        # 上传的目标bucket名称
        self.bucket = bucket
        # 加密策略，仅storage_type为SYSTEM_OSS时有效
        self.encoded_policy = encoded_policy
        # 文件失效的日期时间
        self.expiration = expiration
        # 对象存储的上传目标文件路径
        self.file_path = file_path
        # 上传的目标主机名，仅storage_type为SYSTEM_OSS时有效
        self.host = host
        # 地域ID
        self.region_id = region_id
        # 签名，仅storage_type为SYSTEM_OSS时有效
        self.signature = signature
        # 存储类型，取值如下： SYSTEM_AFS表示AFS存储，SYSTEM_OSS表示OSS存储
        self.storage_type = storage_type
        # 上传的目标URL
        self.url = url

    def validate(self):
        if self.expiration is not None:
            self.validate_pattern(self.expiration, 'expiration', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.access_key_id is not None:
            result['access_key_id'] = self.access_key_id
        if self.bucket is not None:
            result['bucket'] = self.bucket
        if self.encoded_policy is not None:
            result['encoded_policy'] = self.encoded_policy
        if self.expiration is not None:
            result['expiration'] = self.expiration
        if self.file_path is not None:
            result['file_path'] = self.file_path
        if self.host is not None:
            result['host'] = self.host
        if self.region_id is not None:
            result['region_id'] = self.region_id
        if self.signature is not None:
            result['signature'] = self.signature
        if self.storage_type is not None:
            result['storage_type'] = self.storage_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('access_key_id') is not None:
            self.access_key_id = m.get('access_key_id')
        if m.get('bucket') is not None:
            self.bucket = m.get('bucket')
        if m.get('encoded_policy') is not None:
            self.encoded_policy = m.get('encoded_policy')
        if m.get('expiration') is not None:
            self.expiration = m.get('expiration')
        if m.get('file_path') is not None:
            self.file_path = m.get('file_path')
        if m.get('host') is not None:
            self.host = m.get('host')
        if m.get('region_id') is not None:
            self.region_id = m.get('region_id')
        if m.get('signature') is not None:
            self.signature = m.get('signature')
        if m.get('storage_type') is not None:
            self.storage_type = m.get('storage_type')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class ZoneView(TeaModel):
    def __init__(
        self,
        display_name: str = None,
        id: str = None,
        identity: str = None,
        state: str = None,
    ):
        # 显示名称
        self.display_name = display_name
        # table id
        self.id = id
        # 标识
        self.identity = identity
        # 状态
        self.state = state

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.id is not None:
            result['id'] = self.id
        if self.identity is not None:
            result['identity'] = self.identity
        if self.state is not None:
            result['state'] = self.state
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        if m.get('state') is not None:
            self.state = m.get('state')
        return self


class ServiceInfoGroup(TeaModel):
    def __init__(
        self,
        service_info_list: List[ServiceInfo] = None,
    ):
        # 发布应用列表
        self.service_info_list = service_info_list

    def validate(self):
        self.validate_required(self.service_info_list, 'service_info_list')
        if self.service_info_list:
            for k in self.service_info_list:
                if k:
                    k.validate()

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

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


class SidecarCondition(TeaModel):
    def __init__(
        self,
        workspace_groups: str = None,
        cells: str = None,
    ):
        # 支持的workspaceGroup
        self.workspace_groups = workspace_groups
        # 支持的cell列表
        self.cells = cells

    def validate(self):
        self.validate_required(self.workspace_groups, 'workspace_groups')

    def to_map(self):
        result = dict()
        if self.workspace_groups is not None:
            result['workspace_groups'] = self.workspace_groups
        if self.cells is not None:
            result['cells'] = self.cells
        return result

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


class BuildpackRegionRelationDetail(TeaModel):
    def __init__(
        self,
        buildpack_id: str = None,
        buildpack_tenant_id: str = None,
        creation_time: str = None,
        file_checksum: str = None,
        file_location: str = None,
        file_size: int = None,
        file_status: str = None,
        from_region_id: str = None,
        id: str = None,
        modification_time: str = None,
        object_name: str = None,
        original_file_name: str = None,
        readable_file_size: str = None,
        region: Region = None,
    ):
        # buildpackId
        self.buildpack_id = buildpack_id
        # buildpackTenantId
        self.buildpack_tenant_id = buildpack_tenant_id
        # creationTime
        self.creation_time = creation_time
        # fileChecksum
        self.file_checksum = file_checksum
        # fileLocation
        self.file_location = file_location
        # fileSize
        self.file_size = file_size
        # fileStatus
        self.file_status = file_status
        # fromRegionId
        self.from_region_id = from_region_id
        # id
        self.id = id
        # modificationTime
        self.modification_time = modification_time
        # objectName
        self.object_name = object_name
        # originalFileName
        self.original_file_name = original_file_name
        # readableFileSize
        self.readable_file_size = readable_file_size
        # RegionDto
        self.region = region

    def validate(self):
        if self.creation_time is not None:
            self.validate_pattern(self.creation_time, 'creation_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time is not None:
            self.validate_pattern(self.modification_time, 'modification_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.region:
            self.region.validate()

    def to_map(self):
        result = dict()
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        if self.buildpack_tenant_id is not None:
            result['buildpack_tenant_id'] = self.buildpack_tenant_id
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.file_checksum is not None:
            result['file_checksum'] = self.file_checksum
        if self.file_location is not None:
            result['file_location'] = self.file_location
        if self.file_size is not None:
            result['file_size'] = self.file_size
        if self.file_status is not None:
            result['file_status'] = self.file_status
        if self.from_region_id is not None:
            result['from_region_id'] = self.from_region_id
        if self.id is not None:
            result['id'] = self.id
        if self.modification_time is not None:
            result['modification_time'] = self.modification_time
        if self.object_name is not None:
            result['object_name'] = self.object_name
        if self.original_file_name is not None:
            result['original_file_name'] = self.original_file_name
        if self.readable_file_size is not None:
            result['readable_file_size'] = self.readable_file_size
        if self.region is not None:
            result['region'] = self.region.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        if m.get('buildpack_tenant_id') is not None:
            self.buildpack_tenant_id = m.get('buildpack_tenant_id')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('file_checksum') is not None:
            self.file_checksum = m.get('file_checksum')
        if m.get('file_location') is not None:
            self.file_location = m.get('file_location')
        if m.get('file_size') is not None:
            self.file_size = m.get('file_size')
        if m.get('file_status') is not None:
            self.file_status = m.get('file_status')
        if m.get('from_region_id') is not None:
            self.from_region_id = m.get('from_region_id')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('modification_time') is not None:
            self.modification_time = m.get('modification_time')
        if m.get('object_name') is not None:
            self.object_name = m.get('object_name')
        if m.get('original_file_name') is not None:
            self.original_file_name = m.get('original_file_name')
        if m.get('readable_file_size') is not None:
            self.readable_file_size = m.get('readable_file_size')
        if m.get('region') is not None:
            temp_model = Region()
            self.region = temp_model.from_map(m['region'])
        return self


class DisasterInfo(TeaModel):
    def __init__(
        self,
        disaster_recovery_state: str = None,
        local_failover_target: str = None,
        press_disaster_recovery_state: str = None,
        remote_failover_target: str = None,
        source: str = None,
        type: str = None,
    ):
        # 正常容灾状态
        self.disaster_recovery_state = disaster_recovery_state
        # 同城灾备单元(组)
        self.local_failover_target = local_failover_target
        # 压测容灾状态
        self.press_disaster_recovery_state = press_disaster_recovery_state
        # 异地灾备单元(组)
        self.remote_failover_target = remote_failover_target
        # 逻辑单元&部署单元名称
        self.source = source
        # 容灾类型
        self.type = type

    def validate(self):
        self.validate_required(self.disaster_recovery_state, 'disaster_recovery_state')
        self.validate_required(self.local_failover_target, 'local_failover_target')
        self.validate_required(self.press_disaster_recovery_state, 'press_disaster_recovery_state')
        self.validate_required(self.remote_failover_target, 'remote_failover_target')
        self.validate_required(self.source, 'source')
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        if self.disaster_recovery_state is not None:
            result['disaster_recovery_state'] = self.disaster_recovery_state
        if self.local_failover_target is not None:
            result['local_failover_target'] = self.local_failover_target
        if self.press_disaster_recovery_state is not None:
            result['press_disaster_recovery_state'] = self.press_disaster_recovery_state
        if self.remote_failover_target is not None:
            result['remote_failover_target'] = self.remote_failover_target
        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('disaster_recovery_state') is not None:
            self.disaster_recovery_state = m.get('disaster_recovery_state')
        if m.get('local_failover_target') is not None:
            self.local_failover_target = m.get('local_failover_target')
        if m.get('press_disaster_recovery_state') is not None:
            self.press_disaster_recovery_state = m.get('press_disaster_recovery_state')
        if m.get('remote_failover_target') is not None:
            self.remote_failover_target = m.get('remote_failover_target')
        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 ParamVal(TeaModel):
    def __init__(
        self,
        render_val: str = None,
        scope_id: str = None,
        scope: str = None,
    ):
        # 参数渲染后的值
        self.render_val = render_val
        # 某个 scope_id
        self.scope_id = scope_id
        # scope 类型
        self.scope = scope

    def validate(self):
        self.validate_required(self.render_val, 'render_val')
        self.validate_required(self.scope_id, 'scope_id')
        self.validate_required(self.scope, 'scope')

    def to_map(self):
        result = dict()
        if self.render_val is not None:
            result['render_val'] = self.render_val
        if self.scope_id is not None:
            result['scope_id'] = self.scope_id
        if self.scope is not None:
            result['scope'] = self.scope
        return result

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


class BGReleaseExecutionProgress(TeaModel):
    def __init__(
        self,
        unit_id: str = None,
        unit_type: str = None,
        resource_type: str = None,
        traffic_execution_progress_of_service: List[SlbExecutionProgress] = None,
        service_execution_progress_group: List[TaskExecutionProgress] = None,
        rollback_service_execution_progress_group: List[TaskExecutionProgress] = None,
        base_progress: ResourceGroupExecutionProgress = None,
    ):
        # unit_id
        self.unit_id = unit_id
        # unit_type
        self.unit_type = unit_type
        # resource_type
        self.resource_type = resource_type
        # traffic_execution_progress_of_service
        self.traffic_execution_progress_of_service = traffic_execution_progress_of_service
        # service_execution_progress_group
        self.service_execution_progress_group = service_execution_progress_group
        # rollback_service_execution_progress_group
        self.rollback_service_execution_progress_group = rollback_service_execution_progress_group
        # base_progress
        self.base_progress = base_progress

    def validate(self):
        self.validate_required(self.unit_id, 'unit_id')
        self.validate_required(self.unit_type, 'unit_type')
        self.validate_required(self.resource_type, 'resource_type')
        self.validate_required(self.traffic_execution_progress_of_service, 'traffic_execution_progress_of_service')
        if self.traffic_execution_progress_of_service:
            for k in self.traffic_execution_progress_of_service:
                if k:
                    k.validate()
        self.validate_required(self.service_execution_progress_group, 'service_execution_progress_group')
        if self.service_execution_progress_group:
            for k in self.service_execution_progress_group:
                if k:
                    k.validate()
        self.validate_required(self.rollback_service_execution_progress_group, 'rollback_service_execution_progress_group')
        if self.rollback_service_execution_progress_group:
            for k in self.rollback_service_execution_progress_group:
                if k:
                    k.validate()
        self.validate_required(self.base_progress, 'base_progress')
        if self.base_progress:
            self.base_progress.validate()

    def to_map(self):
        result = dict()
        if self.unit_id is not None:
            result['unit_id'] = self.unit_id
        if self.unit_type is not None:
            result['unit_type'] = self.unit_type
        if self.resource_type is not None:
            result['resource_type'] = self.resource_type
        result['traffic_execution_progress_of_service'] = []
        if self.traffic_execution_progress_of_service is not None:
            for k in self.traffic_execution_progress_of_service:
                result['traffic_execution_progress_of_service'].append(k.to_map() if k else None)
        result['service_execution_progress_group'] = []
        if self.service_execution_progress_group is not None:
            for k in self.service_execution_progress_group:
                result['service_execution_progress_group'].append(k.to_map() if k else None)
        result['rollback_service_execution_progress_group'] = []
        if self.rollback_service_execution_progress_group is not None:
            for k in self.rollback_service_execution_progress_group:
                result['rollback_service_execution_progress_group'].append(k.to_map() if k else None)
        if self.base_progress is not None:
            result['base_progress'] = self.base_progress.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('unit_id') is not None:
            self.unit_id = m.get('unit_id')
        if m.get('unit_type') is not None:
            self.unit_type = m.get('unit_type')
        if m.get('resource_type') is not None:
            self.resource_type = m.get('resource_type')
        self.traffic_execution_progress_of_service = []
        if m.get('traffic_execution_progress_of_service') is not None:
            for k in m.get('traffic_execution_progress_of_service'):
                temp_model = SlbExecutionProgress()
                self.traffic_execution_progress_of_service.append(temp_model.from_map(k))
        self.service_execution_progress_group = []
        if m.get('service_execution_progress_group') is not None:
            for k in m.get('service_execution_progress_group'):
                temp_model = TaskExecutionProgress()
                self.service_execution_progress_group.append(temp_model.from_map(k))
        self.rollback_service_execution_progress_group = []
        if m.get('rollback_service_execution_progress_group') is not None:
            for k in m.get('rollback_service_execution_progress_group'):
                temp_model = TaskExecutionProgress()
                self.rollback_service_execution_progress_group.append(temp_model.from_map(k))
        if m.get('base_progress') is not None:
            temp_model = ResourceGroupExecutionProgress()
            self.base_progress = temp_model.from_map(m['base_progress'])
        return self


class SingleExecResult(TeaModel):
    def __init__(
        self,
        execute_details: str = None,
        finish_time: int = None,
        start_time: int = None,
        status: str = None,
        target: str = None,
    ):
        # 执行结果详情。如果成功，为执行日志；如果失败，为错误信息
        self.execute_details = execute_details
        # 执行结束时间
        self.finish_time = finish_time
        # 执行开始时间
        self.start_time = start_time
        # 执行结果状态。取值列表：
        # EXECUTING：执行中；
        # SUCCESS：执行成功；
        # FAILED：执行失败；
        # IGNORED：已忽略；
        # TIME_OUT：已超时
        # 
        self.status = status
        # 执行对象。比如一台机器的ip
        self.target = target

    def validate(self):
        self.validate_required(self.status, 'status')
        self.validate_required(self.target, 'target')

    def to_map(self):
        result = dict()
        if self.execute_details is not None:
            result['execute_details'] = self.execute_details
        if self.finish_time is not None:
            result['finish_time'] = self.finish_time
        if self.start_time is not None:
            result['start_time'] = self.start_time
        if self.status is not None:
            result['status'] = self.status
        if self.target is not None:
            result['target'] = self.target
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('execute_details') is not None:
            self.execute_details = m.get('execute_details')
        if m.get('finish_time') is not None:
            self.finish_time = m.get('finish_time')
        if m.get('start_time') is not None:
            self.start_time = m.get('start_time')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('target') is not None:
            self.target = m.get('target')
        return self


class VServerGroupMountInfo(TeaModel):
    def __init__(
        self,
        iaas_id: str = None,
        name: str = None,
        paas_id: str = None,
        mount_weights: List[MountWeight] = None,
    ):
        # iaas id
        self.iaas_id = iaas_id
        # 名称
        self.name = name
        # paas id
        self.paas_id = paas_id
        # 权重信息
        self.mount_weights = mount_weights

    def validate(self):
        self.validate_required(self.iaas_id, 'iaas_id')
        self.validate_required(self.name, 'name')
        self.validate_required(self.paas_id, 'paas_id')
        self.validate_required(self.mount_weights, 'mount_weights')
        if self.mount_weights:
            for k in self.mount_weights:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.iaas_id is not None:
            result['iaas_id'] = self.iaas_id
        if self.name is not None:
            result['name'] = self.name
        if self.paas_id is not None:
            result['paas_id'] = self.paas_id
        result['mount_weights'] = []
        if self.mount_weights is not None:
            for k in self.mount_weights:
                result['mount_weights'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('iaas_id') is not None:
            self.iaas_id = m.get('iaas_id')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('paas_id') is not None:
            self.paas_id = m.get('paas_id')
        self.mount_weights = []
        if m.get('mount_weights') is not None:
            for k in m.get('mount_weights'):
                temp_model = MountWeight()
                self.mount_weights.append(temp_model.from_map(k))
        return self


class OpsProcessDefinition(TeaModel):
    def __init__(
        self,
        description: str = None,
        instruction: str = None,
        name: str = None,
        ops_type: str = None,
        plan_id: str = None,
        type: str = None,
        arrangements: List[ArrangementInfo] = None,
        env_config: List[Pair] = None,
        supported_transitions: List[str] = None,
        node_id: str = None,
        state: str = None,
        started_time: str = None,
        finished_time: str = None,
        standalone_executable: bool = None,
        id: str = None,
    ):
        # 描述
        self.description = description
        # 指令名称
        self.instruction = instruction
        # 进程名
        self.name = name
        # 运维类型
        self.ops_type = ops_type
        # 发布单ID
        self.plan_id = plan_id
        # 类型
        self.type = type
        # 概览信息
        self.arrangements = arrangements
        # 环境变量
        self.env_config = env_config
        # 支持的状态转换列表
        self.supported_transitions = supported_transitions
        # 节点ID
        self.node_id = node_id
        # 状态
        self.state = state
        # 开始时间
        self.started_time = started_time
        # 结束时间
        self.finished_time = finished_time
        # 可独立执行
        self.standalone_executable = standalone_executable
        # ID
        self.id = id

    def validate(self):
        self.validate_required(self.description, 'description')
        self.validate_required(self.instruction, 'instruction')
        self.validate_required(self.name, 'name')
        self.validate_required(self.ops_type, 'ops_type')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.type, 'type')
        self.validate_required(self.arrangements, 'arrangements')
        if self.arrangements:
            for k in self.arrangements:
                if k:
                    k.validate()
        self.validate_required(self.env_config, 'env_config')
        if self.env_config:
            for k in self.env_config:
                if k:
                    k.validate()
        self.validate_required(self.supported_transitions, 'supported_transitions')
        self.validate_required(self.node_id, 'node_id')
        self.validate_required(self.state, 'state')
        self.validate_required(self.started_time, 'started_time')
        if self.started_time is not None:
            self.validate_pattern(self.started_time, 'started_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.finished_time, 'finished_time')
        if self.finished_time is not None:
            self.validate_pattern(self.finished_time, 'finished_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.standalone_executable, 'standalone_executable')
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.instruction is not None:
            result['instruction'] = self.instruction
        if self.name is not None:
            result['name'] = self.name
        if self.ops_type is not None:
            result['ops_type'] = self.ops_type
        if self.plan_id is not None:
            result['plan_id'] = self.plan_id
        if self.type is not None:
            result['type'] = self.type
        result['arrangements'] = []
        if self.arrangements is not None:
            for k in self.arrangements:
                result['arrangements'].append(k.to_map() if k else None)
        result['env_config'] = []
        if self.env_config is not None:
            for k in self.env_config:
                result['env_config'].append(k.to_map() if k else None)
        if self.supported_transitions is not None:
            result['supported_transitions'] = self.supported_transitions
        if self.node_id is not None:
            result['node_id'] = self.node_id
        if self.state is not None:
            result['state'] = self.state
        if self.started_time is not None:
            result['started_time'] = self.started_time
        if self.finished_time is not None:
            result['finished_time'] = self.finished_time
        if self.standalone_executable is not None:
            result['standalone_executable'] = self.standalone_executable
        if self.id is not None:
            result['id'] = self.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('instruction') is not None:
            self.instruction = m.get('instruction')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('ops_type') is not None:
            self.ops_type = m.get('ops_type')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('type') is not None:
            self.type = m.get('type')
        self.arrangements = []
        if m.get('arrangements') is not None:
            for k in m.get('arrangements'):
                temp_model = ArrangementInfo()
                self.arrangements.append(temp_model.from_map(k))
        self.env_config = []
        if m.get('env_config') is not None:
            for k in m.get('env_config'):
                temp_model = Pair()
                self.env_config.append(temp_model.from_map(k))
        if m.get('supported_transitions') is not None:
            self.supported_transitions = m.get('supported_transitions')
        if m.get('node_id') is not None:
            self.node_id = m.get('node_id')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('started_time') is not None:
            self.started_time = m.get('started_time')
        if m.get('finished_time') is not None:
            self.finished_time = m.get('finished_time')
        if m.get('standalone_executable') is not None:
            self.standalone_executable = m.get('standalone_executable')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class Tag(TeaModel):
    def __init__(
        self,
        display_name: str = None,
        key: str = None,
        type: str = None,
        value: str = None,
    ):
        # 可读键名
        self.display_name = display_name
        # 键名
        self.key = key
        # 映射类型，可选
        self.type = type
        # 键值
        self.value = value

    def validate(self):
        self.validate_required(self.key, 'key')
        self.validate_required(self.value, 'value')

    def to_map(self):
        result = dict()
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.key is not None:
            result['key'] = self.key
        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('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('key') is not None:
            self.key = m.get('key')
        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 Workspace(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        display_name: str = None,
        id: str = None,
        identity: str = None,
        name: str = None,
        network_type: str = None,
        region: str = None,
        region_id: str = None,
        tenant: str = None,
        update_time: str = None,
        zones: List[str] = None,
        type: str = None,
    ):
        # 创建时间
        self.create_time = create_time
        # workspace 显示名称
        self.display_name = display_name
        # workspace 名称
        self.id = id
        # 工作空间唯一标识
        self.identity = identity
        # workspace 名称（等同于唯一标识）
        self.name = name
        # 网络类型
        self.network_type = network_type
        # workspace所在regionId
        self.region = region
        # region id
        self.region_id = region_id
        # 所属租户名称
        self.tenant = tenant
        # 最近更新时间
        self.update_time = update_time
        # workspace所在zoneIdentity列表
        self.zones = zones
        # 工作空间类型
        self.type = type

    def validate(self):
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.create_time is not None:
            result['create_time'] = self.create_time
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.id is not None:
            result['id'] = self.id
        if self.identity is not None:
            result['identity'] = self.identity
        if self.name is not None:
            result['name'] = self.name
        if self.network_type is not None:
            result['network_type'] = self.network_type
        if self.region is not None:
            result['region'] = self.region
        if self.region_id is not None:
            result['region_id'] = self.region_id
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.update_time is not None:
            result['update_time'] = self.update_time
        if self.zones is not None:
            result['zones'] = self.zones
        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('create_time') is not None:
            self.create_time = m.get('create_time')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('network_type') is not None:
            self.network_type = m.get('network_type')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('region_id') is not None:
            self.region_id = m.get('region_id')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('update_time') is not None:
            self.update_time = m.get('update_time')
        if m.get('zones') is not None:
            self.zones = m.get('zones')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class AppExtraInfo(TeaModel):
    def __init__(
        self,
        name: str = None,
        type: str = None,
        value: str = None,
    ):
        # 应用额外元数据名称
        self.name = name
        # 元数据类型为 TEXT, USER 类型
        self.type = type
        # 元数据值
        self.value = value

    def validate(self):
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.name is not None:
            result['name'] = self.name
        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('name') is not None:
            self.name = m.get('name')
        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 OpsTargetLegalStates(TeaModel):
    def __init__(
        self,
        target_type: str = None,
        states: List[str] = None,
    ):
        # 目标类型
        self.target_type = target_type
        # 合法状态
        self.states = states

    def validate(self):
        self.validate_required(self.target_type, 'target_type')
        self.validate_required(self.states, 'states')

    def to_map(self):
        result = dict()
        if self.target_type is not None:
            result['target_type'] = self.target_type
        if self.states is not None:
            result['states'] = self.states
        return result

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


class SidecarScopeDetail(TeaModel):
    def __init__(
        self,
        scope: str = None,
        scope_identity: str = None,
        scope_identity_display_name: str = None,
        scope_identity_name: str = None,
    ):
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一id，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # scope identity展示名称
        self.scope_identity_display_name = scope_identity_display_name
        # scope对应的唯一标识符
        self.scope_identity_name = scope_identity_name

    def validate(self):
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.scope_identity_name, 'scope_identity_name')

    def to_map(self):
        result = dict()
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.scope_identity_display_name is not None:
            result['scope_identity_display_name'] = self.scope_identity_display_name
        if self.scope_identity_name is not None:
            result['scope_identity_name'] = self.scope_identity_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('scope_identity_display_name') is not None:
            self.scope_identity_display_name = m.get('scope_identity_display_name')
        if m.get('scope_identity_name') is not None:
            self.scope_identity_name = m.get('scope_identity_name')
        return self


class BuildpackOS(TeaModel):
    def __init__(
        self,
        creation_time: str = None,
        description: str = None,
        extra_info: str = None,
        full_name: str = None,
        id: int = None,
        modification_time: str = None,
        name: str = None,
        os_bit: int = None,
        supported_cloud_display_names: List[str] = None,
        supported_cloud_names: List[str] = None,
        version: str = None,
        os_bit_num: int = None,
    ):
        # creationTime
        self.creation_time = creation_time
        # 描述
        self.description = description
        # extraInfo
        self.extra_info = extra_info
        # 全名
        self.full_name = full_name
        # id
        self.id = id
        # modificationTime
        self.modification_time = modification_time
        # 名字
        self.name = name
        # 操作系统位数
        self.os_bit = os_bit
        # supportedCloudDisplayNames
        self.supported_cloud_display_names = supported_cloud_display_names
        # supportedCloudNames
        self.supported_cloud_names = supported_cloud_names
        # 版本
        self.version = version
        # 操作系统位数，e.g. 32 or 64
        self.os_bit_num = os_bit_num

    def validate(self):
        if self.creation_time is not None:
            self.validate_pattern(self.creation_time, 'creation_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time is not None:
            self.validate_pattern(self.modification_time, 'modification_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.description is not None:
            result['description'] = self.description
        if self.extra_info is not None:
            result['extra_info'] = self.extra_info
        if self.full_name is not None:
            result['full_name'] = self.full_name
        if self.id is not None:
            result['id'] = self.id
        if self.modification_time is not None:
            result['modification_time'] = self.modification_time
        if self.name is not None:
            result['name'] = self.name
        if self.os_bit is not None:
            result['os_bit'] = self.os_bit
        if self.supported_cloud_display_names is not None:
            result['supported_cloud_display_names'] = self.supported_cloud_display_names
        if self.supported_cloud_names is not None:
            result['supported_cloud_names'] = self.supported_cloud_names
        if self.version is not None:
            result['version'] = self.version
        if self.os_bit_num is not None:
            result['os_bit_num'] = self.os_bit_num
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('extra_info') is not None:
            self.extra_info = m.get('extra_info')
        if m.get('full_name') is not None:
            self.full_name = m.get('full_name')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('modification_time') is not None:
            self.modification_time = m.get('modification_time')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('os_bit') is not None:
            self.os_bit = m.get('os_bit')
        if m.get('supported_cloud_display_names') is not None:
            self.supported_cloud_display_names = m.get('supported_cloud_display_names')
        if m.get('supported_cloud_names') is not None:
            self.supported_cloud_names = m.get('supported_cloud_names')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('os_bit_num') is not None:
            self.os_bit_num = m.get('os_bit_num')
        return self


class AppServiceExecutionProgressWithRollbackInfo(TeaModel):
    def __init__(
        self,
        progress: AppServiceExecutionProgress = None,
        rollback_progress: AppServiceExecutionProgress = None,
    ):
        # progress
        self.progress = progress
        # rollback_progress
        self.rollback_progress = rollback_progress

    def validate(self):
        self.validate_required(self.progress, 'progress')
        if self.progress:
            self.progress.validate()
        self.validate_required(self.rollback_progress, 'rollback_progress')
        if self.rollback_progress:
            self.rollback_progress.validate()

    def to_map(self):
        result = dict()
        if self.progress is not None:
            result['progress'] = self.progress.to_map()
        if self.rollback_progress is not None:
            result['rollback_progress'] = self.rollback_progress.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('progress') is not None:
            temp_model = AppServiceExecutionProgress()
            self.progress = temp_model.from_map(m['progress'])
        if m.get('rollback_progress') is not None:
            temp_model = AppServiceExecutionProgress()
            self.rollback_progress = temp_model.from_map(m['rollback_progress'])
        return self


class WorkspaceView(TeaModel):
    def __init__(
        self,
        cells: List[CellView] = None,
        display_name: str = None,
        id: str = None,
        identity: str = None,
        network_type: str = None,
        region: str = None,
    ):
        # 部署单元列表
        self.cells = cells
        # 显示名称
        self.display_name = display_name
        # table id
        self.id = id
        # 标识
        self.identity = identity
        # 网络类型
        self.network_type = network_type
        # workspace所在region名称
        self.region = region

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

    def to_map(self):
        result = dict()
        result['cells'] = []
        if self.cells is not None:
            for k in self.cells:
                result['cells'].append(k.to_map() if k else None)
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.id is not None:
            result['id'] = self.id
        if self.identity is not None:
            result['identity'] = self.identity
        if self.network_type is not None:
            result['network_type'] = self.network_type
        if self.region is not None:
            result['region'] = self.region
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.cells = []
        if m.get('cells') is not None:
            for k in m.get('cells'):
                temp_model = CellView()
                self.cells.append(temp_model.from_map(k))
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        if m.get('network_type') is not None:
            self.network_type = m.get('network_type')
        if m.get('region') is not None:
            self.region = m.get('region')
        return self


class SidecarTemplateConfig(TeaModel):
    def __init__(
        self,
        type: str = None,
        template: str = None,
    ):
        # 类型：默认、透明劫持
        self.type = type
        # 模板内容
        self.template = template

    def validate(self):
        self.validate_required(self.type, 'type')
        self.validate_required(self.template, 'template')

    def to_map(self):
        result = dict()
        if self.type is not None:
            result['type'] = self.type
        if self.template is not None:
            result['template'] = self.template
        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('template') is not None:
            self.template = m.get('template')
        return self


class Cell(TeaModel):
    def __init__(
        self,
        deployment_zone: str = None,
        description: str = None,
        id: str = None,
        master_zone: str = None,
        name: str = None,
        paas_id: str = None,
        status: str = None,
        tenant: str = None,
        type: str = None,
        workspace: str = None,
        workspace_group: str = None,
        zones: List[str] = None,
        display_name: str = None,
        appended_zone_ids: List[str] = None,
    ):
        # 部署区域名称
        self.deployment_zone = deployment_zone
        # 部署单元描述
        self.description = description
        # 部署单元名称
        self.id = id
        # 部署单元所属主可用区ID列表
        self.master_zone = master_zone
        # 部署单元显示名称
        self.name = name
        # 部署单元对应的paas id
        self.paas_id = paas_id
        # 部署单元状态
        self.status = status
        # 租户名称
        self.tenant = tenant
        # 部署单元类型[单元化模式特有]。
        self.type = type
        # 工作空间名称
        self.workspace = workspace
        # 环境名称
        self.workspace_group = workspace_group
        # 部署单元所属可用区ID列表
        self.zones = zones
        # displayName
        self.display_name = display_name
        # appendedZoneIds
        self.appended_zone_ids = appended_zone_ids

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.deployment_zone is not None:
            result['deployment_zone'] = self.deployment_zone
        if self.description is not None:
            result['description'] = self.description
        if self.id is not None:
            result['id'] = self.id
        if self.master_zone is not None:
            result['master_zone'] = self.master_zone
        if self.name is not None:
            result['name'] = self.name
        if self.paas_id is not None:
            result['paas_id'] = self.paas_id
        if self.status is not None:
            result['status'] = self.status
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.type is not None:
            result['type'] = self.type
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.workspace_group is not None:
            result['workspace_group'] = self.workspace_group
        if self.zones is not None:
            result['zones'] = self.zones
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.appended_zone_ids is not None:
            result['appended_zone_ids'] = self.appended_zone_ids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('deployment_zone') is not None:
            self.deployment_zone = m.get('deployment_zone')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('master_zone') is not None:
            self.master_zone = m.get('master_zone')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('paas_id') is not None:
            self.paas_id = m.get('paas_id')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        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('workspace_group') is not None:
            self.workspace_group = m.get('workspace_group')
        if m.get('zones') is not None:
            self.zones = m.get('zones')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('appended_zone_ids') is not None:
            self.appended_zone_ids = m.get('appended_zone_ids')
        return self


class TemplateParamDef(TeaModel):
    def __init__(
        self,
        data_level: str = None,
        default_val: str = None,
        deleted: bool = None,
        desc: str = None,
        id: str = None,
        key: str = None,
        param_version: int = None,
        type: str = None,
        value: str = None,
        created_time: str = None,
        modified_time: str = None,
    ):
        # 数据保密级别，L1,L2,L3
        self.data_level = data_level
        # 默认值，表达式解析结果为空时使用
        self.default_val = default_val
        # 是否已删除
        self.deleted = deleted
        # 参数描述
        self.desc = desc
        # 参数id
        self.id = id
        # 参数名
        self.key = key
        # 版本
        self.param_version = param_version
        # 参数值类型，CONST/EXPR
        self.type = type
        # 参数值，可能是一个常量或者表达式
        self.value = value
        # 创建时间
        self.created_time = created_time
        # 修改时间
        self.modified_time = modified_time

    def validate(self):
        self.validate_required(self.data_level, 'data_level')
        self.validate_required(self.key, 'key')
        self.validate_required(self.type, 'type')
        self.validate_required(self.value, 'value')
        if self.created_time is not None:
            self.validate_pattern(self.created_time, 'created_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modified_time is not None:
            self.validate_pattern(self.modified_time, 'modified_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.data_level is not None:
            result['data_level'] = self.data_level
        if self.default_val is not None:
            result['default_val'] = self.default_val
        if self.deleted is not None:
            result['deleted'] = self.deleted
        if self.desc is not None:
            result['desc'] = self.desc
        if self.id is not None:
            result['id'] = self.id
        if self.key is not None:
            result['key'] = self.key
        if self.param_version is not None:
            result['param_version'] = self.param_version
        if self.type is not None:
            result['type'] = self.type
        if self.value is not None:
            result['value'] = self.value
        if self.created_time is not None:
            result['created_time'] = self.created_time
        if self.modified_time is not None:
            result['modified_time'] = self.modified_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('data_level') is not None:
            self.data_level = m.get('data_level')
        if m.get('default_val') is not None:
            self.default_val = m.get('default_val')
        if m.get('deleted') is not None:
            self.deleted = m.get('deleted')
        if m.get('desc') is not None:
            self.desc = m.get('desc')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('param_version') is not None:
            self.param_version = m.get('param_version')
        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('created_time') is not None:
            self.created_time = m.get('created_time')
        if m.get('modified_time') is not None:
            self.modified_time = m.get('modified_time')
        return self


class BuildpackParamTemplate(TeaModel):
    def __init__(
        self,
        buildpack_id: str = None,
        default_value: str = None,
        description: str = None,
        id: str = None,
        key: str = None,
        readonly: bool = None,
        required: bool = None,
    ):
        # 技术栈版本的id
        self.buildpack_id = buildpack_id
        # 技术栈版本参数的默认值
        self.default_value = default_value
        # 技术栈版本参数的描述
        self.description = description
        # id
        self.id = id
        # 技术栈版本参数的key
        self.key = key
        # 该技术栈版本参数是否是只读的
        self.readonly = readonly
        # 该技术栈版本参数是否是必须的
        self.required = required

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        if self.default_value is not None:
            result['default_value'] = self.default_value
        if self.description is not None:
            result['description'] = self.description
        if self.id is not None:
            result['id'] = self.id
        if self.key is not None:
            result['key'] = self.key
        if self.readonly is not None:
            result['readonly'] = self.readonly
        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('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        if m.get('default_value') is not None:
            self.default_value = m.get('default_value')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('readonly') is not None:
            self.readonly = m.get('readonly')
        if m.get('required') is not None:
            self.required = m.get('required')
        return self


class AppServiceEntity(TeaModel):
    def __init__(
        self,
        app_id: str = None,
        app_name: str = None,
        buildpack_full_version: str = None,
        buildpack_id: str = None,
        cell_ids: List[str] = None,
        description: str = None,
        ecs_list: List[Computer] = None,
        extend_properties: str = None,
        id: str = None,
        is_default: bool = None,
        is_service: bool = None,
        last_deploy_status: str = None,
        last_deploy_version: str = None,
        last_ops_order_id: str = None,
        name: str = None,
        owner_id: str = None,
        rds_list: List[DepsDatabase] = None,
        slb_list: List[SLBInfo] = None,
        techstack_id: int = None,
        techstack_identity: str = None,
        techstack_name: str = None,
        utc_create: str = None,
        utc_modified: str = None,
        workspace_display_name: str = None,
        workspace_id: str = None,
        workspace_name: str = None,
        owner_login_name: str = None,
        owner_display_name: str = None,
    ):
        # appId
        self.app_id = app_id
        # appName
        self.app_name = app_name
        # buildpackFullVersion
        self.buildpack_full_version = buildpack_full_version
        # 构建包id
        self.buildpack_id = buildpack_id
        # cellIds
        self.cell_ids = cell_ids
        # description
        self.description = description
        # 当前应用服务用到的 ecs 资源列表
        self.ecs_list = ecs_list
        # extendProperties
        self.extend_properties = extend_properties
        # id
        self.id = id
        # isDefault
        self.is_default = is_default
        # isService
        self.is_service = is_service
        # lastDeployStatus
        self.last_deploy_status = last_deploy_status
        # lastDeployVersion
        self.last_deploy_version = last_deploy_version
        # lastOpsOrderId
        self.last_ops_order_id = last_ops_order_id
        # name
        self.name = name
        # ownerId
        self.owner_id = owner_id
        # 当前应用服务使用的 rds 资源列表
        self.rds_list = rds_list
        # 当前应用服务使用的 slb 资源列表
        self.slb_list = slb_list
        # techstackId
        self.techstack_id = techstack_id
        # techstackIdentity
        self.techstack_identity = techstack_identity
        # techstackName
        self.techstack_name = techstack_name
        # 创建时间
        self.utc_create = utc_create
        # 修改时间
        self.utc_modified = utc_modified
        # 工作空间显示名称
        self.workspace_display_name = workspace_display_name
        # workspaceId
        self.workspace_id = workspace_id
        # 工作空间名称
        self.workspace_name = workspace_name
        # 负责人登录名称
        self.owner_login_name = owner_login_name
        # 负责人显示名称
        self.owner_display_name = owner_display_name

    def validate(self):
        if self.ecs_list:
            for k in self.ecs_list:
                if k:
                    k.validate()
        if self.rds_list:
            for k in self.rds_list:
                if k:
                    k.validate()
        if self.slb_list:
            for k in self.slb_list:
                if k:
                    k.validate()
        if self.utc_create is not None:
            self.validate_pattern(self.utc_create, 'utc_create', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.utc_modified is not None:
            self.validate_pattern(self.utc_modified, 'utc_modified', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.buildpack_full_version is not None:
            result['buildpack_full_version'] = self.buildpack_full_version
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        if self.cell_ids is not None:
            result['cell_ids'] = self.cell_ids
        if self.description is not None:
            result['description'] = self.description
        result['ecs_list'] = []
        if self.ecs_list is not None:
            for k in self.ecs_list:
                result['ecs_list'].append(k.to_map() if k else None)
        if self.extend_properties is not None:
            result['extend_properties'] = self.extend_properties
        if self.id is not None:
            result['id'] = self.id
        if self.is_default is not None:
            result['is_default'] = self.is_default
        if self.is_service is not None:
            result['is_service'] = self.is_service
        if self.last_deploy_status is not None:
            result['last_deploy_status'] = self.last_deploy_status
        if self.last_deploy_version is not None:
            result['last_deploy_version'] = self.last_deploy_version
        if self.last_ops_order_id is not None:
            result['last_ops_order_id'] = self.last_ops_order_id
        if self.name is not None:
            result['name'] = self.name
        if self.owner_id is not None:
            result['owner_id'] = self.owner_id
        result['rds_list'] = []
        if self.rds_list is not None:
            for k in self.rds_list:
                result['rds_list'].append(k.to_map() if k else None)
        result['slb_list'] = []
        if self.slb_list is not None:
            for k in self.slb_list:
                result['slb_list'].append(k.to_map() if k else None)
        if self.techstack_id is not None:
            result['techstack_id'] = self.techstack_id
        if self.techstack_identity is not None:
            result['techstack_identity'] = self.techstack_identity
        if self.techstack_name is not None:
            result['techstack_name'] = self.techstack_name
        if self.utc_create is not None:
            result['utc_create'] = self.utc_create
        if self.utc_modified is not None:
            result['utc_modified'] = self.utc_modified
        if self.workspace_display_name is not None:
            result['workspace_display_name'] = self.workspace_display_name
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        if self.workspace_name is not None:
            result['workspace_name'] = self.workspace_name
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        if self.owner_display_name is not None:
            result['owner_display_name'] = self.owner_display_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('buildpack_full_version') is not None:
            self.buildpack_full_version = m.get('buildpack_full_version')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        if m.get('cell_ids') is not None:
            self.cell_ids = m.get('cell_ids')
        if m.get('description') is not None:
            self.description = m.get('description')
        self.ecs_list = []
        if m.get('ecs_list') is not None:
            for k in m.get('ecs_list'):
                temp_model = Computer()
                self.ecs_list.append(temp_model.from_map(k))
        if m.get('extend_properties') is not None:
            self.extend_properties = m.get('extend_properties')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('is_default') is not None:
            self.is_default = m.get('is_default')
        if m.get('is_service') is not None:
            self.is_service = m.get('is_service')
        if m.get('last_deploy_status') is not None:
            self.last_deploy_status = m.get('last_deploy_status')
        if m.get('last_deploy_version') is not None:
            self.last_deploy_version = m.get('last_deploy_version')
        if m.get('last_ops_order_id') is not None:
            self.last_ops_order_id = m.get('last_ops_order_id')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('owner_id') is not None:
            self.owner_id = m.get('owner_id')
        self.rds_list = []
        if m.get('rds_list') is not None:
            for k in m.get('rds_list'):
                temp_model = DepsDatabase()
                self.rds_list.append(temp_model.from_map(k))
        self.slb_list = []
        if m.get('slb_list') is not None:
            for k in m.get('slb_list'):
                temp_model = SLBInfo()
                self.slb_list.append(temp_model.from_map(k))
        if m.get('techstack_id') is not None:
            self.techstack_id = m.get('techstack_id')
        if m.get('techstack_identity') is not None:
            self.techstack_identity = m.get('techstack_identity')
        if m.get('techstack_name') is not None:
            self.techstack_name = m.get('techstack_name')
        if m.get('utc_create') is not None:
            self.utc_create = m.get('utc_create')
        if m.get('utc_modified') is not None:
            self.utc_modified = m.get('utc_modified')
        if m.get('workspace_display_name') is not None:
            self.workspace_display_name = m.get('workspace_display_name')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        if m.get('workspace_name') is not None:
            self.workspace_name = m.get('workspace_name')
        if m.get('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        if m.get('owner_display_name') is not None:
            self.owner_display_name = m.get('owner_display_name')
        return self


class Techstack(TeaModel):
    def __init__(
        self,
        description: str = None,
        extra_info: str = None,
        id: str = None,
        identity: str = None,
        name: str = None,
        scope: str = None,
        status: str = None,
    ):
        # 描述信息
        self.description = description
        # extraInfo
        self.extra_info = extra_info
        # 技术栈ID
        self.id = id
        # 标识符
        self.identity = identity
        # 名称
        self.name = name
        # 作用域
        self.scope = scope
        # 技术栈状态
        self.status = status

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.extra_info is not None:
            result['extra_info'] = self.extra_info
        if self.id is not None:
            result['id'] = self.id
        if self.identity is not None:
            result['identity'] = self.identity
        if self.name is not None:
            result['name'] = self.name
        if self.scope is not None:
            result['scope'] = self.scope
        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('description') is not None:
            self.description = m.get('description')
        if m.get('extra_info') is not None:
            self.extra_info = m.get('extra_info')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class ConnectionStub(TeaModel):
    def __init__(
        self,
        id: int = None,
        cloud: Cloud = None,
        type: str = None,
        tenant_name: str = None,
        tenant_id: str = None,
    ):
        # id
        self.id = id
        # cloud
        self.cloud = cloud
        # StubType
        self.type = type
        # tenantName
        self.tenant_name = tenant_name
        # tenantId
        self.tenant_id = tenant_id

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

    def to_map(self):
        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.cloud is not None:
            result['cloud'] = self.cloud.to_map()
        if self.type is not None:
            result['type'] = self.type
        if self.tenant_name is not None:
            result['tenant_name'] = self.tenant_name
        if self.tenant_id is not None:
            result['tenant_id'] = self.tenant_id
        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('cloud') is not None:
            temp_model = Cloud()
            self.cloud = temp_model.from_map(m['cloud'])
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('tenant_name') is not None:
            self.tenant_name = m.get('tenant_name')
        if m.get('tenant_id') is not None:
            self.tenant_id = m.get('tenant_id')
        return self


class OpsUnit(TeaModel):
    def __init__(
        self,
        cell: str = None,
        computers: List[OpsComputer] = None,
        region: str = None,
        zone: str = None,
    ):
        # 单元所属部署区
        self.cell = cell
        # 包含在此单元中进行运维操作的计算容器列表
        self.computers = computers
        # 单元所属地域
        self.region = region
        # 单元所属可用区
        self.zone = zone

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

    def to_map(self):
        result = dict()
        if self.cell is not None:
            result['cell'] = self.cell
        result['computers'] = []
        if self.computers is not None:
            for k in self.computers:
                result['computers'].append(k.to_map() if k else None)
        if self.region is not None:
            result['region'] = self.region
        if self.zone is not None:
            result['zone'] = self.zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('cell') is not None:
            self.cell = m.get('cell')
        self.computers = []
        if m.get('computers') is not None:
            for k in m.get('computers'):
                temp_model = OpsComputer()
                self.computers.append(temp_model.from_map(k))
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('zone') is not None:
            self.zone = m.get('zone')
        return self


class AppDepend(TeaModel):
    def __init__(
        self,
        app_name: str = None,
        depend_app_names: str = None,
        app_display_name: str = None,
    ):
        # 当前应用名称
        self.app_name = app_name
        # 该应用依赖的所有应用的 id 列表字符串
        self.depend_app_names = depend_app_names
        # 应用显示名称
        self.app_display_name = app_display_name

    def validate(self):
        self.validate_required(self.app_name, 'app_name')
        self.validate_required(self.depend_app_names, 'depend_app_names')

    def to_map(self):
        result = dict()
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.depend_app_names is not None:
            result['depend_app_names'] = self.depend_app_names
        if self.app_display_name is not None:
            result['app_display_name'] = self.app_display_name
        return result

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


class Buildpack(TeaModel):
    def __init__(
        self,
        available_tenant_names: List[str] = None,
        build_command: str = None,
        contact_info: str = None,
        debug_mode: bool = None,
        depracation_note: str = None,
        description: str = None,
        full_version: str = None,
        id: str = None,
        industry_label: str = None,
        major_version: int = None,
        minor_version: int = None,
        patch_version: int = None,
        publication_time: str = None,
        scope: str = None,
        status: str = None,
    ):
        # 可以使用该技术栈版本的租户名称
        self.available_tenant_names = available_tenant_names
        # 技术栈版本的编译打包命令
        self.build_command = build_command
        # 分享给其他租户时留下的联系信息
        self.contact_info = contact_info
        # 当前技术栈版本是否是debug模式
        self.debug_mode = debug_mode
        # 废弃技术栈版本的原因
        self.depracation_note = depracation_note
        # 描述
        self.description = description
        # 技术栈的版本号
        self.full_version = full_version
        # 技术栈版本ID
        self.id = id
        # 行业标志,I(金区)或者N(非金区)
        self.industry_label = industry_label
        # 主要版本号
        self.major_version = major_version
        # 次要版本号
        self.minor_version = minor_version
        # 补丁版本号
        self.patch_version = patch_version
        # 发布时间
        self.publication_time = publication_time
        # 技术栈版本是系统系统的还是用户自定义的
        self.scope = scope
        # 技术栈版本的状态
        self.status = status

    def validate(self):
        if self.publication_time is not None:
            self.validate_pattern(self.publication_time, 'publication_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.available_tenant_names is not None:
            result['available_tenant_names'] = self.available_tenant_names
        if self.build_command is not None:
            result['build_command'] = self.build_command
        if self.contact_info is not None:
            result['contact_info'] = self.contact_info
        if self.debug_mode is not None:
            result['debug_mode'] = self.debug_mode
        if self.depracation_note is not None:
            result['depracation_note'] = self.depracation_note
        if self.description is not None:
            result['description'] = self.description
        if self.full_version is not None:
            result['full_version'] = self.full_version
        if self.id is not None:
            result['id'] = self.id
        if self.industry_label is not None:
            result['industry_label'] = self.industry_label
        if self.major_version is not None:
            result['major_version'] = self.major_version
        if self.minor_version is not None:
            result['minor_version'] = self.minor_version
        if self.patch_version is not None:
            result['patch_version'] = self.patch_version
        if self.publication_time is not None:
            result['publication_time'] = self.publication_time
        if self.scope is not None:
            result['scope'] = self.scope
        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('available_tenant_names') is not None:
            self.available_tenant_names = m.get('available_tenant_names')
        if m.get('build_command') is not None:
            self.build_command = m.get('build_command')
        if m.get('contact_info') is not None:
            self.contact_info = m.get('contact_info')
        if m.get('debug_mode') is not None:
            self.debug_mode = m.get('debug_mode')
        if m.get('depracation_note') is not None:
            self.depracation_note = m.get('depracation_note')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('industry_label') is not None:
            self.industry_label = m.get('industry_label')
        if m.get('major_version') is not None:
            self.major_version = m.get('major_version')
        if m.get('minor_version') is not None:
            self.minor_version = m.get('minor_version')
        if m.get('patch_version') is not None:
            self.patch_version = m.get('patch_version')
        if m.get('publication_time') is not None:
            self.publication_time = m.get('publication_time')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class TechstackBuildpackCount(TeaModel):
    def __init__(
        self,
        buildpack_count: int = None,
        creation_time: str = None,
        description: str = None,
        extra_info: str = None,
        id: str = None,
        identity: str = None,
        modification_time: str = None,
        name: str = None,
        scope: str = None,
        status: str = None,
    ):
        # buildpackCount
        self.buildpack_count = buildpack_count
        # creation_time
        self.creation_time = creation_time
        # description
        self.description = description
        # extra_info
        self.extra_info = extra_info
        # id
        self.id = id
        # identity
        self.identity = identity
        # modification_time
        self.modification_time = modification_time
        # name
        self.name = name
        # scope
        self.scope = scope
        # status
        self.status = status

    def validate(self):
        if self.creation_time is not None:
            self.validate_pattern(self.creation_time, 'creation_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.id, 'id')
        if self.modification_time is not None:
            self.validate_pattern(self.modification_time, 'modification_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.name, 'name')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.status, 'status')

    def to_map(self):
        result = dict()
        if self.buildpack_count is not None:
            result['buildpack_count'] = self.buildpack_count
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.description is not None:
            result['description'] = self.description
        if self.extra_info is not None:
            result['extra_info'] = self.extra_info
        if self.id is not None:
            result['id'] = self.id
        if self.identity is not None:
            result['identity'] = self.identity
        if self.modification_time is not None:
            result['modification_time'] = self.modification_time
        if self.name is not None:
            result['name'] = self.name
        if self.scope is not None:
            result['scope'] = self.scope
        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('buildpack_count') is not None:
            self.buildpack_count = m.get('buildpack_count')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('extra_info') is not None:
            self.extra_info = m.get('extra_info')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        if m.get('modification_time') is not None:
            self.modification_time = m.get('modification_time')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class ServiceInfoGroupCollection(TeaModel):
    def __init__(
        self,
        service_info_groups: ServiceInfoGroup = None,
    ):
        # service info groups
        self.service_info_groups = service_info_groups

    def validate(self):
        self.validate_required(self.service_info_groups, 'service_info_groups')
        if self.service_info_groups:
            self.service_info_groups.validate()

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

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


class NotificationConfig(TeaModel):
    def __init__(
        self,
        receivers: List[NotificationReceiver] = None,
        notification_type: str = None,
        enabled: bool = None,
        cloud_web_url: str = None,
        id: str = None,
    ):
        # 接收人列表
        self.receivers = receivers
        # 类型
        self.notification_type = notification_type
        # 是否开启，默认不开启
        self.enabled = enabled
        # cloud_web_url
        self.cloud_web_url = cloud_web_url
        # id
        self.id = id

    def validate(self):
        self.validate_required(self.receivers, 'receivers')
        if self.receivers:
            for k in self.receivers:
                if k:
                    k.validate()
        self.validate_required(self.notification_type, 'notification_type')
        self.validate_required(self.cloud_web_url, 'cloud_web_url')
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        result['receivers'] = []
        if self.receivers is not None:
            for k in self.receivers:
                result['receivers'].append(k.to_map() if k else None)
        if self.notification_type is not None:
            result['notification_type'] = self.notification_type
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.cloud_web_url is not None:
            result['cloud_web_url'] = self.cloud_web_url
        if self.id is not None:
            result['id'] = self.id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.receivers = []
        if m.get('receivers') is not None:
            for k in m.get('receivers'):
                temp_model = NotificationReceiver()
                self.receivers.append(temp_model.from_map(k))
        if m.get('notification_type') is not None:
            self.notification_type = m.get('notification_type')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('cloud_web_url') is not None:
            self.cloud_web_url = m.get('cloud_web_url')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class PaginationQuery(TeaModel):
    def __init__(
        self,
        current_page: int = None,
        page_size: int = None,
        fuzzy_name: str = None,
    ):
        # 当前页码
        self.current_page = current_page
        # 分页大小
        self.page_size = page_size
        # 模糊搜索
        self.fuzzy_name = fuzzy_name

    def validate(self):
        self.validate_required(self.current_page, 'current_page')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.fuzzy_name, 'fuzzy_name')

    def to_map(self):
        result = dict()
        if self.current_page is not None:
            result['current_page'] = self.current_page
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.fuzzy_name is not None:
            result['fuzzy_name'] = self.fuzzy_name
        return result

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


class AppTechstackRelation(TeaModel):
    def __init__(
        self,
        app_id: str = None,
        buildpack_arch: str = None,
        creation_time: str = None,
        extra_info: str = None,
        id: str = None,
        modification_time: str = None,
        techstack_id: int = None,
        techstack_identity: str = None,
        techstack_name: str = None,
    ):
        # appId
        self.app_id = app_id
        # buildpackArch
        self.buildpack_arch = buildpack_arch
        # creationTime
        self.creation_time = creation_time
        # extraInfo
        self.extra_info = extra_info
        # id
        self.id = id
        # modificationTime
        self.modification_time = modification_time
        # techstackId
        self.techstack_id = techstack_id
        # techstackIdentity
        self.techstack_identity = techstack_identity
        # techstackName
        self.techstack_name = techstack_name

    def validate(self):
        if self.creation_time is not None:
            self.validate_pattern(self.creation_time, 'creation_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time is not None:
            self.validate_pattern(self.modification_time, 'modification_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.buildpack_arch is not None:
            result['buildpack_arch'] = self.buildpack_arch
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.extra_info is not None:
            result['extra_info'] = self.extra_info
        if self.id is not None:
            result['id'] = self.id
        if self.modification_time is not None:
            result['modification_time'] = self.modification_time
        if self.techstack_id is not None:
            result['techstack_id'] = self.techstack_id
        if self.techstack_identity is not None:
            result['techstack_identity'] = self.techstack_identity
        if self.techstack_name is not None:
            result['techstack_name'] = self.techstack_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('buildpack_arch') is not None:
            self.buildpack_arch = m.get('buildpack_arch')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('extra_info') is not None:
            self.extra_info = m.get('extra_info')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('modification_time') is not None:
            self.modification_time = m.get('modification_time')
        if m.get('techstack_id') is not None:
            self.techstack_id = m.get('techstack_id')
        if m.get('techstack_identity') is not None:
            self.techstack_identity = m.get('techstack_identity')
        if m.get('techstack_name') is not None:
            self.techstack_name = m.get('techstack_name')
        return self


class MapStringToBooleanEntity(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: bool = None,
    ):
        # key
        self.key = key
        # value
        self.value = value

    def validate(self):
        self.validate_required(self.key, 'key')
        self.validate_required(self.value, 'value')

    def to_map(self):
        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 BGReleaseArrangement(TeaModel):
    def __init__(
        self,
        active_unit_id: str = None,
        deactivated_unit_id: str = None,
        gray_traffic_process_id: str = None,
        rollback_process_id: str = None,
        service_info_collection: List[ServiceInfo] = None,
        step_type: str = None,
        unit_type: str = None,
        name: str = None,
        arrangement_type: str = None,
        env_config: List[Pair] = None,
        targets_legal_states: List[OpsTargetLegalStates] = None,
        process_definition_id: str = None,
        parent_id: str = None,
        parent_entity_type: str = None,
        supported_transitions: List[str] = None,
        node_id: str = None,
        state: str = None,
        started_time: str = None,
        finished_time: str = None,
        standalone_executable: bool = None,
        id: str = None,
    ):
        # 活跃单元 ID
        self.active_unit_id = active_unit_id
        # 非活跃单元 ID
        self.deactivated_unit_id = deactivated_unit_id
        # 灰度进程ID
        self.gray_traffic_process_id = gray_traffic_process_id
        # 回滚进程ID
        self.rollback_process_id = rollback_process_id
        # 发布应用信息集合
        self.service_info_collection = service_info_collection
        # 类型
        self.step_type = step_type
        # 单元类型
        self.unit_type = unit_type
        # 名称
        self.name = name
        # 类型
        self.arrangement_type = arrangement_type
        # 环境变量
        self.env_config = env_config
        # 合法状态列表
        self.targets_legal_states = targets_legal_states
        # 运维进程ID
        self.process_definition_id = process_definition_id
        # 父运维进程ID
        self.parent_id = parent_id
        # 父进程类型
        self.parent_entity_type = parent_entity_type
        # 支持的转换类型
        self.supported_transitions = supported_transitions
        # 流程节点 ID
        self.node_id = node_id
        # 状态
        self.state = state
        # 开始时间
        self.started_time = started_time
        # 结束时间
        self.finished_time = finished_time
        # 是否可以独立运行
        self.standalone_executable = standalone_executable
        # ID
        self.id = id

    def validate(self):
        self.validate_required(self.active_unit_id, 'active_unit_id')
        self.validate_required(self.deactivated_unit_id, 'deactivated_unit_id')
        self.validate_required(self.gray_traffic_process_id, 'gray_traffic_process_id')
        self.validate_required(self.rollback_process_id, 'rollback_process_id')
        self.validate_required(self.service_info_collection, 'service_info_collection')
        if self.service_info_collection:
            for k in self.service_info_collection:
                if k:
                    k.validate()
        self.validate_required(self.step_type, 'step_type')
        self.validate_required(self.unit_type, 'unit_type')
        self.validate_required(self.name, 'name')
        self.validate_required(self.arrangement_type, 'arrangement_type')
        self.validate_required(self.env_config, 'env_config')
        if self.env_config:
            for k in self.env_config:
                if k:
                    k.validate()
        self.validate_required(self.targets_legal_states, 'targets_legal_states')
        if self.targets_legal_states:
            for k in self.targets_legal_states:
                if k:
                    k.validate()
        self.validate_required(self.process_definition_id, 'process_definition_id')
        self.validate_required(self.parent_id, 'parent_id')
        self.validate_required(self.parent_entity_type, 'parent_entity_type')
        self.validate_required(self.supported_transitions, 'supported_transitions')
        self.validate_required(self.node_id, 'node_id')
        self.validate_required(self.state, 'state')
        self.validate_required(self.started_time, 'started_time')
        if self.started_time is not None:
            self.validate_pattern(self.started_time, 'started_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.finished_time, 'finished_time')
        if self.finished_time is not None:
            self.validate_pattern(self.finished_time, 'finished_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.standalone_executable, 'standalone_executable')
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.active_unit_id is not None:
            result['active_unit_id'] = self.active_unit_id
        if self.deactivated_unit_id is not None:
            result['deactivated_unit_id'] = self.deactivated_unit_id
        if self.gray_traffic_process_id is not None:
            result['gray_traffic_process_id'] = self.gray_traffic_process_id
        if self.rollback_process_id is not None:
            result['rollback_process_id'] = self.rollback_process_id
        result['service_info_collection'] = []
        if self.service_info_collection is not None:
            for k in self.service_info_collection:
                result['service_info_collection'].append(k.to_map() if k else None)
        if self.step_type is not None:
            result['step_type'] = self.step_type
        if self.unit_type is not None:
            result['unit_type'] = self.unit_type
        if self.name is not None:
            result['name'] = self.name
        if self.arrangement_type is not None:
            result['arrangement_type'] = self.arrangement_type
        result['env_config'] = []
        if self.env_config is not None:
            for k in self.env_config:
                result['env_config'].append(k.to_map() if k else None)
        result['targets_legal_states'] = []
        if self.targets_legal_states is not None:
            for k in self.targets_legal_states:
                result['targets_legal_states'].append(k.to_map() if k else None)
        if self.process_definition_id is not None:
            result['process_definition_id'] = self.process_definition_id
        if self.parent_id is not None:
            result['parent_id'] = self.parent_id
        if self.parent_entity_type is not None:
            result['parent_entity_type'] = self.parent_entity_type
        if self.supported_transitions is not None:
            result['supported_transitions'] = self.supported_transitions
        if self.node_id is not None:
            result['node_id'] = self.node_id
        if self.state is not None:
            result['state'] = self.state
        if self.started_time is not None:
            result['started_time'] = self.started_time
        if self.finished_time is not None:
            result['finished_time'] = self.finished_time
        if self.standalone_executable is not None:
            result['standalone_executable'] = self.standalone_executable
        if self.id is not None:
            result['id'] = self.id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('active_unit_id') is not None:
            self.active_unit_id = m.get('active_unit_id')
        if m.get('deactivated_unit_id') is not None:
            self.deactivated_unit_id = m.get('deactivated_unit_id')
        if m.get('gray_traffic_process_id') is not None:
            self.gray_traffic_process_id = m.get('gray_traffic_process_id')
        if m.get('rollback_process_id') is not None:
            self.rollback_process_id = m.get('rollback_process_id')
        self.service_info_collection = []
        if m.get('service_info_collection') is not None:
            for k in m.get('service_info_collection'):
                temp_model = ServiceInfo()
                self.service_info_collection.append(temp_model.from_map(k))
        if m.get('step_type') is not None:
            self.step_type = m.get('step_type')
        if m.get('unit_type') is not None:
            self.unit_type = m.get('unit_type')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('arrangement_type') is not None:
            self.arrangement_type = m.get('arrangement_type')
        self.env_config = []
        if m.get('env_config') is not None:
            for k in m.get('env_config'):
                temp_model = Pair()
                self.env_config.append(temp_model.from_map(k))
        self.targets_legal_states = []
        if m.get('targets_legal_states') is not None:
            for k in m.get('targets_legal_states'):
                temp_model = OpsTargetLegalStates()
                self.targets_legal_states.append(temp_model.from_map(k))
        if m.get('process_definition_id') is not None:
            self.process_definition_id = m.get('process_definition_id')
        if m.get('parent_id') is not None:
            self.parent_id = m.get('parent_id')
        if m.get('parent_entity_type') is not None:
            self.parent_entity_type = m.get('parent_entity_type')
        if m.get('supported_transitions') is not None:
            self.supported_transitions = m.get('supported_transitions')
        if m.get('node_id') is not None:
            self.node_id = m.get('node_id')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('started_time') is not None:
            self.started_time = m.get('started_time')
        if m.get('finished_time') is not None:
            self.finished_time = m.get('finished_time')
        if m.get('standalone_executable') is not None:
            self.standalone_executable = m.get('standalone_executable')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class AppBaselineSidecarConfig(TeaModel):
    def __init__(
        self,
        app_name: str = None,
        category: str = None,
        conditions: List[SidecarCondition] = None,
        enable: bool = None,
        sidecar_version: str = None,
        id: str = None,
    ):
        # 应用名
        self.app_name = app_name
        # sidecar类型
        self.category = category
        # 应用基线适用条件，金融云环境仅能指定workspaceGroups属性，并且只能指定一个workspaceGroup
        self.conditions = conditions
        # 是否开启sidecar
        self.enable = enable
        # sidecar版本号，金融云环境必填
        self.sidecar_version = sidecar_version
        # 应用基线id
        self.id = id

    def validate(self):
        self.validate_required(self.app_name, 'app_name')
        self.validate_required(self.category, 'category')
        self.validate_required(self.conditions, 'conditions')
        if self.conditions:
            for k in self.conditions:
                if k:
                    k.validate()
        self.validate_required(self.enable, 'enable')
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.category is not None:
            result['category'] = self.category
        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.enable is not None:
            result['enable'] = self.enable
        if self.sidecar_version is not None:
            result['sidecar_version'] = self.sidecar_version
        if self.id is not None:
            result['id'] = self.id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('category') is not None:
            self.category = m.get('category')
        self.conditions = []
        if m.get('conditions') is not None:
            for k in m.get('conditions'):
                temp_model = SidecarCondition()
                self.conditions.append(temp_model.from_map(k))
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('sidecar_version') is not None:
            self.sidecar_version = m.get('sidecar_version')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class StateCount(TeaModel):
    def __init__(
        self,
        state: str = None,
        count: int = None,
    ):
        # state
        self.state = state
        # count
        self.count = count

    def validate(self):
        self.validate_required(self.state, 'state')
        self.validate_required(self.count, 'count')

    def to_map(self):
        result = dict()
        if self.state is not None:
            result['state'] = self.state
        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('state') is not None:
            self.state = m.get('state')
        if m.get('count') is not None:
            self.count = m.get('count')
        return self


class Reason(TeaModel):
    def __init__(
        self,
        content: str = None,
        visible: bool = None,
        code: str = None,
        placeholder: str = None,
        params: List[str] = None,
    ):
        # content
        self.content = content
        # visible
        self.visible = visible
        # code
        self.code = code
        # placeholder
        self.placeholder = placeholder
        # params
        self.params = params

    def validate(self):
        self.validate_required(self.content, 'content')
        self.validate_required(self.visible, 'visible')
        self.validate_required(self.code, 'code')
        self.validate_required(self.placeholder, 'placeholder')
        self.validate_required(self.params, 'params')

    def to_map(self):
        result = dict()
        if self.content is not None:
            result['content'] = self.content
        if self.visible is not None:
            result['visible'] = self.visible
        if self.code is not None:
            result['code'] = self.code
        if self.placeholder is not None:
            result['placeholder'] = self.placeholder
        if self.params is not None:
            result['params'] = self.params
        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('visible') is not None:
            self.visible = m.get('visible')
        if m.get('code') is not None:
            self.code = m.get('code')
        if m.get('placeholder') is not None:
            self.placeholder = m.get('placeholder')
        if m.get('params') is not None:
            self.params = m.get('params')
        return self


class BuildpackCompositeVO(TeaModel):
    def __init__(
        self,
        app_service_count: int = None,
        creator: UserDTO = None,
        origin_type: str = None,
        publisher: UserDTO = None,
        supported_os: List[BuildpackOS] = None,
        supported_regions: List[BuildpackRegionRelationDetail] = None,
        techstack: Techstack = None,
        id: str = None,
        description: str = None,
        full_version: str = None,
    ):
        # app_service_count
        self.app_service_count = app_service_count
        # creator
        self.creator = creator
        # origin_type
        self.origin_type = origin_type
        # publisher
        self.publisher = publisher
        # supported_o_s
        self.supported_os = supported_os
        # supported_regions
        self.supported_regions = supported_regions
        # techstack
        self.techstack = techstack
        # id
        self.id = id
        # description
        self.description = description
        # fullVersion
        self.full_version = full_version

    def validate(self):
        if self.creator:
            self.creator.validate()
        if self.publisher:
            self.publisher.validate()
        if self.supported_os:
            for k in self.supported_os:
                if k:
                    k.validate()
        if self.supported_regions:
            for k in self.supported_regions:
                if k:
                    k.validate()
        if self.techstack:
            self.techstack.validate()

    def to_map(self):
        result = dict()
        if self.app_service_count is not None:
            result['app_service_count'] = self.app_service_count
        if self.creator is not None:
            result['creator'] = self.creator.to_map()
        if self.origin_type is not None:
            result['origin_type'] = self.origin_type
        if self.publisher is not None:
            result['publisher'] = self.publisher.to_map()
        result['supported_o_s'] = []
        if self.supported_os is not None:
            for k in self.supported_os:
                result['supported_o_s'].append(k.to_map() if k else None)
        result['supported_regions'] = []
        if self.supported_regions is not None:
            for k in self.supported_regions:
                result['supported_regions'].append(k.to_map() if k else None)
        if self.techstack is not None:
            result['techstack'] = self.techstack.to_map()
        if self.id is not None:
            result['id'] = self.id
        if self.description is not None:
            result['description'] = self.description
        if self.full_version is not None:
            result['full_version'] = self.full_version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_service_count') is not None:
            self.app_service_count = m.get('app_service_count')
        if m.get('creator') is not None:
            temp_model = UserDTO()
            self.creator = temp_model.from_map(m['creator'])
        if m.get('origin_type') is not None:
            self.origin_type = m.get('origin_type')
        if m.get('publisher') is not None:
            temp_model = UserDTO()
            self.publisher = temp_model.from_map(m['publisher'])
        self.supported_os = []
        if m.get('supported_o_s') is not None:
            for k in m.get('supported_o_s'):
                temp_model = BuildpackOS()
                self.supported_os.append(temp_model.from_map(k))
        self.supported_regions = []
        if m.get('supported_regions') is not None:
            for k in m.get('supported_regions'):
                temp_model = BuildpackRegionRelationDetail()
                self.supported_regions.append(temp_model.from_map(k))
        if m.get('techstack') is not None:
            temp_model = Techstack()
            self.techstack = temp_model.from_map(m['techstack'])
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        return self


class AppGroup(TeaModel):
    def __init__(
        self,
        app_scheme: List[AppDepend] = None,
        description: str = None,
        id: str = None,
        name: str = None,
        owner_login_name: str = None,
        parent_id: str = None,
        layer: int = None,
    ):
        # 应用依赖规划
        self.app_scheme = app_scheme
        # 应用分组描述
        self.description = description
        # 应用分组ID
        self.id = id
        # 应用分组名称
        self.name = name
        # 应用分组负责人登录名
        self.owner_login_name = owner_login_name
        # 父应用分组ID
        self.parent_id = parent_id
        # 应用分组层级，从1开始，1代表一级分组，2代表二级分组
        self.layer = layer

    def validate(self):
        if self.app_scheme:
            for k in self.app_scheme:
                if k:
                    k.validate()
        self.validate_required(self.id, 'id')
        self.validate_required(self.name, 'name')
        self.validate_required(self.owner_login_name, 'owner_login_name')
        self.validate_required(self.parent_id, 'parent_id')

    def to_map(self):
        result = dict()
        result['app_scheme'] = []
        if self.app_scheme is not None:
            for k in self.app_scheme:
                result['app_scheme'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        if self.parent_id is not None:
            result['parent_id'] = self.parent_id
        if self.layer is not None:
            result['layer'] = self.layer
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.app_scheme = []
        if m.get('app_scheme') is not None:
            for k in m.get('app_scheme'):
                temp_model = AppDepend()
                self.app_scheme.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        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('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        if m.get('parent_id') is not None:
            self.parent_id = m.get('parent_id')
        if m.get('layer') is not None:
            self.layer = m.get('layer')
        return self


class WorkspaceDeltaInfo(TeaModel):
    def __init__(
        self,
        tenant: str = None,
        workspace: str = None,
    ):
        # 租户名
        self.tenant = tenant
        # 环境名
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.tenant, 'tenant')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class BuildpackDetail(TeaModel):
    def __init__(
        self,
        app_service_count: int = None,
        available_tenant_names: List[str] = None,
        build_command: str = None,
        contact_info: str = None,
        created_from: str = None,
        creation_chain: List[str] = None,
        creation_time: str = None,
        debug_mode: bool = None,
        depracation_note: str = None,
        description: str = None,
        extra_info: str = None,
        full_version: str = None,
        id: str = None,
        industry_label: str = None,
        major_version: int = None,
        minor_version: int = None,
        modification_time: str = None,
        origin_type: str = None,
        patch_version: int = None,
        publication_time: str = None,
        publication_time_date: str = None,
        scope: str = None,
        status: str = None,
        supported_os: List[BuildpackOS] = None,
        supported_regions: List[str] = None,
        supported_regions_list: List[BuildpackRegionRelationDetail] = None,
        techstack: Techstack = None,
        techstack_id: int = None,
        tenant_id: str = None,
    ):
        # 使用该技术栈版本的appservice的数量
        self.app_service_count = app_service_count
        # 可以使用该技术栈版本的租户ID
        self.available_tenant_names = available_tenant_names
        # buildCommand
        self.build_command = build_command
        # 分享给其他租户留下的联系信息
        self.contact_info = contact_info
        # createdFrom
        self.created_from = created_from
        # creationChain
        self.creation_chain = creation_chain
        # creationTime
        self.creation_time = creation_time
        # 当前技术栈版本是否是debug模式
        self.debug_mode = debug_mode
        # 废弃技术栈版本的原因
        self.depracation_note = depracation_note
        # 描述
        self.description = description
        # extraInfo
        self.extra_info = extra_info
        # 技术栈版本号
        self.full_version = full_version
        # 技术栈版本ID
        self.id = id
        # 行业标志,I(金区)或者N(非金区)
        self.industry_label = industry_label
        # 主要版本号
        self.major_version = major_version
        # 次要版本号
        self.minor_version = minor_version
        # modificationTime
        self.modification_time = modification_time
        # 原始类型
        self.origin_type = origin_type
        # 补丁版本号
        self.patch_version = patch_version
        # 发布时间
        self.publication_time = publication_time
        # 发布时间，日期格式
        self.publication_time_date = publication_time_date
        # 技术栈版本提供方所在域
        self.scope = scope
        # 技术栈版本的状态
        self.status = status
        # 支持的操作系统列表
        self.supported_os = supported_os
        # 支持的地域ID列表
        self.supported_regions = supported_regions
        # 支持的地域列表
        self.supported_regions_list = supported_regions_list
        # techstack
        self.techstack = techstack
        # 关联的 Techstack ID
        self.techstack_id = techstack_id
        # tenantId
        self.tenant_id = tenant_id

    def validate(self):
        if self.creation_time is not None:
            self.validate_pattern(self.creation_time, 'creation_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time is not None:
            self.validate_pattern(self.modification_time, 'modification_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.publication_time_date is not None:
            self.validate_pattern(self.publication_time_date, 'publication_time_date', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.supported_os:
            for k in self.supported_os:
                if k:
                    k.validate()
        if self.supported_regions_list:
            for k in self.supported_regions_list:
                if k:
                    k.validate()
        if self.techstack:
            self.techstack.validate()

    def to_map(self):
        result = dict()
        if self.app_service_count is not None:
            result['app_service_count'] = self.app_service_count
        if self.available_tenant_names is not None:
            result['available_tenant_names'] = self.available_tenant_names
        if self.build_command is not None:
            result['build_command'] = self.build_command
        if self.contact_info is not None:
            result['contact_info'] = self.contact_info
        if self.created_from is not None:
            result['created_from'] = self.created_from
        if self.creation_chain is not None:
            result['creation_chain'] = self.creation_chain
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.debug_mode is not None:
            result['debug_mode'] = self.debug_mode
        if self.depracation_note is not None:
            result['depracation_note'] = self.depracation_note
        if self.description is not None:
            result['description'] = self.description
        if self.extra_info is not None:
            result['extra_info'] = self.extra_info
        if self.full_version is not None:
            result['full_version'] = self.full_version
        if self.id is not None:
            result['id'] = self.id
        if self.industry_label is not None:
            result['industry_label'] = self.industry_label
        if self.major_version is not None:
            result['major_version'] = self.major_version
        if self.minor_version is not None:
            result['minor_version'] = self.minor_version
        if self.modification_time is not None:
            result['modification_time'] = self.modification_time
        if self.origin_type is not None:
            result['origin_type'] = self.origin_type
        if self.patch_version is not None:
            result['patch_version'] = self.patch_version
        if self.publication_time is not None:
            result['publication_time'] = self.publication_time
        if self.publication_time_date is not None:
            result['publication_time_date'] = self.publication_time_date
        if self.scope is not None:
            result['scope'] = self.scope
        if self.status is not None:
            result['status'] = self.status
        result['supported_os'] = []
        if self.supported_os is not None:
            for k in self.supported_os:
                result['supported_os'].append(k.to_map() if k else None)
        if self.supported_regions is not None:
            result['supported_regions'] = self.supported_regions
        result['supported_regions_list'] = []
        if self.supported_regions_list is not None:
            for k in self.supported_regions_list:
                result['supported_regions_list'].append(k.to_map() if k else None)
        if self.techstack is not None:
            result['techstack'] = self.techstack.to_map()
        if self.techstack_id is not None:
            result['techstack_id'] = self.techstack_id
        if self.tenant_id is not None:
            result['tenant_id'] = self.tenant_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_service_count') is not None:
            self.app_service_count = m.get('app_service_count')
        if m.get('available_tenant_names') is not None:
            self.available_tenant_names = m.get('available_tenant_names')
        if m.get('build_command') is not None:
            self.build_command = m.get('build_command')
        if m.get('contact_info') is not None:
            self.contact_info = m.get('contact_info')
        if m.get('created_from') is not None:
            self.created_from = m.get('created_from')
        if m.get('creation_chain') is not None:
            self.creation_chain = m.get('creation_chain')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('debug_mode') is not None:
            self.debug_mode = m.get('debug_mode')
        if m.get('depracation_note') is not None:
            self.depracation_note = m.get('depracation_note')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('extra_info') is not None:
            self.extra_info = m.get('extra_info')
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('industry_label') is not None:
            self.industry_label = m.get('industry_label')
        if m.get('major_version') is not None:
            self.major_version = m.get('major_version')
        if m.get('minor_version') is not None:
            self.minor_version = m.get('minor_version')
        if m.get('modification_time') is not None:
            self.modification_time = m.get('modification_time')
        if m.get('origin_type') is not None:
            self.origin_type = m.get('origin_type')
        if m.get('patch_version') is not None:
            self.patch_version = m.get('patch_version')
        if m.get('publication_time') is not None:
            self.publication_time = m.get('publication_time')
        if m.get('publication_time_date') is not None:
            self.publication_time_date = m.get('publication_time_date')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('status') is not None:
            self.status = m.get('status')
        self.supported_os = []
        if m.get('supported_os') is not None:
            for k in m.get('supported_os'):
                temp_model = BuildpackOS()
                self.supported_os.append(temp_model.from_map(k))
        if m.get('supported_regions') is not None:
            self.supported_regions = m.get('supported_regions')
        self.supported_regions_list = []
        if m.get('supported_regions_list') is not None:
            for k in m.get('supported_regions_list'):
                temp_model = BuildpackRegionRelationDetail()
                self.supported_regions_list.append(temp_model.from_map(k))
        if m.get('techstack') is not None:
            temp_model = Techstack()
            self.techstack = temp_model.from_map(m['techstack'])
        if m.get('techstack_id') is not None:
            self.techstack_id = m.get('techstack_id')
        if m.get('tenant_id') is not None:
            self.tenant_id = m.get('tenant_id')
        return self


class AppConfigTemplate(TeaModel):
    def __init__(
        self,
        app_name: str = None,
        comment: str = None,
        id: str = None,
        operator_id: str = None,
        params: List[TemplateParamDef] = None,
        release_time: str = None,
        state: str = None,
        tenant_id: str = None,
        tpl_version: str = None,
        created_time: str = None,
        modified_time: str = None,
    ):
        # 应用名称
        self.app_name = app_name
        # 描述
        self.comment = comment
        # 应用参数模板 id
        self.id = id
        # 操作人 id
        self.operator_id = operator_id
        # 参数定义列表
        self.params = params
        # 参数模板发布时间
        self.release_time = release_time
        # 模板状态，DRAFT 草稿，RELEASE 已发布，发布后才会生成 version，否则为空
        self.state = state
        # 租户 id
        self.tenant_id = tenant_id
        # 模板版本
        self.tpl_version = tpl_version
        # 创建时间
        self.created_time = created_time
        # 修改时间
        self.modified_time = modified_time

    def validate(self):
        self.validate_required(self.app_name, 'app_name')
        self.validate_required(self.operator_id, 'operator_id')
        self.validate_required(self.params, 'params')
        if self.params:
            for k in self.params:
                if k:
                    k.validate()
        if self.release_time is not None:
            self.validate_pattern(self.release_time, 'release_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.state, 'state')
        self.validate_required(self.tenant_id, 'tenant_id')
        if self.created_time is not None:
            self.validate_pattern(self.created_time, 'created_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modified_time is not None:
            self.validate_pattern(self.modified_time, 'modified_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.comment is not None:
            result['comment'] = self.comment
        if self.id is not None:
            result['id'] = self.id
        if self.operator_id is not None:
            result['operator_id'] = self.operator_id
        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.release_time is not None:
            result['release_time'] = self.release_time
        if self.state is not None:
            result['state'] = self.state
        if self.tenant_id is not None:
            result['tenant_id'] = self.tenant_id
        if self.tpl_version is not None:
            result['tpl_version'] = self.tpl_version
        if self.created_time is not None:
            result['created_time'] = self.created_time
        if self.modified_time is not None:
            result['modified_time'] = self.modified_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('comment') is not None:
            self.comment = m.get('comment')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('operator_id') is not None:
            self.operator_id = m.get('operator_id')
        self.params = []
        if m.get('params') is not None:
            for k in m.get('params'):
                temp_model = TemplateParamDef()
                self.params.append(temp_model.from_map(k))
        if m.get('release_time') is not None:
            self.release_time = m.get('release_time')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('tenant_id') is not None:
            self.tenant_id = m.get('tenant_id')
        if m.get('tpl_version') is not None:
            self.tpl_version = m.get('tpl_version')
        if m.get('created_time') is not None:
            self.created_time = m.get('created_time')
        if m.get('modified_time') is not None:
            self.modified_time = m.get('modified_time')
        return self


class AggregateExecutableProgress(TeaModel):
    def __init__(
        self,
        base_progress: ResourceGroupExecutionProgress = None,
        bg_release_progresses: List[BGReleaseExecutionProgress] = None,
        app_service_progresses: List[AppServiceExecutionProgressWithRollbackInfo] = None,
        common_progresses: List[ResourceGroupExecutionProgress] = None,
    ):
        # base_progress
        self.base_progress = base_progress
        # bg_release_progresses
        self.bg_release_progresses = bg_release_progresses
        # app_service_progresses
        self.app_service_progresses = app_service_progresses
        # common_progresses
        self.common_progresses = common_progresses

    def validate(self):
        self.validate_required(self.base_progress, 'base_progress')
        if self.base_progress:
            self.base_progress.validate()
        self.validate_required(self.bg_release_progresses, 'bg_release_progresses')
        if self.bg_release_progresses:
            for k in self.bg_release_progresses:
                if k:
                    k.validate()
        self.validate_required(self.app_service_progresses, 'app_service_progresses')
        if self.app_service_progresses:
            for k in self.app_service_progresses:
                if k:
                    k.validate()
        self.validate_required(self.common_progresses, 'common_progresses')
        if self.common_progresses:
            for k in self.common_progresses:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.base_progress is not None:
            result['base_progress'] = self.base_progress.to_map()
        result['bg_release_progresses'] = []
        if self.bg_release_progresses is not None:
            for k in self.bg_release_progresses:
                result['bg_release_progresses'].append(k.to_map() if k else None)
        result['app_service_progresses'] = []
        if self.app_service_progresses is not None:
            for k in self.app_service_progresses:
                result['app_service_progresses'].append(k.to_map() if k else None)
        result['common_progresses'] = []
        if self.common_progresses is not None:
            for k in self.common_progresses:
                result['common_progresses'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('base_progress') is not None:
            temp_model = ResourceGroupExecutionProgress()
            self.base_progress = temp_model.from_map(m['base_progress'])
        self.bg_release_progresses = []
        if m.get('bg_release_progresses') is not None:
            for k in m.get('bg_release_progresses'):
                temp_model = BGReleaseExecutionProgress()
                self.bg_release_progresses.append(temp_model.from_map(k))
        self.app_service_progresses = []
        if m.get('app_service_progresses') is not None:
            for k in m.get('app_service_progresses'):
                temp_model = AppServiceExecutionProgressWithRollbackInfo()
                self.app_service_progresses.append(temp_model.from_map(k))
        self.common_progresses = []
        if m.get('common_progresses') is not None:
            for k in m.get('common_progresses'):
                temp_model = ResourceGroupExecutionProgress()
                self.common_progresses.append(temp_model.from_map(k))
        return self


class Connection(TeaModel):
    def __init__(
        self,
        id: int = None,
        tenant_id: str = None,
        identity: str = None,
        name: str = None,
        plug: ConnectionStub = None,
        socket: ConnectionStub = None,
        access_key: str = None,
        access_secret: str = None,
        created_time: str = None,
        modified_time: str = None,
        executor: str = None,
        status: str = None,
    ):
        # id
        self.id = id
        # tenantId
        self.tenant_id = tenant_id
        # identity
        self.identity = identity
        # name
        self.name = name
        # plug
        self.plug = plug
        # socket
        self.socket = socket
        # accessKey
        self.access_key = access_key
        # accessSecret
        self.access_secret = access_secret
        # 创建时间
        self.created_time = created_time
        # 修改时间
        self.modified_time = modified_time
        # executor
        self.executor = executor
        # status
        self.status = status

    def validate(self):
        if self.plug:
            self.plug.validate()
        if self.socket:
            self.socket.validate()
        if self.created_time is not None:
            self.validate_pattern(self.created_time, 'created_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modified_time is not None:
            self.validate_pattern(self.modified_time, 'modified_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.tenant_id is not None:
            result['tenant_id'] = self.tenant_id
        if self.identity is not None:
            result['identity'] = self.identity
        if self.name is not None:
            result['name'] = self.name
        if self.plug is not None:
            result['plug'] = self.plug.to_map()
        if self.socket is not None:
            result['socket'] = self.socket.to_map()
        if self.access_key is not None:
            result['access_key'] = self.access_key
        if self.access_secret is not None:
            result['access_secret'] = self.access_secret
        if self.created_time is not None:
            result['created_time'] = self.created_time
        if self.modified_time is not None:
            result['modified_time'] = self.modified_time
        if self.executor is not None:
            result['executor'] = self.executor
        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('id') is not None:
            self.id = m.get('id')
        if m.get('tenant_id') is not None:
            self.tenant_id = m.get('tenant_id')
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('plug') is not None:
            temp_model = ConnectionStub()
            self.plug = temp_model.from_map(m['plug'])
        if m.get('socket') is not None:
            temp_model = ConnectionStub()
            self.socket = temp_model.from_map(m['socket'])
        if m.get('access_key') is not None:
            self.access_key = m.get('access_key')
        if m.get('access_secret') is not None:
            self.access_secret = m.get('access_secret')
        if m.get('created_time') is not None:
            self.created_time = m.get('created_time')
        if m.get('modified_time') is not None:
            self.modified_time = m.get('modified_time')
        if m.get('executor') is not None:
            self.executor = m.get('executor')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class DeploymentZone(TeaModel):
    def __init__(
        self,
        id: str = None,
        name: str = None,
        display_name: str = None,
        description: str = None,
        workspace_id: str = None,
        workspace_group_id: str = None,
        status: str = None,
        master_zone_id: str = None,
        appended_zone_ids: List[str] = None,
        cells: List[Cell] = None,
    ):
        # id
        self.id = id
        # 名称
        self.name = name
        # 显示名
        self.display_name = display_name
        # 描述
        self.description = description
        # 环境 id
        self.workspace_id = workspace_id
        # 工作空间组 id
        self.workspace_group_id = workspace_group_id
        # 状态
        self.status = status
        # 主可用区 ID
        self.master_zone_id = master_zone_id
        # 附属可用区 ID
        self.appended_zone_ids = appended_zone_ids
        # 包含部署单元
        self.cells = cells

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.name, 'name')
        self.validate_required(self.display_name, 'display_name')
        self.validate_required(self.description, 'description')
        self.validate_required(self.workspace_id, 'workspace_id')
        self.validate_required(self.workspace_group_id, 'workspace_group_id')
        self.validate_required(self.status, 'status')
        self.validate_required(self.master_zone_id, 'master_zone_id')
        self.validate_required(self.appended_zone_ids, 'appended_zone_ids')
        self.validate_required(self.cells, 'cells')
        if self.cells:
            for k in self.cells:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.description is not None:
            result['description'] = self.description
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        if self.workspace_group_id is not None:
            result['workspace_group_id'] = self.workspace_group_id
        if self.status is not None:
            result['status'] = self.status
        if self.master_zone_id is not None:
            result['master_zone_id'] = self.master_zone_id
        if self.appended_zone_ids is not None:
            result['appended_zone_ids'] = self.appended_zone_ids
        result['cells'] = []
        if self.cells is not None:
            for k in self.cells:
                result['cells'].append(k.to_map() if k else None)
        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('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        if m.get('workspace_group_id') is not None:
            self.workspace_group_id = m.get('workspace_group_id')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('master_zone_id') is not None:
            self.master_zone_id = m.get('master_zone_id')
        if m.get('appended_zone_ids') is not None:
            self.appended_zone_ids = m.get('appended_zone_ids')
        self.cells = []
        if m.get('cells') is not None:
            for k in m.get('cells'):
                temp_model = Cell()
                self.cells.append(temp_model.from_map(k))
        return self


class Repository(TeaModel):
    def __init__(
        self,
        name: str = None,
        type: str = None,
        url: str = None,
        owner_login_name: str = None,
        owner_display_name: str = None,
        created_time: str = None,
    ):
        # 代码库名字
        self.name = name
        # 代码库类型，svn或者git
        self.type = type
        # 代码库地址
        self.url = url
        # 代码库负责人登录名称
        self.owner_login_name = owner_login_name
        # 代码库负责人显示名称
        self.owner_display_name = owner_display_name
        # 创建时间
        self.created_time = created_time

    def validate(self):
        self.validate_required(self.name, 'name')
        if self.created_time is not None:
            self.validate_pattern(self.created_time, 'created_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.type is not None:
            result['type'] = self.type
        if self.url is not None:
            result['url'] = self.url
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        if self.owner_display_name is not None:
            result['owner_display_name'] = self.owner_display_name
        if self.created_time is not None:
            result['created_time'] = self.created_time
        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('type') is not None:
            self.type = m.get('type')
        if m.get('url') is not None:
            self.url = m.get('url')
        if m.get('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        if m.get('owner_display_name') is not None:
            self.owner_display_name = m.get('owner_display_name')
        if m.get('created_time') is not None:
            self.created_time = m.get('created_time')
        return self


class Sidecar(TeaModel):
    def __init__(
        self,
        description: str = None,
        gmt_created: str = None,
        gmt_modified: str = None,
        sidecar_name: str = None,
        scope_detail: SidecarScopeDetail = None,
    ):
        # sidecar描述内容
        self.description = description
        # 创建时间
        self.gmt_created = gmt_created
        # 修改时间
        self.gmt_modified = gmt_modified
        # sidecar名称
        self.sidecar_name = sidecar_name
        # scope生效范围详情
        self.scope_detail = scope_detail

    def validate(self):
        self.validate_required(self.gmt_created, 'gmt_created')
        if self.gmt_created is not None:
            self.validate_pattern(self.gmt_created, 'gmt_created', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.gmt_modified, 'gmt_modified')
        if self.gmt_modified is not None:
            self.validate_pattern(self.gmt_modified, 'gmt_modified', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.sidecar_name, 'sidecar_name')
        self.validate_required(self.scope_detail, 'scope_detail')
        if self.scope_detail:
            self.scope_detail.validate()

    def to_map(self):
        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.gmt_created is not None:
            result['gmt_created'] = self.gmt_created
        if self.gmt_modified is not None:
            result['gmt_modified'] = self.gmt_modified
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        if self.scope_detail is not None:
            result['scope_detail'] = self.scope_detail.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('gmt_created') is not None:
            self.gmt_created = m.get('gmt_created')
        if m.get('gmt_modified') is not None:
            self.gmt_modified = m.get('gmt_modified')
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        if m.get('scope_detail') is not None:
            temp_model = SidecarScopeDetail()
            self.scope_detail = temp_model.from_map(m['scope_detail'])
        return self


class ExecutorProgress(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        request_ids: List[str] = None,
        status: str = None,
        result_msg: str = None,
    ):
        # 请求 ID
        self.request_id = request_id
        # 请求 ID 列表
        self.request_ids = request_ids
        # 状态
        self.status = status
        # 错误信息
        self.result_msg = result_msg

    def validate(self):
        self.validate_required(self.status, 'status')
        self.validate_required(self.result_msg, 'result_msg')

    def to_map(self):
        result = dict()
        if self.request_id is not None:
            result['request_id'] = self.request_id
        if self.request_ids is not None:
            result['request_ids'] = self.request_ids
        if self.status is not None:
            result['status'] = self.status
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('request_id') is not None:
            self.request_id = m.get('request_id')
        if m.get('request_ids') is not None:
            self.request_ids = m.get('request_ids')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        return self


class BuildpackDetailVO(TeaModel):
    def __init__(
        self,
        app_service_count: int = None,
        available_tenant_names: List[str] = None,
        buildpack_params: List[BuildpackParamTemplate] = None,
        build_command: str = None,
        build_command_params: List[BuildCommandParams] = None,
        contact_info: str = None,
        created_from: str = None,
        creation_chain: List[str] = None,
        creation_time: str = None,
        creator: UserDTO = None,
        debug_mode: bool = None,
        depracation_note: str = None,
        description: str = None,
        extra_info: str = None,
        full_version: str = None,
        id: str = None,
        industry_label: str = None,
        major_version: int = None,
        minor_version: int = None,
        modification_time: str = None,
        origin_type: str = None,
        patch_version: int = None,
        publication_time: str = None,
        publisher: UserDTO = None,
        scope: str = None,
        status: str = None,
        storage_upload_endpoints: List[UploadEndpoint] = None,
        supported_os: List[BuildpackOS] = None,
        supported_regions: List[BuildpackRegionRelationDetail] = None,
        techstack: Techstack = None,
        tenant_id: str = None,
    ):
        # appServiceCount
        self.app_service_count = app_service_count
        # availableTenantNames
        self.available_tenant_names = available_tenant_names
        # buildpack_params
        self.buildpack_params = buildpack_params
        # buildCommand
        self.build_command = build_command
        # build_commandp_params
        self.build_command_params = build_command_params
        # contactInfo
        self.contact_info = contact_info
        # createdFrom
        self.created_from = created_from
        # creationChain
        self.creation_chain = creation_chain
        # creationTime
        self.creation_time = creation_time
        # creator
        self.creator = creator
        # debugMode
        self.debug_mode = debug_mode
        # depracationNote
        self.depracation_note = depracation_note
        # description
        self.description = description
        # extraInfo
        self.extra_info = extra_info
        # fullVersion
        self.full_version = full_version
        # id
        self.id = id
        # industryLabel
        self.industry_label = industry_label
        # majorVersion
        self.major_version = major_version
        # minorVersion
        self.minor_version = minor_version
        # modificationTime
        self.modification_time = modification_time
        # originType
        self.origin_type = origin_type
        # patchVersion
        self.patch_version = patch_version
        # publicationTime
        self.publication_time = publication_time
        # publisher
        self.publisher = publisher
        # scope
        self.scope = scope
        # status
        self.status = status
        # storageUploadEndpoints
        self.storage_upload_endpoints = storage_upload_endpoints
        # supportedOS
        self.supported_os = supported_os
        # supportedRegions
        self.supported_regions = supported_regions
        # techstack
        self.techstack = techstack
        # tenantId
        self.tenant_id = tenant_id

    def validate(self):
        if self.buildpack_params:
            for k in self.buildpack_params:
                if k:
                    k.validate()
        if self.build_command_params:
            for k in self.build_command_params:
                if k:
                    k.validate()
        if self.creation_time is not None:
            self.validate_pattern(self.creation_time, 'creation_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.creator:
            self.creator.validate()
        if self.modification_time is not None:
            self.validate_pattern(self.modification_time, 'modification_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.publication_time is not None:
            self.validate_pattern(self.publication_time, 'publication_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.publisher:
            self.publisher.validate()
        if self.storage_upload_endpoints:
            for k in self.storage_upload_endpoints:
                if k:
                    k.validate()
        if self.supported_os:
            for k in self.supported_os:
                if k:
                    k.validate()
        if self.supported_regions:
            for k in self.supported_regions:
                if k:
                    k.validate()
        if self.techstack:
            self.techstack.validate()

    def to_map(self):
        result = dict()
        if self.app_service_count is not None:
            result['app_service_count'] = self.app_service_count
        if self.available_tenant_names is not None:
            result['available_tenant_names'] = self.available_tenant_names
        result['buildpack_params'] = []
        if self.buildpack_params is not None:
            for k in self.buildpack_params:
                result['buildpack_params'].append(k.to_map() if k else None)
        if self.build_command is not None:
            result['build_command'] = self.build_command
        result['build_command_params'] = []
        if self.build_command_params is not None:
            for k in self.build_command_params:
                result['build_command_params'].append(k.to_map() if k else None)
        if self.contact_info is not None:
            result['contact_info'] = self.contact_info
        if self.created_from is not None:
            result['created_from'] = self.created_from
        if self.creation_chain is not None:
            result['creation_chain'] = self.creation_chain
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.creator is not None:
            result['creator'] = self.creator.to_map()
        if self.debug_mode is not None:
            result['debug_mode'] = self.debug_mode
        if self.depracation_note is not None:
            result['depracation_note'] = self.depracation_note
        if self.description is not None:
            result['description'] = self.description
        if self.extra_info is not None:
            result['extra_info'] = self.extra_info
        if self.full_version is not None:
            result['full_version'] = self.full_version
        if self.id is not None:
            result['id'] = self.id
        if self.industry_label is not None:
            result['industry_label'] = self.industry_label
        if self.major_version is not None:
            result['major_version'] = self.major_version
        if self.minor_version is not None:
            result['minor_version'] = self.minor_version
        if self.modification_time is not None:
            result['modification_time'] = self.modification_time
        if self.origin_type is not None:
            result['origin_type'] = self.origin_type
        if self.patch_version is not None:
            result['patch_version'] = self.patch_version
        if self.publication_time is not None:
            result['publication_time'] = self.publication_time
        if self.publisher is not None:
            result['publisher'] = self.publisher.to_map()
        if self.scope is not None:
            result['scope'] = self.scope
        if self.status is not None:
            result['status'] = self.status
        result['storage_upload_endpoints'] = []
        if self.storage_upload_endpoints is not None:
            for k in self.storage_upload_endpoints:
                result['storage_upload_endpoints'].append(k.to_map() if k else None)
        result['supported_o_s'] = []
        if self.supported_os is not None:
            for k in self.supported_os:
                result['supported_o_s'].append(k.to_map() if k else None)
        result['supported_regions'] = []
        if self.supported_regions is not None:
            for k in self.supported_regions:
                result['supported_regions'].append(k.to_map() if k else None)
        if self.techstack is not None:
            result['techstack'] = self.techstack.to_map()
        if self.tenant_id is not None:
            result['tenant_id'] = self.tenant_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_service_count') is not None:
            self.app_service_count = m.get('app_service_count')
        if m.get('available_tenant_names') is not None:
            self.available_tenant_names = m.get('available_tenant_names')
        self.buildpack_params = []
        if m.get('buildpack_params') is not None:
            for k in m.get('buildpack_params'):
                temp_model = BuildpackParamTemplate()
                self.buildpack_params.append(temp_model.from_map(k))
        if m.get('build_command') is not None:
            self.build_command = m.get('build_command')
        self.build_command_params = []
        if m.get('build_command_params') is not None:
            for k in m.get('build_command_params'):
                temp_model = BuildCommandParams()
                self.build_command_params.append(temp_model.from_map(k))
        if m.get('contact_info') is not None:
            self.contact_info = m.get('contact_info')
        if m.get('created_from') is not None:
            self.created_from = m.get('created_from')
        if m.get('creation_chain') is not None:
            self.creation_chain = m.get('creation_chain')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('creator') is not None:
            temp_model = UserDTO()
            self.creator = temp_model.from_map(m['creator'])
        if m.get('debug_mode') is not None:
            self.debug_mode = m.get('debug_mode')
        if m.get('depracation_note') is not None:
            self.depracation_note = m.get('depracation_note')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('extra_info') is not None:
            self.extra_info = m.get('extra_info')
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('industry_label') is not None:
            self.industry_label = m.get('industry_label')
        if m.get('major_version') is not None:
            self.major_version = m.get('major_version')
        if m.get('minor_version') is not None:
            self.minor_version = m.get('minor_version')
        if m.get('modification_time') is not None:
            self.modification_time = m.get('modification_time')
        if m.get('origin_type') is not None:
            self.origin_type = m.get('origin_type')
        if m.get('patch_version') is not None:
            self.patch_version = m.get('patch_version')
        if m.get('publication_time') is not None:
            self.publication_time = m.get('publication_time')
        if m.get('publisher') is not None:
            temp_model = UserDTO()
            self.publisher = temp_model.from_map(m['publisher'])
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('status') is not None:
            self.status = m.get('status')
        self.storage_upload_endpoints = []
        if m.get('storage_upload_endpoints') is not None:
            for k in m.get('storage_upload_endpoints'):
                temp_model = UploadEndpoint()
                self.storage_upload_endpoints.append(temp_model.from_map(k))
        self.supported_os = []
        if m.get('supported_o_s') is not None:
            for k in m.get('supported_o_s'):
                temp_model = BuildpackOS()
                self.supported_os.append(temp_model.from_map(k))
        self.supported_regions = []
        if m.get('supported_regions') is not None:
            for k in m.get('supported_regions'):
                temp_model = BuildpackRegionRelationDetail()
                self.supported_regions.append(temp_model.from_map(k))
        if m.get('techstack') is not None:
            temp_model = Techstack()
            self.techstack = temp_model.from_map(m['techstack'])
        if m.get('tenant_id') is not None:
            self.tenant_id = m.get('tenant_id')
        return self


class Application(TeaModel):
    def __init__(
        self,
        depends: List[str] = None,
        name: str = None,
        service_name: str = None,
        version: str = None,
        custom_params_map: str = None,
    ):
        # 应用部署时依赖的应用名称，只允许取此次调用参数中列出的应用。不允许形成循环依赖。
        self.depends = depends
        # 执行部署操作的目标应用名称，应用名称最大60个UTF-8字符
        self.name = name
        # 执行部署操作的目标应用服务名称，应用服务名称最大60个UTF-8字符
        self.service_name = service_name
        # 执行部署操作的目标应用版本。如果某个应用未指定版本，则使用最新版本部署。
        self.version = version
        # 自定义参数 jsonStr Map<String,List<String>>
        self.custom_params_map = custom_params_map

    def validate(self):
        self.validate_required(self.name, 'name')
        self.validate_required(self.service_name, 'service_name')

    def to_map(self):
        result = dict()
        if self.depends is not None:
            result['depends'] = self.depends
        if self.name is not None:
            result['name'] = self.name
        if self.service_name is not None:
            result['service_name'] = self.service_name
        if self.version is not None:
            result['version'] = self.version
        if self.custom_params_map is not None:
            result['custom_params_map'] = self.custom_params_map
        return result

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


class OpsTaskExecutionDetail(TeaModel):
    def __init__(
        self,
        task_id: str = None,
        request_token: str = None,
        node_id: str = None,
        request_id: str = None,
        execution_count: int = None,
        execution_state: str = None,
        target_id: str = None,
        error_code: str = None,
        result_msg: str = None,
        started_time: str = None,
        finished_time: str = None,
        standalone_executable: bool = None,
        id: str = None,
    ):
        # task_id
        self.task_id = task_id
        # request_token
        self.request_token = request_token
        # node_id
        self.node_id = node_id
        # request_id
        self.request_id = request_id
        # execution_count
        self.execution_count = execution_count
        # executionState
        self.execution_state = execution_state
        # target_id
        self.target_id = target_id
        # error_code
        self.error_code = error_code
        # result_msg
        self.result_msg = result_msg
        # startedTime
        self.started_time = started_time
        # finished_time
        self.finished_time = finished_time
        # standalone_executable
        self.standalone_executable = standalone_executable
        # id
        self.id = id

    def validate(self):
        self.validate_required(self.task_id, 'task_id')
        self.validate_required(self.request_token, 'request_token')
        self.validate_required(self.node_id, 'node_id')
        self.validate_required(self.request_id, 'request_id')
        self.validate_required(self.execution_count, 'execution_count')
        self.validate_required(self.execution_state, 'execution_state')
        self.validate_required(self.target_id, 'target_id')
        self.validate_required(self.error_code, 'error_code')
        self.validate_required(self.result_msg, 'result_msg')
        self.validate_required(self.started_time, 'started_time')
        if self.started_time is not None:
            self.validate_pattern(self.started_time, 'started_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.finished_time, 'finished_time')
        if self.finished_time is not None:
            self.validate_pattern(self.finished_time, 'finished_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.standalone_executable, 'standalone_executable')
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.task_id is not None:
            result['task_id'] = self.task_id
        if self.request_token is not None:
            result['request_token'] = self.request_token
        if self.node_id is not None:
            result['node_id'] = self.node_id
        if self.request_id is not None:
            result['request_id'] = self.request_id
        if self.execution_count is not None:
            result['execution_count'] = self.execution_count
        if self.execution_state is not None:
            result['execution_state'] = self.execution_state
        if self.target_id is not None:
            result['target_id'] = self.target_id
        if self.error_code is not None:
            result['error_code'] = self.error_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.started_time is not None:
            result['started_time'] = self.started_time
        if self.finished_time is not None:
            result['finished_time'] = self.finished_time
        if self.standalone_executable is not None:
            result['standalone_executable'] = self.standalone_executable
        if self.id is not None:
            result['id'] = self.id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('task_id') is not None:
            self.task_id = m.get('task_id')
        if m.get('request_token') is not None:
            self.request_token = m.get('request_token')
        if m.get('node_id') is not None:
            self.node_id = m.get('node_id')
        if m.get('request_id') is not None:
            self.request_id = m.get('request_id')
        if m.get('execution_count') is not None:
            self.execution_count = m.get('execution_count')
        if m.get('execution_state') is not None:
            self.execution_state = m.get('execution_state')
        if m.get('target_id') is not None:
            self.target_id = m.get('target_id')
        if m.get('error_code') is not None:
            self.error_code = m.get('error_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('started_time') is not None:
            self.started_time = m.get('started_time')
        if m.get('finished_time') is not None:
            self.finished_time = m.get('finished_time')
        if m.get('standalone_executable') is not None:
            self.standalone_executable = m.get('standalone_executable')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class CmdExecResult(TeaModel):
    def __init__(
        self,
        err_msg: str = None,
        finish_time: int = None,
        results: List[SingleExecResult] = None,
        start_time: int = None,
        status: str = None,
    ):
        # 错误信息。内容为指令无法下发到机器上的详细原因
        self.err_msg = err_msg
        # 执行结束时间
        self.finish_time = finish_time
        # 执行的结果
        self.results = results
        # 执行开始时间
        self.start_time = start_time
        # 执行结果状态。取值列表：
        # EXECUTING：执行中；
        # SUCCESS：执行成功；
        # FAILED：执行失败；
        # IGNORED：已忽略；
        # TIME_OUT：已超时
        # 
        self.status = status

    def validate(self):
        if self.results:
            for k in self.results:
                if k:
                    k.validate()
        self.validate_required(self.status, 'status')

    def to_map(self):
        result = dict()
        if self.err_msg is not None:
            result['err_msg'] = self.err_msg
        if self.finish_time is not None:
            result['finish_time'] = self.finish_time
        result['results'] = []
        if self.results is not None:
            for k in self.results:
                result['results'].append(k.to_map() if k else None)
        if self.start_time is not None:
            result['start_time'] = self.start_time
        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('err_msg') is not None:
            self.err_msg = m.get('err_msg')
        if m.get('finish_time') is not None:
            self.finish_time = m.get('finish_time')
        self.results = []
        if m.get('results') is not None:
            for k in m.get('results'):
                temp_model = SingleExecResult()
                self.results.append(temp_model.from_map(k))
        if m.get('start_time') is not None:
            self.start_time = m.get('start_time')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class SLBMountInfo(TeaModel):
    def __init__(
        self,
        iaas_id: str = None,
        id: str = None,
        name: str = None,
        vip_addresses: List[str] = None,
        mount_weights: List[MountWeight] = None,
        v_server_group_mount_info_list: List[VServerGroupMountInfo] = None,
    ):
        # iaas id
        self.iaas_id = iaas_id
        # slb id
        self.id = id
        # SLB 名
        self.name = name
        # vip 地址
        self.vip_addresses = vip_addresses
        # 挂载权重
        self.mount_weights = mount_weights
        # 虚拟服务器组挂载信息
        self.v_server_group_mount_info_list = v_server_group_mount_info_list

    def validate(self):
        self.validate_required(self.iaas_id, 'iaas_id')
        self.validate_required(self.id, 'id')
        self.validate_required(self.name, 'name')
        self.validate_required(self.vip_addresses, 'vip_addresses')
        self.validate_required(self.mount_weights, 'mount_weights')
        if self.mount_weights:
            for k in self.mount_weights:
                if k:
                    k.validate()
        self.validate_required(self.v_server_group_mount_info_list, 'v_server_group_mount_info_list')
        if self.v_server_group_mount_info_list:
            for k in self.v_server_group_mount_info_list:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.iaas_id is not None:
            result['iaas_id'] = self.iaas_id
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        if self.vip_addresses is not None:
            result['vip_addresses'] = self.vip_addresses
        result['mount_weights'] = []
        if self.mount_weights is not None:
            for k in self.mount_weights:
                result['mount_weights'].append(k.to_map() if k else None)
        result['v_server_group_mount_info_list'] = []
        if self.v_server_group_mount_info_list is not None:
            for k in self.v_server_group_mount_info_list:
                result['v_server_group_mount_info_list'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('iaas_id') is not None:
            self.iaas_id = m.get('iaas_id')
        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('vip_addresses') is not None:
            self.vip_addresses = m.get('vip_addresses')
        self.mount_weights = []
        if m.get('mount_weights') is not None:
            for k in m.get('mount_weights'):
                temp_model = MountWeight()
                self.mount_weights.append(temp_model.from_map(k))
        self.v_server_group_mount_info_list = []
        if m.get('v_server_group_mount_info_list') is not None:
            for k in m.get('v_server_group_mount_info_list'):
                temp_model = VServerGroupMountInfo()
                self.v_server_group_mount_info_list.append(temp_model.from_map(k))
        return self


class BuildpackParam(TeaModel):
    def __init__(
        self,
        default_value: str = None,
        key: str = None,
        readonly: bool = None,
        required: bool = None,
        description: str = None,
    ):
        # default_value
        self.default_value = default_value
        # key
        self.key = key
        # readonly
        self.readonly = readonly
        # required
        self.required = required
        # description
        self.description = description

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.default_value is not None:
            result['default_value'] = self.default_value
        if self.key is not None:
            result['key'] = self.key
        if self.readonly is not None:
            result['readonly'] = self.readonly
        if self.required is not None:
            result['required'] = self.required
        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('default_value') is not None:
            self.default_value = m.get('default_value')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('readonly') is not None:
            self.readonly = m.get('readonly')
        if m.get('required') is not None:
            self.required = m.get('required')
        if m.get('description') is not None:
            self.description = m.get('description')
        return self


class AppServiceCount(TeaModel):
    def __init__(
        self,
        classic_count: int = None,
        container_count: int = None,
        serverless_count: int = None,
    ):
        # 经典容器服务数量
        self.classic_count = classic_count
        # 容器应用服务数量
        self.container_count = container_count
        # 无服务器应用服务数
        self.serverless_count = serverless_count

    def validate(self):
        self.validate_required(self.classic_count, 'classic_count')
        self.validate_required(self.container_count, 'container_count')
        self.validate_required(self.serverless_count, 'serverless_count')

    def to_map(self):
        result = dict()
        if self.classic_count is not None:
            result['classic_count'] = self.classic_count
        if self.container_count is not None:
            result['container_count'] = self.container_count
        if self.serverless_count is not None:
            result['serverless_count'] = self.serverless_count
        return result

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


class DepracationNotePayload(TeaModel):
    def __init__(
        self,
        depracation_note: str = None,
    ):
        # depracationNote
        self.depracation_note = depracation_note

    def validate(self):
        pass

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

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


class AppVersion(TeaModel):
    def __init__(
        self,
        app_id: str = None,
        branch: str = None,
        build_type: str = None,
        code_version: str = None,
        description: str = None,
        error_code: str = None,
        error_msg: str = None,
        etag: str = None,
        id: str = None,
        status: str = None,
        task_id: str = None,
        utc_create: str = None,
        version: str = None,
        workspace_id: str = None,
    ):
        # 所属应用id `内部id对用户无用，不应返回，应使用应用名称`
        self.app_id = app_id
        # 从源代码构建时标识代码分支，上传新版本时为空 `混淆了应用版本和编译任务；目前没必要返回`
        self.branch = branch
        # 应用发布包构建类型:**scm**(源代码构建)，**upload_file**(发布包上传包括本地上传和从某个文件交换源上传) `混淆了应用版本和编译任务；目前没必要返回`
        # 
        self.build_type = build_type
        # 从源代码构建时标识代码版本，上传新版本时为空 `混淆了应用版本和编译任务；目前没必要返回`
        self.code_version = code_version
        # 版本描述
        self.description = description
        # 新版本构建的错误码，成功则为空 `混淆了应用版本和编译任务`
        self.error_code = error_code
        # 新版本构建的错误提示信息，成功则为空 `混淆了应用版本和编译任务`
        self.error_msg = error_msg
        # 构建成功后标识应用发布包的md5
        self.etag = etag
        # 应用版本id `内部id对用户无用，不应返回`
        self.id = id
        # 应用构建状态:**doing**(进行中),**success**(成功),**failed**(失败)
        self.status = status
        # 本次应用发布包构建后台任务的id `混淆了应用版本和构建任务，应使用2个不同的模型`
        self.task_id = task_id
        # 创建时间 `命名建议为create_time`
        self.utc_create = utc_create
        # 应用版本号
        self.version = version
        # 所属工作空间 `内部id对用户无用，不应返回，应使用workspace unique名称`
        self.workspace_id = workspace_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.branch is not None:
            result['branch'] = self.branch
        if self.build_type is not None:
            result['build_type'] = self.build_type
        if self.code_version is not None:
            result['code_version'] = self.code_version
        if self.description is not None:
            result['description'] = self.description
        if self.error_code is not None:
            result['error_code'] = self.error_code
        if self.error_msg is not None:
            result['error_msg'] = self.error_msg
        if self.etag is not None:
            result['etag'] = self.etag
        if self.id is not None:
            result['id'] = self.id
        if self.status is not None:
            result['status'] = self.status
        if self.task_id is not None:
            result['task_id'] = self.task_id
        if self.utc_create is not None:
            result['utc_create'] = self.utc_create
        if self.version is not None:
            result['version'] = self.version
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('branch') is not None:
            self.branch = m.get('branch')
        if m.get('build_type') is not None:
            self.build_type = m.get('build_type')
        if m.get('code_version') is not None:
            self.code_version = m.get('code_version')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('error_code') is not None:
            self.error_code = m.get('error_code')
        if m.get('error_msg') is not None:
            self.error_msg = m.get('error_msg')
        if m.get('etag') is not None:
            self.etag = m.get('etag')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('task_id') is not None:
            self.task_id = m.get('task_id')
        if m.get('utc_create') is not None:
            self.utc_create = m.get('utc_create')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        return self


class OpsCmd(TeaModel):
    def __init__(
        self,
        args: List[OpsCmdArg] = None,
        retry_interval: int = None,
        retry_times: int = None,
        template_id: str = None,
        time_out: int = None,
    ):
        # 执行指令的参数列表
        self.args = args
        # 失败重试的间隔，单位为秒
        self.retry_interval = retry_interval
        # 失败重试次数
        self.retry_times = retry_times
        # 指令模板ID
        self.template_id = template_id
        # 单次执行的超时时间，单位为秒
        self.time_out = time_out

    def validate(self):
        if self.args:
            for k in self.args:
                if k:
                    k.validate()
        self.validate_required(self.template_id, 'template_id')

    def to_map(self):
        result = dict()
        result['args'] = []
        if self.args is not None:
            for k in self.args:
                result['args'].append(k.to_map() if k else None)
        if self.retry_interval is not None:
            result['retry_interval'] = self.retry_interval
        if self.retry_times is not None:
            result['retry_times'] = self.retry_times
        if self.template_id is not None:
            result['template_id'] = self.template_id
        if self.time_out is not None:
            result['time_out'] = self.time_out
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.args = []
        if m.get('args') is not None:
            for k in m.get('args'):
                temp_model = OpsCmdArg()
                self.args.append(temp_model.from_map(k))
        if m.get('retry_interval') is not None:
            self.retry_interval = m.get('retry_interval')
        if m.get('retry_times') is not None:
            self.retry_times = m.get('retry_times')
        if m.get('template_id') is not None:
            self.template_id = m.get('template_id')
        if m.get('time_out') is not None:
            self.time_out = m.get('time_out')
        return self


class OpsTask(TeaModel):
    def __init__(
        self,
        parent_group_id: str = None,
        service_id: str = None,
        arrangement_id: str = None,
        action_handler_code: str = None,
        max_retry_attempts: int = None,
        context: List[Pair] = None,
        process_definition_id: str = None,
        parent_id: str = None,
        parent_entity_type: str = None,
        state: str = None,
        started_time: str = None,
        finished_time: str = None,
        standalone_executable: bool = None,
        id: str = None,
    ):
        # parent_group_id
        self.parent_group_id = parent_group_id
        # service_id
        self.service_id = service_id
        # arrangement_id
        self.arrangement_id = arrangement_id
        # action_handler_code
        self.action_handler_code = action_handler_code
        # max_retry_attempts
        self.max_retry_attempts = max_retry_attempts
        # context
        self.context = context
        # process_definition_id
        self.process_definition_id = process_definition_id
        # parent_id
        self.parent_id = parent_id
        # parent_entity_type
        self.parent_entity_type = parent_entity_type
        # state
        self.state = state
        # started_time
        self.started_time = started_time
        # finished_time
        self.finished_time = finished_time
        # standalone_executable
        self.standalone_executable = standalone_executable
        # id
        self.id = id

    def validate(self):
        self.validate_required(self.parent_group_id, 'parent_group_id')
        self.validate_required(self.service_id, 'service_id')
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.action_handler_code, 'action_handler_code')
        self.validate_required(self.max_retry_attempts, 'max_retry_attempts')
        self.validate_required(self.context, 'context')
        if self.context:
            for k in self.context:
                if k:
                    k.validate()
        self.validate_required(self.process_definition_id, 'process_definition_id')
        self.validate_required(self.parent_id, 'parent_id')
        self.validate_required(self.parent_entity_type, 'parent_entity_type')
        self.validate_required(self.state, 'state')
        self.validate_required(self.started_time, 'started_time')
        if self.started_time is not None:
            self.validate_pattern(self.started_time, 'started_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.finished_time, 'finished_time')
        if self.finished_time is not None:
            self.validate_pattern(self.finished_time, 'finished_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.standalone_executable, 'standalone_executable')
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.parent_group_id is not None:
            result['parent_group_id'] = self.parent_group_id
        if self.service_id is not None:
            result['service_id'] = self.service_id
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.action_handler_code is not None:
            result['action_handler_code'] = self.action_handler_code
        if self.max_retry_attempts is not None:
            result['max_retry_attempts'] = self.max_retry_attempts
        result['context'] = []
        if self.context is not None:
            for k in self.context:
                result['context'].append(k.to_map() if k else None)
        if self.process_definition_id is not None:
            result['process_definition_id'] = self.process_definition_id
        if self.parent_id is not None:
            result['parent_id'] = self.parent_id
        if self.parent_entity_type is not None:
            result['parent_entity_type'] = self.parent_entity_type
        if self.state is not None:
            result['state'] = self.state
        if self.started_time is not None:
            result['started_time'] = self.started_time
        if self.finished_time is not None:
            result['finished_time'] = self.finished_time
        if self.standalone_executable is not None:
            result['standalone_executable'] = self.standalone_executable
        if self.id is not None:
            result['id'] = self.id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('parent_group_id') is not None:
            self.parent_group_id = m.get('parent_group_id')
        if m.get('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('action_handler_code') is not None:
            self.action_handler_code = m.get('action_handler_code')
        if m.get('max_retry_attempts') is not None:
            self.max_retry_attempts = m.get('max_retry_attempts')
        self.context = []
        if m.get('context') is not None:
            for k in m.get('context'):
                temp_model = Pair()
                self.context.append(temp_model.from_map(k))
        if m.get('process_definition_id') is not None:
            self.process_definition_id = m.get('process_definition_id')
        if m.get('parent_id') is not None:
            self.parent_id = m.get('parent_id')
        if m.get('parent_entity_type') is not None:
            self.parent_entity_type = m.get('parent_entity_type')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('started_time') is not None:
            self.started_time = m.get('started_time')
        if m.get('finished_time') is not None:
            self.finished_time = m.get('finished_time')
        if m.get('standalone_executable') is not None:
            self.standalone_executable = m.get('standalone_executable')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class RenderParam(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
        type: str = None,
        desc: str = None,
        data_level: str = None,
        render_vals: List[ParamVal] = None,
    ):
        # 参数名
        self.key = key
        # 参数值，可能是一个常量或者表达式
        self.value = value
        # 参数值类型，CONST/EXPR
        self.type = type
        # 参数描述
        self.desc = desc
        # 数据保密级别，L1,L2,L3
        self.data_level = data_level
        # 参数渲染后的值
        self.render_vals = render_vals

    def validate(self):
        self.validate_required(self.key, 'key')
        self.validate_required(self.value, 'value')
        self.validate_required(self.type, 'type')
        self.validate_required(self.data_level, 'data_level')
        self.validate_required(self.render_vals, 'render_vals')
        if self.render_vals:
            for k in self.render_vals:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.key is not None:
            result['key'] = self.key
        if self.value is not None:
            result['value'] = self.value
        if self.type is not None:
            result['type'] = self.type
        if self.desc is not None:
            result['desc'] = self.desc
        if self.data_level is not None:
            result['data_level'] = self.data_level
        result['render_vals'] = []
        if self.render_vals is not None:
            for k in self.render_vals:
                result['render_vals'].append(k.to_map() if k else None)
        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')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('desc') is not None:
            self.desc = m.get('desc')
        if m.get('data_level') is not None:
            self.data_level = m.get('data_level')
        self.render_vals = []
        if m.get('render_vals') is not None:
            for k in m.get('render_vals'):
                temp_model = ParamVal()
                self.render_vals.append(temp_model.from_map(k))
        return self


class BuildpackAdapter(TeaModel):
    def __init__(
        self,
        buildpack_arch: str = None,
        full_version: str = None,
        supported_os: List[BuildpackOS] = None,
        supported_regions: List[BuildpackRegionRelationDetail] = None,
        techstack: Techstack = None,
    ):
        # buildpackArch
        self.buildpack_arch = buildpack_arch
        # fullVersion
        self.full_version = full_version
        # supportedOS
        self.supported_os = supported_os
        # supportedRegions
        self.supported_regions = supported_regions
        # techstack
        self.techstack = techstack

    def validate(self):
        if self.supported_os:
            for k in self.supported_os:
                if k:
                    k.validate()
        if self.supported_regions:
            for k in self.supported_regions:
                if k:
                    k.validate()
        if self.techstack:
            self.techstack.validate()

    def to_map(self):
        result = dict()
        if self.buildpack_arch is not None:
            result['buildpack_arch'] = self.buildpack_arch
        if self.full_version is not None:
            result['full_version'] = self.full_version
        result['supported_o_s'] = []
        if self.supported_os is not None:
            for k in self.supported_os:
                result['supported_o_s'].append(k.to_map() if k else None)
        result['supported_regions'] = []
        if self.supported_regions is not None:
            for k in self.supported_regions:
                result['supported_regions'].append(k.to_map() if k else None)
        if self.techstack is not None:
            result['techstack'] = self.techstack.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('buildpack_arch') is not None:
            self.buildpack_arch = m.get('buildpack_arch')
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        self.supported_os = []
        if m.get('supported_o_s') is not None:
            for k in m.get('supported_o_s'):
                temp_model = BuildpackOS()
                self.supported_os.append(temp_model.from_map(k))
        self.supported_regions = []
        if m.get('supported_regions') is not None:
            for k in m.get('supported_regions'):
                temp_model = BuildpackRegionRelationDetail()
                self.supported_regions.append(temp_model.from_map(k))
        if m.get('techstack') is not None:
            temp_model = Techstack()
            self.techstack = temp_model.from_map(m['techstack'])
        return self


class AppServiceEnvParam(TeaModel):
    def __init__(
        self,
        app_id: str = None,
        app_service_id: str = None,
        baseline_buildpack_id: str = None,
        creation_time: str = None,
        default_value: str = None,
        description: str = None,
        id: str = None,
        key: str = None,
        modification_time: str = None,
        original_default_value: str = None,
        original_description: str = None,
        original_readonly: str = None,
        original_required: bool = None,
        readonly: bool = None,
        required: bool = None,
        status: str = None,
        value: str = None,
        workspace_id: str = None,
    ):
        # app_id
        self.app_id = app_id
        # app_service_id
        self.app_service_id = app_service_id
        # baseline_buildpack_id
        self.baseline_buildpack_id = baseline_buildpack_id
        # creation_time
        self.creation_time = creation_time
        # default_value
        self.default_value = default_value
        # description
        self.description = description
        # id
        self.id = id
        # key
        self.key = key
        # modification_time
        self.modification_time = modification_time
        # original_default_value
        self.original_default_value = original_default_value
        # original_description
        self.original_description = original_description
        # original_readonly
        self.original_readonly = original_readonly
        # original_required
        self.original_required = original_required
        # readonly
        self.readonly = readonly
        # required
        self.required = required
        # status
        self.status = status
        # value
        self.value = value
        # workspace_id
        self.workspace_id = workspace_id

    def validate(self):
        if self.creation_time is not None:
            self.validate_pattern(self.creation_time, 'creation_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time is not None:
            self.validate_pattern(self.modification_time, 'modification_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.app_service_id is not None:
            result['app_service_id'] = self.app_service_id
        if self.baseline_buildpack_id is not None:
            result['baseline_buildpack_id'] = self.baseline_buildpack_id
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.default_value is not None:
            result['default_value'] = self.default_value
        if self.description is not None:
            result['description'] = self.description
        if self.id is not None:
            result['id'] = self.id
        if self.key is not None:
            result['key'] = self.key
        if self.modification_time is not None:
            result['modification_time'] = self.modification_time
        if self.original_default_value is not None:
            result['original_default_value'] = self.original_default_value
        if self.original_description is not None:
            result['original_description'] = self.original_description
        if self.original_readonly is not None:
            result['original_readonly'] = self.original_readonly
        if self.original_required is not None:
            result['original_required'] = self.original_required
        if self.readonly is not None:
            result['readonly'] = self.readonly
        if self.required is not None:
            result['required'] = self.required
        if self.status is not None:
            result['status'] = self.status
        if self.value is not None:
            result['value'] = self.value
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('app_service_id') is not None:
            self.app_service_id = m.get('app_service_id')
        if m.get('baseline_buildpack_id') is not None:
            self.baseline_buildpack_id = m.get('baseline_buildpack_id')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('default_value') is not None:
            self.default_value = m.get('default_value')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('modification_time') is not None:
            self.modification_time = m.get('modification_time')
        if m.get('original_default_value') is not None:
            self.original_default_value = m.get('original_default_value')
        if m.get('original_description') is not None:
            self.original_description = m.get('original_description')
        if m.get('original_readonly') is not None:
            self.original_readonly = m.get('original_readonly')
        if m.get('original_required') is not None:
            self.original_required = m.get('original_required')
        if m.get('readonly') is not None:
            self.readonly = m.get('readonly')
        if m.get('required') is not None:
            self.required = m.get('required')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('value') is not None:
            self.value = m.get('value')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        return self


class Role(TeaModel):
    def __init__(
        self,
        id: str = None,
        name: str = None,
        description: str = None,
    ):
        # id
        self.id = id
        # name
        self.name = name
        # description
        self.description = description

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.name, 'name')
        self.validate_required(self.description, 'description')

    def to_map(self):
        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        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('id') is not None:
            self.id = m.get('id')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('description') is not None:
            self.description = m.get('description')
        return self


class BuildpackAppService(TeaModel):
    def __init__(
        self,
        app_id: str = None,
        app_name: str = None,
        buildpack_full_version: str = None,
        buildpack_id: str = None,
        cell_ids: List[str] = None,
        description: str = None,
        extend_properties: str = None,
        id: str = None,
        is_default: bool = None,
        is_service: bool = None,
        last_deploy_status: str = None,
        last_deploy_version: str = None,
        last_ops_order_id: str = None,
        name: str = None,
        owner_id: str = None,
        techstack_id: int = None,
        techstack_identity: str = None,
        techstack_name: str = None,
        utc_create: str = None,
        utc_modified: str = None,
        workspace_id: str = None,
    ):
        # appId
        self.app_id = app_id
        # appName
        self.app_name = app_name
        # buildpackFullVersion
        self.buildpack_full_version = buildpack_full_version
        # buildpackId
        self.buildpack_id = buildpack_id
        # cellIds
        self.cell_ids = cell_ids
        # description
        self.description = description
        # extendProperties
        self.extend_properties = extend_properties
        # id
        self.id = id
        # isDefault
        self.is_default = is_default
        # isService
        self.is_service = is_service
        # lastDeployStatus
        self.last_deploy_status = last_deploy_status
        # lastDeployVersion
        self.last_deploy_version = last_deploy_version
        # lastOpsOrderId
        self.last_ops_order_id = last_ops_order_id
        # name
        self.name = name
        # ownerId
        self.owner_id = owner_id
        # techstackId
        self.techstack_id = techstack_id
        # techstackIdentity
        self.techstack_identity = techstack_identity
        # techstackName
        self.techstack_name = techstack_name
        # utcCreate
        self.utc_create = utc_create
        # utcModified
        self.utc_modified = utc_modified
        # workspaceId
        self.workspace_id = workspace_id

    def validate(self):
        self.validate_required(self.id, 'id')
        if self.utc_create is not None:
            self.validate_pattern(self.utc_create, 'utc_create', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.utc_modified is not None:
            self.validate_pattern(self.utc_modified, 'utc_modified', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.buildpack_full_version is not None:
            result['buildpack_full_version'] = self.buildpack_full_version
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        if self.cell_ids is not None:
            result['cell_ids'] = self.cell_ids
        if self.description is not None:
            result['description'] = self.description
        if self.extend_properties is not None:
            result['extend_properties'] = self.extend_properties
        if self.id is not None:
            result['id'] = self.id
        if self.is_default is not None:
            result['is_default'] = self.is_default
        if self.is_service is not None:
            result['is_service'] = self.is_service
        if self.last_deploy_status is not None:
            result['last_deploy_status'] = self.last_deploy_status
        if self.last_deploy_version is not None:
            result['last_deploy_version'] = self.last_deploy_version
        if self.last_ops_order_id is not None:
            result['last_ops_order_id'] = self.last_ops_order_id
        if self.name is not None:
            result['name'] = self.name
        if self.owner_id is not None:
            result['owner_id'] = self.owner_id
        if self.techstack_id is not None:
            result['techstack_id'] = self.techstack_id
        if self.techstack_identity is not None:
            result['techstack_identity'] = self.techstack_identity
        if self.techstack_name is not None:
            result['techstack_name'] = self.techstack_name
        if self.utc_create is not None:
            result['utc_create'] = self.utc_create
        if self.utc_modified is not None:
            result['utc_modified'] = self.utc_modified
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('buildpack_full_version') is not None:
            self.buildpack_full_version = m.get('buildpack_full_version')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        if m.get('cell_ids') is not None:
            self.cell_ids = m.get('cell_ids')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('extend_properties') is not None:
            self.extend_properties = m.get('extend_properties')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('is_default') is not None:
            self.is_default = m.get('is_default')
        if m.get('is_service') is not None:
            self.is_service = m.get('is_service')
        if m.get('last_deploy_status') is not None:
            self.last_deploy_status = m.get('last_deploy_status')
        if m.get('last_deploy_version') is not None:
            self.last_deploy_version = m.get('last_deploy_version')
        if m.get('last_ops_order_id') is not None:
            self.last_ops_order_id = m.get('last_ops_order_id')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('owner_id') is not None:
            self.owner_id = m.get('owner_id')
        if m.get('techstack_id') is not None:
            self.techstack_id = m.get('techstack_id')
        if m.get('techstack_identity') is not None:
            self.techstack_identity = m.get('techstack_identity')
        if m.get('techstack_name') is not None:
            self.techstack_name = m.get('techstack_name')
        if m.get('utc_create') is not None:
            self.utc_create = m.get('utc_create')
        if m.get('utc_modified') is not None:
            self.utc_modified = m.get('utc_modified')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        return self


class DeployView(TeaModel):
    def __init__(
        self,
        workspace_app_services: List[AppServiceEntity] = None,
        workspace_display_name: str = None,
        workspace_id: str = None,
        workspace_name: str = None,
    ):
        # 当前 workspace 下的所有应用服务
        self.workspace_app_services = workspace_app_services
        # workspace 显示名称
        self.workspace_display_name = workspace_display_name
        # workspace id
        self.workspace_id = workspace_id
        # workspace 名称
        self.workspace_name = workspace_name

    def validate(self):
        self.validate_required(self.workspace_app_services, 'workspace_app_services')
        if self.workspace_app_services:
            for k in self.workspace_app_services:
                if k:
                    k.validate()
        self.validate_required(self.workspace_display_name, 'workspace_display_name')
        self.validate_required(self.workspace_id, 'workspace_id')

    def to_map(self):
        result = dict()
        result['workspace_app_services'] = []
        if self.workspace_app_services is not None:
            for k in self.workspace_app_services:
                result['workspace_app_services'].append(k.to_map() if k else None)
        if self.workspace_display_name is not None:
            result['workspace_display_name'] = self.workspace_display_name
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        if self.workspace_name is not None:
            result['workspace_name'] = self.workspace_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.workspace_app_services = []
        if m.get('workspace_app_services') is not None:
            for k in m.get('workspace_app_services'):
                temp_model = AppServiceEntity()
                self.workspace_app_services.append(temp_model.from_map(k))
        if m.get('workspace_display_name') is not None:
            self.workspace_display_name = m.get('workspace_display_name')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        if m.get('workspace_name') is not None:
            self.workspace_name = m.get('workspace_name')
        return self


class SidecarRule(TeaModel):
    def __init__(
        self,
        description: str = None,
        gmt_created: str = None,
        gmt_modified: str = None,
        instance_name: str = None,
        level: int = None,
        scope_detail: SidecarScopeDetail = None,
        sidecar_version_instance_id: str = None,
        status: int = None,
        status_reason: str = None,
    ):
        # sidecar规则描述
        self.description = description
        # 创建时间
        self.gmt_created = gmt_created
        # 修改时间
        self.gmt_modified = gmt_modified
        # 版本实例名称
        self.instance_name = instance_name
        # 规则优先级
        self.level = level
        # scope生效范围详情
        self.scope_detail = scope_detail
        # sidecar版本实例id
        self.sidecar_version_instance_id = sidecar_version_instance_id
        # 规则状态
        self.status = status
        # 发布、下线、废弃原因
        # 
        self.status_reason = status_reason

    def validate(self):
        self.validate_required(self.gmt_created, 'gmt_created')
        if self.gmt_created is not None:
            self.validate_pattern(self.gmt_created, 'gmt_created', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.gmt_modified, 'gmt_modified')
        if self.gmt_modified is not None:
            self.validate_pattern(self.gmt_modified, 'gmt_modified', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.instance_name, 'instance_name')
        self.validate_required(self.level, 'level')
        self.validate_required(self.scope_detail, 'scope_detail')
        if self.scope_detail:
            self.scope_detail.validate()
        self.validate_required(self.sidecar_version_instance_id, 'sidecar_version_instance_id')
        self.validate_required(self.status, 'status')

    def to_map(self):
        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.gmt_created is not None:
            result['gmt_created'] = self.gmt_created
        if self.gmt_modified is not None:
            result['gmt_modified'] = self.gmt_modified
        if self.instance_name is not None:
            result['instance_name'] = self.instance_name
        if self.level is not None:
            result['level'] = self.level
        if self.scope_detail is not None:
            result['scope_detail'] = self.scope_detail.to_map()
        if self.sidecar_version_instance_id is not None:
            result['sidecar_version_instance_id'] = self.sidecar_version_instance_id
        if self.status is not None:
            result['status'] = self.status
        if self.status_reason is not None:
            result['status_reason'] = self.status_reason
        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('gmt_created') is not None:
            self.gmt_created = m.get('gmt_created')
        if m.get('gmt_modified') is not None:
            self.gmt_modified = m.get('gmt_modified')
        if m.get('instance_name') is not None:
            self.instance_name = m.get('instance_name')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('scope_detail') is not None:
            temp_model = SidecarScopeDetail()
            self.scope_detail = temp_model.from_map(m['scope_detail'])
        if m.get('sidecar_version_instance_id') is not None:
            self.sidecar_version_instance_id = m.get('sidecar_version_instance_id')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('status_reason') is not None:
            self.status_reason = m.get('status_reason')
        return self


class SupportedRegion(TeaModel):
    def __init__(
        self,
        file_size: int = None,
        file_status: str = None,
        original_file_name: str = None,
        region_num: str = None,
    ):
        # file_size
        self.file_size = file_size
        # file_status
        self.file_status = file_status
        # original_file_name
        self.original_file_name = original_file_name
        # region_id
        self.region_num = region_num

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.file_size is not None:
            result['file_size'] = self.file_size
        if self.file_status is not None:
            result['file_status'] = self.file_status
        if self.original_file_name is not None:
            result['original_file_name'] = self.original_file_name
        if self.region_num is not None:
            result['region_num'] = self.region_num
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('file_size') is not None:
            self.file_size = m.get('file_size')
        if m.get('file_status') is not None:
            self.file_status = m.get('file_status')
        if m.get('original_file_name') is not None:
            self.original_file_name = m.get('original_file_name')
        if m.get('region_num') is not None:
            self.region_num = m.get('region_num')
        return self


class TaskResult(TeaModel):
    def __init__(
        self,
        result: str = None,
        target_id: str = None,
    ):
        # 任务执行结果。取值：
        # SUCCESSFUL：任务执行成功；
        # FAILED：任务执行失败
        # 
        self.result = result
        # 任务目标id，如：一个Computer的id
        self.target_id = target_id

    def validate(self):
        pass

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

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


class AppParam(TeaModel):
    def __init__(
        self,
        app_name: str = None,
        created_time: str = None,
        data_level: str = None,
        desc: str = None,
        id: str = None,
        key: str = None,
        modified_time: str = None,
        param_version: int = None,
        scope: str = None,
        scope_id: str = None,
        tenant_id: str = None,
        type: str = None,
        value: str = None,
    ):
        # 应用名称
        self.app_name = app_name
        # 创建时间
        self.created_time = created_time
        # 数据保密等级
        self.data_level = data_level
        # 参数描述
        self.desc = desc
        # 应用参数 id
        self.id = id
        # 参数名
        self.key = key
        # 修改时间
        self.modified_time = modified_time
        # 版本
        self.param_version = param_version
        # 该参数属于哪个 scope
        self.scope = scope
        # 该参数在该 scope 中的 id
        self.scope_id = scope_id
        # 租户 id
        self.tenant_id = tenant_id
        # 参数类型
        self.type = type
        # 参数值
        self.value = value

    def validate(self):
        self.validate_required(self.app_name, 'app_name')
        if self.created_time is not None:
            self.validate_pattern(self.created_time, 'created_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.data_level, 'data_level')
        self.validate_required(self.key, 'key')
        if self.modified_time is not None:
            self.validate_pattern(self.modified_time, 'modified_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_id, 'scope_id')
        self.validate_required(self.tenant_id, 'tenant_id')
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.created_time is not None:
            result['created_time'] = self.created_time
        if self.data_level is not None:
            result['data_level'] = self.data_level
        if self.desc is not None:
            result['desc'] = self.desc
        if self.id is not None:
            result['id'] = self.id
        if self.key is not None:
            result['key'] = self.key
        if self.modified_time is not None:
            result['modified_time'] = self.modified_time
        if self.param_version is not None:
            result['param_version'] = self.param_version
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_id is not None:
            result['scope_id'] = self.scope_id
        if self.tenant_id is not None:
            result['tenant_id'] = self.tenant_id
        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('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('created_time') is not None:
            self.created_time = m.get('created_time')
        if m.get('data_level') is not None:
            self.data_level = m.get('data_level')
        if m.get('desc') is not None:
            self.desc = m.get('desc')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('modified_time') is not None:
            self.modified_time = m.get('modified_time')
        if m.get('param_version') is not None:
            self.param_version = m.get('param_version')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_id') is not None:
            self.scope_id = m.get('scope_id')
        if m.get('tenant_id') is not None:
            self.tenant_id = m.get('tenant_id')
        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 SidecarVersionInstance(TeaModel):
    def __init__(
        self,
        description: str = None,
        gmt_created: str = None,
        gmt_modified: str = None,
        instance_name: str = None,
        params: str = None,
        params_configs: List[SidecarParamsConfig] = None,
        release_note: str = None,
        scope_detail: SidecarScopeDetail = None,
        sidecar_name: str = None,
        sidecar_release_version_id: str = None,
        sidecar_version: str = None,
        sidecar_version_instance_id: str = None,
        status: int = None,
        status_reason: str = None,
        template: str = None,
        template_configs: List[SidecarTemplateConfig] = None,
    ):
        # 版本实例描述
        self.description = description
        # 创建时间
        self.gmt_created = gmt_created
        # 修改时间
        self.gmt_modified = gmt_modified
        # 版本实例名称
        self.instance_name = instance_name
        # 环境参数模板
        self.params = params
        # sidecar参数配置
        self.params_configs = params_configs
        # sidecar版本发布说明
        self.release_note = release_note
        # scope生效范围详情
        self.scope_detail = scope_detail
        # sidecar名称
        self.sidecar_name = sidecar_name
        # sidecar版本id
        self.sidecar_release_version_id = sidecar_release_version_id
        # sidecar版本号
        self.sidecar_version = sidecar_version
        # sidecar版本实例id
        self.sidecar_version_instance_id = sidecar_version_instance_id
        # 版本实例状态
        self.status = status
        # 发布、下线、废弃原因
        # 
        self.status_reason = status_reason
        # sidecar版本模板
        self.template = template
        # sidecar模板配置
        self.template_configs = template_configs

    def validate(self):
        self.validate_required(self.description, 'description')
        self.validate_required(self.gmt_created, 'gmt_created')
        if self.gmt_created is not None:
            self.validate_pattern(self.gmt_created, 'gmt_created', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.gmt_modified, 'gmt_modified')
        if self.gmt_modified is not None:
            self.validate_pattern(self.gmt_modified, 'gmt_modified', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.instance_name, 'instance_name')
        if self.params_configs:
            for k in self.params_configs:
                if k:
                    k.validate()
        self.validate_required(self.release_note, 'release_note')
        self.validate_required(self.scope_detail, 'scope_detail')
        if self.scope_detail:
            self.scope_detail.validate()
        self.validate_required(self.sidecar_name, 'sidecar_name')
        self.validate_required(self.sidecar_release_version_id, 'sidecar_release_version_id')
        self.validate_required(self.sidecar_version, 'sidecar_version')
        self.validate_required(self.sidecar_version_instance_id, 'sidecar_version_instance_id')
        self.validate_required(self.status, 'status')
        self.validate_required(self.template, 'template')
        self.validate_required(self.template_configs, 'template_configs')
        if self.template_configs:
            for k in self.template_configs:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.gmt_created is not None:
            result['gmt_created'] = self.gmt_created
        if self.gmt_modified is not None:
            result['gmt_modified'] = self.gmt_modified
        if self.instance_name is not None:
            result['instance_name'] = self.instance_name
        if self.params is not None:
            result['params'] = self.params
        result['params_configs'] = []
        if self.params_configs is not None:
            for k in self.params_configs:
                result['params_configs'].append(k.to_map() if k else None)
        if self.release_note is not None:
            result['release_note'] = self.release_note
        if self.scope_detail is not None:
            result['scope_detail'] = self.scope_detail.to_map()
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        if self.sidecar_release_version_id is not None:
            result['sidecar_release_version_id'] = self.sidecar_release_version_id
        if self.sidecar_version is not None:
            result['sidecar_version'] = self.sidecar_version
        if self.sidecar_version_instance_id is not None:
            result['sidecar_version_instance_id'] = self.sidecar_version_instance_id
        if self.status is not None:
            result['status'] = self.status
        if self.status_reason is not None:
            result['status_reason'] = self.status_reason
        if self.template is not None:
            result['template'] = self.template
        result['template_configs'] = []
        if self.template_configs is not None:
            for k in self.template_configs:
                result['template_configs'].append(k.to_map() if k else None)
        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('gmt_created') is not None:
            self.gmt_created = m.get('gmt_created')
        if m.get('gmt_modified') is not None:
            self.gmt_modified = m.get('gmt_modified')
        if m.get('instance_name') is not None:
            self.instance_name = m.get('instance_name')
        if m.get('params') is not None:
            self.params = m.get('params')
        self.params_configs = []
        if m.get('params_configs') is not None:
            for k in m.get('params_configs'):
                temp_model = SidecarParamsConfig()
                self.params_configs.append(temp_model.from_map(k))
        if m.get('release_note') is not None:
            self.release_note = m.get('release_note')
        if m.get('scope_detail') is not None:
            temp_model = SidecarScopeDetail()
            self.scope_detail = temp_model.from_map(m['scope_detail'])
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        if m.get('sidecar_release_version_id') is not None:
            self.sidecar_release_version_id = m.get('sidecar_release_version_id')
        if m.get('sidecar_version') is not None:
            self.sidecar_version = m.get('sidecar_version')
        if m.get('sidecar_version_instance_id') is not None:
            self.sidecar_version_instance_id = m.get('sidecar_version_instance_id')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('status_reason') is not None:
            self.status_reason = m.get('status_reason')
        if m.get('template') is not None:
            self.template = m.get('template')
        self.template_configs = []
        if m.get('template_configs') is not None:
            for k in m.get('template_configs'):
                temp_model = SidecarTemplateConfig()
                self.template_configs.append(temp_model.from_map(k))
        return self


class BuildpackRegionRelation(TeaModel):
    def __init__(
        self,
        buildpack_id: str = None,
        buildpack_tenant_id: str = None,
        file_checksum: str = None,
        file_location: str = None,
        file_size: int = None,
        file_status: str = None,
        original_file_name: str = None,
        readable_file_size: str = None,
        region_id: str = None,
        region_identity: str = None,
        region_name: str = None,
        storage_type: str = None,
    ):
        # 技术栈版本的id
        self.buildpack_id = buildpack_id
        # 技术栈租户ID
        self.buildpack_tenant_id = buildpack_tenant_id
        # 文件的checksum
        self.file_checksum = file_checksum
        # 文件存储地址
        self.file_location = file_location
        # 文件大小，类似1100
        self.file_size = file_size
        # 文件状态
        self.file_status = file_status
        # 文件的初始名称
        self.original_file_name = original_file_name
        # 文件可读的大小，类似1.1MB
        self.readable_file_size = readable_file_size
        # region的ID
        self.region_id = region_id
        # region的标识符
        self.region_identity = region_identity
        # region的名称
        self.region_name = region_name
        # 存储类型，取值如下： SYSTEM_AFS表示AFS存储，SYSTEM_OSS表示OSS存储
        self.storage_type = storage_type

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        if self.buildpack_tenant_id is not None:
            result['buildpack_tenant_id'] = self.buildpack_tenant_id
        if self.file_checksum is not None:
            result['file_checksum'] = self.file_checksum
        if self.file_location is not None:
            result['file_location'] = self.file_location
        if self.file_size is not None:
            result['file_size'] = self.file_size
        if self.file_status is not None:
            result['file_status'] = self.file_status
        if self.original_file_name is not None:
            result['original_file_name'] = self.original_file_name
        if self.readable_file_size is not None:
            result['readable_file_size'] = self.readable_file_size
        if self.region_id is not None:
            result['region_id'] = self.region_id
        if self.region_identity is not None:
            result['region_identity'] = self.region_identity
        if self.region_name is not None:
            result['region_name'] = self.region_name
        if self.storage_type is not None:
            result['storage_type'] = self.storage_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        if m.get('buildpack_tenant_id') is not None:
            self.buildpack_tenant_id = m.get('buildpack_tenant_id')
        if m.get('file_checksum') is not None:
            self.file_checksum = m.get('file_checksum')
        if m.get('file_location') is not None:
            self.file_location = m.get('file_location')
        if m.get('file_size') is not None:
            self.file_size = m.get('file_size')
        if m.get('file_status') is not None:
            self.file_status = m.get('file_status')
        if m.get('original_file_name') is not None:
            self.original_file_name = m.get('original_file_name')
        if m.get('readable_file_size') is not None:
            self.readable_file_size = m.get('readable_file_size')
        if m.get('region_id') is not None:
            self.region_id = m.get('region_id')
        if m.get('region_identity') is not None:
            self.region_identity = m.get('region_identity')
        if m.get('region_name') is not None:
            self.region_name = m.get('region_name')
        if m.get('storage_type') is not None:
            self.storage_type = m.get('storage_type')
        return self


class RegionMeta(TeaModel):
    def __init__(
        self,
        available_network_types: List[str] = None,
        display_name: str = None,
        id: str = None,
        paas_id: str = None,
        region_iaas_id: str = None,
        zone_ids: List[str] = None,
        state: str = None,
    ):
        # region支持的网络类型
        self.available_network_types = available_network_types
        # region display name
        self.display_name = display_name
        # region identity
        self.id = id
        # region paas id
        self.paas_id = paas_id
        # region iaas id
        self.region_iaas_id = region_iaas_id
        # region包含的所有zone id列表
        self.zone_ids = zone_ids
        # region state.
        self.state = state

    def validate(self):
        self.validate_required(self.state, 'state')

    def to_map(self):
        result = dict()
        if self.available_network_types is not None:
            result['available_network_types'] = self.available_network_types
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.id is not None:
            result['id'] = self.id
        if self.paas_id is not None:
            result['paas_id'] = self.paas_id
        if self.region_iaas_id is not None:
            result['region_iaas_id'] = self.region_iaas_id
        if self.zone_ids is not None:
            result['zone_ids'] = self.zone_ids
        if self.state is not None:
            result['state'] = self.state
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('available_network_types') is not None:
            self.available_network_types = m.get('available_network_types')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('paas_id') is not None:
            self.paas_id = m.get('paas_id')
        if m.get('region_iaas_id') is not None:
            self.region_iaas_id = m.get('region_iaas_id')
        if m.get('zone_ids') is not None:
            self.zone_ids = m.get('zone_ids')
        if m.get('state') is not None:
            self.state = m.get('state')
        return self


class WorkspaceGroup(TeaModel):
    def __init__(
        self,
        id: str = None,
        name: str = None,
        status: str = None,
        tenant: str = None,
        workspaces: List[str] = None,
    ):
        # 环境名称
        self.id = id
        # 环境显示名称
        self.name = name
        # 环境状态
        self.status = status
        # 租户名称
        self.tenant = tenant
        # 工作空间名称列表
        self.workspaces = workspaces

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        if self.status is not None:
            result['status'] = self.status
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.workspaces is not None:
            result['workspaces'] = self.workspaces
        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('status') is not None:
            self.status = m.get('status')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspaces') is not None:
            self.workspaces = m.get('workspaces')
        return self


class AggregatedTaskExecutionProgress(TeaModel):
    def __init__(
        self,
        error_task_execution_nodes: List[ErrorTaskExecutionNode] = None,
        task_execution_progress: TaskExecutionProgress = None,
    ):
        # 错误节点信息
        self.error_task_execution_nodes = error_task_execution_nodes
        # 任务执行进度
        self.task_execution_progress = task_execution_progress

    def validate(self):
        self.validate_required(self.error_task_execution_nodes, 'error_task_execution_nodes')
        if self.error_task_execution_nodes:
            for k in self.error_task_execution_nodes:
                if k:
                    k.validate()
        self.validate_required(self.task_execution_progress, 'task_execution_progress')
        if self.task_execution_progress:
            self.task_execution_progress.validate()

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

    def from_map(self, m: dict = None):
        m = m or dict()
        self.error_task_execution_nodes = []
        if m.get('error_task_execution_nodes') is not None:
            for k in m.get('error_task_execution_nodes'):
                temp_model = ErrorTaskExecutionNode()
                self.error_task_execution_nodes.append(temp_model.from_map(k))
        if m.get('task_execution_progress') is not None:
            temp_model = TaskExecutionProgress()
            self.task_execution_progress = temp_model.from_map(m['task_execution_progress'])
        return self


class OpsPlan(TeaModel):
    def __init__(
        self,
        auto_execution: bool = None,
        context: List[Pair] = None,
        description: str = None,
        enable_notification: bool = None,
        executor_id: str = None,
        executor_name: str = None,
        finished_time: str = None,
        id: str = None,
        last_operator: str = None,
        message_detail: List[Pair] = None,
        message_params: str = None,
        name: str = None,
        ops_type: str = None,
        process_definitions: List[OpsProcessDefinition] = None,
        release_mode: str = None,
        rollback_plan_id: str = None,
        standalone_executable: bool = None,
        started_time: str = None,
        state: str = None,
        time_series_id: str = None,
    ):
        # 是否自动执行
        self.auto_execution = auto_execution
        # 上下文
        self.context = context
        # 描述
        self.description = description
        # 是否开启通知
        self.enable_notification = enable_notification
        # 执行人 ID
        self.executor_id = executor_id
        # 执行人
        self.executor_name = executor_name
        # 完成时间
        self.finished_time = finished_time
        # ID
        self.id = id
        # last operator
        self.last_operator = last_operator
        # 详情
        self.message_detail = message_detail
        # 信息
        self.message_params = message_params
        # 名称
        self.name = name
        # 类型
        self.ops_type = ops_type
        # 发布进程
        self.process_definitions = process_definitions
        # release_mode
        self.release_mode = release_mode
        # 回滚单ID
        self.rollback_plan_id = rollback_plan_id
        # 是否可独立执行
        self.standalone_executable = standalone_executable
        # 开始时间
        self.started_time = started_time
        # 状态
        self.state = state
        # 发布单 ID
        self.time_series_id = time_series_id

    def validate(self):
        if self.context:
            for k in self.context:
                if k:
                    k.validate()
        if self.finished_time is not None:
            self.validate_pattern(self.finished_time, 'finished_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.message_detail:
            for k in self.message_detail:
                if k:
                    k.validate()
        if self.process_definitions:
            for k in self.process_definitions:
                if k:
                    k.validate()
        if self.started_time is not None:
            self.validate_pattern(self.started_time, 'started_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.auto_execution is not None:
            result['auto_execution'] = self.auto_execution
        result['context'] = []
        if self.context is not None:
            for k in self.context:
                result['context'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.enable_notification is not None:
            result['enable_notification'] = self.enable_notification
        if self.executor_id is not None:
            result['executor_id'] = self.executor_id
        if self.executor_name is not None:
            result['executor_name'] = self.executor_name
        if self.finished_time is not None:
            result['finished_time'] = self.finished_time
        if self.id is not None:
            result['id'] = self.id
        if self.last_operator is not None:
            result['last_operator'] = self.last_operator
        result['message_detail'] = []
        if self.message_detail is not None:
            for k in self.message_detail:
                result['message_detail'].append(k.to_map() if k else None)
        if self.message_params is not None:
            result['message_params'] = self.message_params
        if self.name is not None:
            result['name'] = self.name
        if self.ops_type is not None:
            result['ops_type'] = self.ops_type
        result['process_definitions'] = []
        if self.process_definitions is not None:
            for k in self.process_definitions:
                result['process_definitions'].append(k.to_map() if k else None)
        if self.release_mode is not None:
            result['release_mode'] = self.release_mode
        if self.rollback_plan_id is not None:
            result['rollback_plan_id'] = self.rollback_plan_id
        if self.standalone_executable is not None:
            result['standalone_executable'] = self.standalone_executable
        if self.started_time is not None:
            result['started_time'] = self.started_time
        if self.state is not None:
            result['state'] = self.state
        if self.time_series_id is not None:
            result['time_series_id'] = self.time_series_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auto_execution') is not None:
            self.auto_execution = m.get('auto_execution')
        self.context = []
        if m.get('context') is not None:
            for k in m.get('context'):
                temp_model = Pair()
                self.context.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('enable_notification') is not None:
            self.enable_notification = m.get('enable_notification')
        if m.get('executor_id') is not None:
            self.executor_id = m.get('executor_id')
        if m.get('executor_name') is not None:
            self.executor_name = m.get('executor_name')
        if m.get('finished_time') is not None:
            self.finished_time = m.get('finished_time')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('last_operator') is not None:
            self.last_operator = m.get('last_operator')
        self.message_detail = []
        if m.get('message_detail') is not None:
            for k in m.get('message_detail'):
                temp_model = Pair()
                self.message_detail.append(temp_model.from_map(k))
        if m.get('message_params') is not None:
            self.message_params = m.get('message_params')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('ops_type') is not None:
            self.ops_type = m.get('ops_type')
        self.process_definitions = []
        if m.get('process_definitions') is not None:
            for k in m.get('process_definitions'):
                temp_model = OpsProcessDefinition()
                self.process_definitions.append(temp_model.from_map(k))
        if m.get('release_mode') is not None:
            self.release_mode = m.get('release_mode')
        if m.get('rollback_plan_id') is not None:
            self.rollback_plan_id = m.get('rollback_plan_id')
        if m.get('standalone_executable') is not None:
            self.standalone_executable = m.get('standalone_executable')
        if m.get('started_time') is not None:
            self.started_time = m.get('started_time')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('time_series_id') is not None:
            self.time_series_id = m.get('time_series_id')
        return self


class CellGroup(TeaModel):
    def __init__(
        self,
        cells: List[DeployCell] = None,
        datacenter: str = None,
        default_gzone: str = None,
        disaster_info: List[DisasterInfo] = None,
        modified_time: str = None,
        name: str = None,
        operator: str = None,
        region: str = None,
        type: str = None,
    ):
        # 包含部署单元列表
        self.cells = cells
        # 机房名称
        self.datacenter = datacenter
        # 默认全局域
        self.default_gzone = default_gzone
        # 逻辑单元灾备信息
        self.disaster_info = disaster_info
        # 修改时间
        self.modified_time = modified_time
        # 逻辑单元名称
        self.name = name
        # 操作人
        self.operator = operator
        # 所属地域：CZone Group 必填
        self.region = region
        # 逻辑单元类型
        self.type = type

    def validate(self):
        self.validate_required(self.cells, 'cells')
        if self.cells:
            for k in self.cells:
                if k:
                    k.validate()
        self.validate_required(self.disaster_info, 'disaster_info')
        if self.disaster_info:
            for k in self.disaster_info:
                if k:
                    k.validate()
        self.validate_required(self.modified_time, 'modified_time')
        if self.modified_time is not None:
            self.validate_pattern(self.modified_time, 'modified_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.name, 'name')
        self.validate_required(self.operator, 'operator')
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        result['cells'] = []
        if self.cells is not None:
            for k in self.cells:
                result['cells'].append(k.to_map() if k else None)
        if self.datacenter is not None:
            result['datacenter'] = self.datacenter
        if self.default_gzone is not None:
            result['default_gzone'] = self.default_gzone
        result['disaster_info'] = []
        if self.disaster_info is not None:
            for k in self.disaster_info:
                result['disaster_info'].append(k.to_map() if k else None)
        if self.modified_time is not None:
            result['modified_time'] = self.modified_time
        if self.name is not None:
            result['name'] = self.name
        if self.operator is not None:
            result['operator'] = self.operator
        if self.region is not None:
            result['region'] = self.region
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.cells = []
        if m.get('cells') is not None:
            for k in m.get('cells'):
                temp_model = DeployCell()
                self.cells.append(temp_model.from_map(k))
        if m.get('datacenter') is not None:
            self.datacenter = m.get('datacenter')
        if m.get('default_gzone') is not None:
            self.default_gzone = m.get('default_gzone')
        self.disaster_info = []
        if m.get('disaster_info') is not None:
            for k in m.get('disaster_info'):
                temp_model = DisasterInfo()
                self.disaster_info.append(temp_model.from_map(k))
        if m.get('modified_time') is not None:
            self.modified_time = m.get('modified_time')
        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('region') is not None:
            self.region = m.get('region')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class AppServiceBuildpackRelation(TeaModel):
    def __init__(
        self,
        app_id: str = None,
        app_service_id: str = None,
        buildpack_arch: str = None,
        buildpack_full_version: str = None,
        buildpack_id: str = None,
        creation_time: str = None,
        extra_info: str = None,
        id: str = None,
        modification_time: str = None,
        techstack_id: int = None,
        techstack_identity: str = None,
        techstack_name: str = None,
        workspace_id: str = None,
    ):
        # app_id
        self.app_id = app_id
        # app_service_id
        self.app_service_id = app_service_id
        # buildpack_arch
        self.buildpack_arch = buildpack_arch
        # buildpack_full_version
        self.buildpack_full_version = buildpack_full_version
        # buildpack_id
        self.buildpack_id = buildpack_id
        # creation_time
        self.creation_time = creation_time
        # extra_info
        self.extra_info = extra_info
        # id
        self.id = id
        # modification_time
        self.modification_time = modification_time
        # techstack_id
        self.techstack_id = techstack_id
        # techstack_identity
        self.techstack_identity = techstack_identity
        # techstack_name
        self.techstack_name = techstack_name
        # workspace_id
        self.workspace_id = workspace_id

    def validate(self):
        if self.creation_time is not None:
            self.validate_pattern(self.creation_time, 'creation_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time is not None:
            self.validate_pattern(self.modification_time, 'modification_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.app_service_id is not None:
            result['app_service_id'] = self.app_service_id
        if self.buildpack_arch is not None:
            result['buildpack_arch'] = self.buildpack_arch
        if self.buildpack_full_version is not None:
            result['buildpack_full_version'] = self.buildpack_full_version
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.extra_info is not None:
            result['extra_info'] = self.extra_info
        if self.id is not None:
            result['id'] = self.id
        if self.modification_time is not None:
            result['modification_time'] = self.modification_time
        if self.techstack_id is not None:
            result['techstack_id'] = self.techstack_id
        if self.techstack_identity is not None:
            result['techstack_identity'] = self.techstack_identity
        if self.techstack_name is not None:
            result['techstack_name'] = self.techstack_name
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('app_service_id') is not None:
            self.app_service_id = m.get('app_service_id')
        if m.get('buildpack_arch') is not None:
            self.buildpack_arch = m.get('buildpack_arch')
        if m.get('buildpack_full_version') is not None:
            self.buildpack_full_version = m.get('buildpack_full_version')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('extra_info') is not None:
            self.extra_info = m.get('extra_info')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('modification_time') is not None:
            self.modification_time = m.get('modification_time')
        if m.get('techstack_id') is not None:
            self.techstack_id = m.get('techstack_id')
        if m.get('techstack_identity') is not None:
            self.techstack_identity = m.get('techstack_identity')
        if m.get('techstack_name') is not None:
            self.techstack_name = m.get('techstack_name')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        return self


class RegionView(TeaModel):
    def __init__(
        self,
        available_network_types: List[str] = None,
        display_name: str = None,
        id: str = None,
        identity: str = None,
        zones: List[ZoneView] = None,
    ):
        # 支持的网络类型列表
        self.available_network_types = available_network_types
        # 显示名称
        self.display_name = display_name
        # table id
        self.id = id
        # 标识
        self.identity = identity
        # region包含的所有zone 列表
        self.zones = zones

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

    def to_map(self):
        result = dict()
        if self.available_network_types is not None:
            result['available_network_types'] = self.available_network_types
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.id is not None:
            result['id'] = self.id
        if self.identity is not None:
            result['identity'] = self.identity
        result['zones'] = []
        if self.zones is not None:
            for k in self.zones:
                result['zones'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('available_network_types') is not None:
            self.available_network_types = m.get('available_network_types')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        self.zones = []
        if m.get('zones') is not None:
            for k in m.get('zones'):
                temp_model = ZoneView()
                self.zones.append(temp_model.from_map(k))
        return self


class ComputerCell(TeaModel):
    def __init__(
        self,
        cell_id: str = None,
        computer_id: str = None,
    ):
        # 部署单元唯一标识
        self.cell_id = cell_id
        # 计算资源唯一标识
        self.computer_id = computer_id

    def validate(self):
        self.validate_required(self.cell_id, 'cell_id')
        self.validate_required(self.computer_id, 'computer_id')

    def to_map(self):
        result = dict()
        if self.cell_id is not None:
            result['cell_id'] = self.cell_id
        if self.computer_id is not None:
            result['computer_id'] = self.computer_id
        return result

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


class CmdTemplate(TeaModel):
    def __init__(
        self,
        arg_names: List[str] = None,
        content: str = None,
        creator: str = None,
        description: str = None,
        execute_account: str = None,
        id: str = None,
        name: str = None,
        retry_interval: int = None,
        retry_times: int = None,
        time_out: int = None,
        type: str = None,
    ):
        # 指令模板定义的参数名称。比如：./install_env.sh --version 2.2，其中的 --version 就是参数名称
        self.arg_names = arg_names
        # 指令模板内容，可以为一个简单命令，也可是一个自定义脚本
        self.content = content
        # 指令模板创建者，通常为改用户注册蚂蚁金融云的email
        self.creator = creator
        # 指令模板描述
        self.description = description
        # 在机器上执行该指令的账号，比如：root, admin
        self.execute_account = execute_account
        # 指令模板ID
        self.id = id
        # 指令名称
        self.name = name
        # 失败重试的间隔，单位为秒
        self.retry_interval = retry_interval
        # 失败重试次数
        self.retry_times = retry_times
        # 单次执行的超时时间，单位为秒
        self.time_out = time_out
        # 模板类型。目前取值列表：
        # SIMPLE_COMMAND：简单指令类型；
        # CUSTOM_SHELL_SCRIPT：用户自定义shell脚本
        self.type = type

    def validate(self):
        self.validate_required(self.creator, 'creator')
        self.validate_required(self.id, 'id')
        self.validate_required(self.name, 'name')
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        if self.arg_names is not None:
            result['arg_names'] = self.arg_names
        if self.content is not None:
            result['content'] = self.content
        if self.creator is not None:
            result['creator'] = self.creator
        if self.description is not None:
            result['description'] = self.description
        if self.execute_account is not None:
            result['execute_account'] = self.execute_account
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        if self.retry_interval is not None:
            result['retry_interval'] = self.retry_interval
        if self.retry_times is not None:
            result['retry_times'] = self.retry_times
        if self.time_out is not None:
            result['time_out'] = self.time_out
        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('arg_names') is not None:
            self.arg_names = m.get('arg_names')
        if m.get('content') is not None:
            self.content = m.get('content')
        if m.get('creator') is not None:
            self.creator = m.get('creator')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('execute_account') is not None:
            self.execute_account = m.get('execute_account')
        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('retry_interval') is not None:
            self.retry_interval = m.get('retry_interval')
        if m.get('retry_times') is not None:
            self.retry_times = m.get('retry_times')
        if m.get('time_out') is not None:
            self.time_out = m.get('time_out')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class AppPackageListView(TeaModel):
    def __init__(
        self,
        app_id: str = None,
        app_name: str = None,
        package_count: int = None,
        buildpack_id: str = None,
        buildpack_name: str = None,
        buildpack_version: str = None,
        app_owner_id: str = None,
        app_owner_name: str = None,
        latest_package: AppManifest = None,
        app_status: str = None,
    ):
        # appId
        self.app_id = app_id
        # appName
        self.app_name = app_name
        # packageCount
        self.package_count = package_count
        # buildpackId
        self.buildpack_id = buildpack_id
        # buildpackName
        self.buildpack_name = buildpack_name
        # buildpackVersion
        self.buildpack_version = buildpack_version
        # appOwnerId
        self.app_owner_id = app_owner_id
        # appOwnerName
        self.app_owner_name = app_owner_name
        # latestPackage
        self.latest_package = latest_package
        # appStatus
        self.app_status = app_status

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

    def to_map(self):
        result = dict()
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.package_count is not None:
            result['package_count'] = self.package_count
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        if self.buildpack_name is not None:
            result['buildpack_name'] = self.buildpack_name
        if self.buildpack_version is not None:
            result['buildpack_version'] = self.buildpack_version
        if self.app_owner_id is not None:
            result['app_owner_id'] = self.app_owner_id
        if self.app_owner_name is not None:
            result['app_owner_name'] = self.app_owner_name
        if self.latest_package is not None:
            result['latest_package'] = self.latest_package.to_map()
        if self.app_status is not None:
            result['app_status'] = self.app_status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('package_count') is not None:
            self.package_count = m.get('package_count')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        if m.get('buildpack_name') is not None:
            self.buildpack_name = m.get('buildpack_name')
        if m.get('buildpack_version') is not None:
            self.buildpack_version = m.get('buildpack_version')
        if m.get('app_owner_id') is not None:
            self.app_owner_id = m.get('app_owner_id')
        if m.get('app_owner_name') is not None:
            self.app_owner_name = m.get('app_owner_name')
        if m.get('latest_package') is not None:
            temp_model = AppManifest()
            self.latest_package = temp_model.from_map(m['latest_package'])
        if m.get('app_status') is not None:
            self.app_status = m.get('app_status')
        return self


class RetryInfo(TeaModel):
    def __init__(
        self,
        action: str = None,
        check_interval: int = None,
        retry_failed_only: bool = None,
        retry_times: int = None,
        timeout: int = None,
    ):
        # action
        self.action = action
        # check_interval
        self.check_interval = check_interval
        # retry_failed_only
        self.retry_failed_only = retry_failed_only
        # retry_times
        self.retry_times = retry_times
        # timeout
        self.timeout = timeout

    def validate(self):
        self.validate_required(self.action, 'action')
        self.validate_required(self.check_interval, 'check_interval')
        self.validate_required(self.retry_failed_only, 'retry_failed_only')
        self.validate_required(self.retry_times, 'retry_times')
        self.validate_required(self.timeout, 'timeout')

    def to_map(self):
        result = dict()
        if self.action is not None:
            result['action'] = self.action
        if self.check_interval is not None:
            result['check_interval'] = self.check_interval
        if self.retry_failed_only is not None:
            result['retry_failed_only'] = self.retry_failed_only
        if self.retry_times is not None:
            result['retry_times'] = self.retry_times
        if self.timeout is not None:
            result['timeout'] = self.timeout
        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('check_interval') is not None:
            self.check_interval = m.get('check_interval')
        if m.get('retry_failed_only') is not None:
            self.retry_failed_only = m.get('retry_failed_only')
        if m.get('retry_times') is not None:
            self.retry_times = m.get('retry_times')
        if m.get('timeout') is not None:
            self.timeout = m.get('timeout')
        return self


class DeploymentCell(TeaModel):
    def __init__(
        self,
        name: str = None,
        cell_ids: List[str] = None,
        description: str = None,
        id: str = None,
    ):
        # name
        self.name = name
        # 部署单元 id
        self.cell_ids = cell_ids
        # description
        self.description = description
        # id
        self.id = id

    def validate(self):
        self.validate_required(self.name, 'name')
        self.validate_required(self.cell_ids, 'cell_ids')
        self.validate_required(self.description, 'description')
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.cell_ids is not None:
            result['cell_ids'] = self.cell_ids
        if self.description is not None:
            result['description'] = self.description
        if self.id is not None:
            result['id'] = self.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('cell_ids') is not None:
            self.cell_ids = m.get('cell_ids')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class ApplicationInfo(TeaModel):
    def __init__(
        self,
        alias: str = None,
        application_name: str = None,
        app_extra_infos: List[AppExtraInfo] = None,
        app_group_name: str = None,
        app_level: str = None,
        buildpack_name: str = None,
        buildpack_version: str = None,
        creation_time: str = None,
        description: str = None,
        owner_login_name: str = None,
        real_owner_login_name: str = None,
        status: str = None,
        global_name: str = None,
        deploy_type: str = None,
    ):
        # 应用别名
        self.alias = alias
        # 应用名称
        self.application_name = application_name
        # 应用额外元数据信息
        self.app_extra_infos = app_extra_infos
        # 应用所属分组名
        self.app_group_name = app_group_name
        # 应用等级名称
        self.app_level = app_level
        # 技术栈名称
        self.buildpack_name = buildpack_name
        # 技术栈版本
        self.buildpack_version = buildpack_version
        # 应用创建时间
        self.creation_time = creation_time
        # 应用描述
        self.description = description
        # 用户真实名称
        self.owner_login_name = owner_login_name
        # 应用负责人登录名
        self.real_owner_login_name = real_owner_login_name
        # 应用状态。取值列表：
        # CREATING：应用创建中；
        # CREATED：应用成功创建，可正常使用；
        # CREATE_FAILED：应用创建失败；
        # DELETING：应用删除中；
        # DELETE_FAILED：应用删除失败
        # 
        self.status = status
        # 全局唯一名字
        self.global_name = global_name
        # 发布模式， package，image，mixed
        self.deploy_type = deploy_type

    def validate(self):
        self.validate_required(self.application_name, 'application_name')
        self.validate_required(self.app_extra_infos, 'app_extra_infos')
        if self.app_extra_infos:
            for k in self.app_extra_infos:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.alias is not None:
            result['alias'] = self.alias
        if self.application_name is not None:
            result['application_name'] = self.application_name
        result['app_extra_infos'] = []
        if self.app_extra_infos is not None:
            for k in self.app_extra_infos:
                result['app_extra_infos'].append(k.to_map() if k else None)
        if self.app_group_name is not None:
            result['app_group_name'] = self.app_group_name
        if self.app_level is not None:
            result['app_level'] = self.app_level
        if self.buildpack_name is not None:
            result['buildpack_name'] = self.buildpack_name
        if self.buildpack_version is not None:
            result['buildpack_version'] = self.buildpack_version
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.description is not None:
            result['description'] = self.description
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        if self.real_owner_login_name is not None:
            result['real_owner_login_name'] = self.real_owner_login_name
        if self.status is not None:
            result['status'] = self.status
        if self.global_name is not None:
            result['global_name'] = self.global_name
        if self.deploy_type is not None:
            result['deploy_type'] = self.deploy_type
        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('application_name') is not None:
            self.application_name = m.get('application_name')
        self.app_extra_infos = []
        if m.get('app_extra_infos') is not None:
            for k in m.get('app_extra_infos'):
                temp_model = AppExtraInfo()
                self.app_extra_infos.append(temp_model.from_map(k))
        if m.get('app_group_name') is not None:
            self.app_group_name = m.get('app_group_name')
        if m.get('app_level') is not None:
            self.app_level = m.get('app_level')
        if m.get('buildpack_name') is not None:
            self.buildpack_name = m.get('buildpack_name')
        if m.get('buildpack_version') is not None:
            self.buildpack_version = m.get('buildpack_version')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        if m.get('real_owner_login_name') is not None:
            self.real_owner_login_name = m.get('real_owner_login_name')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('global_name') is not None:
            self.global_name = m.get('global_name')
        if m.get('deploy_type') is not None:
            self.deploy_type = m.get('deploy_type')
        return self


class DynamicQuery(TeaModel):
    def __init__(
        self,
        current_page: int = None,
        filter: str = None,
        page_size: int = None,
        query: str = None,
        sort: str = None,
    ):
        # 分页规则-currentPage
        self.current_page = current_page
        # 字段过滤
        self.filter = filter
        # 分页规则-pageSize
        self.page_size = page_size
        # 具体的查询条件字符串
        self.query = query
        # 查询结果的排序规则
        self.sort = sort

    def validate(self):
        self.validate_required(self.query, 'query')

    def to_map(self):
        result = dict()
        if self.current_page is not None:
            result['current_page'] = self.current_page
        if self.filter is not None:
            result['filter'] = self.filter
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.query is not None:
            result['query'] = self.query
        if self.sort is not None:
            result['sort'] = self.sort
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('current_page') is not None:
            self.current_page = m.get('current_page')
        if m.get('filter') is not None:
            self.filter = m.get('filter')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('query') is not None:
            self.query = m.get('query')
        if m.get('sort') is not None:
            self.sort = m.get('sort')
        return self


class App(TeaModel):
    def __init__(
        self,
        app_group_id: str = None,
        app_group_name: str = None,
        buildpack_name: str = None,
        buildpack_version: str = None,
        created_time: str = None,
        default_route: bool = None,
        deploy_type: str = None,
        description: str = None,
        display_name: str = None,
        global_name: str = None,
        id: str = None,
        name: str = None,
        owner_display_name: str = None,
        owner_login_name: str = None,
        stack_id: str = None,
        status: str = None,
        tags: List[Tag] = None,
        owner_id: str = None,
    ):
        # 应用所属分组 id
        self.app_group_id = app_group_id
        # 应用分组名称
        self.app_group_name = app_group_name
        # 技术栈名称
        self.buildpack_name = buildpack_name
        # 技术栈版本
        self.buildpack_version = buildpack_version
        # 创建时间
        self.created_time = created_time
        # 允许访问公网
        self.default_route = default_route
        # 应用发布模式，发布包，发布镜像，混合发布。
        # 默认为空 - 表示包发布模式
        self.deploy_type = deploy_type
        # 应用描述
        self.description = description
        # 显示名称
        self.display_name = display_name
        # 域内应用全局唯一名称
        self.global_name = global_name
        # 应用 id
        self.id = id
        # 应用名称
        self.name = name
        # 应用负责人显示名称
        self.owner_display_name = owner_display_name
        # 应用负责人登录名称
        self.owner_login_name = owner_login_name
        # 技术栈id
        self.stack_id = stack_id
        # 应用状态
        self.status = status
        # 应用额外信息（应用标签）
        self.tags = tags
        # 应用负责人id
        self.owner_id = owner_id

    def validate(self):
        if self.created_time is not None:
            self.validate_pattern(self.created_time, 'created_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.app_group_id is not None:
            result['app_group_id'] = self.app_group_id
        if self.app_group_name is not None:
            result['app_group_name'] = self.app_group_name
        if self.buildpack_name is not None:
            result['buildpack_name'] = self.buildpack_name
        if self.buildpack_version is not None:
            result['buildpack_version'] = self.buildpack_version
        if self.created_time is not None:
            result['created_time'] = self.created_time
        if self.default_route is not None:
            result['default_route'] = self.default_route
        if self.deploy_type is not None:
            result['deploy_type'] = self.deploy_type
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.global_name is not None:
            result['global_name'] = self.global_name
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        if self.owner_display_name is not None:
            result['owner_display_name'] = self.owner_display_name
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        if self.stack_id is not None:
            result['stack_id'] = self.stack_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.owner_id is not None:
            result['owner_id'] = self.owner_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_group_id') is not None:
            self.app_group_id = m.get('app_group_id')
        if m.get('app_group_name') is not None:
            self.app_group_name = m.get('app_group_name')
        if m.get('buildpack_name') is not None:
            self.buildpack_name = m.get('buildpack_name')
        if m.get('buildpack_version') is not None:
            self.buildpack_version = m.get('buildpack_version')
        if m.get('created_time') is not None:
            self.created_time = m.get('created_time')
        if m.get('default_route') is not None:
            self.default_route = m.get('default_route')
        if m.get('deploy_type') is not None:
            self.deploy_type = m.get('deploy_type')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('global_name') is not None:
            self.global_name = m.get('global_name')
        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('owner_display_name') is not None:
            self.owner_display_name = m.get('owner_display_name')
        if m.get('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        if m.get('stack_id') is not None:
            self.stack_id = m.get('stack_id')
        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 = Tag()
                self.tags.append(temp_model.from_map(k))
        if m.get('owner_id') is not None:
            self.owner_id = m.get('owner_id')
        return self


class AppLevel(TeaModel):
    def __init__(
        self,
        id: str = None,
        name: str = None,
        owner_login_name: str = None,
    ):
        # 应用等级ID
        self.id = id
        # 应用等级名称
        self.name = name
        # 应用等级负责人登录名
        self.owner_login_name = owner_login_name

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        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('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        return self


class BuildpackByAppV(TeaModel):
    def __init__(
        self,
        id: str = None,
        name: str = None,
        des: str = None,
        version: str = None,
        deploy_script_id: str = None,
        build_script_id: str = None,
        config_id: str = None,
        component_id: str = None,
        command_id: str = None,
        bg_enable: bool = None,
        creator: str = None,
        tenant_id: str = None,
        customer_ids: str = None,
        gmt_create: str = None,
        gmt_modified: str = None,
        result_msg: str = None,
        utc_create: str = None,
        utc_modified: str = None,
    ):
        # id
        self.id = id
        # name
        self.name = name
        # des
        self.des = des
        # version
        self.version = version
        # deployScriptId
        self.deploy_script_id = deploy_script_id
        # buildScriptId
        self.build_script_id = build_script_id
        # configId
        self.config_id = config_id
        # componentId
        self.component_id = component_id
        # commandId
        self.command_id = command_id
        # bgEnable
        self.bg_enable = bg_enable
        # creator
        self.creator = creator
        # tenantId
        self.tenant_id = tenant_id
        # customerIds
        self.customer_ids = customer_ids
        # gmtCreate
        self.gmt_create = gmt_create
        # gmtModified
        self.gmt_modified = gmt_modified
        # resultMsg
        self.result_msg = result_msg
        # utcCreate
        self.utc_create = utc_create
        # utcModified
        self.utc_modified = utc_modified

    def validate(self):
        if self.gmt_create is not None:
            self.validate_pattern(self.gmt_create, 'gmt_create', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.gmt_modified is not None:
            self.validate_pattern(self.gmt_modified, 'gmt_modified', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.utc_create is not None:
            self.validate_pattern(self.utc_create, 'utc_create', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.utc_modified is not None:
            self.validate_pattern(self.utc_modified, 'utc_modified', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        if self.des is not None:
            result['des'] = self.des
        if self.version is not None:
            result['version'] = self.version
        if self.deploy_script_id is not None:
            result['deploy_script_id'] = self.deploy_script_id
        if self.build_script_id is not None:
            result['build_script_id'] = self.build_script_id
        if self.config_id is not None:
            result['config_id'] = self.config_id
        if self.component_id is not None:
            result['component_id'] = self.component_id
        if self.command_id is not None:
            result['command_id'] = self.command_id
        if self.bg_enable is not None:
            result['bg_enable'] = self.bg_enable
        if self.creator is not None:
            result['creator'] = self.creator
        if self.tenant_id is not None:
            result['tenant_id'] = self.tenant_id
        if self.customer_ids is not None:
            result['customer_ids'] = self.customer_ids
        if self.gmt_create is not None:
            result['gmt_create'] = self.gmt_create
        if self.gmt_modified is not None:
            result['gmt_modified'] = self.gmt_modified
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.utc_create is not None:
            result['utc_create'] = self.utc_create
        if self.utc_modified is not None:
            result['utc_modified'] = self.utc_modified
        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('des') is not None:
            self.des = m.get('des')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('deploy_script_id') is not None:
            self.deploy_script_id = m.get('deploy_script_id')
        if m.get('build_script_id') is not None:
            self.build_script_id = m.get('build_script_id')
        if m.get('config_id') is not None:
            self.config_id = m.get('config_id')
        if m.get('component_id') is not None:
            self.component_id = m.get('component_id')
        if m.get('command_id') is not None:
            self.command_id = m.get('command_id')
        if m.get('bg_enable') is not None:
            self.bg_enable = m.get('bg_enable')
        if m.get('creator') is not None:
            self.creator = m.get('creator')
        if m.get('tenant_id') is not None:
            self.tenant_id = m.get('tenant_id')
        if m.get('customer_ids') is not None:
            self.customer_ids = m.get('customer_ids')
        if m.get('gmt_create') is not None:
            self.gmt_create = m.get('gmt_create')
        if m.get('gmt_modified') is not None:
            self.gmt_modified = m.get('gmt_modified')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('utc_create') is not None:
            self.utc_create = m.get('utc_create')
        if m.get('utc_modified') is not None:
            self.utc_modified = m.get('utc_modified')
        return self


class AppUnitResource(TeaModel):
    def __init__(
        self,
        app_id: str = None,
        unit_id: str = None,
        machine_count: int = None,
        mounted_machine_count: int = None,
        slb_count: int = None,
        slb_weight: int = None,
    ):
        # 应用 ID
        self.app_id = app_id
        # 单元id
        self.unit_id = unit_id
        # 机器数
        self.machine_count = machine_count
        # 已挂载机器数
        self.mounted_machine_count = mounted_machine_count
        # 负载均衡数
        self.slb_count = slb_count
        # 负载均衡权重
        self.slb_weight = slb_weight

    def validate(self):
        self.validate_required(self.app_id, 'app_id')
        self.validate_required(self.unit_id, 'unit_id')
        self.validate_required(self.machine_count, 'machine_count')
        self.validate_required(self.mounted_machine_count, 'mounted_machine_count')
        self.validate_required(self.slb_count, 'slb_count')
        self.validate_required(self.slb_weight, 'slb_weight')

    def to_map(self):
        result = dict()
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.unit_id is not None:
            result['unit_id'] = self.unit_id
        if self.machine_count is not None:
            result['machine_count'] = self.machine_count
        if self.mounted_machine_count is not None:
            result['mounted_machine_count'] = self.mounted_machine_count
        if self.slb_count is not None:
            result['slb_count'] = self.slb_count
        if self.slb_weight is not None:
            result['slb_weight'] = self.slb_weight
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('unit_id') is not None:
            self.unit_id = m.get('unit_id')
        if m.get('machine_count') is not None:
            self.machine_count = m.get('machine_count')
        if m.get('mounted_machine_count') is not None:
            self.mounted_machine_count = m.get('mounted_machine_count')
        if m.get('slb_count') is not None:
            self.slb_count = m.get('slb_count')
        if m.get('slb_weight') is not None:
            self.slb_weight = m.get('slb_weight')
        return self


class WorkspaceGroupView(TeaModel):
    def __init__(
        self,
        display_name: str = None,
        id: str = None,
        identity: str = None,
        status: str = None,
        tenant_id: str = None,
        workspaces: List[WorkspaceView] = None,
    ):
        # 显示名称
        self.display_name = display_name
        # table id
        self.id = id
        # 标识
        self.identity = identity
        # 环境状态
        self.status = status
        # 租户id
        self.tenant_id = tenant_id
        # 工作空间列表
        self.workspaces = workspaces

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

    def to_map(self):
        result = dict()
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.id is not None:
            result['id'] = self.id
        if self.identity is not None:
            result['identity'] = self.identity
        if self.status is not None:
            result['status'] = self.status
        if self.tenant_id is not None:
            result['tenant_id'] = self.tenant_id
        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('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('tenant_id') is not None:
            self.tenant_id = m.get('tenant_id')
        self.workspaces = []
        if m.get('workspaces') is not None:
            for k in m.get('workspaces'):
                temp_model = WorkspaceView()
                self.workspaces.append(temp_model.from_map(k))
        return self


class MachineGroup(TeaModel):
    def __init__(
        self,
        name: str = None,
        service_id: str = None,
        service_group_id: str = None,
        service_group_collection_id: str = None,
        arrangement_id: str = None,
        service_type: str = None,
        paas_service_id: str = None,
        need_beta: bool = None,
        need_confirm: bool = None,
        need_reserve: bool = None,
        need_confirm_traffic: bool = None,
        machines: List[Machine] = None,
        process_definition_id: str = None,
        parent_id: str = None,
        parent_entity_type: str = None,
        node_id: str = None,
        state: str = None,
        started_time: str = None,
        finished_time: str = None,
        standalone_executable: bool = None,
        id: str = None,
    ):
        # 机器名
        self.name = name
        # 所属发布服务 ID
        self.service_id = service_id
        # 所属发布服务分组 ID
        self.service_group_id = service_group_id
        # 发布服务分组集合 ID
        self.service_group_collection_id = service_group_collection_id
        # 概览 ID
        self.arrangement_id = arrangement_id
        # 服务类型
        self.service_type = service_type
        # paas 服务 ID
        self.paas_service_id = paas_service_id
        # 是否 beta 分组
        self.need_beta = need_beta
        # 是否需要确认
        self.need_confirm = need_confirm
        # 是否需要分组预确认
        self.need_reserve = need_reserve
        # 是否需要引流确认
        self.need_confirm_traffic = need_confirm_traffic
        # 机器信息组
        self.machines = machines
        # pd id
        self.process_definition_id = process_definition_id
        # 父节点 ID
        self.parent_id = parent_id
        # 父节点类型
        self.parent_entity_type = parent_entity_type
        # 流程节点 ID
        self.node_id = node_id
        # 状态
        self.state = state
        # 开始时间
        self.started_time = started_time
        # 结束时间
        self.finished_time = finished_time
        # 是否可以独立执行
        self.standalone_executable = standalone_executable
        # ID
        self.id = id

    def validate(self):
        self.validate_required(self.name, 'name')
        self.validate_required(self.service_id, 'service_id')
        self.validate_required(self.service_group_id, 'service_group_id')
        self.validate_required(self.service_group_collection_id, 'service_group_collection_id')
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.service_type, 'service_type')
        self.validate_required(self.paas_service_id, 'paas_service_id')
        self.validate_required(self.need_beta, 'need_beta')
        self.validate_required(self.need_confirm, 'need_confirm')
        self.validate_required(self.need_reserve, 'need_reserve')
        self.validate_required(self.need_confirm_traffic, 'need_confirm_traffic')
        self.validate_required(self.machines, 'machines')
        if self.machines:
            for k in self.machines:
                if k:
                    k.validate()
        self.validate_required(self.process_definition_id, 'process_definition_id')
        self.validate_required(self.parent_id, 'parent_id')
        self.validate_required(self.parent_entity_type, 'parent_entity_type')
        self.validate_required(self.node_id, 'node_id')
        self.validate_required(self.state, 'state')
        self.validate_required(self.started_time, 'started_time')
        if self.started_time is not None:
            self.validate_pattern(self.started_time, 'started_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.finished_time, 'finished_time')
        if self.finished_time is not None:
            self.validate_pattern(self.finished_time, 'finished_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.standalone_executable, 'standalone_executable')
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.service_id is not None:
            result['service_id'] = self.service_id
        if self.service_group_id is not None:
            result['service_group_id'] = self.service_group_id
        if self.service_group_collection_id is not None:
            result['service_group_collection_id'] = self.service_group_collection_id
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.service_type is not None:
            result['service_type'] = self.service_type
        if self.paas_service_id is not None:
            result['paas_service_id'] = self.paas_service_id
        if self.need_beta is not None:
            result['need_beta'] = self.need_beta
        if self.need_confirm is not None:
            result['need_confirm'] = self.need_confirm
        if self.need_reserve is not None:
            result['need_reserve'] = self.need_reserve
        if self.need_confirm_traffic is not None:
            result['need_confirm_traffic'] = self.need_confirm_traffic
        result['machines'] = []
        if self.machines is not None:
            for k in self.machines:
                result['machines'].append(k.to_map() if k else None)
        if self.process_definition_id is not None:
            result['process_definition_id'] = self.process_definition_id
        if self.parent_id is not None:
            result['parent_id'] = self.parent_id
        if self.parent_entity_type is not None:
            result['parent_entity_type'] = self.parent_entity_type
        if self.node_id is not None:
            result['node_id'] = self.node_id
        if self.state is not None:
            result['state'] = self.state
        if self.started_time is not None:
            result['started_time'] = self.started_time
        if self.finished_time is not None:
            result['finished_time'] = self.finished_time
        if self.standalone_executable is not None:
            result['standalone_executable'] = self.standalone_executable
        if self.id is not None:
            result['id'] = self.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('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('service_group_id') is not None:
            self.service_group_id = m.get('service_group_id')
        if m.get('service_group_collection_id') is not None:
            self.service_group_collection_id = m.get('service_group_collection_id')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('service_type') is not None:
            self.service_type = m.get('service_type')
        if m.get('paas_service_id') is not None:
            self.paas_service_id = m.get('paas_service_id')
        if m.get('need_beta') is not None:
            self.need_beta = m.get('need_beta')
        if m.get('need_confirm') is not None:
            self.need_confirm = m.get('need_confirm')
        if m.get('need_reserve') is not None:
            self.need_reserve = m.get('need_reserve')
        if m.get('need_confirm_traffic') is not None:
            self.need_confirm_traffic = m.get('need_confirm_traffic')
        self.machines = []
        if m.get('machines') is not None:
            for k in m.get('machines'):
                temp_model = Machine()
                self.machines.append(temp_model.from_map(k))
        if m.get('process_definition_id') is not None:
            self.process_definition_id = m.get('process_definition_id')
        if m.get('parent_id') is not None:
            self.parent_id = m.get('parent_id')
        if m.get('parent_entity_type') is not None:
            self.parent_entity_type = m.get('parent_entity_type')
        if m.get('node_id') is not None:
            self.node_id = m.get('node_id')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('started_time') is not None:
            self.started_time = m.get('started_time')
        if m.get('finished_time') is not None:
            self.finished_time = m.get('finished_time')
        if m.get('standalone_executable') is not None:
            self.standalone_executable = m.get('standalone_executable')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class Zone(TeaModel):
    def __init__(
        self,
        id: str = None,
        name: str = None,
        paas_id: str = None,
        region_id: str = None,
        state: str = None,
        iaas_id: str = None,
    ):
        # zone名称
        self.id = id
        # zone显示名称
        self.name = name
        # zone paas id
        self.paas_id = paas_id
        # region identity
        self.region_id = region_id
        # zone state
        self.state = state
        # 机房iaas identity
        self.iaas_id = iaas_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        if self.paas_id is not None:
            result['paas_id'] = self.paas_id
        if self.region_id is not None:
            result['region_id'] = self.region_id
        if self.state is not None:
            result['state'] = self.state
        if self.iaas_id is not None:
            result['iaas_id'] = self.iaas_id
        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('paas_id') is not None:
            self.paas_id = m.get('paas_id')
        if m.get('region_id') is not None:
            self.region_id = m.get('region_id')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('iaas_id') is not None:
            self.iaas_id = m.get('iaas_id')
        return self


class OpsGroup(TeaModel):
    def __init__(
        self,
        status: str = None,
        units: List[OpsUnit] = None,
    ):
        # 运维操作组当前状态。取值列表：
        # INITED：初始化完成；
        # EXECUTING：执行中；
        # SUCCESS：执行成功；
        # FAILED：执行失败；
        # CANCELED：已取消；
        # CONFIRM_WAITING：待确认
        # 
        self.status = status
        # 包含在此运维操作组中的运维单元列表
        self.units = units

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

    def to_map(self):
        result = dict()
        if self.status is not None:
            result['status'] = self.status
        result['units'] = []
        if self.units is not None:
            for k in self.units:
                result['units'].append(k.to_map() if k else None)
        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')
        self.units = []
        if m.get('units') is not None:
            for k in m.get('units'):
                temp_model = OpsUnit()
                self.units.append(temp_model.from_map(k))
        return self


class RollbackInfo(TeaModel):
    def __init__(
        self,
        group_amount: int = None,
        group_strategy: str = None,
        reason: str = None,
        sub_entities: List[str] = None,
        target_id: str = None,
        target_version: str = None,
        need_beta_group: bool = None,
        env_config: List[Pair] = None,
        confirm_succeeded_rollback: bool = None,
        retry_rollbacked: bool = None,
    ):
        # group_amount
        self.group_amount = group_amount
        # group_strategy
        self.group_strategy = group_strategy
        # reason
        self.reason = reason
        # sub_entities
        self.sub_entities = sub_entities
        # target_id
        self.target_id = target_id
        # target_version
        self.target_version = target_version
        # need_beta_group
        self.need_beta_group = need_beta_group
        # env_config
        self.env_config = env_config
        # confirm_succeeded_rollback
        self.confirm_succeeded_rollback = confirm_succeeded_rollback
        # retry_rollbacked
        self.retry_rollbacked = retry_rollbacked

    def validate(self):
        self.validate_required(self.group_amount, 'group_amount')
        self.validate_required(self.group_strategy, 'group_strategy')
        self.validate_required(self.reason, 'reason')
        self.validate_required(self.sub_entities, 'sub_entities')
        self.validate_required(self.target_id, 'target_id')
        self.validate_required(self.target_version, 'target_version')
        if self.env_config:
            for k in self.env_config:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.group_amount is not None:
            result['group_amount'] = self.group_amount
        if self.group_strategy is not None:
            result['group_strategy'] = self.group_strategy
        if self.reason is not None:
            result['reason'] = self.reason
        if self.sub_entities is not None:
            result['sub_entities'] = self.sub_entities
        if self.target_id is not None:
            result['target_id'] = self.target_id
        if self.target_version is not None:
            result['target_version'] = self.target_version
        if self.need_beta_group is not None:
            result['need_beta_group'] = self.need_beta_group
        result['env_config'] = []
        if self.env_config is not None:
            for k in self.env_config:
                result['env_config'].append(k.to_map() if k else None)
        if self.confirm_succeeded_rollback is not None:
            result['confirm_succeeded_rollback'] = self.confirm_succeeded_rollback
        if self.retry_rollbacked is not None:
            result['retry_rollbacked'] = self.retry_rollbacked
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('group_amount') is not None:
            self.group_amount = m.get('group_amount')
        if m.get('group_strategy') is not None:
            self.group_strategy = m.get('group_strategy')
        if m.get('reason') is not None:
            self.reason = m.get('reason')
        if m.get('sub_entities') is not None:
            self.sub_entities = m.get('sub_entities')
        if m.get('target_id') is not None:
            self.target_id = m.get('target_id')
        if m.get('target_version') is not None:
            self.target_version = m.get('target_version')
        if m.get('need_beta_group') is not None:
            self.need_beta_group = m.get('need_beta_group')
        self.env_config = []
        if m.get('env_config') is not None:
            for k in m.get('env_config'):
                temp_model = Pair()
                self.env_config.append(temp_model.from_map(k))
        if m.get('confirm_succeeded_rollback') is not None:
            self.confirm_succeeded_rollback = m.get('confirm_succeeded_rollback')
        if m.get('retry_rollbacked') is not None:
            self.retry_rollbacked = m.get('retry_rollbacked')
        return self


class GlobalParam(TeaModel):
    def __init__(
        self,
        created_time: str = None,
        data_level: str = None,
        desc: str = None,
        id: str = None,
        key: str = None,
        modified_time: str = None,
        param_version: int = None,
        scope: str = None,
        scope_id: str = None,
        type: str = None,
        value: str = None,
    ):
        # 创建时间
        self.created_time = created_time
        # 数据保密等级
        self.data_level = data_level
        # 参数描述
        self.desc = desc
        # 全局参数 id
        self.id = id
        # 参数名
        self.key = key
        # 修改时间
        self.modified_time = modified_time
        # 版本
        self.param_version = param_version
        # 该参数属于哪个 scope
        self.scope = scope
        # 该参数在该 scope 中的 id
        self.scope_id = scope_id
        # 参数值类型
        self.type = type
        # 参数值
        self.value = value

    def validate(self):
        if self.created_time is not None:
            self.validate_pattern(self.created_time, 'created_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.data_level, 'data_level')
        self.validate_required(self.key, 'key')
        if self.modified_time is not None:
            self.validate_pattern(self.modified_time, 'modified_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_id, 'scope_id')
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        if self.created_time is not None:
            result['created_time'] = self.created_time
        if self.data_level is not None:
            result['data_level'] = self.data_level
        if self.desc is not None:
            result['desc'] = self.desc
        if self.id is not None:
            result['id'] = self.id
        if self.key is not None:
            result['key'] = self.key
        if self.modified_time is not None:
            result['modified_time'] = self.modified_time
        if self.param_version is not None:
            result['param_version'] = self.param_version
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_id is not None:
            result['scope_id'] = self.scope_id
        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('created_time') is not None:
            self.created_time = m.get('created_time')
        if m.get('data_level') is not None:
            self.data_level = m.get('data_level')
        if m.get('desc') is not None:
            self.desc = m.get('desc')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('modified_time') is not None:
            self.modified_time = m.get('modified_time')
        if m.get('param_version') is not None:
            self.param_version = m.get('param_version')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_id') is not None:
            self.scope_id = m.get('scope_id')
        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 OpsDeployment(TeaModel):
    def __init__(
        self,
        application_chains: List[OpsApplicationChain] = None,
        executor: str = None,
        operation_id: str = None,
        status: str = None,
        title: str = None,
    ):
        # 此部署操作中所有被操作的应用（服务）详情，以操作链的形式体现
        self.application_chains = application_chains
        # 部署操作执行者
        self.executor = executor
        # 部署单id
        self.operation_id = operation_id
        # 
        # 
        # 部署单状态。取值列表：
        # INITING：初始化中；
        # INIT_FAILED：初始化失败；
        # INITED：初始化完成；
        # EXECUTING：执行中；
        # SUCCESS：执行成功；
        # FAILED：执行失败；
        # CANCELING：取消中；
        # CANCELED：已取消
        # 
        # 
        self.status = status
        # 部署单标题。长度不超过50个UTF-8字符
        self.title = title

    def validate(self):
        self.validate_required(self.application_chains, 'application_chains')
        if self.application_chains:
            for k in self.application_chains:
                if k:
                    k.validate()
        self.validate_required(self.executor, 'executor')
        self.validate_required(self.operation_id, 'operation_id')
        self.validate_required(self.status, 'status')
        self.validate_required(self.title, 'title')

    def to_map(self):
        result = dict()
        result['application_chains'] = []
        if self.application_chains is not None:
            for k in self.application_chains:
                result['application_chains'].append(k.to_map() if k else None)
        if self.executor is not None:
            result['executor'] = self.executor
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        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()
        self.application_chains = []
        if m.get('application_chains') is not None:
            for k in m.get('application_chains'):
                temp_model = OpsApplicationChain()
                self.application_chains.append(temp_model.from_map(k))
        if m.get('executor') is not None:
            self.executor = m.get('executor')
        if m.get('operation_id') is not None:
            self.operation_id = m.get('operation_id')
        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 WorkspaceGroupInfo(TeaModel):
    def __init__(
        self,
        created_time: str = None,
        display_name: str = None,
        domain_suffix: str = None,
        id: str = None,
        master_workspace_id: str = None,
        master_workspace_identity: str = None,
        modified_time: str = None,
        name: str = None,
        release_mode: str = None,
        tenant_name: str = None,
        workspaces: List[Workspace] = None,
        identity: str = None,
    ):
        # 创建时间。
        self.created_time = created_time
        # 工作空间组显示名称。
        self.display_name = display_name
        # 域名后缀。
        self.domain_suffix = domain_suffix
        # 工作空间组id。
        self.id = id
        # 主工作空间id。
        self.master_workspace_id = master_workspace_id
        # 主工作空间名称。
        self.master_workspace_identity = master_workspace_identity
        # 修改时间。
        self.modified_time = modified_time
        # 工作空间组唯一标识。
        self.name = name
        # 发布模式。
        self.release_mode = release_mode
        # the belonging tenant name.
        self.tenant_name = tenant_name
        # 包含工作空间列表。
        self.workspaces = workspaces
        # workspace name
        self.identity = identity

    def validate(self):
        self.validate_required(self.created_time, 'created_time')
        if self.created_time is not None:
            self.validate_pattern(self.created_time, 'created_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.display_name, 'display_name')
        self.validate_required(self.domain_suffix, 'domain_suffix')
        self.validate_required(self.id, 'id')
        self.validate_required(self.master_workspace_id, 'master_workspace_id')
        self.validate_required(self.master_workspace_identity, 'master_workspace_identity')
        self.validate_required(self.modified_time, 'modified_time')
        if self.modified_time is not None:
            self.validate_pattern(self.modified_time, 'modified_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.name, 'name')
        self.validate_required(self.release_mode, 'release_mode')
        self.validate_required(self.tenant_name, 'tenant_name')
        self.validate_required(self.workspaces, 'workspaces')
        if self.workspaces:
            for k in self.workspaces:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.created_time is not None:
            result['created_time'] = self.created_time
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.domain_suffix is not None:
            result['domain_suffix'] = self.domain_suffix
        if self.id is not None:
            result['id'] = self.id
        if self.master_workspace_id is not None:
            result['master_workspace_id'] = self.master_workspace_id
        if self.master_workspace_identity is not None:
            result['master_workspace_identity'] = self.master_workspace_identity
        if self.modified_time is not None:
            result['modified_time'] = self.modified_time
        if self.name is not None:
            result['name'] = self.name
        if self.release_mode is not None:
            result['release_mode'] = self.release_mode
        if self.tenant_name is not None:
            result['tenant_name'] = self.tenant_name
        result['workspaces'] = []
        if self.workspaces is not None:
            for k in self.workspaces:
                result['workspaces'].append(k.to_map() if k else None)
        if self.identity is not None:
            result['identity'] = self.identity
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('created_time') is not None:
            self.created_time = m.get('created_time')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('domain_suffix') is not None:
            self.domain_suffix = m.get('domain_suffix')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('master_workspace_id') is not None:
            self.master_workspace_id = m.get('master_workspace_id')
        if m.get('master_workspace_identity') is not None:
            self.master_workspace_identity = m.get('master_workspace_identity')
        if m.get('modified_time') is not None:
            self.modified_time = m.get('modified_time')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('release_mode') is not None:
            self.release_mode = m.get('release_mode')
        if m.get('tenant_name') is not None:
            self.tenant_name = m.get('tenant_name')
        self.workspaces = []
        if m.get('workspaces') is not None:
            for k in m.get('workspaces'):
                temp_model = Workspace()
                self.workspaces.append(temp_model.from_map(k))
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        return self


class DepsLoadBalancer(TeaModel):
    def __init__(
        self,
        app_services: List[AppService] = None,
        bandwidth: int = None,
        iaas_id: str = None,
        id: str = None,
        internet_charge_type: str = None,
        name: str = None,
        network_type: str = None,
        region: str = None,
        status: str = None,
        vip_address: str = None,
        vip_address_type: str = None,
        vip_type: str = None,
        vpc_id: str = None,
        zone: str = None,
    ):
        # 服务实例列表
        self.app_services = app_services
        # 网络带宽
        self.bandwidth = bandwidth
        # iaaS在创建该资源时为其分配的唯一标示，创建中或创建失败时为空
        self.iaas_id = iaas_id
        # 资源唯一标识
        self.id = id
        # 公网计费方式
        self.internet_charge_type = internet_charge_type
        # 资源名称
        self.name = name
        # VIP类型
        self.network_type = network_type
        # 资源所属的地域id
        self.region = region
        # 
        # 
        # 资源所处的状态，资源状态，取值 CREATING：正在创建，CREATE_FAILED：创建失败，DELETING：正在删除，DELETED：删除成功，
        # DELETE_FAILED：删除失败，RESOURCE_IMPORTING：资源导入中，RESOURCE_IMPORT_FAILED：资源导入失败，RESOURCE_REMOVING：资源删除中，
        # RESOURCE_REMOVE_FAILED：资源删除失败，INACTIVE：未激活，STOPPING：正在停止，STARTING：正在启动，ACTIVE：已激活，LOCKED：已锁定，
        # RELEASING：正在释放，UPDATING：正在更新，MOUNTING：正在挂载，UMOUNTING：正在卸载
        # 
        self.status = status
        # vip地址
        self.vip_address = vip_address
        # address 类型：INTERNET, INTRANET
        self.vip_address_type = vip_address_type
        # VIP类型
        self.vip_type = vip_type
        # vpc的id
        self.vpc_id = vpc_id
        # 资源所属的可用区id
        self.zone = zone

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

    def to_map(self):
        result = dict()
        result['app_services'] = []
        if self.app_services is not None:
            for k in self.app_services:
                result['app_services'].append(k.to_map() if k else None)
        if self.bandwidth is not None:
            result['bandwidth'] = self.bandwidth
        if self.iaas_id is not None:
            result['iaas_id'] = self.iaas_id
        if self.id is not None:
            result['id'] = self.id
        if self.internet_charge_type is not None:
            result['internet_charge_type'] = self.internet_charge_type
        if self.name is not None:
            result['name'] = self.name
        if self.network_type is not None:
            result['network_type'] = self.network_type
        if self.region is not None:
            result['region'] = self.region
        if self.status is not None:
            result['status'] = self.status
        if self.vip_address is not None:
            result['vip_address'] = self.vip_address
        if self.vip_address_type is not None:
            result['vip_address_type'] = self.vip_address_type
        if self.vip_type is not None:
            result['vip_type'] = self.vip_type
        if self.vpc_id is not None:
            result['vpc_id'] = self.vpc_id
        if self.zone is not None:
            result['zone'] = self.zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.app_services = []
        if m.get('app_services') is not None:
            for k in m.get('app_services'):
                temp_model = AppService()
                self.app_services.append(temp_model.from_map(k))
        if m.get('bandwidth') is not None:
            self.bandwidth = m.get('bandwidth')
        if m.get('iaas_id') is not None:
            self.iaas_id = m.get('iaas_id')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('internet_charge_type') is not None:
            self.internet_charge_type = m.get('internet_charge_type')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('network_type') is not None:
            self.network_type = m.get('network_type')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('vip_address') is not None:
            self.vip_address = m.get('vip_address')
        if m.get('vip_address_type') is not None:
            self.vip_address_type = m.get('vip_address_type')
        if m.get('vip_type') is not None:
            self.vip_type = m.get('vip_type')
        if m.get('vpc_id') is not None:
            self.vpc_id = m.get('vpc_id')
        if m.get('zone') is not None:
            self.zone = m.get('zone')
        return self


class SidecarReleaseVersion(TeaModel):
    def __init__(
        self,
        description: str = None,
        gmt_created: str = None,
        gmt_modified: str = None,
        release_note: str = None,
        scope_detail: SidecarScopeDetail = None,
        sidecar_name: str = None,
        sidecar_release_version_id: str = None,
        sidecar_version: str = None,
        status: int = None,
        status_reason: str = None,
        template: str = None,
        template_configs: List[SidecarTemplateConfig] = None,
        type: str = None,
        version_period: str = None,
    ):
        # sidecar版本描述
        self.description = description
        # 创建时间
        self.gmt_created = gmt_created
        # 修改时间
        self.gmt_modified = gmt_modified
        # release note
        self.release_note = release_note
        # scope生效范围详情
        self.scope_detail = scope_detail
        # sidecar名称
        self.sidecar_name = sidecar_name
        # sidecar版本id
        self.sidecar_release_version_id = sidecar_release_version_id
        # sidecar版本号
        self.sidecar_version = sidecar_version
        # 版本状态
        self.status = status
        # 发布、下线、废弃原因
        self.status_reason = status_reason
        # sidecar模板内容
        self.template = template
        # sidecar模板配置
        self.template_configs = template_configs
        # sidecar版本类型
        self.type = type
        # 版本周期：alpha/beta/release
        self.version_period = version_period

    def validate(self):
        self.validate_required(self.gmt_created, 'gmt_created')
        if self.gmt_created is not None:
            self.validate_pattern(self.gmt_created, 'gmt_created', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.gmt_modified, 'gmt_modified')
        if self.gmt_modified is not None:
            self.validate_pattern(self.gmt_modified, 'gmt_modified', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.scope_detail, 'scope_detail')
        if self.scope_detail:
            self.scope_detail.validate()
        self.validate_required(self.sidecar_name, 'sidecar_name')
        self.validate_required(self.sidecar_release_version_id, 'sidecar_release_version_id')
        self.validate_required(self.sidecar_version, 'sidecar_version')
        self.validate_required(self.status, 'status')
        self.validate_required(self.template, 'template')
        self.validate_required(self.template_configs, 'template_configs')
        if self.template_configs:
            for k in self.template_configs:
                if k:
                    k.validate()
        self.validate_required(self.type, 'type')
        self.validate_required(self.version_period, 'version_period')

    def to_map(self):
        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.gmt_created is not None:
            result['gmt_created'] = self.gmt_created
        if self.gmt_modified is not None:
            result['gmt_modified'] = self.gmt_modified
        if self.release_note is not None:
            result['release_note'] = self.release_note
        if self.scope_detail is not None:
            result['scope_detail'] = self.scope_detail.to_map()
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        if self.sidecar_release_version_id is not None:
            result['sidecar_release_version_id'] = self.sidecar_release_version_id
        if self.sidecar_version is not None:
            result['sidecar_version'] = self.sidecar_version
        if self.status is not None:
            result['status'] = self.status
        if self.status_reason is not None:
            result['status_reason'] = self.status_reason
        if self.template is not None:
            result['template'] = self.template
        result['template_configs'] = []
        if self.template_configs is not None:
            for k in self.template_configs:
                result['template_configs'].append(k.to_map() if k else None)
        if self.type is not None:
            result['type'] = self.type
        if self.version_period is not None:
            result['version_period'] = self.version_period
        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('gmt_created') is not None:
            self.gmt_created = m.get('gmt_created')
        if m.get('gmt_modified') is not None:
            self.gmt_modified = m.get('gmt_modified')
        if m.get('release_note') is not None:
            self.release_note = m.get('release_note')
        if m.get('scope_detail') is not None:
            temp_model = SidecarScopeDetail()
            self.scope_detail = temp_model.from_map(m['scope_detail'])
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        if m.get('sidecar_release_version_id') is not None:
            self.sidecar_release_version_id = m.get('sidecar_release_version_id')
        if m.get('sidecar_version') is not None:
            self.sidecar_version = m.get('sidecar_version')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('status_reason') is not None:
            self.status_reason = m.get('status_reason')
        if m.get('template') is not None:
            self.template = m.get('template')
        self.template_configs = []
        if m.get('template_configs') is not None:
            for k in m.get('template_configs'):
                temp_model = SidecarTemplateConfig()
                self.template_configs.append(temp_model.from_map(k))
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('version_period') is not None:
            self.version_period = m.get('version_period')
        return self


class Operator(TeaModel):
    def __init__(
        self,
        id: str = None,
        login_name: str = None,
        email: str = None,
        nick_name: str = None,
    ):
        # id
        self.id = id
        # login_name
        self.login_name = login_name
        # email
        self.email = email
        # nick_name
        self.nick_name = nick_name

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.login_name, 'login_name')
        self.validate_required(self.email, 'email')
        self.validate_required(self.nick_name, 'nick_name')

    def to_map(self):
        result = dict()
        if self.id is not None:
            result['id'] = self.id
        if self.login_name is not None:
            result['login_name'] = self.login_name
        if self.email is not None:
            result['email'] = self.email
        if self.nick_name is not None:
            result['nick_name'] = self.nick_name
        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('login_name') is not None:
            self.login_name = m.get('login_name')
        if m.get('email') is not None:
            self.email = m.get('email')
        if m.get('nick_name') is not None:
            self.nick_name = m.get('nick_name')
        return self


class CreateApplicationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        alias: str = None,
        application_name: str = None,
        buildpack_arch: str = None,
        buildpack_name: str = None,
        buildpack_version: str = None,
        description: str = None,
        owner_login_name: str = None,
        deploy_type: str = None,
        default_route: bool = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用别称。最大60个UTF-8字符
        self.alias = alias
        # 创建的应用名称。最大60个UTF-8字符
        self.application_name = application_name
        # 技术栈架构版本，默认使用BUILDPACK_V1，取值列表：BUILDPACK_V1、BUILDPACK_V2
        self.buildpack_arch = buildpack_arch
        # 应用使用的技术栈名称
        self.buildpack_name = buildpack_name
        # 应用使用的技术栈版本
        self.buildpack_version = buildpack_version
        # 应用描述。最大200个UTF-8字符
        self.description = description
        # 应用负责人登录名
        self.owner_login_name = owner_login_name
        # 应用发布类型，默认不填入表示包发布，支持 mixed,image,workload
        self.deploy_type = deploy_type
        # 是否允许公网访问
        self.default_route = default_route

    def validate(self):
        self.validate_required(self.application_name, 'application_name')
        self.validate_required(self.buildpack_name, 'buildpack_name')
        self.validate_required(self.buildpack_version, 'buildpack_version')
        self.validate_required(self.owner_login_name, 'owner_login_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.alias is not None:
            result['alias'] = self.alias
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.buildpack_arch is not None:
            result['buildpack_arch'] = self.buildpack_arch
        if self.buildpack_name is not None:
            result['buildpack_name'] = self.buildpack_name
        if self.buildpack_version is not None:
            result['buildpack_version'] = self.buildpack_version
        if self.description is not None:
            result['description'] = self.description
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        if self.deploy_type is not None:
            result['deploy_type'] = self.deploy_type
        if self.default_route is not None:
            result['default_route'] = self.default_route
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('alias') is not None:
            self.alias = m.get('alias')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('buildpack_arch') is not None:
            self.buildpack_arch = m.get('buildpack_arch')
        if m.get('buildpack_name') is not None:
            self.buildpack_name = m.get('buildpack_name')
        if m.get('buildpack_version') is not None:
            self.buildpack_version = m.get('buildpack_version')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        if m.get('deploy_type') is not None:
            self.deploy_type = m.get('deploy_type')
        if m.get('default_route') is not None:
            self.default_route = m.get('default_route')
        return self


class CreateApplicationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class CreateApplicationServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        buildpack_version: str = None,
        cell_ids: List[str] = None,
        description: str = None,
        owner_login_name: str = None,
        service_name: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.application_name = application_name
        # 应用使用的技术栈版本
        self.buildpack_version = buildpack_version
        # 部署单元paas id列表
        self.cell_ids = cell_ids
        # 描述
        self.description = description
        # 负责人登录名
        self.owner_login_name = owner_login_name
        # 应用服务实例名称
        self.service_name = service_name
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.application_name, 'application_name')
        self.validate_required(self.buildpack_version, 'buildpack_version')
        self.validate_required(self.service_name, 'service_name')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.buildpack_version is not None:
            result['buildpack_version'] = self.buildpack_version
        if self.cell_ids is not None:
            result['cell_ids'] = self.cell_ids
        if self.description is not None:
            result['description'] = self.description
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        if self.service_name is not None:
            result['service_name'] = self.service_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('buildpack_version') is not None:
            self.buildpack_version = m.get('buildpack_version')
        if m.get('cell_ids') is not None:
            self.cell_ids = m.get('cell_ids')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        if m.get('service_name') is not None:
            self.service_name = m.get('service_name')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateApplicationServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 新建应用服务id
        self.id = id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.id is not None:
            result['id'] = self.id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class EnabledApplicationServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        return result

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


class EnabledApplicationServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        is_enabled: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否启用
        self.is_enabled = is_enabled

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.is_enabled is not None:
            result['is_enabled'] = self.is_enabled
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('is_enabled') is not None:
            self.is_enabled = m.get('is_enabled')
        return self


class GetApplicationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        query_extra_info: bool = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 待查询的应用名称。最大60个UTF-8字符
        self.application_name = application_name
        # 查询结果是否返回应用额外元数据信息。默认为 false
        self.query_extra_info = query_extra_info

    def validate(self):
        self.validate_required(self.application_name, 'application_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.query_extra_info is not None:
            result['query_extra_info'] = self.query_extra_info
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('query_extra_info') is not None:
            self.query_extra_info = m.get('query_extra_info')
        return self


class GetApplicationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        alias: str = None,
        application_name: str = None,
        app_extra_infos: List[AppExtraInfo] = None,
        app_group_name: str = None,
        app_level: str = None,
        buildpack_name: str = None,
        creation_time: str = None,
        description: str = None,
        owner_login_name: str = None,
        status: str = None,
        deploy_type: str = None,
        global_name: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用别名
        self.alias = alias
        # 应用名称
        self.application_name = application_name
        # 应用额外元数据信息
        self.app_extra_infos = app_extra_infos
        # 应用所属分组名
        self.app_group_name = app_group_name
        # 应用等级名称
        self.app_level = app_level
        # 技术栈名称
        self.buildpack_name = buildpack_name
        # 应用创建时间
        self.creation_time = creation_time
        # 应用描述
        self.description = description
        # 应用负责人登录名
        self.owner_login_name = owner_login_name
        # 应用状态。取值列表：
        # CREATING：应用创建中；
        # CREATED：应用成功创建，可正常使用；
        # CREATE_FAILED：应用创建失败
        # 
        self.status = status
        # 发布模式， package，image，mixed
        self.deploy_type = deploy_type
        # 全局唯一名字
        self.global_name = global_name

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.alias is not None:
            result['alias'] = self.alias
        if self.application_name is not None:
            result['application_name'] = self.application_name
        result['app_extra_infos'] = []
        if self.app_extra_infos is not None:
            for k in self.app_extra_infos:
                result['app_extra_infos'].append(k.to_map() if k else None)
        if self.app_group_name is not None:
            result['app_group_name'] = self.app_group_name
        if self.app_level is not None:
            result['app_level'] = self.app_level
        if self.buildpack_name is not None:
            result['buildpack_name'] = self.buildpack_name
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.description is not None:
            result['description'] = self.description
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        if self.status is not None:
            result['status'] = self.status
        if self.deploy_type is not None:
            result['deploy_type'] = self.deploy_type
        if self.global_name is not None:
            result['global_name'] = self.global_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('alias') is not None:
            self.alias = m.get('alias')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        self.app_extra_infos = []
        if m.get('app_extra_infos') is not None:
            for k in m.get('app_extra_infos'):
                temp_model = AppExtraInfo()
                self.app_extra_infos.append(temp_model.from_map(k))
        if m.get('app_group_name') is not None:
            self.app_group_name = m.get('app_group_name')
        if m.get('app_level') is not None:
            self.app_level = m.get('app_level')
        if m.get('buildpack_name') is not None:
            self.buildpack_name = m.get('buildpack_name')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('deploy_type') is not None:
            self.deploy_type = m.get('deploy_type')
        if m.get('global_name') is not None:
            self.global_name = m.get('global_name')
        return self


class GetApplicationServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        service_name: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 待查询的应用名称。最大60个UTF-8字符
        self.application_name = application_name
        # 待查询服务实例名称
        self.service_name = service_name
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.application_name, 'application_name')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.service_name is not None:
            result['service_name'] = self.service_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('service_name') is not None:
            self.service_name = m.get('service_name')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetApplicationServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        application_name: str = None,
        buildpack_version: str = None,
        cell_ids: List[str] = None,
        description: str = None,
        extra_infos: str = None,
        latest_operation_id: str = None,
        latest_operation_type: str = None,
        latest_version_no: str = None,
        service_name: str = None,
        workspace: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用名称
        self.application_name = application_name
        # 技术栈版本
        self.buildpack_version = buildpack_version
        # 关联的部署单元
        self.cell_ids = cell_ids
        # 服务实例描述
        self.description = description
        # 用户自定义的扩展属性
        self.extra_infos = extra_infos
        # 最近一次执行的运维操作单号
        self.latest_operation_id = latest_operation_id
        # 最近一次执行的运维操作类型。取值列表：
        # DEPLOYMENT：部署操作
        # 
        self.latest_operation_type = latest_operation_type
        # 最近成功部署的版本号
        self.latest_version_no = latest_version_no
        # 服务实例名称
        self.service_name = service_name
        # 环境名称
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.buildpack_version is not None:
            result['buildpack_version'] = self.buildpack_version
        if self.cell_ids is not None:
            result['cell_ids'] = self.cell_ids
        if self.description is not None:
            result['description'] = self.description
        if self.extra_infos is not None:
            result['extra_infos'] = self.extra_infos
        if self.latest_operation_id is not None:
            result['latest_operation_id'] = self.latest_operation_id
        if self.latest_operation_type is not None:
            result['latest_operation_type'] = self.latest_operation_type
        if self.latest_version_no is not None:
            result['latest_version_no'] = self.latest_version_no
        if self.service_name is not None:
            result['service_name'] = self.service_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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('buildpack_version') is not None:
            self.buildpack_version = m.get('buildpack_version')
        if m.get('cell_ids') is not None:
            self.cell_ids = m.get('cell_ids')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('extra_infos') is not None:
            self.extra_infos = m.get('extra_infos')
        if m.get('latest_operation_id') is not None:
            self.latest_operation_id = m.get('latest_operation_id')
        if m.get('latest_operation_type') is not None:
            self.latest_operation_type = m.get('latest_operation_type')
        if m.get('latest_version_no') is not None:
            self.latest_version_no = m.get('latest_version_no')
        if m.get('service_name') is not None:
            self.service_name = m.get('service_name')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryApplicationServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        page_num: int = None,
        page_size: int = None,
        workspaces: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 待查询的应用名称。最大60个UTF-8字符
        self.application_name = application_name
        # 当前页码，默认为1
        self.page_num = page_num
        # 分页大小，默认10，最大50
        self.page_size = page_size
        # 目标环境名称
        self.workspaces = workspaces

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.workspaces is not None:
            result['workspaces'] = self.workspaces
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('workspaces') is not None:
            self.workspaces = m.get('workspaces')
        return self


class QueryApplicationServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        page_num: int = None,
        page_size: int = None,
        services: List[AppService] = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 当前页码
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 服务实例列表
        self.services = services
        # 应用总数
        self.total_count = total_count

    def validate(self):
        self.validate_required(self.page_num, 'page_num')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.services, 'services')
        if self.services:
            for k in self.services:
                if k:
                    k.validate()
        self.validate_required(self.total_count, 'total_count')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        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['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        self.services = []
        if m.get('services') is not None:
            for k in m.get('services'):
                temp_model = AppService()
                self.services.append(temp_model.from_map(k))
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class DeleteApplicationServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        service_name: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 待删除的服务实例的应用名称
        self.application_name = application_name
        # 待删除服务实例名称
        self.service_name = service_name
        # 待删除服务实例所在环境名称
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.application_name, 'application_name')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.service_name is not None:
            result['service_name'] = self.service_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('service_name') is not None:
            self.service_name = m.get('service_name')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class DeleteApplicationServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class GetApplicationPackageRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        version_no: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 发布包所属的应用名称。最大60个UTF-8字符
        self.application_name = application_name
        # 版本号。长度不超过50个单字节字符
        self.version_no = version_no
        # 环境
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.application_name, 'application_name')
        self.validate_required(self.version_no, 'version_no')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.version_no is not None:
            result['version_no'] = self.version_no
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('version_no') is not None:
            self.version_no = m.get('version_no')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetApplicationPackageResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        app_name: str = None,
        creation_time: str = None,
        download_url: str = None,
        etag: str = None,
        name: str = None,
        version_memo: str = None,
        version_no: str = None,
        workspace: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用发布包所属应用名字
        self.app_name = app_name
        # 应用发布包创建时间
        self.creation_time = creation_time
        # 应用发布包下载地址
        self.download_url = download_url
        # 应用发布包的校验码
        self.etag = etag
        # 应用发布包名称
        self.name = name
        # 应用发布包备注
        self.version_memo = version_memo
        # 应用发布包版本
        self.version_no = version_no
        # 应用发布包所属环境
        self.workspace = workspace

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.download_url is not None:
            result['download_url'] = self.download_url
        if self.etag is not None:
            result['etag'] = self.etag
        if self.name is not None:
            result['name'] = self.name
        if self.version_memo is not None:
            result['version_memo'] = self.version_memo
        if self.version_no is not None:
            result['version_no'] = self.version_no
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('download_url') is not None:
            self.download_url = m.get('download_url')
        if m.get('etag') is not None:
            self.etag = m.get('etag')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('version_memo') is not None:
            self.version_memo = m.get('version_memo')
        if m.get('version_no') is not None:
            self.version_no = m.get('version_no')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryAppVersionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        build_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 版本构建id
        self.build_id = build_id

    def validate(self):
        self.validate_required(self.build_id, 'build_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.build_id is not None:
            result['build_id'] = self.build_id
        return result

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


class QueryAppVersionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        version: AppVersion = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用发布包详情
        self.version = version

    def validate(self):
        self.validate_required(self.version, 'version')
        if self.version:
            self.version.validate()

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.version is not None:
            result['version'] = self.version.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('version') is not None:
            temp_model = AppVersion()
            self.version = temp_model.from_map(m['version'])
        return self


class DeleteApplicationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 目标应用完整名称
        self.application_name = application_name

    def validate(self):
        self.validate_required(self.application_name, 'application_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        return result

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


class DeleteApplicationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class ListApplicationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        page_num: int = None,
        page_size: int = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 当前页码，默认为1
        self.page_num = page_num
        # 分页大小，默认10
        self.page_size = page_size

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        return self


class ListApplicationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        application_names: List[str] = None,
        page_num: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用名称列表
        self.application_names = application_names
        # 当前页码
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 应用总数
        self.total_count = total_count

    def validate(self):
        self.validate_required(self.application_names, 'application_names')
        self.validate_required(self.page_num, 'page_num')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.total_count, 'total_count')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.application_names is not None:
            result['application_names'] = self.application_names
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('application_names') is not None:
            self.application_names = m.get('application_names')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class ListAppgroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        page_num: int = None,
        page_size: int = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 当前页码，默认为1
        self.page_num = page_num
        # 分页大小，默认10
        self.page_size = page_size

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        return self


class ListAppgroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        app_groups: List[AppGroup] = None,
        page_num: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用名称列表
        self.app_groups = app_groups
        # 当前页码
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 应用总数
        self.total_count = total_count

    def validate(self):
        self.validate_required(self.app_groups, 'app_groups')
        if self.app_groups:
            for k in self.app_groups:
                if k:
                    k.validate()
        self.validate_required(self.page_num, 'page_num')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.total_count, 'total_count')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['app_groups'] = []
        if self.app_groups is not None:
            for k in self.app_groups:
                result['app_groups'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.app_groups = []
        if m.get('app_groups') is not None:
            for k in m.get('app_groups'):
                temp_model = AppGroup()
                self.app_groups.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class QueryApplicationComputerRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application: str = None,
        assign: bool = None,
        computer_type: str = None,
        cpu: int = None,
        memory: int = None,
        name: str = None,
        page_num: int = None,
        page_size: int = None,
        service_name: str = None,
        statuses: List[str] = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 目标服务实例名称，填写application时有意义。application不填时，service_name的值会被忽略
        self.application = application
        # assign=true代表分配了app/appservice的computer,反之代表没有分配app/appservice的computer
        self.assign = assign
        # 资源类型
        self.computer_type = computer_type
        # cpu核数
        self.cpu = cpu
        # 内存大小，单位MB
        self.memory = memory
        # 资源名称
        self.name = name
        # 当前页码，默认为1
        self.page_num = page_num
        # 分页大小，默认10
        self.page_size = page_size
        # 目标服务实例名称
        self.service_name = service_name
        # 资源所处的状态，可指定多个
        self.statuses = statuses
        # 目标工作空间名称
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application is not None:
            result['application'] = self.application
        if self.assign is not None:
            result['assign'] = self.assign
        if self.computer_type is not None:
            result['computer_type'] = self.computer_type
        if self.cpu is not None:
            result['cpu'] = self.cpu
        if self.memory is not None:
            result['memory'] = self.memory
        if self.name is not None:
            result['name'] = self.name
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.service_name is not None:
            result['service_name'] = self.service_name
        if self.statuses is not None:
            result['statuses'] = self.statuses
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application') is not None:
            self.application = m.get('application')
        if m.get('assign') is not None:
            self.assign = m.get('assign')
        if m.get('computer_type') is not None:
            self.computer_type = m.get('computer_type')
        if m.get('cpu') is not None:
            self.cpu = m.get('cpu')
        if m.get('memory') is not None:
            self.memory = m.get('memory')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('service_name') is not None:
            self.service_name = m.get('service_name')
        if m.get('statuses') is not None:
            self.statuses = m.get('statuses')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryApplicationComputerResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        computers: List[Computer] = None,
        page_num: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 资源列表
        self.computers = computers
        # 当前页码
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 资源总数
        self.total_count = total_count

    def validate(self):
        self.validate_required(self.computers, 'computers')
        if self.computers:
            for k in self.computers:
                if k:
                    k.validate()
        self.validate_required(self.page_num, 'page_num')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.total_count, 'total_count')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['computers'] = []
        if self.computers is not None:
            for k in self.computers:
                result['computers'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.computers = []
        if m.get('computers') is not None:
            for k in m.get('computers'):
                temp_model = Computer()
                self.computers.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class GetApplicationRepositoryRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 待查询的应用名称。最大60个UTF-8字符
        self.application_name = application_name

    def validate(self):
        self.validate_required(self.application_name, 'application_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        return result

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


class GetApplicationRepositoryResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        repository: Repository = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 代码库信息
        self.repository = repository

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.repository is not None:
            result['repository'] = self.repository.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('repository') is not None:
            temp_model = Repository()
            self.repository = temp_model.from_map(m['repository'])
        return self


class QueryAppgroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        name: str = None,
        page_num: int = None,
        page_size: int = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用分组名称
        self.name = name
        # 当前页码，默认为1
        self.page_num = page_num
        # 分页大小，默认10
        self.page_size = page_size

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.name is not None:
            result['name'] = self.name
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        return result

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


class QueryAppgroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        app_groups: List[AppGroup] = None,
        page_num: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用分组列表
        self.app_groups = app_groups
        # 当前页码
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 资源总数
        self.total_count = total_count

    def validate(self):
        self.validate_required(self.app_groups, 'app_groups')
        if self.app_groups:
            for k in self.app_groups:
                if k:
                    k.validate()
        self.validate_required(self.page_num, 'page_num')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.total_count, 'total_count')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['app_groups'] = []
        if self.app_groups is not None:
            for k in self.app_groups:
                result['app_groups'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.app_groups = []
        if m.get('app_groups') is not None:
            for k in m.get('app_groups'):
                temp_model = AppGroup()
                self.app_groups.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class QueryApplevelRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        name: str = None,
        page_num: int = None,
        page_size: int = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用等级名称
        self.name = name
        # 当前页码，默认为1
        self.page_num = page_num
        # 分页大小，默认10
        self.page_size = page_size

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.name is not None:
            result['name'] = self.name
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        return result

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


class QueryApplevelResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        app_levels: List[AppLevel] = None,
        page_num: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用等级列表
        self.app_levels = app_levels
        # 当前页码
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 资源总数
        self.total_count = total_count

    def validate(self):
        self.validate_required(self.app_levels, 'app_levels')
        if self.app_levels:
            for k in self.app_levels:
                if k:
                    k.validate()
        self.validate_required(self.page_num, 'page_num')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.total_count, 'total_count')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['app_levels'] = []
        if self.app_levels is not None:
            for k in self.app_levels:
                result['app_levels'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.app_levels = []
        if m.get('app_levels') is not None:
            for k in m.get('app_levels'):
                temp_model = AppLevel()
                self.app_levels.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class QueryApplicationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        app_group_name: str = None,
        app_level_name: str = None,
        owner_login_name: str = None,
        page_num: int = None,
        page_size: int = None,
        query_extra_info: bool = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.application_name = application_name
        # 应用分组名
        self.app_group_name = app_group_name
        # 应用级别
        self.app_level_name = app_level_name
        # 登录名
        self.owner_login_name = owner_login_name
        # 当前页码，默认为1
        self.page_num = page_num
        # 分页大小，默认10
        self.page_size = page_size
        # 查询结果是否返回应用额外元数据信息。此字段为 true 时，为保证查询效率，列表大小将强制修改为 10 （若超过）
        self.query_extra_info = query_extra_info

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.app_group_name is not None:
            result['app_group_name'] = self.app_group_name
        if self.app_level_name is not None:
            result['app_level_name'] = self.app_level_name
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.query_extra_info is not None:
            result['query_extra_info'] = self.query_extra_info
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('app_group_name') is not None:
            self.app_group_name = m.get('app_group_name')
        if m.get('app_level_name') is not None:
            self.app_level_name = m.get('app_level_name')
        if m.get('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('query_extra_info') is not None:
            self.query_extra_info = m.get('query_extra_info')
        return self


class QueryApplicationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        applications: List[ApplicationInfo] = None,
        page_num: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用列表
        self.applications = applications
        # 当前页码
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 资源总数
        self.total_count = total_count

    def validate(self):
        self.validate_required(self.applications, 'applications')
        if self.applications:
            for k in self.applications:
                if k:
                    k.validate()
        self.validate_required(self.page_num, 'page_num')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.total_count, 'total_count')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['applications'] = []
        if self.applications is not None:
            for k in self.applications:
                result['applications'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.applications = []
        if m.get('applications') is not None:
            for k in m.get('applications'):
                temp_model = ApplicationInfo()
                self.applications.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class CreateAppVersionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        file_md_5: str = None,
        file_path: str = None,
        file_size: int = None,
        file_source: str = None,
        version_memo: str = None,
        version_no: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 目标应用完整名称
        self.application_name = application_name
        # 应用部署包文件16字节md5值，以32位十六进制字符表示，不区分大小写。如果提供，APPMS下载应用部署包完成后，将会以此md5值进行校验，检验不通过则认为下载失败
        # 
        self.file_md_5 = file_md_5
        # 应用部署包文件路径。长度不超过1024个单字节字符
        self.file_path = file_path
        # 应用部署包文件大小，单位字节。取值范围[1,524288000]，即最大支持500M, 524288000 = 500 x 1024 x 1024
        # 
        self.file_size = file_size
        # 文件交换源id
        self.file_source = file_source
        # 版本备注。长度不超过100个双字节字符
        self.version_memo = version_memo
        # 版本号。长度不超过50个单字节字符
        self.version_no = version_no
        # 目标工作空间名称
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.application_name, 'application_name')
        self.validate_required(self.file_path, 'file_path')
        if self.file_path is not None:
            self.validate_max_length(self.file_path, 'file_path', 1024)
        self.validate_required(self.file_size, 'file_size')
        if self.file_size is not None:
            self.validate_maximum(self.file_size, 'file_size', 524288000)
            self.validate_minimum(self.file_size, 'file_size', 1)
        self.validate_required(self.file_source, 'file_source')
        if self.version_memo is not None:
            self.validate_max_length(self.version_memo, 'version_memo', 100)
        self.validate_required(self.version_no, 'version_no')
        if self.version_no is not None:
            self.validate_max_length(self.version_no, 'version_no', 50)
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.file_md_5 is not None:
            result['file_md5'] = self.file_md_5
        if self.file_path is not None:
            result['file_path'] = self.file_path
        if self.file_size is not None:
            result['file_size'] = self.file_size
        if self.file_source is not None:
            result['file_source'] = self.file_source
        if self.version_memo is not None:
            result['version_memo'] = self.version_memo
        if self.version_no is not None:
            result['version_no'] = self.version_no
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('file_md5') is not None:
            self.file_md_5 = m.get('file_md5')
        if m.get('file_path') is not None:
            self.file_path = m.get('file_path')
        if m.get('file_size') is not None:
            self.file_size = m.get('file_size')
        if m.get('file_source') is not None:
            self.file_source = m.get('file_source')
        if m.get('version_memo') is not None:
            self.version_memo = m.get('version_memo')
        if m.get('version_no') is not None:
            self.version_no = m.get('version_no')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateAppVersionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        build_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 发布包任务id，可用于查询应用发布包生成状态
        self.build_id = build_id

    def validate(self):
        self.validate_required(self.build_id, 'build_id')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.build_id is not None:
            result['build_id'] = self.build_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('build_id') is not None:
            self.build_id = m.get('build_id')
        return self


class QueryAppDeltaRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        end_time: str = None,
        start_time: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 结束时间点
        self.end_time = end_time
        # 开始时间点
        self.start_time = start_time

    def validate(self):
        self.validate_required(self.end_time, 'end_time')
        if self.end_time is not None:
            self.validate_pattern(self.end_time, 'end_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.start_time, 'start_time')
        if self.start_time is not None:
            self.validate_pattern(self.start_time, 'start_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.end_time is not None:
            result['end_time'] = self.end_time
        if self.start_time is not None:
            result['start_time'] = self.start_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('end_time') is not None:
            self.end_time = m.get('end_time')
        if m.get('start_time') is not None:
            self.start_time = m.get('start_time')
        return self


class QueryAppDeltaResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        tenants: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 发生变化的租户列表
        self.tenants = tenants

    def validate(self):
        self.validate_required(self.tenants, 'tenants')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.tenants is not None:
            result['tenants'] = self.tenants
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('tenants') is not None:
            self.tenants = m.get('tenants')
        return self


class QueryApplicationLoadbalancerRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application: str = None,
        name: str = None,
        network_type: str = None,
        page_num: int = None,
        page_size: int = None,
        service_name: str = None,
        statuses: List[str] = None,
        vip_address: str = None,
        vip_address_type: str = None,
        vip_type: str = None,
        vpc_ids: List[str] = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 目标服务实例名称，填写application时有意义。application不填时，service_name的值会被忽略
        self.application = application
        # 资源名称
        self.name = name
        # VIP类型
        self.network_type = network_type
        # 当前页码，默认为1
        self.page_num = page_num
        # 分页大小，默认10
        self.page_size = page_size
        # 目标服务实例名称
        self.service_name = service_name
        # 资源所处的状态，可指定多个
        self.statuses = statuses
        # vip地址
        self.vip_address = vip_address
        # address 类型：INTERNET, INTRANET
        self.vip_address_type = vip_address_type
        # VIP类型
        self.vip_type = vip_type
        # vpc的id
        self.vpc_ids = vpc_ids
        # 目标工作空间名称
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application is not None:
            result['application'] = self.application
        if self.name is not None:
            result['name'] = self.name
        if self.network_type is not None:
            result['network_type'] = self.network_type
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.service_name is not None:
            result['service_name'] = self.service_name
        if self.statuses is not None:
            result['statuses'] = self.statuses
        if self.vip_address is not None:
            result['vip_address'] = self.vip_address
        if self.vip_address_type is not None:
            result['vip_address_type'] = self.vip_address_type
        if self.vip_type is not None:
            result['vip_type'] = self.vip_type
        if self.vpc_ids is not None:
            result['vpc_ids'] = self.vpc_ids
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application') is not None:
            self.application = m.get('application')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('network_type') is not None:
            self.network_type = m.get('network_type')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('service_name') is not None:
            self.service_name = m.get('service_name')
        if m.get('statuses') is not None:
            self.statuses = m.get('statuses')
        if m.get('vip_address') is not None:
            self.vip_address = m.get('vip_address')
        if m.get('vip_address_type') is not None:
            self.vip_address_type = m.get('vip_address_type')
        if m.get('vip_type') is not None:
            self.vip_type = m.get('vip_type')
        if m.get('vpc_ids') is not None:
            self.vpc_ids = m.get('vpc_ids')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryApplicationLoadbalancerResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        loadbalancers: List[DepsLoadBalancer] = None,
        page_num: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 负载均衡资源列表
        self.loadbalancers = loadbalancers
        # 当前页码
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 应用总数
        self.total_count = total_count

    def validate(self):
        self.validate_required(self.loadbalancers, 'loadbalancers')
        if self.loadbalancers:
            for k in self.loadbalancers:
                if k:
                    k.validate()
        self.validate_required(self.page_num, 'page_num')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.total_count, 'total_count')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['loadbalancers'] = []
        if self.loadbalancers is not None:
            for k in self.loadbalancers:
                result['loadbalancers'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.loadbalancers = []
        if m.get('loadbalancers') is not None:
            for k in m.get('loadbalancers'):
                temp_model = DepsLoadBalancer()
                self.loadbalancers.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class QueryApplicationDatabaseRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application: str = None,
        connection_address: str = None,
        name: str = None,
        network_type: str = None,
        net_type: str = None,
        page_num: int = None,
        page_size: int = None,
        port: int = None,
        service_name: str = None,
        statuses: List[str] = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 目标服务实例名称，填写application时有意义。application不填时，service_name的值会被忽略
        self.application = application
        # 连接地址
        self.connection_address = connection_address
        # 资源名称
        self.name = name
        # 网络类型，Classic或VPC
        self.network_type = network_type
        # 网络连接类型，取值 Internet：外网，Intranet：内网
        self.net_type = net_type
        # 当前页码，默认为1
        self.page_num = page_num
        # 分页大小，默认10
        self.page_size = page_size
        # 连接端口
        self.port = port
        # 目标服务实例名称
        self.service_name = service_name
        # 资源所处的状态，可指定多个
        self.statuses = statuses
        # 目标工作空间名称
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application is not None:
            result['application'] = self.application
        if self.connection_address is not None:
            result['connection_address'] = self.connection_address
        if self.name is not None:
            result['name'] = self.name
        if self.network_type is not None:
            result['network_type'] = self.network_type
        if self.net_type is not None:
            result['net_type'] = self.net_type
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.port is not None:
            result['port'] = self.port
        if self.service_name is not None:
            result['service_name'] = self.service_name
        if self.statuses is not None:
            result['statuses'] = self.statuses
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application') is not None:
            self.application = m.get('application')
        if m.get('connection_address') is not None:
            self.connection_address = m.get('connection_address')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('network_type') is not None:
            self.network_type = m.get('network_type')
        if m.get('net_type') is not None:
            self.net_type = m.get('net_type')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('port') is not None:
            self.port = m.get('port')
        if m.get('service_name') is not None:
            self.service_name = m.get('service_name')
        if m.get('statuses') is not None:
            self.statuses = m.get('statuses')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryApplicationDatabaseResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        databases: List[DepsDatabase] = None,
        page_num: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 资源列表
        self.databases = databases
        # 当前页码
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 应用总数
        self.total_count = total_count

    def validate(self):
        self.validate_required(self.databases, 'databases')
        if self.databases:
            for k in self.databases:
                if k:
                    k.validate()
        self.validate_required(self.page_num, 'page_num')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.total_count, 'total_count')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['databases'] = []
        if self.databases is not None:
            for k in self.databases:
                result['databases'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.databases = []
        if m.get('databases') is not None:
            for k in m.get('databases'):
                temp_model = DepsDatabase()
                self.databases.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class UploadApplicationPackageRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        package_name: str = None,
        version_no: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 目标应用完整名称
        self.application_name = application_name
        # 应用发布包名称。长度不超过100个双字节字符
        self.package_name = package_name
        # 版本号。长度不超过50个单字节字符
        self.version_no = version_no
        # 目标工作空间名称
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.application_name, 'application_name')
        self.validate_required(self.package_name, 'package_name')
        if self.package_name is not None:
            self.validate_max_length(self.package_name, 'package_name', 100)
        self.validate_required(self.version_no, 'version_no')
        if self.version_no is not None:
            self.validate_max_length(self.version_no, 'version_no', 50)
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.package_name is not None:
            result['package_name'] = self.package_name
        if self.version_no is not None:
            result['version_no'] = self.version_no
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('package_name') is not None:
            self.package_name = m.get('package_name')
        if m.get('version_no') is not None:
            self.version_no = m.get('version_no')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UploadApplicationPackageResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        bucket_name: str = None,
        signed_upload_url: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 上传oss的bucket名称
        self.bucket_name = bucket_name
        # 上传应用发布包的授权签名上传地址
        self.signed_upload_url = signed_upload_url

    def validate(self):
        self.validate_required(self.signed_upload_url, 'signed_upload_url')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.bucket_name is not None:
            result['bucket_name'] = self.bucket_name
        if self.signed_upload_url is not None:
            result['signed_upload_url'] = self.signed_upload_url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('bucket_name') is not None:
            self.bucket_name = m.get('bucket_name')
        if m.get('signed_upload_url') is not None:
            self.signed_upload_url = m.get('signed_upload_url')
        return self


class SyncreateApplicationVersionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        package_etag: str = None,
        package_name: str = None,
        version_memo: str = None,
        version_no: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 目标应用完整名称
        self.application_name = application_name
        # 应用部署包文件16字节md5值，以32位十六进制字符表示，不区分大小写。如果提供，将会以此md5值进行校验，检验不通过则认为创建失败
        # 
        self.package_etag = package_etag
        # 应用发布包名称。长度不超过100个双字节字符
        self.package_name = package_name
        # 应用发布包备注
        self.version_memo = version_memo
        # 版本号。长度不超过50个单字节字符
        self.version_no = version_no
        # 目标工作空间名称
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.application_name, 'application_name')
        self.validate_required(self.package_name, 'package_name')
        if self.package_name is not None:
            self.validate_max_length(self.package_name, 'package_name', 100)
        self.validate_required(self.version_no, 'version_no')
        if self.version_no is not None:
            self.validate_max_length(self.version_no, 'version_no', 50)
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.package_etag is not None:
            result['package_etag'] = self.package_etag
        if self.package_name is not None:
            result['package_name'] = self.package_name
        if self.version_memo is not None:
            result['version_memo'] = self.version_memo
        if self.version_no is not None:
            result['version_no'] = self.version_no
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('package_etag') is not None:
            self.package_etag = m.get('package_etag')
        if m.get('package_name') is not None:
            self.package_name = m.get('package_name')
        if m.get('version_memo') is not None:
            self.version_memo = m.get('version_memo')
        if m.get('version_no') is not None:
            self.version_no = m.get('version_no')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SyncreateApplicationVersionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class ListCloudconnectorConnectionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        return result

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


class ListCloudconnectorConnectionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[Connection] = None,
        start_index: int = None,
        page_size: int = None,
        total_size: int = None,
        current_page: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # List<Connection>
        self.data = data
        # startIndex
        self.start_index = start_index
        # pageSize
        self.page_size = page_size
        # totalSize
        self.total_size = total_size
        # currentPage
        self.current_page = current_page

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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.start_index is not None:
            result['start_index'] = self.start_index
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_size is not None:
            result['total_size'] = self.total_size
        if self.current_page is not None:
            result['current_page'] = self.current_page
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = Connection()
                self.data.append(temp_model.from_map(k))
        if m.get('start_index') is not None:
            self.start_index = m.get('start_index')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_size') is not None:
            self.total_size = m.get('total_size')
        if m.get('current_page') is not None:
            self.current_page = m.get('current_page')
        return self


class QueryAppservicebuildpackrelationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        appservice_ids: List[str] = None,
        app_ids: List[str] = None,
        buildpack_arch: str = None,
        buildpack_ids: List[str] = None,
        current_page: int = None,
        descend: bool = None,
        ids: List[str] = None,
        page_size: int = None,
        sort_field: str = None,
        start_index: int = None,
        techstack_identities: List[str] = None,
        techstack_ids: List[str] = None,
        workspace_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 一组应用服务id
        self.appservice_ids = appservice_ids
        # 一组应用id
        # 
        self.app_ids = app_ids
        # buildpackArch
        self.buildpack_arch = buildpack_arch
        # buildpackIds
        self.buildpack_ids = buildpack_ids
        # 当前页
        self.current_page = current_page
        # 是否降序
        self.descend = descend
        # ids
        self.ids = ids
        # 每页个数
        self.page_size = page_size
        # 分类
        self.sort_field = sort_field
        # 开始索引
        self.start_index = start_index
        # techstackIdentities
        self.techstack_identities = techstack_identities
        # 一组技术栈id
        self.techstack_ids = techstack_ids
        # workspaceId
        self.workspace_id = workspace_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.appservice_ids is not None:
            result['appservice_ids'] = self.appservice_ids
        if self.app_ids is not None:
            result['app_ids'] = self.app_ids
        if self.buildpack_arch is not None:
            result['buildpack_arch'] = self.buildpack_arch
        if self.buildpack_ids is not None:
            result['buildpack_ids'] = self.buildpack_ids
        if self.current_page is not None:
            result['current_page'] = self.current_page
        if self.descend is not None:
            result['descend'] = self.descend
        if self.ids is not None:
            result['ids'] = self.ids
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.sort_field is not None:
            result['sort_field'] = self.sort_field
        if self.start_index is not None:
            result['start_index'] = self.start_index
        if self.techstack_identities is not None:
            result['techstack_identities'] = self.techstack_identities
        if self.techstack_ids is not None:
            result['techstack_ids'] = self.techstack_ids
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('appservice_ids') is not None:
            self.appservice_ids = m.get('appservice_ids')
        if m.get('app_ids') is not None:
            self.app_ids = m.get('app_ids')
        if m.get('buildpack_arch') is not None:
            self.buildpack_arch = m.get('buildpack_arch')
        if m.get('buildpack_ids') is not None:
            self.buildpack_ids = m.get('buildpack_ids')
        if m.get('current_page') is not None:
            self.current_page = m.get('current_page')
        if m.get('descend') is not None:
            self.descend = m.get('descend')
        if m.get('ids') is not None:
            self.ids = m.get('ids')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('sort_field') is not None:
            self.sort_field = m.get('sort_field')
        if m.get('start_index') is not None:
            self.start_index = m.get('start_index')
        if m.get('techstack_identities') is not None:
            self.techstack_identities = m.get('techstack_identities')
        if m.get('techstack_ids') is not None:
            self.techstack_ids = m.get('techstack_ids')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        return self


class QueryAppservicebuildpackrelationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        app_service_buildpack_relations: List[AppServiceBuildpackRelation] = None,
        current_page: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # app_service_buildpack_relations
        self.app_service_buildpack_relations = app_service_buildpack_relations
        # current_page
        self.current_page = current_page
        # page_size
        self.page_size = page_size
        # total_count
        self.total_count = total_count

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['app_service_buildpack_relations'] = []
        if self.app_service_buildpack_relations is not None:
            for k in self.app_service_buildpack_relations:
                result['app_service_buildpack_relations'].append(k.to_map() if k else None)
        if self.current_page is not None:
            result['current_page'] = self.current_page
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.app_service_buildpack_relations = []
        if m.get('app_service_buildpack_relations') is not None:
            for k in m.get('app_service_buildpack_relations'):
                temp_model = AppServiceBuildpackRelation()
                self.app_service_buildpack_relations.append(temp_model.from_map(k))
        if m.get('current_page') is not None:
            self.current_page = m.get('current_page')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class UpdateAppservicebuildpackrelationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        new_app_service: BuildpackAppService = None,
        original_app_service: BuildpackAppService = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # new_app_service
        self.new_app_service = new_app_service
        # original_app_service
        self.original_app_service = original_app_service

    def validate(self):
        if self.new_app_service:
            self.new_app_service.validate()
        if self.original_app_service:
            self.original_app_service.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.new_app_service is not None:
            result['new_app_service'] = self.new_app_service.to_map()
        if self.original_app_service is not None:
            result['original_app_service'] = self.original_app_service.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('new_app_service') is not None:
            temp_model = BuildpackAppService()
            self.new_app_service = temp_model.from_map(m['new_app_service'])
        if m.get('original_app_service') is not None:
            temp_model = BuildpackAppService()
            self.original_app_service = temp_model.from_map(m['original_app_service'])
        return self


class UpdateAppservicebuildpackrelationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class QueryAppserviceenvparamRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_ids: List[str] = None,
        app_service_ids: List[str] = None,
        buildpack_ids: List[str] = None,
        creation_time_from: str = None,
        creation_time_to: str = None,
        current_page: int = None,
        default_value: str = None,
        descend: bool = None,
        ids: List[str] = None,
        is_processed: bool = None,
        key: str = None,
        modification_time_from: str = None,
        modification_time_to: str = None,
        page_size: int = None,
        sort_field: str = None,
        start_index: int = None,
        value: str = None,
        workspace_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # appIds
        self.app_ids = app_ids
        # appServiceIds
        self.app_service_ids = app_service_ids
        # buildpackIds
        self.buildpack_ids = buildpack_ids
        # creationTimeFrom
        self.creation_time_from = creation_time_from
        # creationTimeTo
        self.creation_time_to = creation_time_to
        # 当前页
        self.current_page = current_page
        # defaultValue
        self.default_value = default_value
        # 是否降序
        self.descend = descend
        # ids
        self.ids = ids
        # isProcessed
        self.is_processed = is_processed
        # key
        self.key = key
        # modificationTimeFrom
        self.modification_time_from = modification_time_from
        # modificationTimeTo
        self.modification_time_to = modification_time_to
        # 每页个数
        self.page_size = page_size
        # 分类
        self.sort_field = sort_field
        # 开始索引
        self.start_index = start_index
        # value
        self.value = value
        # workspaceId
        self.workspace_id = workspace_id

    def validate(self):
        if self.creation_time_from is not None:
            self.validate_pattern(self.creation_time_from, 'creation_time_from', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.creation_time_to is not None:
            self.validate_pattern(self.creation_time_to, 'creation_time_to', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time_from is not None:
            self.validate_pattern(self.modification_time_from, 'modification_time_from', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time_to is not None:
            self.validate_pattern(self.modification_time_to, 'modification_time_to', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_ids is not None:
            result['app_ids'] = self.app_ids
        if self.app_service_ids is not None:
            result['app_service_ids'] = self.app_service_ids
        if self.buildpack_ids is not None:
            result['buildpack_ids'] = self.buildpack_ids
        if self.creation_time_from is not None:
            result['creation_time_from'] = self.creation_time_from
        if self.creation_time_to is not None:
            result['creation_time_to'] = self.creation_time_to
        if self.current_page is not None:
            result['current_page'] = self.current_page
        if self.default_value is not None:
            result['default_value'] = self.default_value
        if self.descend is not None:
            result['descend'] = self.descend
        if self.ids is not None:
            result['ids'] = self.ids
        if self.is_processed is not None:
            result['is_processed'] = self.is_processed
        if self.key is not None:
            result['key'] = self.key
        if self.modification_time_from is not None:
            result['modification_time_from'] = self.modification_time_from
        if self.modification_time_to is not None:
            result['modification_time_to'] = self.modification_time_to
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.sort_field is not None:
            result['sort_field'] = self.sort_field
        if self.start_index is not None:
            result['start_index'] = self.start_index
        if self.value is not None:
            result['value'] = self.value
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_ids') is not None:
            self.app_ids = m.get('app_ids')
        if m.get('app_service_ids') is not None:
            self.app_service_ids = m.get('app_service_ids')
        if m.get('buildpack_ids') is not None:
            self.buildpack_ids = m.get('buildpack_ids')
        if m.get('creation_time_from') is not None:
            self.creation_time_from = m.get('creation_time_from')
        if m.get('creation_time_to') is not None:
            self.creation_time_to = m.get('creation_time_to')
        if m.get('current_page') is not None:
            self.current_page = m.get('current_page')
        if m.get('default_value') is not None:
            self.default_value = m.get('default_value')
        if m.get('descend') is not None:
            self.descend = m.get('descend')
        if m.get('ids') is not None:
            self.ids = m.get('ids')
        if m.get('is_processed') is not None:
            self.is_processed = m.get('is_processed')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('modification_time_from') is not None:
            self.modification_time_from = m.get('modification_time_from')
        if m.get('modification_time_to') is not None:
            self.modification_time_to = m.get('modification_time_to')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('sort_field') is not None:
            self.sort_field = m.get('sort_field')
        if m.get('start_index') is not None:
            self.start_index = m.get('start_index')
        if m.get('value') is not None:
            self.value = m.get('value')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        return self


class QueryAppserviceenvparamResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        app_service_env_params: List[AppServiceEnvParam] = None,
        current_page: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # app_service_env_params
        self.app_service_env_params = app_service_env_params
        # current_page
        self.current_page = current_page
        # page_size
        self.page_size = page_size
        # total_count
        self.total_count = total_count

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['app_service_env_params'] = []
        if self.app_service_env_params is not None:
            for k in self.app_service_env_params:
                result['app_service_env_params'].append(k.to_map() if k else None)
        if self.current_page is not None:
            result['current_page'] = self.current_page
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.app_service_env_params = []
        if m.get('app_service_env_params') is not None:
            for k in m.get('app_service_env_params'):
                temp_model = AppServiceEnvParam()
                self.app_service_env_params.append(temp_model.from_map(k))
        if m.get('current_page') is not None:
            self.current_page = m.get('current_page')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class QueryAppserviceenvparamGroupbyappservicesRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_service_ids: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # appServiceIds
        self.app_service_ids = app_service_ids

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_service_ids is not None:
            result['app_service_ids'] = self.app_service_ids
        return result

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


class QueryAppserviceenvparamGroupbyappservicesResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        app_service_env_param: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 环境变量json字符串
        self.app_service_env_param = app_service_env_param

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.app_service_env_param is not None:
            result['app_service_env_param'] = self.app_service_env_param
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('app_service_env_param') is not None:
            self.app_service_env_param = m.get('app_service_env_param')
        return self


class QueryAppserviceenvparamQuerywithdiffRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_service_id: str = None,
        buildpack_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # appServiceId
        self.app_service_id = app_service_id
        # buildpackId
        self.buildpack_id = buildpack_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_service_id is not None:
            result['app_service_id'] = self.app_service_id
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_service_id') is not None:
            self.app_service_id = m.get('app_service_id')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        return self


class QueryAppserviceenvparamQuerywithdiffResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        app_service_env_param_diff: List[AppServiceEnvParam] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # json字符串
        self.app_service_env_param_diff = app_service_env_param_diff

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['app_service_env_param_diff'] = []
        if self.app_service_env_param_diff is not None:
            for k in self.app_service_env_param_diff:
                result['app_service_env_param_diff'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.app_service_env_param_diff = []
        if m.get('app_service_env_param_diff') is not None:
            for k in m.get('app_service_env_param_diff'):
                temp_model = AppServiceEnvParam()
                self.app_service_env_param_diff.append(temp_model.from_map(k))
        return self


class UpdateAppserviceenvparamUpdateparamsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_service_id: str = None,
        buildpack_id: str = None,
        params: List[AppServiceEnvParam] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # appServiceId
        self.app_service_id = app_service_id
        # buildpackId
        self.buildpack_id = buildpack_id
        # params
        self.params = params

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

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_service_id is not None:
            result['app_service_id'] = self.app_service_id
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_service_id') is not None:
            self.app_service_id = m.get('app_service_id')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        self.params = []
        if m.get('params') is not None:
            for k in m.get('params'):
                temp_model = AppServiceEnvParam()
                self.params.append(temp_model.from_map(k))
        return self


class UpdateAppserviceenvparamUpdateparamsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        app_service_env_param: List[AppServiceEnvParam] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # AppServiceEnvParam集合
        self.app_service_env_param = app_service_env_param

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['app_service_env_param'] = []
        if self.app_service_env_param is not None:
            for k in self.app_service_env_param:
                result['app_service_env_param'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.app_service_env_param = []
        if m.get('app_service_env_param') is not None:
            for k in m.get('app_service_env_param'):
                temp_model = AppServiceEnvParam()
                self.app_service_env_param.append(temp_model.from_map(k))
        return self


class QueryApptechstackrelationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_ids: List[str] = None,
        buildpack_arch: str = None,
        creation_time_from: str = None,
        creation_time_to: str = None,
        current_page: int = None,
        descend: str = None,
        ids: List[int] = None,
        is_processed: bool = None,
        modification_time_from: str = None,
        modification_time_to: str = None,
        page_size: int = None,
        sort_field: str = None,
        start_index: int = None,
        techstack_identities: str = None,
        techstack_ids: List[int] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 一组应用id
        self.app_ids = app_ids
        # buildpack_arch
        self.buildpack_arch = buildpack_arch
        # creation_fime_from
        # 
        self.creation_time_from = creation_time_from
        # creation_time_to
        # 
        self.creation_time_to = creation_time_to
        # current_page
        # 
        self.current_page = current_page
        # 是否降序
        self.descend = descend
        # ids
        self.ids = ids
        # isProcessed
        self.is_processed = is_processed
        # modification_time_from
        # 
        self.modification_time_from = modification_time_from
        # modification_time_to
        # 
        self.modification_time_to = modification_time_to
        # page_size
        # 
        self.page_size = page_size
        # 分类
        self.sort_field = sort_field
        # start_index
        # 
        self.start_index = start_index
        # techstack_identities
        # 
        self.techstack_identities = techstack_identities
        # techstack_ids
        # 
        self.techstack_ids = techstack_ids

    def validate(self):
        self.validate_required(self.app_ids, 'app_ids')
        if self.creation_time_from is not None:
            self.validate_pattern(self.creation_time_from, 'creation_time_from', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.creation_time_to is not None:
            self.validate_pattern(self.creation_time_to, 'creation_time_to', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.current_page, 'current_page')
        if self.modification_time_from is not None:
            self.validate_pattern(self.modification_time_from, 'modification_time_from', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time_to is not None:
            self.validate_pattern(self.modification_time_to, 'modification_time_to', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.start_index, 'start_index')
        self.validate_required(self.techstack_ids, 'techstack_ids')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_ids is not None:
            result['app_ids'] = self.app_ids
        if self.buildpack_arch is not None:
            result['buildpack_arch'] = self.buildpack_arch
        if self.creation_time_from is not None:
            result['creation_time_from'] = self.creation_time_from
        if self.creation_time_to is not None:
            result['creation_time_to'] = self.creation_time_to
        if self.current_page is not None:
            result['current_page'] = self.current_page
        if self.descend is not None:
            result['descend'] = self.descend
        if self.ids is not None:
            result['ids'] = self.ids
        if self.is_processed is not None:
            result['is_processed'] = self.is_processed
        if self.modification_time_from is not None:
            result['modification_time_from'] = self.modification_time_from
        if self.modification_time_to is not None:
            result['modification_time_to'] = self.modification_time_to
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.sort_field is not None:
            result['sort_field'] = self.sort_field
        if self.start_index is not None:
            result['start_index'] = self.start_index
        if self.techstack_identities is not None:
            result['techstack_identities'] = self.techstack_identities
        if self.techstack_ids is not None:
            result['techstack_ids'] = self.techstack_ids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_ids') is not None:
            self.app_ids = m.get('app_ids')
        if m.get('buildpack_arch') is not None:
            self.buildpack_arch = m.get('buildpack_arch')
        if m.get('creation_time_from') is not None:
            self.creation_time_from = m.get('creation_time_from')
        if m.get('creation_time_to') is not None:
            self.creation_time_to = m.get('creation_time_to')
        if m.get('current_page') is not None:
            self.current_page = m.get('current_page')
        if m.get('descend') is not None:
            self.descend = m.get('descend')
        if m.get('ids') is not None:
            self.ids = m.get('ids')
        if m.get('is_processed') is not None:
            self.is_processed = m.get('is_processed')
        if m.get('modification_time_from') is not None:
            self.modification_time_from = m.get('modification_time_from')
        if m.get('modification_time_to') is not None:
            self.modification_time_to = m.get('modification_time_to')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('sort_field') is not None:
            self.sort_field = m.get('sort_field')
        if m.get('start_index') is not None:
            self.start_index = m.get('start_index')
        if m.get('techstack_identities') is not None:
            self.techstack_identities = m.get('techstack_identities')
        if m.get('techstack_ids') is not None:
            self.techstack_ids = m.get('techstack_ids')
        return self


class QueryApptechstackrelationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        app_techstack_relations: List[AppTechstackRelation] = None,
        current_page: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # app_techstack_relations
        self.app_techstack_relations = app_techstack_relations
        # current_page
        self.current_page = current_page
        # page_size
        self.page_size = page_size
        # total_count
        self.total_count = total_count

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['app_techstack_relations'] = []
        if self.app_techstack_relations is not None:
            for k in self.app_techstack_relations:
                result['app_techstack_relations'].append(k.to_map() if k else None)
        if self.current_page is not None:
            result['current_page'] = self.current_page
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.app_techstack_relations = []
        if m.get('app_techstack_relations') is not None:
            for k in m.get('app_techstack_relations'):
                temp_model = AppTechstackRelation()
                self.app_techstack_relations.append(temp_model.from_map(k))
        if m.get('current_page') is not None:
            self.current_page = m.get('current_page')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class UpdateApptechstackrelationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_id: str = None,
        buildpack_arch: str = None,
        creation_time: str = None,
        extra_info: str = None,
        id: str = None,
        modification_time: str = None,
        techstack_id: int = None,
        techstack_identity: str = None,
        techstack_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # appId
        self.app_id = app_id
        # buildpackArch
        self.buildpack_arch = buildpack_arch
        # creationTime
        self.creation_time = creation_time
        # extraInfo
        self.extra_info = extra_info
        # id
        self.id = id
        # modificationTime
        self.modification_time = modification_time
        # techstackId
        self.techstack_id = techstack_id
        # techstackIdentity
        self.techstack_identity = techstack_identity
        # techstackName
        self.techstack_name = techstack_name

    def validate(self):
        if self.creation_time is not None:
            self.validate_pattern(self.creation_time, 'creation_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time is not None:
            self.validate_pattern(self.modification_time, 'modification_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.buildpack_arch is not None:
            result['buildpack_arch'] = self.buildpack_arch
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.extra_info is not None:
            result['extra_info'] = self.extra_info
        if self.id is not None:
            result['id'] = self.id
        if self.modification_time is not None:
            result['modification_time'] = self.modification_time
        if self.techstack_id is not None:
            result['techstack_id'] = self.techstack_id
        if self.techstack_identity is not None:
            result['techstack_identity'] = self.techstack_identity
        if self.techstack_name is not None:
            result['techstack_name'] = self.techstack_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('buildpack_arch') is not None:
            self.buildpack_arch = m.get('buildpack_arch')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('extra_info') is not None:
            self.extra_info = m.get('extra_info')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('modification_time') is not None:
            self.modification_time = m.get('modification_time')
        if m.get('techstack_id') is not None:
            self.techstack_id = m.get('techstack_id')
        if m.get('techstack_identity') is not None:
            self.techstack_identity = m.get('techstack_identity')
        if m.get('techstack_name') is not None:
            self.techstack_name = m.get('techstack_name')
        return self


class UpdateApptechstackrelationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class CreateAppRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        appgroup_name: str = None,
        description: str = None,
        display_name: str = None,
        name: str = None,
        owner_login_name: str = None,
        stack_id: str = None,
        tags: List[Tag] = None,
        buildpack_version: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用所属分组，至于应用所属分组的级别需要后端根据分组名称计算出来
        self.appgroup_name = appgroup_name
        # 应用描述
        self.description = description
        # 显示名称
        self.display_name = display_name
        # 应用名称
        self.name = name
        # 用户登录名
        self.owner_login_name = owner_login_name
        # 技术栈 id
        self.stack_id = stack_id
        # 应用额外信息（应用标签）
        self.tags = tags
        # 技术栈版本
        self.buildpack_version = buildpack_version

    def validate(self):
        self.validate_required(self.appgroup_name, 'appgroup_name')
        self.validate_required(self.name, 'name')
        self.validate_required(self.stack_id, 'stack_id')
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.appgroup_name is not None:
            result['appgroup_name'] = self.appgroup_name
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.name is not None:
            result['name'] = self.name
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        if self.stack_id is not None:
            result['stack_id'] = self.stack_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.buildpack_version is not None:
            result['buildpack_version'] = self.buildpack_version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('appgroup_name') is not None:
            self.appgroup_name = m.get('appgroup_name')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        if m.get('stack_id') is not None:
            self.stack_id = m.get('stack_id')
        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('buildpack_version') is not None:
            self.buildpack_version = m.get('buildpack_version')
        return self


class CreateAppResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 创建的应用 id
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class CreateAppGroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_scheme: List[AppDepend] = None,
        description: str = None,
        name: str = None,
        owner_login_name: str = None,
        parent_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用依赖规划
        self.app_scheme = app_scheme
        # 应用分组描述
        self.description = description
        # 应用分组名称，支持中文
        self.name = name
        # 应用分组负责人登录名
        self.owner_login_name = owner_login_name
        # 父应用分组 id
        self.parent_id = parent_id

    def validate(self):
        if self.app_scheme:
            for k in self.app_scheme:
                if k:
                    k.validate()
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        result['app_scheme'] = []
        if self.app_scheme is not None:
            for k in self.app_scheme:
                result['app_scheme'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.name is not None:
            result['name'] = self.name
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        if self.parent_id is not None:
            result['parent_id'] = self.parent_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        self.app_scheme = []
        if m.get('app_scheme') is not None:
            for k in m.get('app_scheme'):
                temp_model = AppDepend()
                self.app_scheme.append(temp_model.from_map(k))
        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('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        if m.get('parent_id') is not None:
            self.parent_id = m.get('parent_id')
        return self


class CreateAppGroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 创建的应用分组名称
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class GetAppRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 待查询的应用名称
        self.name = name

    def validate(self):
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class GetAppResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: App = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用基本信息
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            temp_model = App()
            self.data = temp_model.from_map(m['data'])
        return self


class CountAppServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.app_name = app_name

    def validate(self):
        self.validate_required(self.app_name, 'app_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        return result

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


class CountAppServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: AppServiceCount = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用服务计数
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            temp_model = AppServiceCount()
            self.data = temp_model.from_map(m['data'])
        return self


class AllAppDeployviewRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.app_name = app_name

    def validate(self):
        self.validate_required(self.app_name, 'app_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        return result

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


class AllAppDeployviewResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[DeployView] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 所有 workspace 的部署图/拓扑图
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['data'] = []
        if self.data is not None:
            for k in self.data:
                result['data'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = DeployView()
                self.data.append(temp_model.from_map(k))
        return self


class QueryAppRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_group_name: str = None,
        app_name: str = None,
        orders: List[str] = None,
        page_num: int = None,
        page_size: int = None,
        query_type: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 根据应用分组查询，为空默认查询所有应用分组
        self.app_group_name = app_group_name
        # 根据应用名称查询，为空默认查询所有应用
        self.app_name = app_name
        # 排序规则数组，默认为 UTC_CREATED_DESC，即 根据创建时间降序排序
        self.orders = orders
        # 当前页码，从1开始，默认为1
        self.page_num = page_num
        # 分页大小，默认为10
        self.page_size = page_size
        # 查询类型，支持精准查询、模糊查询、前缀模糊查询，这里默认为模糊查询；查询类型针对字段 app_name, app_group_name
        self.query_type = query_type

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_group_name is not None:
            result['app_group_name'] = self.app_group_name
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.orders is not None:
            result['orders'] = self.orders
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.query_type is not None:
            result['query_type'] = self.query_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_group_name') is not None:
            self.app_group_name = m.get('app_group_name')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('orders') is not None:
            self.orders = m.get('orders')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('query_type') is not None:
            self.query_type = m.get('query_type')
        return self


class QueryAppResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[App] = None,
        page_num: int = None,
        page_size: int = None,
        total: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 查询到的应用列表，包含每个应用的分组信息
        self.data = data
        # 当前页
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 记录总数
        self.total = total

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = App()
                self.data.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class GetAppGroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用分组名称
        self.name = name

    def validate(self):
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class GetAppGroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: AppGroup = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用分组
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            temp_model = AppGroup()
            self.data = temp_model.from_map(m['data'])
        return self


class QueryAppGroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_group_name: str = None,
        layer: int = None,
        orders: List[str] = None,
        owner_login_name: str = None,
        page_num: int = None,
        page_size: int = None,
        query_type: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 根据应用分组名称查询
        self.app_group_name = app_group_name
        # 根据应用分组层级进行筛选
        self.layer = layer
        # 排序规则数组，默认为 UTC_CREATED_DESC，即 根据创建时间降序排序
        self.orders = orders
        # 根据应用分组负责人登录名查询
        self.owner_login_name = owner_login_name
        # 当前页码，从1开始，默认为1
        self.page_num = page_num
        # 分页大小，默认为10
        self.page_size = page_size
        # 查询类型，支持精准查询、模糊查询、前缀模糊查询，这里默认为模糊查询；查询类型针对字段, app_group_name, owner_login_name
        self.query_type = query_type

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_group_name is not None:
            result['app_group_name'] = self.app_group_name
        if self.layer is not None:
            result['layer'] = self.layer
        if self.orders is not None:
            result['orders'] = self.orders
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.query_type is not None:
            result['query_type'] = self.query_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_group_name') is not None:
            self.app_group_name = m.get('app_group_name')
        if m.get('layer') is not None:
            self.layer = m.get('layer')
        if m.get('orders') is not None:
            self.orders = m.get('orders')
        if m.get('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('query_type') is not None:
            self.query_type = m.get('query_type')
        return self


class QueryAppGroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[AppGroup] = None,
        page_num: int = None,
        page_size: int = None,
        total: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 查询到的应用列表，包含每个应用的分组信息
        self.data = data
        # 当前页
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 记录总数
        self.total = total

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = AppGroup()
                self.data.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class QueryAppServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        orders: List[str] = None,
        page_num: int = None,
        page_size: int = None,
        workspace_ids: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 根据应用名称查询，不能为空，不支持一次性查询所有应用
        self.app_name = app_name
        # 排序规则数组，默认为 UTC_CREATED_DESC，即 根据创建时间降序排序
        self.orders = orders
        # 当前页码，从1开始，默认为1
        self.page_num = page_num
        # 分页大小，默认为10
        self.page_size = page_size
        # 工作空间列表
        self.workspace_ids = workspace_ids

    def validate(self):
        self.validate_required(self.app_name, 'app_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.orders is not None:
            result['orders'] = self.orders
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.workspace_ids is not None:
            result['workspace_ids'] = self.workspace_ids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('orders') is not None:
            self.orders = m.get('orders')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('workspace_ids') is not None:
            self.workspace_ids = m.get('workspace_ids')
        return self


class QueryAppServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[AppServiceEntity] = None,
        page_num: int = None,
        page_size: int = None,
        total: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用服务实例列表，每个应用服务实例包含 slb、ecs、db 等信息
        self.data = data
        # 当前页码
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 总数
        self.total = total

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = AppServiceEntity()
                self.data.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class CreateAppFavouriteRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        owner_login_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 用户要收藏的应用名称
        self.app_name = app_name
        # 用户登录名
        self.owner_login_name = owner_login_name

    def validate(self):
        self.validate_required(self.app_name, 'app_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        return self


class CreateAppFavouriteResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 收藏成功的记录id
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class DeleteAppFavouriteRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        owner_login_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 用户要取消收藏的应用名称
        self.app_name = app_name
        # 用户登录名
        self.owner_login_name = owner_login_name

    def validate(self):
        self.validate_required(self.app_name, 'app_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.owner_login_name is not None:
            result['owner_login_name'] = self.owner_login_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('owner_login_name') is not None:
            self.owner_login_name = m.get('owner_login_name')
        return self


class DeleteAppFavouriteResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否取消收藏成功
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class UpdateAppRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        appgroup_name: str = None,
        buildpack_version: str = None,
        description: str = None,
        display_name: str = None,
        name: str = None,
        tags: List[Tag] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用所属分组，至于应用所属分组的级别需要后端根据分组名称计算出来
        self.appgroup_name = appgroup_name
        # 技术栈版本
        self.buildpack_version = buildpack_version
        # 应用描述
        self.description = description
        # 显示名称
        self.display_name = display_name
        # 应用名称
        self.name = name
        # 应用额外信息（应用标签）
        self.tags = tags

    def validate(self):
        self.validate_required(self.name, 'name')
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.appgroup_name is not None:
            result['appgroup_name'] = self.appgroup_name
        if self.buildpack_version is not None:
            result['buildpack_version'] = self.buildpack_version
        if self.description is not None:
            result['description'] = self.description
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.name is not None:
            result['name'] = self.name
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('appgroup_name') is not None:
            self.appgroup_name = m.get('appgroup_name')
        if m.get('buildpack_version') is not None:
            self.buildpack_version = m.get('buildpack_version')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('name') is not None:
            self.name = m.get('name')
        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 UpdateAppResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否更新成功
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class UpdateAppGroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_scheme: List[AppDepend] = None,
        description: str = None,
        name: str = None,
        parent_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用依赖拓扑图
        self.app_scheme = app_scheme
        # 应用分组描述
        self.description = description
        # 应用分组名称，支持中文
        self.name = name
        # 父应用分组 id
        self.parent_id = parent_id

    def validate(self):
        if self.app_scheme:
            for k in self.app_scheme:
                if k:
                    k.validate()
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        result['app_scheme'] = []
        if self.app_scheme is not None:
            for k in self.app_scheme:
                result['app_scheme'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.name is not None:
            result['name'] = self.name
        if self.parent_id is not None:
            result['parent_id'] = self.parent_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        self.app_scheme = []
        if m.get('app_scheme') is not None:
            for k in m.get('app_scheme'):
                temp_model = AppDepend()
                self.app_scheme.append(temp_model.from_map(k))
        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('parent_id') is not None:
            self.parent_id = m.get('parent_id')
        return self


class UpdateAppGroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否更新成功
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class ListAppFavouriteRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        orders: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 排序规则数组，默认为 UTC_CREATED_DESC，即 根据创建时间降序排序
        self.orders = orders

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.orders is not None:
            result['orders'] = self.orders
        return result

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


class ListAppFavouriteResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[App] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 当前用户收藏的所有应用
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['data'] = []
        if self.data is not None:
            for k in self.data:
                result['data'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = App()
                self.data.append(temp_model.from_map(k))
        return self


class DeleteAppRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 要删除的应用名称
        self.name = name

    def validate(self):
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class DeleteAppResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否删除成功
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class DeleteAppGroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 要删除的应用分组名称
        self.name = name

    def validate(self):
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class DeleteAppGroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否删除成功
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class QueryAppPlanRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        orders: List[str] = None,
        order_id: str = None,
        page_num: int = None,
        page_size: int = None,
        state_list: List[str] = None,
        workspace: str = None,
        workspace_ids: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.app_name = app_name
        # 排序规则数组，默认为 UTC_CREATED_DESC，即 根据创建时间降序排序
        self.orders = orders
        # 发布单 order_id
        self.order_id = order_id
        # 当前页码，从1开始，默认为1
        self.page_num = page_num
        # 分页大小，默认为10
        self.page_size = page_size
        # 状态筛选列表
        self.state_list = state_list
        # 工作空间名称
        self.workspace = workspace
        # 工作空间 id 列表
        self.workspace_ids = workspace_ids

    def validate(self):
        self.validate_required(self.app_name, 'app_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.orders is not None:
            result['orders'] = self.orders
        if self.order_id is not None:
            result['order_id'] = self.order_id
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.state_list is not None:
            result['state_list'] = self.state_list
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.workspace_ids is not None:
            result['workspace_ids'] = self.workspace_ids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('orders') is not None:
            self.orders = m.get('orders')
        if m.get('order_id') is not None:
            self.order_id = m.get('order_id')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('state_list') is not None:
            self.state_list = m.get('state_list')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        if m.get('workspace_ids') is not None:
            self.workspace_ids = m.get('workspace_ids')
        return self


class QueryAppPlanResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[OpsPlan] = None,
        page_num: int = None,
        page_size: int = None,
        total: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 查询到的发布单列表
        self.data = data
        # 当前分页，默认为1
        self.page_num = page_num
        # 分页大小，默认为10
        self.page_size = page_size
        # 查询总数
        self.total = total

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = OpsPlan()
                self.data.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total') is not None:
            self.total = m.get('total')
        return self


class ExistAppGroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        appgroup_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用分组名称
        self.appgroup_name = appgroup_name

    def validate(self):
        self.validate_required(self.appgroup_name, 'appgroup_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.appgroup_name is not None:
            result['appgroup_name'] = self.appgroup_name
        return result

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


class ExistAppGroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否存在
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class QueryUserRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        login_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 没传递该参数时，返回当前登录用户信息
        self.login_name = login_name

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.login_name is not None:
            result['login_name'] = self.login_name
        return result

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


class QueryUserResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: UserDTO = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 用户信息
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            temp_model = UserDTO()
            self.data = temp_model.from_map(m['data'])
        return self


class ExistAppRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.app_name = app_name

    def validate(self):
        self.validate_required(self.app_name, 'app_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        return result

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


class ExistAppResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否存在
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class GetApplicationBuildpackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        service_name: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.application_name = application_name
        # 应用服务的名称
        self.service_name = service_name
        # 环境
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.application_name, 'application_name')
        self.validate_required(self.service_name, 'service_name')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.service_name is not None:
            result['service_name'] = self.service_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('service_name') is not None:
            self.service_name = m.get('service_name')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetApplicationBuildpackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpack_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 技术栈id
        self.buildpack_id = buildpack_id

    def validate(self):
        self.validate_required(self.buildpack_id, 'buildpack_id')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        return self


class GetApplicationTechstackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.application_name = application_name

    def validate(self):
        self.validate_required(self.application_name, 'application_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        return result

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


class GetApplicationTechstackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        techstack: Techstack = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 技术栈框架
        self.techstack = techstack

    def validate(self):
        self.validate_required(self.techstack, 'techstack')
        if self.techstack:
            self.techstack.validate()

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.techstack is not None:
            result['techstack'] = self.techstack.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('techstack') is not None:
            temp_model = Techstack()
            self.techstack = temp_model.from_map(m['techstack'])
        return self


class GetBuildpackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        buildpack_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 技术栈版本的ID
        self.buildpack_id = buildpack_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        return result

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


class GetBuildpackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpack_params: List[BuildpackParamTemplate] = None,
        contact_info: str = None,
        creator_id: str = None,
        debug_mode: bool = None,
        depracation_note: str = None,
        description: str = None,
        full_version: str = None,
        publication_time: str = None,
        publisher_id: str = None,
        scope: str = None,
        shared_tenants: List[str] = None,
        status: str = None,
        supported_os: List[BuildpackOS] = None,
        supported_regions: List[str] = None,
        techstack_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # buildpackParams
        self.buildpack_params = buildpack_params
        # contactInfo
        self.contact_info = contact_info
        # creatorId
        self.creator_id = creator_id
        # debugMode
        self.debug_mode = debug_mode
        # depracationNote
        self.depracation_note = depracation_note
        # description
        self.description = description
        # fullVersion
        self.full_version = full_version
        # publicationTime
        self.publication_time = publication_time
        # publisherId
        self.publisher_id = publisher_id
        # scope
        self.scope = scope
        # sharedTenants
        self.shared_tenants = shared_tenants
        # status
        self.status = status
        # supportedOs
        self.supported_os = supported_os
        # supportedRegions
        self.supported_regions = supported_regions
        # techstackId
        self.techstack_id = techstack_id

    def validate(self):
        if self.buildpack_params:
            for k in self.buildpack_params:
                if k:
                    k.validate()
        if self.publication_time is not None:
            self.validate_pattern(self.publication_time, 'publication_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.supported_os:
            for k in self.supported_os:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['buildpack_params'] = []
        if self.buildpack_params is not None:
            for k in self.buildpack_params:
                result['buildpack_params'].append(k.to_map() if k else None)
        if self.contact_info is not None:
            result['contact_info'] = self.contact_info
        if self.creator_id is not None:
            result['creator_id'] = self.creator_id
        if self.debug_mode is not None:
            result['debug_mode'] = self.debug_mode
        if self.depracation_note is not None:
            result['depracation_note'] = self.depracation_note
        if self.description is not None:
            result['description'] = self.description
        if self.full_version is not None:
            result['full_version'] = self.full_version
        if self.publication_time is not None:
            result['publication_time'] = self.publication_time
        if self.publisher_id is not None:
            result['publisher_id'] = self.publisher_id
        if self.scope is not None:
            result['scope'] = self.scope
        if self.shared_tenants is not None:
            result['shared_tenants'] = self.shared_tenants
        if self.status is not None:
            result['status'] = self.status
        result['supported_os'] = []
        if self.supported_os is not None:
            for k in self.supported_os:
                result['supported_os'].append(k.to_map() if k else None)
        if self.supported_regions is not None:
            result['supported_regions'] = self.supported_regions
        if self.techstack_id is not None:
            result['techstack_id'] = self.techstack_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.buildpack_params = []
        if m.get('buildpack_params') is not None:
            for k in m.get('buildpack_params'):
                temp_model = BuildpackParamTemplate()
                self.buildpack_params.append(temp_model.from_map(k))
        if m.get('contact_info') is not None:
            self.contact_info = m.get('contact_info')
        if m.get('creator_id') is not None:
            self.creator_id = m.get('creator_id')
        if m.get('debug_mode') is not None:
            self.debug_mode = m.get('debug_mode')
        if m.get('depracation_note') is not None:
            self.depracation_note = m.get('depracation_note')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        if m.get('publication_time') is not None:
            self.publication_time = m.get('publication_time')
        if m.get('publisher_id') is not None:
            self.publisher_id = m.get('publisher_id')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('shared_tenants') is not None:
            self.shared_tenants = m.get('shared_tenants')
        if m.get('status') is not None:
            self.status = m.get('status')
        self.supported_os = []
        if m.get('supported_os') is not None:
            for k in m.get('supported_os'):
                temp_model = BuildpackOS()
                self.supported_os.append(temp_model.from_map(k))
        if m.get('supported_regions') is not None:
            self.supported_regions = m.get('supported_regions')
        if m.get('techstack_id') is not None:
            self.techstack_id = m.get('techstack_id')
        return self


class ListTechstackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        return result

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


class ListTechstackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        techstacks: List[Techstack] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 技术栈列表
        self.techstacks = techstacks

    def validate(self):
        self.validate_required(self.techstacks, 'techstacks')
        if self.techstacks:
            for k in self.techstacks:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['techstacks'] = []
        if self.techstacks is not None:
            for k in self.techstacks:
                result['techstacks'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.techstacks = []
        if m.get('techstacks') is not None:
            for k in m.get('techstacks'):
                temp_model = Techstack()
                self.techstacks.append(temp_model.from_map(k))
        return self


class QueryBuildpackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        current_page: int = None,
        full_version: str = None,
        page_size: int = None,
        publication_time_from: str = None,
        publication_time_to: str = None,
        scopes: List[str] = None,
        statuses: List[str] = None,
        supported_os_ids: List[int] = None,
        supported_regions: List[str] = None,
        techstack_ids: List[int] = None,
        techstack_names: List[str] = None,
        creator_ids: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 当前页码
        self.current_page = current_page
        # 技术栈版本号
        self.full_version = full_version
        # 每页的大小
        self.page_size = page_size
        # 开始时间
        self.publication_time_from = publication_time_from
        # 截至时间
        self.publication_time_to = publication_time_to
        # 技术栈提供方所在域
        self.scopes = scopes
        # 技术栈版本状态
        self.statuses = statuses
        # 支持的操作系统ID列表
        self.supported_os_ids = supported_os_ids
        # 支持的地域名称列表
        self.supported_regions = supported_regions
        # 技术栈ID列表
        self.techstack_ids = techstack_ids
        # 技术栈名称
        self.techstack_names = techstack_names
        # creatorIds
        self.creator_ids = creator_ids

    def validate(self):
        if self.publication_time_from is not None:
            self.validate_pattern(self.publication_time_from, 'publication_time_from', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.publication_time_to is not None:
            self.validate_pattern(self.publication_time_to, 'publication_time_to', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.current_page is not None:
            result['current_page'] = self.current_page
        if self.full_version is not None:
            result['full_version'] = self.full_version
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.publication_time_from is not None:
            result['publication_time_from'] = self.publication_time_from
        if self.publication_time_to is not None:
            result['publication_time_to'] = self.publication_time_to
        if self.scopes is not None:
            result['scopes'] = self.scopes
        if self.statuses is not None:
            result['statuses'] = self.statuses
        if self.supported_os_ids is not None:
            result['supported_os_ids'] = self.supported_os_ids
        if self.supported_regions is not None:
            result['supported_regions'] = self.supported_regions
        if self.techstack_ids is not None:
            result['techstack_ids'] = self.techstack_ids
        if self.techstack_names is not None:
            result['techstack_names'] = self.techstack_names
        if self.creator_ids is not None:
            result['creator_ids'] = self.creator_ids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('current_page') is not None:
            self.current_page = m.get('current_page')
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('publication_time_from') is not None:
            self.publication_time_from = m.get('publication_time_from')
        if m.get('publication_time_to') is not None:
            self.publication_time_to = m.get('publication_time_to')
        if m.get('scopes') is not None:
            self.scopes = m.get('scopes')
        if m.get('statuses') is not None:
            self.statuses = m.get('statuses')
        if m.get('supported_os_ids') is not None:
            self.supported_os_ids = m.get('supported_os_ids')
        if m.get('supported_regions') is not None:
            self.supported_regions = m.get('supported_regions')
        if m.get('techstack_ids') is not None:
            self.techstack_ids = m.get('techstack_ids')
        if m.get('techstack_names') is not None:
            self.techstack_names = m.get('techstack_names')
        if m.get('creator_ids') is not None:
            self.creator_ids = m.get('creator_ids')
        return self


class QueryBuildpackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpacks: List[BuildpackDetail] = None,
        current_page: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 符合条件的技术栈列表
        self.buildpacks = buildpacks
        # 当前页码
        self.current_page = current_page
        # 每页的大小
        self.page_size = page_size
        # 总数量
        self.total_count = total_count

    def validate(self):
        if self.buildpacks:
            for k in self.buildpacks:
                if k:
                    k.validate()
        self.validate_required(self.current_page, 'current_page')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.total_count, 'total_count')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['buildpacks'] = []
        if self.buildpacks is not None:
            for k in self.buildpacks:
                result['buildpacks'].append(k.to_map() if k else None)
        if self.current_page is not None:
            result['current_page'] = self.current_page
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.buildpacks = []
        if m.get('buildpacks') is not None:
            for k in m.get('buildpacks'):
                temp_model = BuildpackDetail()
                self.buildpacks.append(temp_model.from_map(k))
        if m.get('current_page') is not None:
            self.current_page = m.get('current_page')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class CreateBuildpackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        available_tenant_names: List[str] = None,
        build_command: str = None,
        contact_info: str = None,
        debug_mode: bool = None,
        description: str = None,
        env_params: List[BuildpackParamTemplate] = None,
        full_version: str = None,
        major_version: int = None,
        minor_version: int = None,
        patch_version: int = None,
        scope: str = None,
        supported_os: List[int] = None,
        supported_regions: List[BuildpackRegionRelation] = None,
        techstack_id: int = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 技术栈所支持的租户名称列表
        self.available_tenant_names = available_tenant_names
        # 技术栈的编译打包命令
        self.build_command = build_command
        # 分享给其他租户时留下的联系信息
        self.contact_info = contact_info
        # 当前技术栈是否是debug模式
        self.debug_mode = debug_mode
        # 描述
        self.description = description
        # 环境变量
        self.env_params = env_params
        # 技术栈的版本号
        self.full_version = full_version
        # 主版本号
        self.major_version = major_version
        # 次版本号
        self.minor_version = minor_version
        # 补丁版本号
        self.patch_version = patch_version
        # 技术栈的作用域，可以是SYSTEM或者CUSTOM
        self.scope = scope
        # 支持的操作系统ID
        self.supported_os = supported_os
        # 技术栈支持的地域信息
        self.supported_regions = supported_regions
        # 技术栈大类的id
        self.techstack_id = techstack_id

    def validate(self):
        if self.env_params:
            for k in self.env_params:
                if k:
                    k.validate()
        if self.supported_regions:
            for k in self.supported_regions:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.available_tenant_names is not None:
            result['available_tenant_names'] = self.available_tenant_names
        if self.build_command is not None:
            result['build_command'] = self.build_command
        if self.contact_info is not None:
            result['contact_info'] = self.contact_info
        if self.debug_mode is not None:
            result['debug_mode'] = self.debug_mode
        if self.description is not None:
            result['description'] = self.description
        result['env_params'] = []
        if self.env_params is not None:
            for k in self.env_params:
                result['env_params'].append(k.to_map() if k else None)
        if self.full_version is not None:
            result['full_version'] = self.full_version
        if self.major_version is not None:
            result['major_version'] = self.major_version
        if self.minor_version is not None:
            result['minor_version'] = self.minor_version
        if self.patch_version is not None:
            result['patch_version'] = self.patch_version
        if self.scope is not None:
            result['scope'] = self.scope
        if self.supported_os is not None:
            result['supported_os'] = self.supported_os
        result['supported_regions'] = []
        if self.supported_regions is not None:
            for k in self.supported_regions:
                result['supported_regions'].append(k.to_map() if k else None)
        if self.techstack_id is not None:
            result['techstack_id'] = self.techstack_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('available_tenant_names') is not None:
            self.available_tenant_names = m.get('available_tenant_names')
        if m.get('build_command') is not None:
            self.build_command = m.get('build_command')
        if m.get('contact_info') is not None:
            self.contact_info = m.get('contact_info')
        if m.get('debug_mode') is not None:
            self.debug_mode = m.get('debug_mode')
        if m.get('description') is not None:
            self.description = m.get('description')
        self.env_params = []
        if m.get('env_params') is not None:
            for k in m.get('env_params'):
                temp_model = BuildpackParamTemplate()
                self.env_params.append(temp_model.from_map(k))
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        if m.get('major_version') is not None:
            self.major_version = m.get('major_version')
        if m.get('minor_version') is not None:
            self.minor_version = m.get('minor_version')
        if m.get('patch_version') is not None:
            self.patch_version = m.get('patch_version')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('supported_os') is not None:
            self.supported_os = m.get('supported_os')
        self.supported_regions = []
        if m.get('supported_regions') is not None:
            for k in m.get('supported_regions'):
                temp_model = BuildpackRegionRelation()
                self.supported_regions.append(temp_model.from_map(k))
        if m.get('techstack_id') is not None:
            self.techstack_id = m.get('techstack_id')
        return self


class CreateBuildpackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpack_id: str = None,
        upload_endpoints: List[UploadEndpoint] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 创建完成的技术栈ID
        self.buildpack_id = buildpack_id
        # 技术栈包上传地址信息
        self.upload_endpoints = upload_endpoints

    def validate(self):
        self.validate_required(self.buildpack_id, 'buildpack_id')
        self.validate_required(self.upload_endpoints, 'upload_endpoints')
        if self.upload_endpoints:
            for k in self.upload_endpoints:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        result['upload_endpoints'] = []
        if self.upload_endpoints is not None:
            for k in self.upload_endpoints:
                result['upload_endpoints'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        self.upload_endpoints = []
        if m.get('upload_endpoints') is not None:
            for k in m.get('upload_endpoints'):
                temp_model = UploadEndpoint()
                self.upload_endpoints.append(temp_model.from_map(k))
        return self


class UploadfinishBuildpackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        buildpack_id: str = None,
        supported_regions: List[BuildpackRegionRelation] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 技术栈的ID
        self.buildpack_id = buildpack_id
        # supportedRegions
        self.supported_regions = supported_regions

    def validate(self):
        self.validate_required(self.buildpack_id, 'buildpack_id')
        if self.supported_regions:
            for k in self.supported_regions:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        result['supported_regions'] = []
        if self.supported_regions is not None:
            for k in self.supported_regions:
                result['supported_regions'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        self.supported_regions = []
        if m.get('supported_regions') is not None:
            for k in m.get('supported_regions'):
                temp_model = BuildpackRegionRelation()
                self.supported_regions.append(temp_model.from_map(k))
        return self


class UploadfinishBuildpackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class PublishBuildpackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        buildpack_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # buildpackId
        self.buildpack_id = buildpack_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        return result

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


class PublishBuildpackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class UpdateBuildpackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        build_command: str = None,
        contact_info: str = None,
        debug_mode: bool = None,
        description: str = None,
        env_params: List[BuildpackParamTemplate] = None,
        full_version: str = None,
        id: str = None,
        supported_os: List[int] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 技术栈的编译打包命令
        self.build_command = build_command
        # 分享给其他租户时留下的联系信息
        self.contact_info = contact_info
        # 当前技术栈是否是debug模式
        self.debug_mode = debug_mode
        # 描述
        self.description = description
        # 环境变量
        self.env_params = env_params
        # 技术栈版本号
        self.full_version = full_version
        # 技术栈id
        self.id = id
        # 支持的操作系统ID
        self.supported_os = supported_os

    def validate(self):
        if self.env_params:
            for k in self.env_params:
                if k:
                    k.validate()
        self.validate_required(self.full_version, 'full_version')
        self.validate_required(self.id, 'id')
        self.validate_required(self.supported_os, 'supported_os')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.build_command is not None:
            result['build_command'] = self.build_command
        if self.contact_info is not None:
            result['contact_info'] = self.contact_info
        if self.debug_mode is not None:
            result['debug_mode'] = self.debug_mode
        if self.description is not None:
            result['description'] = self.description
        result['env_params'] = []
        if self.env_params is not None:
            for k in self.env_params:
                result['env_params'].append(k.to_map() if k else None)
        if self.full_version is not None:
            result['full_version'] = self.full_version
        if self.id is not None:
            result['id'] = self.id
        if self.supported_os is not None:
            result['supported_os'] = self.supported_os
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('build_command') is not None:
            self.build_command = m.get('build_command')
        if m.get('contact_info') is not None:
            self.contact_info = m.get('contact_info')
        if m.get('debug_mode') is not None:
            self.debug_mode = m.get('debug_mode')
        if m.get('description') is not None:
            self.description = m.get('description')
        self.env_params = []
        if m.get('env_params') is not None:
            for k in m.get('env_params'):
                temp_model = BuildpackParamTemplate()
                self.env_params.append(temp_model.from_map(k))
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('supported_os') is not None:
            self.supported_os = m.get('supported_os')
        return self


class UpdateBuildpackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class QueryBuildpackFindbynamesRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        techstack_names: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # techstackNames
        self.techstack_names = techstack_names

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.techstack_names is not None:
            result['techstack_names'] = self.techstack_names
        return result

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


class QueryBuildpackFindbynamesResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        techstack: List[Techstack] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # techstack对象的json串
        self.techstack = techstack

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['techstack'] = []
        if self.techstack is not None:
            for k in self.techstack:
                result['techstack'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.techstack = []
        if m.get('techstack') is not None:
            for k in m.get('techstack'):
                temp_model = Techstack()
                self.techstack.append(temp_model.from_map(k))
        return self


class CountBuildpackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        buildpack_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # buildpackId
        self.buildpack_id = buildpack_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        return result

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


class CountBuildpackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # count值
        self.count = count

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('count') is not None:
            self.count = m.get('count')
        return self


class DeprecateBuildpackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        depracation_note_map: DepracationNotePayload = None,
        id: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # depracationNoteMap
        self.depracation_note_map = depracation_note_map
        # ids
        self.id = id

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

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.depracation_note_map is not None:
            result['depracation_note_map'] = self.depracation_note_map.to_map()
        if self.id is not None:
            result['id'] = self.id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('depracation_note_map') is not None:
            temp_model = DepracationNotePayload()
            self.depracation_note_map = temp_model.from_map(m['depracation_note_map'])
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class DeprecateBuildpackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        result: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # result
        self.result = result

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('result') is not None:
            self.result = m.get('result')
        return self


class BatchdeleteBuildpackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # ids
        self.id = id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        return result

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


class BatchdeleteBuildpackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpack_detail_vo: List[BuildpackDetailVO] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # BuildpackDetailVO
        self.buildpack_detail_vo = buildpack_detail_vo

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['buildpack_detail_vo'] = []
        if self.buildpack_detail_vo is not None:
            for k in self.buildpack_detail_vo:
                result['buildpack_detail_vo'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.buildpack_detail_vo = []
        if m.get('buildpack_detail_vo') is not None:
            for k in m.get('buildpack_detail_vo'):
                temp_model = BuildpackDetailVO()
                self.buildpack_detail_vo.append(temp_model.from_map(k))
        return self


class ExistBuildpackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        buildpack_id: str = None,
        full_version: str = None,
        techstack_id: int = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # buildpackId
        self.buildpack_id = buildpack_id
        # fullVersion
        self.full_version = full_version
        # techstackId
        self.techstack_id = techstack_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        if self.full_version is not None:
            result['full_version'] = self.full_version
        if self.techstack_id is not None:
            result['techstack_id'] = self.techstack_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        if m.get('techstack_id') is not None:
            self.techstack_id = m.get('techstack_id')
        return self


class ExistBuildpackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        result: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # result
        self.result = result

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('result') is not None:
            self.result = m.get('result')
        return self


class UpdateBuildpackUpdatepackagesstatusRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        new_file_status: str = None,
        original_file_status: str = None,
        region_num: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # buildpackId
        self.id = id
        # newFileStatus
        self.new_file_status = new_file_status
        # originalFileStatus
        self.original_file_status = original_file_status
        # regionIds
        self.region_num = region_num

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.new_file_status is not None:
            result['new_file_status'] = self.new_file_status
        if self.original_file_status is not None:
            result['original_file_status'] = self.original_file_status
        if self.region_num is not None:
            result['region_num'] = self.region_num
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('new_file_status') is not None:
            self.new_file_status = m.get('new_file_status')
        if m.get('original_file_status') is not None:
            self.original_file_status = m.get('original_file_status')
        if m.get('region_num') is not None:
            self.region_num = m.get('region_num')
        return self


class UpdateBuildpackUpdatepackagesstatusResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        result: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # result
        self.result = result

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('result') is not None:
            self.result = m.get('result')
        return self


class QueryBuildpackFindidversionpairsbyversionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        full_version: str = None,
        statuses: List[str] = None,
        techstack_id: int = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # fullVersion
        self.full_version = full_version
        # statuses
        self.statuses = statuses
        # techstackId
        self.techstack_id = techstack_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.full_version is not None:
            result['full_version'] = self.full_version
        if self.statuses is not None:
            result['statuses'] = self.statuses
        if self.techstack_id is not None:
            result['techstack_id'] = self.techstack_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        if m.get('statuses') is not None:
            self.statuses = m.get('statuses')
        if m.get('techstack_id') is not None:
            self.techstack_id = m.get('techstack_id')
        return self


class QueryBuildpackFindidversionpairsbyversionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpack_composite_vos: List[BuildpackCompositeVO] = None,
        current_page: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # buildpack_composite_v_os
        self.buildpack_composite_vos = buildpack_composite_vos
        # current_page
        self.current_page = current_page
        # page_size
        self.page_size = page_size
        # total_count
        self.total_count = total_count

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['buildpack_composite_v_os'] = []
        if self.buildpack_composite_vos is not None:
            for k in self.buildpack_composite_vos:
                result['buildpack_composite_v_os'].append(k.to_map() if k else None)
        if self.current_page is not None:
            result['current_page'] = self.current_page
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.buildpack_composite_vos = []
        if m.get('buildpack_composite_v_os') is not None:
            for k in m.get('buildpack_composite_v_os'):
                temp_model = BuildpackCompositeVO()
                self.buildpack_composite_vos.append(temp_model.from_map(k))
        if m.get('current_page') is not None:
            self.current_page = m.get('current_page')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class QueryBuildpackGroupbytechstackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        return result

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


class QueryBuildpackGroupbytechstackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        count: List[TechstackBuildpackCount] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # count
        self.count = count

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['count'] = []
        if self.count is not None:
            for k in self.count:
                result['count'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.count = []
        if m.get('count') is not None:
            for k in m.get('count'):
                temp_model = TechstackBuildpackCount()
                self.count.append(temp_model.from_map(k))
        return self


class QueryBuildpackFindvisibletechstacksRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        return result

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


class QueryBuildpackFindvisibletechstacksResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        techstack: List[Techstack] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # Techstack
        self.techstack = techstack

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['techstack'] = []
        if self.techstack is not None:
            for k in self.techstack:
                result['techstack'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.techstack = []
        if m.get('techstack') is not None:
            for k in m.get('techstack'):
                temp_model = Techstack()
                self.techstack.append(temp_model.from_map(k))
        return self


class QueryBuildpackFindwritabletechstacksRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        return result

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


class QueryBuildpackFindwritabletechstacksResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        techstack: List[Techstack] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # Techstack
        self.techstack = techstack

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['techstack'] = []
        if self.techstack is not None:
            for k in self.techstack:
                result['techstack'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.techstack = []
        if m.get('techstack') is not None:
            for k in m.get('techstack'):
                temp_model = Techstack()
                self.techstack.append(temp_model.from_map(k))
        return self


class QueryBuildpackFindosbycurrentcloudRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        return result

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


class QueryBuildpackFindosbycurrentcloudResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpack_os: List[BuildpackOS] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # BuildpackOS
        self.buildpack_os = buildpack_os

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['buildpack_os'] = []
        if self.buildpack_os is not None:
            for k in self.buildpack_os:
                result['buildpack_os'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.buildpack_os = []
        if m.get('buildpack_os') is not None:
            for k in m.get('buildpack_os'):
                temp_model = BuildpackOS()
                self.buildpack_os.append(temp_model.from_map(k))
        return self


class QueryBuildpackFindbyappsvRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_ids: List[str] = None,
        workspace_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # appIds
        self.app_ids = app_ids
        # workspaceId
        self.workspace_id = workspace_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_ids is not None:
            result['app_ids'] = self.app_ids
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_ids') is not None:
            self.app_ids = m.get('app_ids')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        return self


class QueryBuildpackFindbyappsvResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpack: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 包含Buildpack对象的json串
        self.buildpack = buildpack

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.buildpack is not None:
            result['buildpack'] = self.buildpack
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('buildpack') is not None:
            self.buildpack = m.get('buildpack')
        return self


class QueryBuildpackFindbyappsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_ids: List[str] = None,
        workspace_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # appIds
        self.app_ids = app_ids
        # workspaceId
        self.workspace_id = workspace_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_ids is not None:
            result['app_ids'] = self.app_ids
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_ids') is not None:
            self.app_ids = m.get('app_ids')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        return self


class QueryBuildpackFindbyappsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpackv_2adapter: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 包含BuildpackV2Adapter对象的json字符串
        self.buildpackv_2adapter = buildpackv_2adapter

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.buildpackv_2adapter is not None:
            result['buildpackv2adapter'] = self.buildpackv_2adapter
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('buildpackv2adapter') is not None:
            self.buildpackv_2adapter = m.get('buildpackv2adapter')
        return self


class QueryBuildpackFindbyappservicesRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_service_ids: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # appServiceIds
        self.app_service_ids = app_service_ids

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_service_ids is not None:
            result['app_service_ids'] = self.app_service_ids
        return result

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


class QueryBuildpackFindbyappservicesResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpack_v2adapter: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 包含BuildpackV2Adapter对象的json串
        self.buildpack_v2adapter = buildpack_v2adapter

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.buildpack_v2adapter is not None:
            result['buildpack_v2_adapter'] = self.buildpack_v2adapter
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('buildpack_v2_adapter') is not None:
            self.buildpack_v2adapter = m.get('buildpack_v2_adapter')
        return self


class QueryBuildpackFindbyappvRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_id: str = None,
        workspace_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # appId
        self.app_id = app_id
        # workspaceId
        self.workspace_id = workspace_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        return self


class QueryBuildpackFindbyappvResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpack: BuildpackByAppV = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # Buildpack
        self.buildpack = buildpack

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.buildpack is not None:
            result['buildpack'] = self.buildpack.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('buildpack') is not None:
            temp_model = BuildpackByAppV()
            self.buildpack = temp_model.from_map(m['buildpack'])
        return self


class QueryBuildpackFindbyappRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_id: str = None,
        workspace_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # appId
        self.app_id = app_id
        # workspaceId
        self.workspace_id = workspace_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        return self


class QueryBuildpackFindbyappResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        bg_enable: bool = None,
        buildpack_arch: str = None,
        build_script_id: str = None,
        command_id: str = None,
        component_id: str = None,
        config_id: str = None,
        creator: str = None,
        customer_ids: List[str] = None,
        deploy_script_id: str = None,
        des: str = None,
        full_version: str = None,
        gmt_create: str = None,
        gmt_modified: str = None,
        id: str = None,
        name: str = None,
        supported_os: List[BuildpackOS] = None,
        supported_regions: List[BuildpackRegionRelationDetail] = None,
        techstack: Techstack = None,
        tenant_id: str = None,
        utc_create: str = None,
        utc_modified: str = None,
        version: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # bgEnable
        self.bg_enable = bg_enable
        # buildpackArch
        self.buildpack_arch = buildpack_arch
        # buildScriptId
        self.build_script_id = build_script_id
        # commandId
        self.command_id = command_id
        # componentId
        self.component_id = component_id
        # configId
        self.config_id = config_id
        # creator
        self.creator = creator
        # customerIds
        self.customer_ids = customer_ids
        # deployScriptId
        self.deploy_script_id = deploy_script_id
        # des
        self.des = des
        # fullVersion
        self.full_version = full_version
        # gmtCreate
        self.gmt_create = gmt_create
        # gmtModified
        self.gmt_modified = gmt_modified
        # id
        self.id = id
        # name
        self.name = name
        # supportedOS
        self.supported_os = supported_os
        # supportedRegions
        self.supported_regions = supported_regions
        # techstack
        self.techstack = techstack
        # tenantId
        self.tenant_id = tenant_id
        # utcCreate
        self.utc_create = utc_create
        # utcModified
        self.utc_modified = utc_modified
        # version
        self.version = version

    def validate(self):
        if self.gmt_create is not None:
            self.validate_pattern(self.gmt_create, 'gmt_create', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.gmt_modified is not None:
            self.validate_pattern(self.gmt_modified, 'gmt_modified', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.supported_os:
            for k in self.supported_os:
                if k:
                    k.validate()
        if self.supported_regions:
            for k in self.supported_regions:
                if k:
                    k.validate()
        if self.techstack:
            self.techstack.validate()
        if self.utc_create is not None:
            self.validate_pattern(self.utc_create, 'utc_create', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.utc_modified is not None:
            self.validate_pattern(self.utc_modified, 'utc_modified', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.bg_enable is not None:
            result['bg_enable'] = self.bg_enable
        if self.buildpack_arch is not None:
            result['buildpack_arch'] = self.buildpack_arch
        if self.build_script_id is not None:
            result['build_script_id'] = self.build_script_id
        if self.command_id is not None:
            result['command_id'] = self.command_id
        if self.component_id is not None:
            result['component_id'] = self.component_id
        if self.config_id is not None:
            result['config_id'] = self.config_id
        if self.creator is not None:
            result['creator'] = self.creator
        if self.customer_ids is not None:
            result['customer_ids'] = self.customer_ids
        if self.deploy_script_id is not None:
            result['deploy_script_id'] = self.deploy_script_id
        if self.des is not None:
            result['des'] = self.des
        if self.full_version is not None:
            result['full_version'] = self.full_version
        if self.gmt_create is not None:
            result['gmt_create'] = self.gmt_create
        if self.gmt_modified is not None:
            result['gmt_modified'] = self.gmt_modified
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        result['supported_o_s'] = []
        if self.supported_os is not None:
            for k in self.supported_os:
                result['supported_o_s'].append(k.to_map() if k else None)
        result['supported_regions'] = []
        if self.supported_regions is not None:
            for k in self.supported_regions:
                result['supported_regions'].append(k.to_map() if k else None)
        if self.techstack is not None:
            result['techstack'] = self.techstack.to_map()
        if self.tenant_id is not None:
            result['tenant_id'] = self.tenant_id
        if self.utc_create is not None:
            result['utc_create'] = self.utc_create
        if self.utc_modified is not None:
            result['utc_modified'] = self.utc_modified
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('bg_enable') is not None:
            self.bg_enable = m.get('bg_enable')
        if m.get('buildpack_arch') is not None:
            self.buildpack_arch = m.get('buildpack_arch')
        if m.get('build_script_id') is not None:
            self.build_script_id = m.get('build_script_id')
        if m.get('command_id') is not None:
            self.command_id = m.get('command_id')
        if m.get('component_id') is not None:
            self.component_id = m.get('component_id')
        if m.get('config_id') is not None:
            self.config_id = m.get('config_id')
        if m.get('creator') is not None:
            self.creator = m.get('creator')
        if m.get('customer_ids') is not None:
            self.customer_ids = m.get('customer_ids')
        if m.get('deploy_script_id') is not None:
            self.deploy_script_id = m.get('deploy_script_id')
        if m.get('des') is not None:
            self.des = m.get('des')
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        if m.get('gmt_create') is not None:
            self.gmt_create = m.get('gmt_create')
        if m.get('gmt_modified') is not None:
            self.gmt_modified = m.get('gmt_modified')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('name') is not None:
            self.name = m.get('name')
        self.supported_os = []
        if m.get('supported_o_s') is not None:
            for k in m.get('supported_o_s'):
                temp_model = BuildpackOS()
                self.supported_os.append(temp_model.from_map(k))
        self.supported_regions = []
        if m.get('supported_regions') is not None:
            for k in m.get('supported_regions'):
                temp_model = BuildpackRegionRelationDetail()
                self.supported_regions.append(temp_model.from_map(k))
        if m.get('techstack') is not None:
            temp_model = Techstack()
            self.techstack = temp_model.from_map(m['techstack'])
        if m.get('tenant_id') is not None:
            self.tenant_id = m.get('tenant_id')
        if m.get('utc_create') is not None:
            self.utc_create = m.get('utc_create')
        if m.get('utc_modified') is not None:
            self.utc_modified = m.get('utc_modified')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class CreateBuildpackGeneratesignurlRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        region_num: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # 地域ID
        self.region_num = region_num

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.region_num is not None:
            result['region_num'] = self.region_num
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('region_num') is not None:
            self.region_num = m.get('region_num')
        return self


class CreateBuildpackGeneratesignurlResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        url: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # url
        self.url = url

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('url') is not None:
            self.url = m.get('url')
        return self


class QueryBuildpackSumpackagessizeRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        region_ids: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # regionIds
        self.region_ids = region_ids

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.region_ids is not None:
            result['region_ids'] = self.region_ids
        return result

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


class QueryBuildpackSumpackagessizeResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        result: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # json
        self.result = result

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('result') is not None:
            self.result = m.get('result')
        return self


class QueryBuildpackSupportcoderepoRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        techstack_id: int = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # techstackId
        self.techstack_id = techstack_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.techstack_id is not None:
            result['techstack_id'] = self.techstack_id
        return result

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


class QueryBuildpackSupportcoderepoResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # result
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class QueryBuildpackFindavailablebyappserviceidsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_service_ids: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # appServiceIds
        self.app_service_ids = app_service_ids

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_service_ids is not None:
            result['app_service_ids'] = self.app_service_ids
        return result

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


class QueryBuildpackFindavailablebyappserviceidsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        result: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # json
        self.result = result

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('result') is not None:
            self.result = m.get('result')
        return self


class QueryBuildpacknewRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        build_command: str = None,
        created_froms: List[str] = None,
        creation_time_from: str = None,
        creation_time_to: str = None,
        creator_ids: List[str] = None,
        current_page: int = None,
        descend: bool = None,
        full_version: str = None,
        ids: List[str] = None,
        is_processed: bool = None,
        modification_time_from: str = None,
        modification_time_to: str = None,
        page_size: int = None,
        publication_time_from: str = None,
        publication_time_to: str = None,
        publisher_ids: List[str] = None,
        scopes: List[str] = None,
        sort_field: str = None,
        statuses: List[str] = None,
        supported_os_ids: List[int] = None,
        supported_region_ids: List[str] = None,
        techstack_ids: List[int] = None,
        techstack_names: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # buildCommand
        self.build_command = build_command
        # createdFroms
        self.created_froms = created_froms
        # creationTimeFrom
        self.creation_time_from = creation_time_from
        # creationTimeTo
        self.creation_time_to = creation_time_to
        # creatorIds
        self.creator_ids = creator_ids
        # currentPage
        self.current_page = current_page
        # descend
        self.descend = descend
        # fullVersion
        self.full_version = full_version
        # ids
        self.ids = ids
        # isProcessed
        self.is_processed = is_processed
        # modificationTimeFrom
        self.modification_time_from = modification_time_from
        # modificationTimeTo
        self.modification_time_to = modification_time_to
        # pageSize
        self.page_size = page_size
        # publicationTimeFrom
        self.publication_time_from = publication_time_from
        # publicationTimeTo
        self.publication_time_to = publication_time_to
        # publisherIds
        self.publisher_ids = publisher_ids
        # scopes
        self.scopes = scopes
        # sortField
        self.sort_field = sort_field
        # statuses
        self.statuses = statuses
        # supportedOsIds
        self.supported_os_ids = supported_os_ids
        # supported_region_ids
        self.supported_region_ids = supported_region_ids
        # techstackIds
        self.techstack_ids = techstack_ids
        # techstackNames
        self.techstack_names = techstack_names

    def validate(self):
        if self.creation_time_from is not None:
            self.validate_pattern(self.creation_time_from, 'creation_time_from', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.creation_time_to is not None:
            self.validate_pattern(self.creation_time_to, 'creation_time_to', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time_from is not None:
            self.validate_pattern(self.modification_time_from, 'modification_time_from', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time_to is not None:
            self.validate_pattern(self.modification_time_to, 'modification_time_to', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.publication_time_from is not None:
            self.validate_pattern(self.publication_time_from, 'publication_time_from', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.publication_time_to is not None:
            self.validate_pattern(self.publication_time_to, 'publication_time_to', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.build_command is not None:
            result['build_command'] = self.build_command
        if self.created_froms is not None:
            result['created_froms'] = self.created_froms
        if self.creation_time_from is not None:
            result['creation_time_from'] = self.creation_time_from
        if self.creation_time_to is not None:
            result['creation_time_to'] = self.creation_time_to
        if self.creator_ids is not None:
            result['creator_ids'] = self.creator_ids
        if self.current_page is not None:
            result['current_page'] = self.current_page
        if self.descend is not None:
            result['descend'] = self.descend
        if self.full_version is not None:
            result['full_version'] = self.full_version
        if self.ids is not None:
            result['ids'] = self.ids
        if self.is_processed is not None:
            result['is_processed'] = self.is_processed
        if self.modification_time_from is not None:
            result['modification_time_from'] = self.modification_time_from
        if self.modification_time_to is not None:
            result['modification_time_to'] = self.modification_time_to
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.publication_time_from is not None:
            result['publication_time_from'] = self.publication_time_from
        if self.publication_time_to is not None:
            result['publication_time_to'] = self.publication_time_to
        if self.publisher_ids is not None:
            result['publisher_ids'] = self.publisher_ids
        if self.scopes is not None:
            result['scopes'] = self.scopes
        if self.sort_field is not None:
            result['sort_field'] = self.sort_field
        if self.statuses is not None:
            result['statuses'] = self.statuses
        if self.supported_os_ids is not None:
            result['supported_os_ids'] = self.supported_os_ids
        if self.supported_region_ids is not None:
            result['supported_region_ids'] = self.supported_region_ids
        if self.techstack_ids is not None:
            result['techstack_ids'] = self.techstack_ids
        if self.techstack_names is not None:
            result['techstack_names'] = self.techstack_names
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('build_command') is not None:
            self.build_command = m.get('build_command')
        if m.get('created_froms') is not None:
            self.created_froms = m.get('created_froms')
        if m.get('creation_time_from') is not None:
            self.creation_time_from = m.get('creation_time_from')
        if m.get('creation_time_to') is not None:
            self.creation_time_to = m.get('creation_time_to')
        if m.get('creator_ids') is not None:
            self.creator_ids = m.get('creator_ids')
        if m.get('current_page') is not None:
            self.current_page = m.get('current_page')
        if m.get('descend') is not None:
            self.descend = m.get('descend')
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        if m.get('ids') is not None:
            self.ids = m.get('ids')
        if m.get('is_processed') is not None:
            self.is_processed = m.get('is_processed')
        if m.get('modification_time_from') is not None:
            self.modification_time_from = m.get('modification_time_from')
        if m.get('modification_time_to') is not None:
            self.modification_time_to = m.get('modification_time_to')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('publication_time_from') is not None:
            self.publication_time_from = m.get('publication_time_from')
        if m.get('publication_time_to') is not None:
            self.publication_time_to = m.get('publication_time_to')
        if m.get('publisher_ids') is not None:
            self.publisher_ids = m.get('publisher_ids')
        if m.get('scopes') is not None:
            self.scopes = m.get('scopes')
        if m.get('sort_field') is not None:
            self.sort_field = m.get('sort_field')
        if m.get('statuses') is not None:
            self.statuses = m.get('statuses')
        if m.get('supported_os_ids') is not None:
            self.supported_os_ids = m.get('supported_os_ids')
        if m.get('supported_region_ids') is not None:
            self.supported_region_ids = m.get('supported_region_ids')
        if m.get('techstack_ids') is not None:
            self.techstack_ids = m.get('techstack_ids')
        if m.get('techstack_names') is not None:
            self.techstack_names = m.get('techstack_names')
        return self


class QueryBuildpacknewResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpacks: List[BuildpackDetail] = None,
        current_page: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # buildpacks
        self.buildpacks = buildpacks
        # currentPage
        self.current_page = current_page
        # pageSize
        self.page_size = page_size
        # totalCount
        self.total_count = total_count

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['buildpacks'] = []
        if self.buildpacks is not None:
            for k in self.buildpacks:
                result['buildpacks'].append(k.to_map() if k else None)
        if self.current_page is not None:
            result['current_page'] = self.current_page
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.buildpacks = []
        if m.get('buildpacks') is not None:
            for k in m.get('buildpacks'):
                temp_model = BuildpackDetail()
                self.buildpacks.append(temp_model.from_map(k))
        if m.get('current_page') is not None:
            self.current_page = m.get('current_page')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class GetBuildpacknewRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        return result

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


class GetBuildpacknewResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpack_detail_vo: BuildpackDetailVO = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # buildpackDetailVO
        self.buildpack_detail_vo = buildpack_detail_vo

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.buildpack_detail_vo is not None:
            result['buildpack_detail_v_o'] = self.buildpack_detail_vo.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('buildpack_detail_v_o') is not None:
            temp_model = BuildpackDetailVO()
            self.buildpack_detail_vo = temp_model.from_map(m['buildpack_detail_v_o'])
        return self


class UpdateBuildpacknewUploadfinishRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        buildpack_id: str = None,
        buildpack_region_relation: BuildpackRegionRelation = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # buildpackId
        self.buildpack_id = buildpack_id
        # buildpackRegionRelation
        self.buildpack_region_relation = buildpack_region_relation

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

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        if self.buildpack_region_relation is not None:
            result['buildpack_region_relation'] = self.buildpack_region_relation.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        if m.get('buildpack_region_relation') is not None:
            temp_model = BuildpackRegionRelation()
            self.buildpack_region_relation = temp_model.from_map(m['buildpack_region_relation'])
        return self


class UpdateBuildpacknewUploadfinishResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class UpdateBuildpacknewRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        available_tenant_names: List[str] = None,
        buildpack_id: str = None,
        buildpack_params: List[BuildpackParamTemplate] = None,
        contact_info: str = None,
        description: str = None,
        env_params: List[BuildpackParamTemplate] = None,
        full_version: str = None,
        id: str = None,
        scope: str = None,
        status: str = None,
        supported_os: List[int] = None,
        supported_regions: List[BuildpackRegionRelation] = None,
        techstack: Techstack = None,
        techstack_id: str = None,
        build_command_params: List[BuildCommandParams] = None,
        creator: UserDTO = None,
        publisher: UserDTO = None,
        origin_type: str = None,
        app_service_count: int = None,
        debug_mode: bool = None,
        major_version: int = None,
        minor_version: int = None,
        patch_version: int = None,
        build_command: str = None,
        created_from: str = None,
        publication_time: str = None,
        creation_chain: List[str] = None,
        extra_info: str = None,
        depracation_note: str = None,
        industry_label: str = None,
        creation_time: str = None,
        modification_time: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # available_tenant_names
        self.available_tenant_names = available_tenant_names
        # buildpack_id
        self.buildpack_id = buildpack_id
        # buildpack_params
        self.buildpack_params = buildpack_params
        # contactInfo
        self.contact_info = contact_info
        # description
        self.description = description
        # envParams
        self.env_params = env_params
        # fullVersion
        self.full_version = full_version
        # id
        self.id = id
        # scope
        self.scope = scope
        # status
        self.status = status
        # supportedOs
        self.supported_os = supported_os
        # supported_regions
        self.supported_regions = supported_regions
        # techstack
        self.techstack = techstack
        # techstack_id
        self.techstack_id = techstack_id
        # BuildCommandParams
        self.build_command_params = build_command_params
        # creator
        self.creator = creator
        # publisher
        self.publisher = publisher
        # originType
        self.origin_type = origin_type
        # appServiceCount
        self.app_service_count = app_service_count
        # debugMode
        self.debug_mode = debug_mode
        # majorVersion
        self.major_version = major_version
        # minorVersion
        self.minor_version = minor_version
        # patchVersion
        self.patch_version = patch_version
        # buildCommand
        self.build_command = build_command
        # createdFrom
        self.created_from = created_from
        # publicationTime
        self.publication_time = publication_time
        # creationChain
        self.creation_chain = creation_chain
        # extraInfo
        self.extra_info = extra_info
        # depracationNote
        self.depracation_note = depracation_note
        # industryLabel
        self.industry_label = industry_label
        # creationTime
        self.creation_time = creation_time
        # modificationTime
        self.modification_time = modification_time

    def validate(self):
        if self.buildpack_params:
            for k in self.buildpack_params:
                if k:
                    k.validate()
        if self.env_params:
            for k in self.env_params:
                if k:
                    k.validate()
        if self.supported_regions:
            for k in self.supported_regions:
                if k:
                    k.validate()
        if self.techstack:
            self.techstack.validate()
        if self.build_command_params:
            for k in self.build_command_params:
                if k:
                    k.validate()
        if self.creator:
            self.creator.validate()
        if self.publisher:
            self.publisher.validate()
        if self.publication_time is not None:
            self.validate_pattern(self.publication_time, 'publication_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.creation_time is not None:
            self.validate_pattern(self.creation_time, 'creation_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modification_time is not None:
            self.validate_pattern(self.modification_time, 'modification_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.available_tenant_names is not None:
            result['available_tenant_names'] = self.available_tenant_names
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        result['buildpack_params'] = []
        if self.buildpack_params is not None:
            for k in self.buildpack_params:
                result['buildpack_params'].append(k.to_map() if k else None)
        if self.contact_info is not None:
            result['contact_info'] = self.contact_info
        if self.description is not None:
            result['description'] = self.description
        result['env_params'] = []
        if self.env_params is not None:
            for k in self.env_params:
                result['env_params'].append(k.to_map() if k else None)
        if self.full_version is not None:
            result['full_version'] = self.full_version
        if self.id is not None:
            result['id'] = self.id
        if self.scope is not None:
            result['scope'] = self.scope
        if self.status is not None:
            result['status'] = self.status
        if self.supported_os is not None:
            result['supported_os'] = self.supported_os
        result['supported_regions'] = []
        if self.supported_regions is not None:
            for k in self.supported_regions:
                result['supported_regions'].append(k.to_map() if k else None)
        if self.techstack is not None:
            result['techstack'] = self.techstack.to_map()
        if self.techstack_id is not None:
            result['techstack_id'] = self.techstack_id
        result['build_command_params'] = []
        if self.build_command_params is not None:
            for k in self.build_command_params:
                result['build_command_params'].append(k.to_map() if k else None)
        if self.creator is not None:
            result['creator'] = self.creator.to_map()
        if self.publisher is not None:
            result['publisher'] = self.publisher.to_map()
        if self.origin_type is not None:
            result['origin_type'] = self.origin_type
        if self.app_service_count is not None:
            result['app_service_count'] = self.app_service_count
        if self.debug_mode is not None:
            result['debug_mode'] = self.debug_mode
        if self.major_version is not None:
            result['major_version'] = self.major_version
        if self.minor_version is not None:
            result['minor_version'] = self.minor_version
        if self.patch_version is not None:
            result['patch_version'] = self.patch_version
        if self.build_command is not None:
            result['build_command'] = self.build_command
        if self.created_from is not None:
            result['created_from'] = self.created_from
        if self.publication_time is not None:
            result['publication_time'] = self.publication_time
        if self.creation_chain is not None:
            result['creation_chain'] = self.creation_chain
        if self.extra_info is not None:
            result['extra_info'] = self.extra_info
        if self.depracation_note is not None:
            result['depracation_note'] = self.depracation_note
        if self.industry_label is not None:
            result['industry_label'] = self.industry_label
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.modification_time is not None:
            result['modification_time'] = self.modification_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('available_tenant_names') is not None:
            self.available_tenant_names = m.get('available_tenant_names')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        self.buildpack_params = []
        if m.get('buildpack_params') is not None:
            for k in m.get('buildpack_params'):
                temp_model = BuildpackParamTemplate()
                self.buildpack_params.append(temp_model.from_map(k))
        if m.get('contact_info') is not None:
            self.contact_info = m.get('contact_info')
        if m.get('description') is not None:
            self.description = m.get('description')
        self.env_params = []
        if m.get('env_params') is not None:
            for k in m.get('env_params'):
                temp_model = BuildpackParamTemplate()
                self.env_params.append(temp_model.from_map(k))
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('supported_os') is not None:
            self.supported_os = m.get('supported_os')
        self.supported_regions = []
        if m.get('supported_regions') is not None:
            for k in m.get('supported_regions'):
                temp_model = BuildpackRegionRelation()
                self.supported_regions.append(temp_model.from_map(k))
        if m.get('techstack') is not None:
            temp_model = Techstack()
            self.techstack = temp_model.from_map(m['techstack'])
        if m.get('techstack_id') is not None:
            self.techstack_id = m.get('techstack_id')
        self.build_command_params = []
        if m.get('build_command_params') is not None:
            for k in m.get('build_command_params'):
                temp_model = BuildCommandParams()
                self.build_command_params.append(temp_model.from_map(k))
        if m.get('creator') is not None:
            temp_model = UserDTO()
            self.creator = temp_model.from_map(m['creator'])
        if m.get('publisher') is not None:
            temp_model = UserDTO()
            self.publisher = temp_model.from_map(m['publisher'])
        if m.get('origin_type') is not None:
            self.origin_type = m.get('origin_type')
        if m.get('app_service_count') is not None:
            self.app_service_count = m.get('app_service_count')
        if m.get('debug_mode') is not None:
            self.debug_mode = m.get('debug_mode')
        if m.get('major_version') is not None:
            self.major_version = m.get('major_version')
        if m.get('minor_version') is not None:
            self.minor_version = m.get('minor_version')
        if m.get('patch_version') is not None:
            self.patch_version = m.get('patch_version')
        if m.get('build_command') is not None:
            self.build_command = m.get('build_command')
        if m.get('created_from') is not None:
            self.created_from = m.get('created_from')
        if m.get('publication_time') is not None:
            self.publication_time = m.get('publication_time')
        if m.get('creation_chain') is not None:
            self.creation_chain = m.get('creation_chain')
        if m.get('extra_info') is not None:
            self.extra_info = m.get('extra_info')
        if m.get('depracation_note') is not None:
            self.depracation_note = m.get('depracation_note')
        if m.get('industry_label') is not None:
            self.industry_label = m.get('industry_label')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('modification_time') is not None:
            self.modification_time = m.get('modification_time')
        return self


class UpdateBuildpacknewResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpack_id: str = None,
        upload_endpoints: List[UploadEndpoint] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # buildpack_id
        self.buildpack_id = buildpack_id
        # upload_endpoints
        self.upload_endpoints = upload_endpoints

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        result['upload_endpoints'] = []
        if self.upload_endpoints is not None:
            for k in self.upload_endpoints:
                result['upload_endpoints'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        self.upload_endpoints = []
        if m.get('upload_endpoints') is not None:
            for k in m.get('upload_endpoints'):
                temp_model = UploadEndpoint()
                self.upload_endpoints.append(temp_model.from_map(k))
        return self


class CreateBuildpacknewRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        available_tenant_names: List[str] = None,
        buildpack_params: List[BuildpackParamTemplate] = None,
        build_command: str = None,
        build_command_params: List[BuildCommandParams] = None,
        contact_info: str = None,
        debug_mode: bool = None,
        description: str = None,
        full_version: str = None,
        major_version: int = None,
        minor_version: int = None,
        patch_version: int = None,
        scope: str = None,
        storage_upload_endpoints: str = None,
        supported_os: List[int] = None,
        supported_regions: List[BuildpackRegionRelation] = None,
        techstack_id: int = None,
        techstack: Techstack = None,
        status: str = None,
        id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # availableTenantNames
        self.available_tenant_names = available_tenant_names
        # buildpackParams
        self.buildpack_params = buildpack_params
        # buildCommand
        self.build_command = build_command
        # buildCommandParams
        self.build_command_params = build_command_params
        # contact_info
        # 
        self.contact_info = contact_info
        # debug_mode
        # 
        self.debug_mode = debug_mode
        # description
        self.description = description
        # full_version
        # 
        self.full_version = full_version
        # major_version
        # 
        self.major_version = major_version
        # minor_version
        # 
        self.minor_version = minor_version
        # patch_version
        # 
        self.patch_version = patch_version
        # scope
        # 
        self.scope = scope
        # StorageUploadEndpoint
        self.storage_upload_endpoints = storage_upload_endpoints
        # supported_os
        # 
        self.supported_os = supported_os
        # supported_regions
        # 
        self.supported_regions = supported_regions
        # techstack_id
        # 
        self.techstack_id = techstack_id
        # techstack
        self.techstack = techstack
        # status
        self.status = status
        # id
        self.id = id

    def validate(self):
        if self.buildpack_params:
            for k in self.buildpack_params:
                if k:
                    k.validate()
        if self.build_command_params:
            for k in self.build_command_params:
                if k:
                    k.validate()
        if self.supported_regions:
            for k in self.supported_regions:
                if k:
                    k.validate()
        if self.techstack:
            self.techstack.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.available_tenant_names is not None:
            result['available_tenant_names'] = self.available_tenant_names
        result['buildpack_params'] = []
        if self.buildpack_params is not None:
            for k in self.buildpack_params:
                result['buildpack_params'].append(k.to_map() if k else None)
        if self.build_command is not None:
            result['build_command'] = self.build_command
        result['build_command_params'] = []
        if self.build_command_params is not None:
            for k in self.build_command_params:
                result['build_command_params'].append(k.to_map() if k else None)
        if self.contact_info is not None:
            result['contact_info'] = self.contact_info
        if self.debug_mode is not None:
            result['debug_mode'] = self.debug_mode
        if self.description is not None:
            result['description'] = self.description
        if self.full_version is not None:
            result['full_version'] = self.full_version
        if self.major_version is not None:
            result['major_version'] = self.major_version
        if self.minor_version is not None:
            result['minor_version'] = self.minor_version
        if self.patch_version is not None:
            result['patch_version'] = self.patch_version
        if self.scope is not None:
            result['scope'] = self.scope
        if self.storage_upload_endpoints is not None:
            result['storage_upload_endpoints'] = self.storage_upload_endpoints
        if self.supported_os is not None:
            result['supported_os'] = self.supported_os
        result['supported_regions'] = []
        if self.supported_regions is not None:
            for k in self.supported_regions:
                result['supported_regions'].append(k.to_map() if k else None)
        if self.techstack_id is not None:
            result['techstack_id'] = self.techstack_id
        if self.techstack is not None:
            result['techstack'] = self.techstack.to_map()
        if self.status is not None:
            result['status'] = self.status
        if self.id is not None:
            result['id'] = self.id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('available_tenant_names') is not None:
            self.available_tenant_names = m.get('available_tenant_names')
        self.buildpack_params = []
        if m.get('buildpack_params') is not None:
            for k in m.get('buildpack_params'):
                temp_model = BuildpackParamTemplate()
                self.buildpack_params.append(temp_model.from_map(k))
        if m.get('build_command') is not None:
            self.build_command = m.get('build_command')
        self.build_command_params = []
        if m.get('build_command_params') is not None:
            for k in m.get('build_command_params'):
                temp_model = BuildCommandParams()
                self.build_command_params.append(temp_model.from_map(k))
        if m.get('contact_info') is not None:
            self.contact_info = m.get('contact_info')
        if m.get('debug_mode') is not None:
            self.debug_mode = m.get('debug_mode')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('full_version') is not None:
            self.full_version = m.get('full_version')
        if m.get('major_version') is not None:
            self.major_version = m.get('major_version')
        if m.get('minor_version') is not None:
            self.minor_version = m.get('minor_version')
        if m.get('patch_version') is not None:
            self.patch_version = m.get('patch_version')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('storage_upload_endpoints') is not None:
            self.storage_upload_endpoints = m.get('storage_upload_endpoints')
        if m.get('supported_os') is not None:
            self.supported_os = m.get('supported_os')
        self.supported_regions = []
        if m.get('supported_regions') is not None:
            for k in m.get('supported_regions'):
                temp_model = BuildpackRegionRelation()
                self.supported_regions.append(temp_model.from_map(k))
        if m.get('techstack_id') is not None:
            self.techstack_id = m.get('techstack_id')
        if m.get('techstack') is not None:
            temp_model = Techstack()
            self.techstack = temp_model.from_map(m['techstack'])
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class CreateBuildpacknewResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        buildpack_id: str = None,
        upload_endpoints: List[UploadEndpoint] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # buildpack_id
        # 
        self.buildpack_id = buildpack_id
        # upload_endpoints
        # 
        self.upload_endpoints = upload_endpoints

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.buildpack_id is not None:
            result['buildpack_id'] = self.buildpack_id
        result['upload_endpoints'] = []
        if self.upload_endpoints is not None:
            for k in self.upload_endpoints:
                result['upload_endpoints'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('buildpack_id') is not None:
            self.buildpack_id = m.get('buildpack_id')
        self.upload_endpoints = []
        if m.get('upload_endpoints') is not None:
            for k in m.get('upload_endpoints'):
                temp_model = UploadEndpoint()
                self.upload_endpoints.append(temp_model.from_map(k))
        return self


class OnlineBuildpackRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # buildpackId
        self.id = id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        return result

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


class OnlineBuildpackResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class CreateConfigGlobalRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        data_level: str = None,
        desc: str = None,
        key: str = None,
        param_version: int = None,
        scope: str = None,
        scope_id: str = None,
        type: str = None,
        value: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 数据保密等级
        self.data_level = data_level
        # 参数描述
        self.desc = desc
        # 参数名
        self.key = key
        # 参数版本
        self.param_version = param_version
        # 该参数属于哪个 scope
        self.scope = scope
        # 该参数在该 scope 中的 id
        self.scope_id = scope_id
        # 参数类型
        self.type = type
        # 参数值
        self.value = value

    def validate(self):
        self.validate_required(self.data_level, 'data_level')
        self.validate_required(self.key, 'key')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_id, 'scope_id')
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.data_level is not None:
            result['data_level'] = self.data_level
        if self.desc is not None:
            result['desc'] = self.desc
        if self.key is not None:
            result['key'] = self.key
        if self.param_version is not None:
            result['param_version'] = self.param_version
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_id is not None:
            result['scope_id'] = self.scope_id
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('data_level') is not None:
            self.data_level = m.get('data_level')
        if m.get('desc') is not None:
            self.desc = m.get('desc')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('param_version') is not None:
            self.param_version = m.get('param_version')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_id') is not None:
            self.scope_id = m.get('scope_id')
        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 CreateConfigGlobalResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        global_param_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 创建的全局参数 id
        self.global_param_id = global_param_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.global_param_id is not None:
            result['global_param_id'] = self.global_param_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('global_param_id') is not None:
            self.global_param_id = m.get('global_param_id')
        return self


class DeleteConfigGlobalRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        global_param_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 要删除的全局参数 id
        self.global_param_id = global_param_id

    def validate(self):
        self.validate_required(self.global_param_id, 'global_param_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.global_param_id is not None:
            result['global_param_id'] = self.global_param_id
        return result

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


class DeleteConfigGlobalResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class UpdateConfigGlobalRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        data_level: str = None,
        desc: str = None,
        id: str = None,
        key: str = None,
        param_version: int = None,
        scope: str = None,
        scope_id: str = None,
        type: str = None,
        value: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 数据保密等级
        self.data_level = data_level
        # 参数描述
        self.desc = desc
        # 全局参数 id
        self.id = id
        # 参数名
        self.key = key
        # 版本
        self.param_version = param_version
        # 该参数属于哪个 scope
        self.scope = scope
        # 该参数在该 scope 中的 id
        self.scope_id = scope_id
        # 参数类型
        self.type = type
        # 参数值
        self.value = value

    def validate(self):
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.data_level is not None:
            result['data_level'] = self.data_level
        if self.desc is not None:
            result['desc'] = self.desc
        if self.id is not None:
            result['id'] = self.id
        if self.key is not None:
            result['key'] = self.key
        if self.param_version is not None:
            result['param_version'] = self.param_version
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_id is not None:
            result['scope_id'] = self.scope_id
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('data_level') is not None:
            self.data_level = m.get('data_level')
        if m.get('desc') is not None:
            self.desc = m.get('desc')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('param_version') is not None:
            self.param_version = m.get('param_version')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_id') is not None:
            self.scope_id = m.get('scope_id')
        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 UpdateConfigGlobalResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class QueryConfigGlobalRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        data_level: str = None,
        key: str = None,
        orders: List[str] = None,
        page_num: int = None,
        page_size: int = None,
        param_type: str = None,
        query_type: str = None,
        scopes: List[str] = None,
        scope_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 模板参数保密级别
        self.data_level = data_level
        # 参数名
        self.key = key
        # 排序规则数组，默认为 UTC_MODIFIED_DESC，即 根据修改时间降序排序
        self.orders = orders
        # 当前页码，从1开始，默认为1
        self.page_num = page_num
        # 分页大小，默认为10
        self.page_size = page_size
        # 根据参数类型进行查询
        self.param_type = param_type
        # 查询类型，支持精准查询、模糊查询、前缀模糊查询，这里默认为模糊查询；查询类型针对字段 key
        self.query_type = query_type
        # 该参数属于哪个 scope，可以在多个 scope 中查询
        self.scopes = scopes
        # 该参数在该 scope 中的 id
        self.scope_id = scope_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.data_level is not None:
            result['data_level'] = self.data_level
        if self.key is not None:
            result['key'] = self.key
        if self.orders is not None:
            result['orders'] = self.orders
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.param_type is not None:
            result['param_type'] = self.param_type
        if self.query_type is not None:
            result['query_type'] = self.query_type
        if self.scopes is not None:
            result['scopes'] = self.scopes
        if self.scope_id is not None:
            result['scope_id'] = self.scope_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('data_level') is not None:
            self.data_level = m.get('data_level')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('orders') is not None:
            self.orders = m.get('orders')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('param_type') is not None:
            self.param_type = m.get('param_type')
        if m.get('query_type') is not None:
            self.query_type = m.get('query_type')
        if m.get('scopes') is not None:
            self.scopes = m.get('scopes')
        if m.get('scope_id') is not None:
            self.scope_id = m.get('scope_id')
        return self


class QueryConfigGlobalResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[GlobalParam] = None,
        page_num: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 符合条件的全局参数列表
        self.data = data
        # 当前页
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 记录总数
        self.total_count = total_count

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = GlobalParam()
                self.data.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class GetConfigGlobalRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        global_param_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 要获取的全局参数 id
        self.global_param_id = global_param_id

    def validate(self):
        self.validate_required(self.global_param_id, 'global_param_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.global_param_id is not None:
            result['global_param_id'] = self.global_param_id
        return result

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


class GetConfigGlobalResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: GlobalParam = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 获取到的全局参数
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            temp_model = GlobalParam()
            self.data = temp_model.from_map(m['data'])
        return self


class CreateConfigAppRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        data_level: str = None,
        desc: str = None,
        key: str = None,
        param_version: int = None,
        scope: str = None,
        scope_id: str = None,
        type: str = None,
        value: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.app_name = app_name
        # 数据保密等级
        self.data_level = data_level
        # 参数描述
        self.desc = desc
        # 参数名
        self.key = key
        # 版本
        self.param_version = param_version
        # 该参数属于哪个 scope
        self.scope = scope
        # 该参数在该 scope 中的 id
        self.scope_id = scope_id
        # 参数类型
        self.type = type
        # 参数值
        self.value = value

    def validate(self):
        self.validate_required(self.app_name, 'app_name')
        self.validate_required(self.data_level, 'data_level')
        self.validate_required(self.key, 'key')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_id, 'scope_id')
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.data_level is not None:
            result['data_level'] = self.data_level
        if self.desc is not None:
            result['desc'] = self.desc
        if self.key is not None:
            result['key'] = self.key
        if self.param_version is not None:
            result['param_version'] = self.param_version
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_id is not None:
            result['scope_id'] = self.scope_id
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('data_level') is not None:
            self.data_level = m.get('data_level')
        if m.get('desc') is not None:
            self.desc = m.get('desc')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('param_version') is not None:
            self.param_version = m.get('param_version')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_id') is not None:
            self.scope_id = m.get('scope_id')
        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 CreateConfigAppResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        app_param_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用参数 id
        self.app_param_id = app_param_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.app_param_id is not None:
            result['app_param_id'] = self.app_param_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('app_param_id') is not None:
            self.app_param_id = m.get('app_param_id')
        return self


class DeleteConfigAppRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_param_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 要删除的应用参数 id
        self.app_param_id = app_param_id

    def validate(self):
        self.validate_required(self.app_param_id, 'app_param_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_param_id is not None:
            result['app_param_id'] = self.app_param_id
        return result

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


class DeleteConfigAppResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class UpdateConfigAppRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        data_level: str = None,
        desc: str = None,
        id: str = None,
        key: str = None,
        param_version: int = None,
        scope: str = None,
        scope_id: str = None,
        type: str = None,
        value: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 数据保密等级
        self.data_level = data_level
        # 参数描述
        self.desc = desc
        # 应用参数 id
        self.id = id
        # 参数名
        self.key = key
        # 版本
        self.param_version = param_version
        # 该参数属于哪个 scope
        self.scope = scope
        # 该参数在该 scope 中的 id
        self.scope_id = scope_id
        # 参数类型
        self.type = type
        # 参数值
        self.value = value

    def validate(self):
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.data_level is not None:
            result['data_level'] = self.data_level
        if self.desc is not None:
            result['desc'] = self.desc
        if self.id is not None:
            result['id'] = self.id
        if self.key is not None:
            result['key'] = self.key
        if self.param_version is not None:
            result['param_version'] = self.param_version
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_id is not None:
            result['scope_id'] = self.scope_id
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('data_level') is not None:
            self.data_level = m.get('data_level')
        if m.get('desc') is not None:
            self.desc = m.get('desc')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('param_version') is not None:
            self.param_version = m.get('param_version')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_id') is not None:
            self.scope_id = m.get('scope_id')
        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 UpdateConfigAppResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class GetConfigAppRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_param_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用参数 id
        self.app_param_id = app_param_id

    def validate(self):
        self.validate_required(self.app_param_id, 'app_param_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_param_id is not None:
            result['app_param_id'] = self.app_param_id
        return result

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


class GetConfigAppResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: AppParam = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 获取到的应用参数
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            temp_model = AppParam()
            self.data = temp_model.from_map(m['data'])
        return self


class QueryConfigAppRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        data_level: str = None,
        key: str = None,
        orders: List[str] = None,
        page_num: int = None,
        page_size: int = None,
        param_type: str = None,
        query_type: str = None,
        scopes: List[str] = None,
        scope_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.app_name = app_name
        # 模板参数保密级别
        self.data_level = data_level
        # 参数名
        self.key = key
        # 排序规则数组，默认为 UTC_CREATED_DESC，即 根创建时间降序排序
        self.orders = orders
        # 当前页码，从1开始，默认为1
        self.page_num = page_num
        # 分页大小，默认为10
        self.page_size = page_size
        # 根据参数类型进行查询
        self.param_type = param_type
        # 查询类型，支持精准查询、模糊查询、前缀模糊查询，这里默认为模糊查询；查询类型针对字段 app_name, key
        self.query_type = query_type
        # 该参数属于哪个 scope ，是个在多个 scope 中查询
        self.scopes = scopes
        # 该参数在该 scope 中的 id
        self.scope_id = scope_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.data_level is not None:
            result['data_level'] = self.data_level
        if self.key is not None:
            result['key'] = self.key
        if self.orders is not None:
            result['orders'] = self.orders
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.param_type is not None:
            result['param_type'] = self.param_type
        if self.query_type is not None:
            result['query_type'] = self.query_type
        if self.scopes is not None:
            result['scopes'] = self.scopes
        if self.scope_id is not None:
            result['scope_id'] = self.scope_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('data_level') is not None:
            self.data_level = m.get('data_level')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('orders') is not None:
            self.orders = m.get('orders')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('param_type') is not None:
            self.param_type = m.get('param_type')
        if m.get('query_type') is not None:
            self.query_type = m.get('query_type')
        if m.get('scopes') is not None:
            self.scopes = m.get('scopes')
        if m.get('scope_id') is not None:
            self.scope_id = m.get('scope_id')
        return self


class QueryConfigAppResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[AppParam] = None,
        page_num: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 符合条件的应用参数列表
        self.data = data
        # 当前页
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 记录总数
        self.total_count = total_count

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = AppParam()
                self.data.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class SaveConfigTemplateRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        comment: str = None,
        params: List[TemplateParamDef] = None,
        tpl_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.app_name = app_name
        # 描述
        self.comment = comment
        # 参数定义列表
        self.params = params
        # 参数模板 id
        self.tpl_id = tpl_id

    def validate(self):
        self.validate_required(self.app_name, 'app_name')
        if self.params:
            for k in self.params:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.comment is not None:
            result['comment'] = self.comment
        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.tpl_id is not None:
            result['tpl_id'] = self.tpl_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('comment') is not None:
            self.comment = m.get('comment')
        self.params = []
        if m.get('params') is not None:
            for k in m.get('params'):
                temp_model = TemplateParamDef()
                self.params.append(temp_model.from_map(k))
        if m.get('tpl_id') is not None:
            self.tpl_id = m.get('tpl_id')
        return self


class SaveConfigTemplateResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        tpl_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用参数模板 id
        self.tpl_id = tpl_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.tpl_id is not None:
            result['tpl_id'] = self.tpl_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('tpl_id') is not None:
            self.tpl_id = m.get('tpl_id')
        return self


class CreateConfigTemplateRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        comment: str = None,
        params: List[TemplateParamDef] = None,
        tpl_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.app_name = app_name
        # 描述
        self.comment = comment
        # 参数定义列表
        self.params = params
        # 参数模板 id
        self.tpl_id = tpl_id

    def validate(self):
        self.validate_required(self.app_name, 'app_name')
        if self.params:
            for k in self.params:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.comment is not None:
            result['comment'] = self.comment
        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.tpl_id is not None:
            result['tpl_id'] = self.tpl_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('comment') is not None:
            self.comment = m.get('comment')
        self.params = []
        if m.get('params') is not None:
            for k in m.get('params'):
                temp_model = TemplateParamDef()
                self.params.append(temp_model.from_map(k))
        if m.get('tpl_id') is not None:
            self.tpl_id = m.get('tpl_id')
        return self


class CreateConfigTemplateResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        tpl_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用参数模板 id
        self.tpl_id = tpl_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.tpl_id is not None:
            result['tpl_id'] = self.tpl_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('tpl_id') is not None:
            self.tpl_id = m.get('tpl_id')
        return self


class PullConfigTemplateRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        state: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.app_name = app_name
        # RELEAES：获取最新的、已经发布的参数模板；
        # DRAFT：获取最新的参数模板草稿；
        # 不指定：获取已存在的最新的参数模板，不区分已发布或者草稿态；
        self.state = state

    def validate(self):
        self.validate_required(self.app_name, 'app_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.state is not None:
            result['state'] = self.state
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('state') is not None:
            self.state = m.get('state')
        return self


class PullConfigTemplateResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: AppConfigTemplate = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用参数模板
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            temp_model = AppConfigTemplate()
            self.data = temp_model.from_map(m['data'])
        return self


class DeleteConfigTemplatedraftRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        tpl_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 要删除的应用参数模板 id
        self.tpl_id = tpl_id

    def validate(self):
        self.validate_required(self.tpl_id, 'tpl_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.tpl_id is not None:
            result['tpl_id'] = self.tpl_id
        return result

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


class DeleteConfigTemplatedraftResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class GetConfigTemplateRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        tpl_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用参数模板 id
        self.tpl_id = tpl_id

    def validate(self):
        self.validate_required(self.tpl_id, 'tpl_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.tpl_id is not None:
            result['tpl_id'] = self.tpl_id
        return result

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


class GetConfigTemplateResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: AppConfigTemplate = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用参数模板
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            temp_model = AppConfigTemplate()
            self.data = temp_model.from_map(m['data'])
        return self


class QueryConfigTemplateRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        orders: List[str] = None,
        page_num: int = None,
        page_size: int = None,
        query_type: str = None,
        state: str = None,
        tpl_version: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.app_name = app_name
        # 排序规则数组，默认为 UTC_MODIFIED_DESC，即 根据修改时间降序排序
        self.orders = orders
        # 当前页码，从1开始，默认为1
        self.page_num = page_num
        # 分页大小，默认为10
        self.page_size = page_size
        # 查询类型，支持精准查询、模糊查询、前缀模糊查询，这里默认为模糊查询；查询类型针对字段 app_name
        self.query_type = query_type
        # 模板状态，DRAFT 草稿，RELEASE 已发布，发布后才会生成 version，否则为空
        self.state = state
        # 版本
        self.tpl_version = tpl_version

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.orders is not None:
            result['orders'] = self.orders
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.query_type is not None:
            result['query_type'] = self.query_type
        if self.state is not None:
            result['state'] = self.state
        if self.tpl_version is not None:
            result['tpl_version'] = self.tpl_version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('orders') is not None:
            self.orders = m.get('orders')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('query_type') is not None:
            self.query_type = m.get('query_type')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('tpl_version') is not None:
            self.tpl_version = m.get('tpl_version')
        return self


class QueryConfigTemplateResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[AppConfigTemplate] = None,
        page_num: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 符合条件的参数配置模板
        self.data = data
        # 当前页
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 记录总数
        self.total_count = total_count

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = AppConfigTemplate()
                self.data.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class ExecConfigParseRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        params: List[TemplateParamDef] = None,
        workspace_group_id: str = None,
        workspace_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.app_name = app_name
        # 参数定义列表
        self.params = params
        # 工作空间组 id
        self.workspace_group_id = workspace_group_id
        # 工作空间 id
        self.workspace_id = workspace_id

    def validate(self):
        self.validate_required(self.app_name, 'app_name')
        self.validate_required(self.params, 'params')
        if self.params:
            for k in self.params:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        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.workspace_group_id is not None:
            result['workspace_group_id'] = self.workspace_group_id
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        self.params = []
        if m.get('params') is not None:
            for k in m.get('params'):
                temp_model = TemplateParamDef()
                self.params.append(temp_model.from_map(k))
        if m.get('workspace_group_id') is not None:
            self.workspace_group_id = m.get('workspace_group_id')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        return self


class ExecConfigParseResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[RenderParam] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 渲染后的参数列表
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['data'] = []
        if self.data is not None:
            for k in self.data:
                result['data'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = RenderParam()
                self.data.append(temp_model.from_map(k))
        return self


class BatchcreateConfigGlobalRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        items: List[GlobalParam] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 要创建的全局参数列表
        self.items = items

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

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        result['items'] = []
        if self.items is not None:
            for k in self.items:
                result['items'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        self.items = []
        if m.get('items') is not None:
            for k in m.get('items'):
                temp_model = GlobalParam()
                self.items.append(temp_model.from_map(k))
        return self


class BatchcreateConfigGlobalResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class BatchcreateConfigAppRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        items: List[AppParam] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 要创建的应用参数列表
        self.items = items

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

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        result['items'] = []
        if self.items is not None:
            for k in self.items:
                result['items'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        self.items = []
        if m.get('items') is not None:
            for k in m.get('items'):
                temp_model = AppParam()
                self.items.append(temp_model.from_map(k))
        return self


class BatchcreateConfigAppResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class GetConfigSitetreeRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        return result

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


class GetConfigSitetreeResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[RegionView] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 当前租户下的所有 region 列表
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['data'] = []
        if self.data is not None:
            for k in self.data:
                result['data'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = RegionView()
                self.data.append(temp_model.from_map(k))
        return self


class GetConfigTenanttreeRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        return result

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


class GetConfigTenanttreeResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[WorkspaceGroupView] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 当前租户下的所有 workspaceGroup 列表
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['data'] = []
        if self.data is not None:
            for k in self.data:
                result['data'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = WorkspaceGroupView()
                self.data.append(temp_model.from_map(k))
        return self


class ExistConfigAppRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        key: str = None,
        scope_ids: List[str] = None,
        type: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名称
        self.app_name = app_name
        # 应用参数名称，同一个 appName + scope + scopeId 下不能有同名的应用参数
        self.key = key
        # 作用域 id 数组，比如作用域类型（type）是 workspace，那么 scopeId 就是 workspace 的 id
        self.scope_ids = scope_ids
        # 作用域类型
        self.type = type

    def validate(self):
        self.validate_required(self.app_name, 'app_name')
        self.validate_required(self.key, 'key')
        self.validate_required(self.scope_ids, 'scope_ids')
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.key is not None:
            result['key'] = self.key
        if self.scope_ids is not None:
            result['scope_ids'] = self.scope_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('scope_ids') is not None:
            self.scope_ids = m.get('scope_ids')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ExistConfigAppResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[bool] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用参数是否已存在的数组，和入参顺序一一对应
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class ExistConfigGlobalRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        key: str = None,
        scope_ids: List[str] = None,
        type: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 全局参数名称，同一个 scope + scopeId 下不能有同名的全局参数
        self.key = key
        # 作用域 id 数组，比如作用域类型（type）是 workspace，那么 scopeId 就是 workspace 的 id
        self.scope_ids = scope_ids
        # 作用域类型
        self.type = type

    def validate(self):
        self.validate_required(self.key, 'key')
        self.validate_required(self.scope_ids, 'scope_ids')
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.key is not None:
            result['key'] = self.key
        if self.scope_ids is not None:
            result['scope_ids'] = self.scope_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('key') is not None:
            self.key = m.get('key')
        if m.get('scope_ids') is not None:
            self.scope_ids = m.get('scope_ids')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ExistConfigGlobalResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[bool] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用参数是否已存在的数组，和入参顺序一一对应
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class ListWorkspacegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        return result

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


class ListWorkspacegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        workspace_groups: List[WorkspaceGroup] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 环境列表
        self.workspace_groups = workspace_groups

    def validate(self):
        self.validate_required(self.workspace_groups, 'workspace_groups')
        if self.workspace_groups:
            for k in self.workspace_groups:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['workspace_groups'] = []
        if self.workspace_groups is not None:
            for k in self.workspace_groups:
                result['workspace_groups'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.workspace_groups = []
        if m.get('workspace_groups') is not None:
            for k in m.get('workspace_groups'):
                temp_model = WorkspaceGroup()
                self.workspace_groups.append(temp_model.from_map(k))
        return self


class GetWorkspacegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace_group: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 目标环境名称
        self.workspace_group = workspace_group

    def validate(self):
        self.validate_required(self.workspace_group, 'workspace_group')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.workspace_group is not None:
            result['workspace_group'] = self.workspace_group
        return result

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


class GetWorkspacegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        id: str = None,
        name: str = None,
        status: str = None,
        tenant: str = None,
        workspaces: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 环境名称
        self.id = id
        # 环境显示名称
        self.name = name
        # 环境状态
        self.status = status
        # 租户名称
        self.tenant = tenant
        # 工作空间名称列表
        self.workspaces = workspaces

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.name, 'name')
        self.validate_required(self.status, 'status')
        self.validate_required(self.tenant, 'tenant')
        self.validate_required(self.workspaces, 'workspaces')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        if self.status is not None:
            result['status'] = self.status
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.workspaces is not None:
            result['workspaces'] = self.workspaces
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        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('status') is not None:
            self.status = m.get('status')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspaces') is not None:
            self.workspaces = m.get('workspaces')
        return self


class QueryCellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
        workspace_group: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 目标工作空间名称
        self.workspace = workspace
        # 目标环境名称
        self.workspace_group = workspace_group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.workspace_group is not None:
            result['workspace_group'] = self.workspace_group
        return result

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


class QueryCellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        cells: List[Cell] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 部署单元列表
        self.cells = cells

    def validate(self):
        self.validate_required(self.cells, 'cells')
        if self.cells:
            for k in self.cells:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['cells'] = []
        if self.cells is not None:
            for k in self.cells:
                result['cells'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.cells = []
        if m.get('cells') is not None:
            for k in m.get('cells'):
                temp_model = Cell()
                self.cells.append(temp_model.from_map(k))
        return self


class QueryWorkspaceDeltaRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        end_time: str = None,
        start_time: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 结束时间点
        self.end_time = end_time
        # 开始时间点
        self.start_time = start_time

    def validate(self):
        self.validate_required(self.end_time, 'end_time')
        if self.end_time is not None:
            self.validate_pattern(self.end_time, 'end_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.start_time, 'start_time')
        if self.start_time is not None:
            self.validate_pattern(self.start_time, 'start_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.end_time is not None:
            result['end_time'] = self.end_time
        if self.start_time is not None:
            result['start_time'] = self.start_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('end_time') is not None:
            self.end_time = m.get('end_time')
        if m.get('start_time') is not None:
            self.start_time = m.get('start_time')
        return self


class QueryWorkspaceDeltaResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        workspace_delta_infos: List[WorkspaceDeltaInfo] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 发生变化的workspace列表
        self.workspace_delta_infos = workspace_delta_infos

    def validate(self):
        self.validate_required(self.workspace_delta_infos, 'workspace_delta_infos')
        if self.workspace_delta_infos:
            for k in self.workspace_delta_infos:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['workspace_delta_infos'] = []
        if self.workspace_delta_infos is not None:
            for k in self.workspace_delta_infos:
                result['workspace_delta_infos'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.workspace_delta_infos = []
        if m.get('workspace_delta_infos') is not None:
            for k in m.get('workspace_delta_infos'):
                temp_model = WorkspaceDeltaInfo()
                self.workspace_delta_infos.append(temp_model.from_map(k))
        return self


class CreateWorkspacegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        display_name: str = None,
        domain_suffix: str = None,
        name: str = None,
        release_mode: str = None,
        workspaces: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 工作空间组显示名称。
        self.display_name = display_name
        # 域名后缀。
        self.domain_suffix = domain_suffix
        # 工作空间组唯一标识。
        self.name = name
        # 发布部署模式。
        self.release_mode = release_mode
        # 包含工作空间列表。
        self.workspaces = workspaces

    def validate(self):
        self.validate_required(self.display_name, 'display_name')
        self.validate_required(self.domain_suffix, 'domain_suffix')
        self.validate_required(self.name, 'name')
        self.validate_required(self.release_mode, 'release_mode')
        self.validate_required(self.workspaces, 'workspaces')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.domain_suffix is not None:
            result['domain_suffix'] = self.domain_suffix
        if self.name is not None:
            result['name'] = self.name
        if self.release_mode is not None:
            result['release_mode'] = self.release_mode
        if self.workspaces is not None:
            result['workspaces'] = self.workspaces
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('domain_suffix') is not None:
            self.domain_suffix = m.get('domain_suffix')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('release_mode') is not None:
            self.release_mode = m.get('release_mode')
        if m.get('workspaces') is not None:
            self.workspaces = m.get('workspaces')
        return self


class CreateWorkspacegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # workspaceGroupName
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class QueryWorkspacegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 环境组名称（唯一标识）
        self.name = name

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class QueryWorkspacegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        workspace_groups: List[WorkspaceGroupInfo] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 工作空间组列表。
        self.workspace_groups = workspace_groups

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['workspace_groups'] = []
        if self.workspace_groups is not None:
            for k in self.workspace_groups:
                result['workspace_groups'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.workspace_groups = []
        if m.get('workspace_groups') is not None:
            for k in m.get('workspace_groups'):
                temp_model = WorkspaceGroupInfo()
                self.workspace_groups.append(temp_model.from_map(k))
        return self


class DeleteWorkspacegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 工作空间组名称(唯一标识)。
        self.name = name

    def validate(self):
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class DeleteWorkspacegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class GetSingleworkspaceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 所属工作空间唯一标识
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetSingleworkspaceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        created_time: str = None,
        display_name: str = None,
        id: str = None,
        modified_time: str = None,
        name: str = None,
        network_type: str = None,
        region: str = None,
        tenant: str = None,
        type: str = None,
        vpc_iaas_id: str = None,
        workspace_group: str = None,
        zones: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 创建时间。
        self.created_time = created_time
        # workspace工作空间的显示名称
        self.display_name = display_name
        # workspace名称。
        self.id = id
        # 最近修改时间。
        self.modified_time = modified_time
        # workspace显示名称。
        self.name = name
        # 网络类型。
        self.network_type = network_type
        # region id
        self.region = region
        # 所属租户信息。
        self.tenant = tenant
        # 工作空间类型：标准工作空间；单元化工作空间
        self.type = type
        # vpc iaas id
        self.vpc_iaas_id = vpc_iaas_id
        # workspace所属环境名称[可能不存在]。
        self.workspace_group = workspace_group
        # workspace对应的zoneId列表。
        self.zones = zones

    def validate(self):
        if self.created_time is not None:
            self.validate_pattern(self.created_time, 'created_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.modified_time is not None:
            self.validate_pattern(self.modified_time, 'modified_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.created_time is not None:
            result['created_time'] = self.created_time
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.id is not None:
            result['id'] = self.id
        if self.modified_time is not None:
            result['modified_time'] = self.modified_time
        if self.name is not None:
            result['name'] = self.name
        if self.network_type is not None:
            result['network_type'] = self.network_type
        if self.region is not None:
            result['region'] = self.region
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.type is not None:
            result['type'] = self.type
        if self.vpc_iaas_id is not None:
            result['vpc_iaas_id'] = self.vpc_iaas_id
        if self.workspace_group is not None:
            result['workspace_group'] = self.workspace_group
        if self.zones is not None:
            result['zones'] = self.zones
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('created_time') is not None:
            self.created_time = m.get('created_time')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('modified_time') is not None:
            self.modified_time = m.get('modified_time')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('network_type') is not None:
            self.network_type = m.get('network_type')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('vpc_iaas_id') is not None:
            self.vpc_iaas_id = m.get('vpc_iaas_id')
        if m.get('workspace_group') is not None:
            self.workspace_group = m.get('workspace_group')
        if m.get('zones') is not None:
            self.zones = m.get('zones')
        return self


class GetSingleworkspacegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 环境名称。
        self.name = name

    def validate(self):
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class GetSingleworkspacegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        identity: str = None,
        name: str = None,
        release_mode: str = None,
        domain_suffix: str = None,
        workspaces: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 工作空间组标识。
        self.identity = identity
        # 工作空间组显示名称。
        self.name = name
        # 部署模式。
        self.release_mode = release_mode
        # 域名后缀。
        self.domain_suffix = domain_suffix
        # 包含工作空间名称列表。
        self.workspaces = workspaces

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.identity is not None:
            result['identity'] = self.identity
        if self.name is not None:
            result['name'] = self.name
        if self.release_mode is not None:
            result['release_mode'] = self.release_mode
        if self.domain_suffix is not None:
            result['domain_suffix'] = self.domain_suffix
        if self.workspaces is not None:
            result['workspaces'] = self.workspaces
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('release_mode') is not None:
            self.release_mode = m.get('release_mode')
        if m.get('domain_suffix') is not None:
            self.domain_suffix = m.get('domain_suffix')
        if m.get('workspaces') is not None:
            self.workspaces = m.get('workspaces')
        return self


class ListCellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
        workspace_group: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 目标工作空间名称。
        self.workspace = workspace
        # 目标环境名称。
        self.workspace_group = workspace_group

    def validate(self):
        self.validate_required(self.workspace, 'workspace')
        self.validate_required(self.workspace_group, 'workspace_group')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.workspace_group is not None:
            result['workspace_group'] = self.workspace_group
        return result

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


class ListCellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        cells: List[Cell] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 部署单元列表。
        self.cells = cells

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['cells'] = []
        if self.cells is not None:
            for k in self.cells:
                result['cells'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.cells = []
        if m.get('cells') is not None:
            for k in m.get('cells'):
                temp_model = Cell()
                self.cells.append(temp_model.from_map(k))
        return self


class CreateSingleworkspaceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        display_name: str = None,
        name: str = None,
        network_type: str = None,
        region: str = None,
        type: str = None,
        zones: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace 显示名称
        self.display_name = display_name
        # workspace 唯一标识符
        self.name = name
        # VPC ｜ Classic
        self.network_type = network_type
        # 地域
        self.region = region
        # 枚举值：
        # 标准工作空间NORMAL;
        # 单元化工作空间UNIT
        self.type = type
        # 可用区
        self.zones = zones

    def validate(self):
        self.validate_required(self.display_name, 'display_name')
        self.validate_required(self.name, 'name')
        self.validate_required(self.network_type, 'network_type')
        self.validate_required(self.region, 'region')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.name is not None:
            result['name'] = self.name
        if self.network_type is not None:
            result['network_type'] = self.network_type
        if self.region is not None:
            result['region'] = self.region
        if self.type is not None:
            result['type'] = self.type
        if self.zones is not None:
            result['zones'] = self.zones
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('network_type') is not None:
            self.network_type = m.get('network_type')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('zones') is not None:
            self.zones = m.get('zones')
        return self


class CreateSingleworkspaceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        workspace_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # workspace id
        self.workspace_id = workspace_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        return self


class DeleteSingleworkspaceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace id
        self.workspace_id = workspace_id

    def validate(self):
        self.validate_required(self.workspace_id, 'workspace_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_id
        return result

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


class DeleteSingleworkspaceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        success: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 删除是否成功
        self.success = success

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('success') is not None:
            self.success = m.get('success')
        return self


class CreateVpcRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        region_id: str = None,
        tenant_id: str = None,
        vpc_id: str = None,
        workspace_id: str = None,
        name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # VPC所在的地域
        self.region_id = region_id
        # 租户id
        self.tenant_id = tenant_id
        # 创建的VPC的ID
        self.vpc_id = vpc_id
        # 
        # 所属环境id
        self.workspace_id = workspace_id
        # vpc名称
        self.name = name

    def validate(self):
        self.validate_required(self.region_id, 'region_id')
        self.validate_required(self.tenant_id, 'tenant_id')
        self.validate_required(self.vpc_id, 'vpc_id')
        self.validate_required(self.workspace_id, 'workspace_id')
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.region_id is not None:
            result['region_id'] = self.region_id
        if self.tenant_id is not None:
            result['tenant_id'] = self.tenant_id
        if self.vpc_id is not None:
            result['vpc_id'] = self.vpc_id
        if self.workspace_id is not None:
            result['workspace_id'] = self.workspace_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('region_id') is not None:
            self.region_id = m.get('region_id')
        if m.get('tenant_id') is not None:
            self.tenant_id = m.get('tenant_id')
        if m.get('vpc_id') is not None:
            self.vpc_id = m.get('vpc_id')
        if m.get('workspace_id') is not None:
            self.workspace_id = m.get('workspace_id')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class CreateVpcResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # id
        self.id = id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.id is not None:
            result['id'] = self.id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('id') is not None:
            self.id = m.get('id')
        return self


class UpdateWorkspacegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        domain_suffix: str = None,
        name: str = None,
        display_name: str = None,
        workspaces: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 域名后缀。
        self.domain_suffix = domain_suffix
        # workspacegroup名称，唯一标识一个环境。
        self.name = name
        # workspacegroup显示名称。
        self.display_name = display_name
        # 包含工作空间名称。
        self.workspaces = workspaces

    def validate(self):
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.domain_suffix is not None:
            result['domain_suffix'] = self.domain_suffix
        if self.name is not None:
            result['name'] = self.name
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.workspaces is not None:
            result['workspaces'] = self.workspaces
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('domain_suffix') is not None:
            self.domain_suffix = m.get('domain_suffix')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('workspaces') is not None:
            self.workspaces = m.get('workspaces')
        return self


class UpdateWorkspacegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class UpdateSingleworkspaceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        display_name: str = None,
        network_type: str = None,
        region: str = None,
        zones: List[str] = None,
        name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace 显示名称
        self.display_name = display_name
        # VPC ｜ Classic
        self.network_type = network_type
        # 地域id
        self.region = region
        # 可用区id列表
        self.zones = zones
        # 环境唯一标识
        self.name = name

    def validate(self):
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.network_type is not None:
            result['network_type'] = self.network_type
        if self.region is not None:
            result['region'] = self.region
        if self.zones is not None:
            result['zones'] = self.zones
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('network_type') is not None:
            self.network_type = m.get('network_type')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('zones') is not None:
            self.zones = m.get('zones')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class UpdateSingleworkspaceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        success: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 更新成功或失败
        self.success = success

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('success') is not None:
            self.success = m.get('success')
        return self


class ListRegionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        return result

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


class ListRegionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[RegionMeta] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # region list
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['data'] = []
        if self.data is not None:
            for k in self.data:
                result['data'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = RegionMeta()
                self.data.append(temp_model.from_map(k))
        return self


class ListZoneRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        region: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # region identity
        self.region = region

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.region is not None:
            result['region'] = self.region
        return result

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


class ListZoneResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[Zone] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # zone list
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['data'] = []
        if self.data is not None:
            for k in self.data:
                result['data'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = Zone()
                self.data.append(temp_model.from_map(k))
        return self


class CreateCellgroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        datacenter: str = None,
        default_gzone: str = None,
        name: str = None,
        operator: str = None,
        type: str = None,
        workspace_group: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 所属idc
        self.datacenter = datacenter
        # 默认全局域
        self.default_gzone = default_gzone
        # 逻辑单元名称
        self.name = name
        # 操作人
        self.operator = operator
        # 逻辑单元类型
        self.type = type
        # 所属环境组名称
        self.workspace_group = workspace_group

    def validate(self):
        self.validate_required(self.name, 'name')
        self.validate_required(self.operator, 'operator')
        self.validate_required(self.type, 'type')
        self.validate_required(self.workspace_group, 'workspace_group')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.datacenter is not None:
            result['datacenter'] = self.datacenter
        if self.default_gzone is not None:
            result['default_gzone'] = self.default_gzone
        if self.name is not None:
            result['name'] = self.name
        if self.operator is not None:
            result['operator'] = self.operator
        if self.type is not None:
            result['type'] = self.type
        if self.workspace_group is not None:
            result['workspace_group'] = self.workspace_group
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('datacenter') is not None:
            self.datacenter = m.get('datacenter')
        if m.get('default_gzone') is not None:
            self.default_gzone = m.get('default_gzone')
        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('type') is not None:
            self.type = m.get('type')
        if m.get('workspace_group') is not None:
            self.workspace_group = m.get('workspace_group')
        return self


class CreateCellgroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class DeleteCellgroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        name: str = None,
        workspace_group: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 逻辑单元名称
        self.name = name
        # 所属环境名称
        self.workspace_group = workspace_group

    def validate(self):
        self.validate_required(self.name, 'name')
        self.validate_required(self.workspace_group, 'workspace_group')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.name is not None:
            result['name'] = self.name
        if self.workspace_group is not None:
            result['workspace_group'] = self.workspace_group
        return result

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


class DeleteCellgroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class QueryCellgroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        name_prefix: str = None,
        workspace_group: str = None,
        name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # cell group 查询前缀
        self.name_prefix = name_prefix
        # 所属环境名称
        self.workspace_group = workspace_group
        # 逻辑单元名称
        self.name = name

    def validate(self):
        self.validate_required(self.workspace_group, 'workspace_group')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.name_prefix is not None:
            result['name_prefix'] = self.name_prefix
        if self.workspace_group is not None:
            result['workspace_group'] = self.workspace_group
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('name_prefix') is not None:
            self.name_prefix = m.get('name_prefix')
        if m.get('workspace_group') is not None:
            self.workspace_group = m.get('workspace_group')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class QueryCellgroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[CellGroup] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 逻辑单元信息
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['data'] = []
        if self.data is not None:
            for k in self.data:
                result['data'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = CellGroup()
                self.data.append(temp_model.from_map(k))
        return self


class UpdateCellgroupDisasterinfoRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        disaster_info: List[DisasterInfo] = None,
        name: str = None,
        operator: str = None,
        workspace_group: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 灾备信息
        self.disaster_info = disaster_info
        # 逻辑单元名称
        self.name = name
        # 操作人
        self.operator = operator
        # 所属环境组名称
        self.workspace_group = workspace_group

    def validate(self):
        self.validate_required(self.disaster_info, 'disaster_info')
        if self.disaster_info:
            for k in self.disaster_info:
                if k:
                    k.validate()
        self.validate_required(self.name, 'name')
        self.validate_required(self.operator, 'operator')
        self.validate_required(self.workspace_group, 'workspace_group')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        result['disaster_info'] = []
        if self.disaster_info is not None:
            for k in self.disaster_info:
                result['disaster_info'].append(k.to_map() if k else None)
        if self.name is not None:
            result['name'] = self.name
        if self.operator is not None:
            result['operator'] = self.operator
        if self.workspace_group is not None:
            result['workspace_group'] = self.workspace_group
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        self.disaster_info = []
        if m.get('disaster_info') is not None:
            for k in m.get('disaster_info'):
                temp_model = DisasterInfo()
                self.disaster_info.append(temp_model.from_map(k))
        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('workspace_group') is not None:
            self.workspace_group = m.get('workspace_group')
        return self


class UpdateCellgroupDisasterinfoResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class CreateDeploymentCellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        cell_group: str = None,
        color: str = None,
        identity: str = None,
        is_gray: bool = None,
        name: str = None,
        type: str = None,
        weight: int = None,
        workspace: str = None,
        workspace_group: str = None,
        zone: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 所属逻辑单元名称[单元化模式特有]
        # 当type为"RZone"或"CZone"时，为必填项
        self.cell_group = cell_group
        # 蓝绿着色信息[单元化模式特有]
        self.color = color
        # 部署单元唯一标识
        self.identity = identity
        # 是否灰度[单元化模式特有]
        self.is_gray = is_gray
        # 部署单元名称
        self.name = name
        # 部署单元类型:
        # RZone, CZone,GZone,default
        self.type = type
        # 权重[单元化模式特有]
        self.weight = weight
        # 所属工作空间名称
        self.workspace = workspace
        # 所属环境组名称
        self.workspace_group = workspace_group
        # 所属机房名称
        self.zone = zone

    def validate(self):
        self.validate_required(self.identity, 'identity')
        self.validate_required(self.name, 'name')
        self.validate_required(self.type, 'type')
        self.validate_required(self.workspace, 'workspace')
        self.validate_required(self.zone, 'zone')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.cell_group is not None:
            result['cell_group'] = self.cell_group
        if self.color is not None:
            result['color'] = self.color
        if self.identity is not None:
            result['identity'] = self.identity
        if self.is_gray is not None:
            result['is_gray'] = self.is_gray
        if self.name is not None:
            result['name'] = self.name
        if self.type is not None:
            result['type'] = self.type
        if self.weight is not None:
            result['weight'] = self.weight
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.workspace_group is not None:
            result['workspace_group'] = self.workspace_group
        if self.zone is not None:
            result['zone'] = self.zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('cell_group') is not None:
            self.cell_group = m.get('cell_group')
        if m.get('color') is not None:
            self.color = m.get('color')
        if m.get('identity') is not None:
            self.identity = m.get('identity')
        if m.get('is_gray') is not None:
            self.is_gray = m.get('is_gray')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        if m.get('workspace_group') is not None:
            self.workspace_group = m.get('workspace_group')
        if m.get('zone') is not None:
            self.zone = m.get('zone')
        return self


class CreateDeploymentCellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class DeleteDeploymentCellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        name: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 部署单元名称
        self.name = name
        # 所属工作空间名称
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.name, 'name')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.name is not None:
            result['name'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class DeleteDeploymentCellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class QueryDeploymentCellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        name: str = None,
        name_prefix: str = None,
        workspace: str = None,
        workspace_group: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 部署单元名称
        self.name = name
        # 部署单元名称前缀
        self.name_prefix = name_prefix
        # 所属工作空间名称
        self.workspace = workspace
        # 所属环境组名称
        self.workspace_group = workspace_group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.name is not None:
            result['name'] = self.name
        if self.name_prefix is not None:
            result['name_prefix'] = self.name_prefix
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.workspace_group is not None:
            result['workspace_group'] = self.workspace_group
        return result

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


class QueryDeploymentCellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[DeployCell] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 部署单元列表
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['data'] = []
        if self.data is not None:
            for k in self.data:
                result['data'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = DeployCell()
                self.data.append(temp_model.from_map(k))
        return self


class UpdateDeploymentCellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        color: str = None,
        is_gray: bool = None,
        name: str = None,
        weight: int = None,
        workspace: str = None,
        workspace_group: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 蓝绿着色信息
        self.color = color
        # 是否灰度
        self.is_gray = is_gray
        # 部署单元名称
        self.name = name
        # 权重
        self.weight = weight
        # 所属工作空间名称
        self.workspace = workspace
        # 所属环境组名称
        self.workspace_group = workspace_group

    def validate(self):
        self.validate_required(self.name, 'name')
        self.validate_required(self.workspace, 'workspace')
        self.validate_required(self.workspace_group, 'workspace_group')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.color is not None:
            result['color'] = self.color
        if self.is_gray is not None:
            result['is_gray'] = self.is_gray
        if self.name is not None:
            result['name'] = self.name
        if self.weight is not None:
            result['weight'] = self.weight
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.workspace_group is not None:
            result['workspace_group'] = self.workspace_group
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('color') is not None:
            self.color = m.get('color')
        if m.get('is_gray') is not None:
            self.is_gray = m.get('is_gray')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        if m.get('workspace_group') is not None:
            self.workspace_group = m.get('workspace_group')
        return self


class UpdateDeploymentCellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class QueryDeploymentRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        creation_time: str = None,
        operation_id: str = None,
        page_num: int = None,
        page_size: int = None,
        statuses: List[str] = None,
        title: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 部署单包含的应用（服务）名称
        self.application_name = application_name
        # 部署单创建日期，采用UTC时间，按照ISO8601标准表示，格式为：YYYY-MM-DDThh:mm:ssZ
        self.creation_time = creation_time
        # 部署单id
        self.operation_id = operation_id
        # 当前页码，默认为1
        self.page_num = page_num
        # 分页大小，默认10
        self.page_size = page_size
        # 
        # 部署单状态。取值列表：
        # INITING：初始化中；
        # INIT_FAILED：初始化失败；
        # INITED：初始化完成；
        # EXECUTING：执行中；
        # SUCCESS：执行成功；
        # FAILED：执行失败；
        # CANCELING：取消中；
        # CANCELED：已取消
        # 
        # 
        self.statuses = statuses
        # 精确部署单标题
        self.title = title

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.statuses is not None:
            result['statuses'] = self.statuses
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        if m.get('operation_id') is not None:
            self.operation_id = m.get('operation_id')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('statuses') is not None:
            self.statuses = m.get('statuses')
        if m.get('title') is not None:
            self.title = m.get('title')
        return self


class QueryDeploymentResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        deployments: List[OpsDeployment] = None,
        page_num: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 批量查询部署单结果，以操作链的形式体现
        self.deployments = deployments
        # 当前页码
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 发布单总数
        self.total_count = total_count

    def validate(self):
        self.validate_required(self.deployments, 'deployments')
        if self.deployments:
            for k in self.deployments:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['deployments'] = []
        if self.deployments is not None:
            for k in self.deployments:
                result['deployments'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.deployments = []
        if m.get('deployments') is not None:
            for k in m.get('deployments'):
                temp_model = OpsDeployment()
                self.deployments.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class CancelDeploymentRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
        reason: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 部署单id
        self.operation_id = operation_id
        # 取消原因。长度不超过100个UTF-8字符
        self.reason = reason

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')
        self.validate_required(self.reason, 'reason')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        if self.reason is not None:
            result['reason'] = self.reason
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('operation_id') is not None:
            self.operation_id = m.get('operation_id')
        if m.get('reason') is not None:
            self.reason = m.get('reason')
        return self


class CancelDeploymentResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class CreateDeploymentRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        applications: List[Application] = None,
        auto_execute: bool = None,
        deploy_dimension: str = None,
        title: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用列表
        self.applications = applications
        # 是否启用自动运维，默认为**False**\
        self.auto_execute = auto_execute
        # 部署维度，有两种取值：APPLICATION和APP_SERVICE。设置为APPLICATION，表示在尚未引入应用服务环境中对整个应用都执行部署操作; APP_SERVICE表示在引入应用服务的环境中对应用服务执行部署操作。
        self.deploy_dimension = deploy_dimension
        # 部署单标题。长度不超过50个UTF-8字符
        self.title = title
        # 执行部署操作的目标工作空间
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.applications, 'applications')
        if self.applications:
            for k in self.applications:
                if k:
                    k.validate()
        self.validate_required(self.deploy_dimension, 'deploy_dimension')
        self.validate_required(self.title, 'title')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        result['applications'] = []
        if self.applications is not None:
            for k in self.applications:
                result['applications'].append(k.to_map() if k else None)
        if self.auto_execute is not None:
            result['auto_execute'] = self.auto_execute
        if self.deploy_dimension is not None:
            result['deploy_dimension'] = self.deploy_dimension
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        self.applications = []
        if m.get('applications') is not None:
            for k in m.get('applications'):
                temp_model = Application()
                self.applications.append(temp_model.from_map(k))
        if m.get('auto_execute') is not None:
            self.auto_execute = m.get('auto_execute')
        if m.get('deploy_dimension') is not None:
            self.deploy_dimension = m.get('deploy_dimension')
        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 CreateDeploymentResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        operation_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 创建完成的部署单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('operation_id') is not None:
            self.operation_id = m.get('operation_id')
        return self


class GetDeploymentRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 部署单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

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


class GetDeploymentResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        application_chains: List[OpsApplicationChain] = None,
        executor: str = None,
        status: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 此部署操作中所有被操作的应用详情，以操作链的形式体现
        self.application_chains = application_chains
        # 部署操作执行者
        self.executor = executor
        # 
        # 
        # 部署单状态。取值列表：
        # INITING：初始化中；
        # INIT_FAILED：初始化失败；
        # INITED：初始化完成；
        # EXECUTING：执行中；
        # SUCCESS：执行成功；
        # FAILED：执行失败；
        # CANCELING：取消中；
        # CANCELED：已取消
        # 
        # 
        self.status = status

    def validate(self):
        self.validate_required(self.application_chains, 'application_chains')
        if self.application_chains:
            for k in self.application_chains:
                if k:
                    k.validate()
        self.validate_required(self.executor, 'executor')
        self.validate_required(self.status, 'status')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['application_chains'] = []
        if self.application_chains is not None:
            for k in self.application_chains:
                result['application_chains'].append(k.to_map() if k else None)
        if self.executor is not None:
            result['executor'] = self.executor
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.application_chains = []
        if m.get('application_chains') is not None:
            for k in m.get('application_chains'):
                temp_model = OpsApplicationChain()
                self.application_chains.append(temp_model.from_map(k))
        if m.get('executor') is not None:
            self.executor = m.get('executor')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class RetryDeploymentRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 部署单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

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


class RetryDeploymentResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class StartDeploymentRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 部署单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

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


class StartDeploymentResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class GetDeploymentApplicationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        operation_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 待查询的应用（服务）名称，必须是部署单中包含的应用（服务）
        self.application_name = application_name
        # 部署单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.application_name, 'application_name')
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('operation_id') is not None:
            self.operation_id = m.get('operation_id')
        return self


class GetDeploymentApplicationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        groups: List[OpsGroup] = None,
        status: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 此应用下所有计算容器分组运维状态详情
        self.groups = groups
        # 应用（服务）当前运维状态。取值列表：INITING：初始化中；INIT_FAILED：初始化失败；INITED：初始化完成；
        # EXECUTING：执行中；SUCCESS：执行成功；FAILED：执行失败
        # 
        self.status = status

    def validate(self):
        self.validate_required(self.groups, 'groups')
        if self.groups:
            for k in self.groups:
                if k:
                    k.validate()
        self.validate_required(self.status, 'status')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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.status is not None:
            result['status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.groups = []
        if m.get('groups') is not None:
            for k in m.get('groups'):
                temp_model = OpsGroup()
                self.groups.append(temp_model.from_map(k))
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class RollbackDeploymentApplicationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        operation_id: str = None,
        reason: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 被回滚的应用（服务）名称，必须是部署单中包含的应用（服务）
        self.application_name = application_name
        # 部署单id
        self.operation_id = operation_id
        # 回滚原因。长度不超过100个UTF-8字符
        self.reason = reason

    def validate(self):
        self.validate_required(self.application_name, 'application_name')
        self.validate_required(self.operation_id, 'operation_id')
        self.validate_required(self.reason, 'reason')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        if self.reason is not None:
            result['reason'] = self.reason
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('operation_id') is not None:
            self.operation_id = m.get('operation_id')
        if m.get('reason') is not None:
            self.reason = m.get('reason')
        return self


class RollbackDeploymentApplicationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class ReinitDeploymentRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 部署单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

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


class ReinitDeploymentResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class QueryCmdtemplateRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        description: str = None,
        name: str = None,
        page_num: int = None,
        page_size: int = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 指令模板描述信息
        self.description = description
        # 指令名称
        self.name = name
        # 当前页码，默认为1
        self.page_num = page_num
        # 分页大小，默认10
        self.page_size = page_size

    def validate(self):
        self.validate_required(self.name, 'name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.description is not None:
            result['description'] = self.description
        if self.name is not None:
            result['name'] = self.name
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        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('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        return self


class QueryCmdtemplateResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        page_num: int = None,
        page_size: int = None,
        template_ids: List[str] = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 当前页码
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 指令模板ID列表
        self.template_ids = template_ids
        # 指令模板总数
        self.total_count = total_count

    def validate(self):
        self.validate_required(self.page_num, 'page_num')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.template_ids, 'template_ids')
        self.validate_required(self.total_count, 'total_count')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.template_ids is not None:
            result['template_ids'] = self.template_ids
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('template_ids') is not None:
            self.template_ids = m.get('template_ids')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class GetCmdtemplateRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 指令模板ID
        self.id = id

    def validate(self):
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        return result

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


class GetCmdtemplateResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        template: CmdTemplate = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 指令模板详情
        self.template = template

    def validate(self):
        self.validate_required(self.template, 'template')
        if self.template:
            self.template.validate()

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.template is not None:
            result['template'] = self.template.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('template') is not None:
            temp_model = CmdTemplate()
            self.template = temp_model.from_map(m['template'])
        return self


class SyncexecuteCmdTaskRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        cmd: OpsCmd = None,
        computers: List[OpsComputer] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 执行的指令。示例如下：cmd.template_id=000015678&cmd.args.1.name=--version&cmd.args.1.value=2.2
        self.cmd = cmd
        # 执行指令的目标机器id列表。n代表第n个应用的名称，n从1开始，最大100。每个应用名称最大60个UTF-8字符。如果要输入多个机器，使用如下形式：computers.1.id=000112367&computers.2.id=000112367
        self.computers = computers

    def validate(self):
        self.validate_required(self.cmd, 'cmd')
        if self.cmd:
            self.cmd.validate()
        self.validate_required(self.computers, 'computers')
        if self.computers:
            for k in self.computers:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.cmd is not None:
            result['cmd'] = self.cmd.to_map()
        result['computers'] = []
        if self.computers is not None:
            for k in self.computers:
                result['computers'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('cmd') is not None:
            temp_model = OpsCmd()
            self.cmd = temp_model.from_map(m['cmd'])
        self.computers = []
        if m.get('computers') is not None:
            for k in m.get('computers'):
                temp_model = OpsComputer()
                self.computers.append(temp_model.from_map(k))
        return self


class SyncexecuteCmdTaskResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        result: CmdExecResult = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 指令执行结果详情
        self.result = result

    def validate(self):
        self.validate_required(self.result, 'result')
        if self.result:
            self.result.validate()

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.result is not None:
            result['result'] = self.result.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('result') is not None:
            temp_model = CmdExecResult()
            self.result = temp_model.from_map(m['result'])
        return self


class AsyncexecuteCmdTaskRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        cmd: OpsCmd = None,
        computers: List[OpsComputer] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 执行的指令。示例如下：cmd.template_id=000015678&cmd.args.1.name=--version&cmd.args.1.value=2.2
        self.cmd = cmd
        # 执行指令的目标机器id列表。n代表第n个应用的名称，n从1开始，最大100。每个应用名称最大60个UTF-8字符。如果要输入多个机器，使用如下形式：computers.1.id=000112367&computers.2.id=000112367
        self.computers = computers

    def validate(self):
        self.validate_required(self.cmd, 'cmd')
        if self.cmd:
            self.cmd.validate()
        self.validate_required(self.computers, 'computers')
        if self.computers:
            for k in self.computers:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.cmd is not None:
            result['cmd'] = self.cmd.to_map()
        result['computers'] = []
        if self.computers is not None:
            for k in self.computers:
                result['computers'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('cmd') is not None:
            temp_model = OpsCmd()
            self.cmd = temp_model.from_map(m['cmd'])
        self.computers = []
        if m.get('computers') is not None:
            for k in m.get('computers'):
                temp_model = OpsComputer()
                self.computers.append(temp_model.from_map(k))
        return self


class AsyncexecuteCmdTaskResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        task_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 指令执行任务ID，用于查询任务详情
        self.task_id = task_id

    def validate(self):
        self.validate_required(self.task_id, 'task_id')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.task_id is not None:
            result['task_id'] = self.task_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('task_id') is not None:
            self.task_id = m.get('task_id')
        return self


class GetCmdTaskRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        task_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 异步指令执行的任务ID
        self.task_id = task_id

    def validate(self):
        self.validate_required(self.task_id, 'task_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.task_id is not None:
            result['task_id'] = self.task_id
        return result

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


class GetCmdTaskResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        result: CmdExecResult = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 指令执行结果详情
        self.result = result

    def validate(self):
        self.validate_required(self.result, 'result')
        if self.result:
            self.result.validate()

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.result is not None:
            result['result'] = self.result.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('result') is not None:
            temp_model = CmdExecResult()
            self.result = temp_model.from_map(m['result'])
        return self


class CreateAppopsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        applications: List[Application] = None,
        auto_execute: bool = None,
        computers: List[Computer] = None,
        ops_action: str = None,
        ops_action_params: str = None,
        ops_dimension: str = None,
        title: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 执行运维操作的目标应用名称列表。n代表第n个应用的名称，n从1开始，最大100。每个应用名称最大60个UTF-8字符。如果要输入多个应用，使用如下形式：applications.1.name=myapp1&applications.2.name=myapp2
        self.applications = applications
        # 是否启用自动运维，默认为**False**\
        self.auto_execute = auto_execute
        # 执行运维操作的目标机器id列表。n代表第n个应用的名称，n从1开始，最大100。每个应用名称最大60个UTF-8字符。如果要输入多个机器，使用如下形式：computers.1.id=000112367&computers.2.id=000112367
        self.computers = computers
        # 应用运维的操作类型，取值列表：ONLINE：上线应用，OFFLINE：下线应用，RESTART:重启应用，DEPLOY_STATIC_RESOURCE：部署静态资源。
        # 部署静态资源需传入 ops_action_params 为("default_execute_account", "resource_download_url", "resource_target_file")
        # 
        self.ops_action = ops_action
        # ops_action 所需要的参数，以JSON格式传入。以 {"param_name": "param_value"} 定义JSON。
        self.ops_action_params = ops_action_params
        # 应用运维的维度，有三种取值：APPLICATION、APP_SERVICE和MACHINE。设置为APPLICATION，表示在非应用服务环境下整个应用都执行该应用运维操作；设置为APP_SERVICE，表示在应用服务环境下对应用服务执行运维操作;设置为MACHINE，表示应用下的一台或多台机器执行改应用运维操作。
        self.ops_dimension = ops_dimension
        # 运维单标题。长度不超过50个UTF-8字符
        self.title = title

    def validate(self):
        if self.applications:
            for k in self.applications:
                if k:
                    k.validate()
        if self.computers:
            for k in self.computers:
                if k:
                    k.validate()
        self.validate_required(self.ops_action, 'ops_action')
        self.validate_required(self.ops_dimension, 'ops_dimension')
        self.validate_required(self.title, 'title')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        result['applications'] = []
        if self.applications is not None:
            for k in self.applications:
                result['applications'].append(k.to_map() if k else None)
        if self.auto_execute is not None:
            result['auto_execute'] = self.auto_execute
        result['computers'] = []
        if self.computers is not None:
            for k in self.computers:
                result['computers'].append(k.to_map() if k else None)
        if self.ops_action is not None:
            result['ops_action'] = self.ops_action
        if self.ops_action_params is not None:
            result['ops_action_params'] = self.ops_action_params
        if self.ops_dimension is not None:
            result['ops_dimension'] = self.ops_dimension
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        self.applications = []
        if m.get('applications') is not None:
            for k in m.get('applications'):
                temp_model = Application()
                self.applications.append(temp_model.from_map(k))
        if m.get('auto_execute') is not None:
            self.auto_execute = m.get('auto_execute')
        self.computers = []
        if m.get('computers') is not None:
            for k in m.get('computers'):
                temp_model = Computer()
                self.computers.append(temp_model.from_map(k))
        if m.get('ops_action') is not None:
            self.ops_action = m.get('ops_action')
        if m.get('ops_action_params') is not None:
            self.ops_action_params = m.get('ops_action_params')
        if m.get('ops_dimension') is not None:
            self.ops_dimension = m.get('ops_dimension')
        if m.get('title') is not None:
            self.title = m.get('title')
        return self


class CreateAppopsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        operation_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 创建完成的运维单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('operation_id') is not None:
            self.operation_id = m.get('operation_id')
        return self


class GetAppopsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 运维单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

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


class GetAppopsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        application_chains: List[OpsApplicationChain] = None,
        executor: str = None,
        ops_action: str = None,
        ops_dimension: str = None,
        status: str = None,
        title: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 此运维操作中所有被操作的应用详情，以操作链的形式体现
        self.application_chains = application_chains
        # 运维操作执行者
        self.executor = executor
        # 应用运维的操作类型，取值列表：ONLINE：上线应用，OFFLINE：下线应用，RESTART:重启应用，DEPLOY_STATIC_RESOURCE：部署静态资源
        self.ops_action = ops_action
        # 应用运维的维度，有三种取值：APPLICATION、APP_SERVICE和MACHINE。设置为APPLICATION，表示在非应用服务环境下整个应用都执行该应用运维操作；设置为APP_SERVICE，表示在应用服务环境下对应用服务执行运维操作;设置为MACHINE，表示应用下的一台或多台机器执行改应用运维操作。
        self.ops_dimension = ops_dimension
        # 
        # 
        # 部署单状态。取值列表：
        # INITING：初始化中；
        # INIT_FAILED：初始化失败；
        # INITED：初始化完成；
        # EXECUTING：执行中；
        # SUCCESS：执行成功；
        # FAILED：执行失败；
        # CANCELING：取消中；
        # CANCELED：已取消
        # 
        # 
        self.status = status
        # 应用运维单标题
        self.title = title

    def validate(self):
        self.validate_required(self.application_chains, 'application_chains')
        if self.application_chains:
            for k in self.application_chains:
                if k:
                    k.validate()
        self.validate_required(self.executor, 'executor')
        self.validate_required(self.ops_action, 'ops_action')
        self.validate_required(self.ops_dimension, 'ops_dimension')
        self.validate_required(self.status, 'status')
        self.validate_required(self.title, 'title')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['application_chains'] = []
        if self.application_chains is not None:
            for k in self.application_chains:
                result['application_chains'].append(k.to_map() if k else None)
        if self.executor is not None:
            result['executor'] = self.executor
        if self.ops_action is not None:
            result['ops_action'] = self.ops_action
        if self.ops_dimension is not None:
            result['ops_dimension'] = self.ops_dimension
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.application_chains = []
        if m.get('application_chains') is not None:
            for k in m.get('application_chains'):
                temp_model = OpsApplicationChain()
                self.application_chains.append(temp_model.from_map(k))
        if m.get('executor') is not None:
            self.executor = m.get('executor')
        if m.get('ops_action') is not None:
            self.ops_action = m.get('ops_action')
        if m.get('ops_dimension') is not None:
            self.ops_dimension = m.get('ops_dimension')
        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 StartAppopsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 运维单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

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


class StartAppopsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class ReinitAppopsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 运维单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

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


class ReinitAppopsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class CancelAppopsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
        reason: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 运维单id
        self.operation_id = operation_id
        # 取消原因。长度不超过100个UTF-8字符
        self.reason = reason

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')
        self.validate_required(self.reason, 'reason')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        if self.reason is not None:
            result['reason'] = self.reason
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('operation_id') is not None:
            self.operation_id = m.get('operation_id')
        if m.get('reason') is not None:
            self.reason = m.get('reason')
        return self


class CancelAppopsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class RetryAppopsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 运维单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

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


class RetryAppopsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class CreateComputeropsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        cmds: List[OpsCmd] = None,
        computers: List[Computer] = None,
        title: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 执行的指令列表。n代表第n个指令，n从1开始，最大20。示例如下：cmds.1.template_id=000015678&cmds.1.args.1.name=--version&cmds.1.args.1.value=2.2&cmds.2.template_id=000015688
        self.cmds = cmds
        # 执行运维操作的目标机器id列表。n代表第n个应用的名称，n从1开始，最大100。每个应用名称最大60个UTF-8字符。如果要输入多个机器，使用如下形式：computers.1.id=000112367&computers.2.id=000112367
        self.computers = computers
        # 运维单标题。长度不超过50个UTF-8字符
        self.title = title

    def validate(self):
        if self.cmds:
            for k in self.cmds:
                if k:
                    k.validate()
        if self.computers:
            for k in self.computers:
                if k:
                    k.validate()
        self.validate_required(self.title, 'title')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        result['cmds'] = []
        if self.cmds is not None:
            for k in self.cmds:
                result['cmds'].append(k.to_map() if k else None)
        result['computers'] = []
        if self.computers is not None:
            for k in self.computers:
                result['computers'].append(k.to_map() if k else None)
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        self.cmds = []
        if m.get('cmds') is not None:
            for k in m.get('cmds'):
                temp_model = OpsCmd()
                self.cmds.append(temp_model.from_map(k))
        self.computers = []
        if m.get('computers') is not None:
            for k in m.get('computers'):
                temp_model = Computer()
                self.computers.append(temp_model.from_map(k))
        if m.get('title') is not None:
            self.title = m.get('title')
        return self


class CreateComputeropsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        operation_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 创建完成的运维单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('operation_id') is not None:
            self.operation_id = m.get('operation_id')
        return self


class GetComputeropsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 运维单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

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


class GetComputeropsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        executor: str = None,
        groups: List[OpsGroup] = None,
        status: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 运维操作执行者
        self.executor = executor
        # 改运维单下所有计算容器分组运维状态详情
        self.groups = groups
        # 
        # 
        # 部署单状态。取值列表：
        # INITING：初始化中；
        # INIT_FAILED：初始化失败；
        # INITED：初始化完成；
        # EXECUTING：执行中；
        # SUCCESS：执行成功；
        # FAILED：执行失败；
        # CANCELING：取消中；
        # CANCELED：已取消
        # 
        # 
        self.status = status

    def validate(self):
        self.validate_required(self.executor, 'executor')
        self.validate_required(self.groups, 'groups')
        if self.groups:
            for k in self.groups:
                if k:
                    k.validate()
        self.validate_required(self.status, 'status')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.executor is not None:
            result['executor'] = self.executor
        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.status is not None:
            result['status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('executor') is not None:
            self.executor = m.get('executor')
        self.groups = []
        if m.get('groups') is not None:
            for k in m.get('groups'):
                temp_model = OpsGroup()
                self.groups.append(temp_model.from_map(k))
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class StartComputeropsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 运维单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

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


class StartComputeropsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class ReinitComputeropsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 运维单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

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


class ReinitComputeropsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class CancelComputeropsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
        reason: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 运维单id
        self.operation_id = operation_id
        # 取消原因。长度不超过100个UTF-8字符
        self.reason = reason

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')
        self.validate_required(self.reason, 'reason')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        if self.reason is not None:
            result['reason'] = self.reason
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('operation_id') is not None:
            self.operation_id = m.get('operation_id')
        if m.get('reason') is not None:
            self.reason = m.get('reason')
        return self


class CancelComputeropsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class RetryComputeropsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        operation_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 运维单id
        self.operation_id = operation_id

    def validate(self):
        self.validate_required(self.operation_id, 'operation_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.operation_id is not None:
            result['operation_id'] = self.operation_id
        return result

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


class RetryComputeropsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class QueryOpsappsvcRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        page_num: int = None,
        page_size: int = None,
        service_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用的名称
        self.app_name = app_name
        # 当前页码，默认为1
        self.page_num = page_num
        # 分页大小，默认10，最大50
        self.page_size = page_size
        # 应用服务的名称，如果为空，会查询该应用下所有应用服务的运维历史
        self.service_name = service_name

    def validate(self):
        self.validate_required(self.app_name, 'app_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.service_name is not None:
            result['service_name'] = self.service_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('service_name') is not None:
            self.service_name = m.get('service_name')
        return self


class QueryOpsappsvcResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        opsappsvcs: List[OpsApplication] = None,
        page_num: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用服务的运维历史
        self.opsappsvcs = opsappsvcs
        # 当前页码
        self.page_num = page_num
        # 分页大小
        self.page_size = page_size
        # 总数
        self.total_count = total_count

    def validate(self):
        self.validate_required(self.opsappsvcs, 'opsappsvcs')
        if self.opsappsvcs:
            for k in self.opsappsvcs:
                if k:
                    k.validate()
        self.validate_required(self.page_num, 'page_num')
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.total_count, 'total_count')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['opsappsvcs'] = []
        if self.opsappsvcs is not None:
            for k in self.opsappsvcs:
                result['opsappsvcs'].append(k.to_map() if k else None)
        if self.page_num is not None:
            result['page_num'] = self.page_num
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.opsappsvcs = []
        if m.get('opsappsvcs') is not None:
            for k in m.get('opsappsvcs'):
                temp_model = OpsApplication()
                self.opsappsvcs.append(temp_model.from_map(k))
        if m.get('page_num') is not None:
            self.page_num = m.get('page_num')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class AsyncexecuteBashcmdRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        command: str = None,
        computers: List[Computer] = None,
        time_out: int = None,
        user: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 执行的命令，长度不能超过500个字符
        self.command = command
        # 执行指令的目标机器id列表。n代表第n个机器，n从1开始，最大50。如果要输入多个机器，使用如下形式：computers.1.id=000112367&computers.2.id=000112367
        self.computers = computers
        # 单次执行的超时时间，单位为秒。最大值为1800秒，默认值也为1800秒
        self.time_out = time_out
        # 机器上执行命令的用户,比如：root,admin
        self.user = user

    def validate(self):
        self.validate_required(self.command, 'command')
        self.validate_required(self.computers, 'computers')
        if self.computers:
            for k in self.computers:
                if k:
                    k.validate()
        self.validate_required(self.time_out, 'time_out')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.command is not None:
            result['command'] = self.command
        result['computers'] = []
        if self.computers is not None:
            for k in self.computers:
                result['computers'].append(k.to_map() if k else None)
        if self.time_out is not None:
            result['time_out'] = self.time_out
        if self.user is not None:
            result['user'] = self.user
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('command') is not None:
            self.command = m.get('command')
        self.computers = []
        if m.get('computers') is not None:
            for k in m.get('computers'):
                temp_model = Computer()
                self.computers.append(temp_model.from_map(k))
        if m.get('time_out') is not None:
            self.time_out = m.get('time_out')
        if m.get('user') is not None:
            self.user = m.get('user')
        return self


class AsyncexecuteBashcmdResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        task_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 异步bash命令执行的任务ID
        self.task_id = task_id

    def validate(self):
        self.validate_required(self.task_id, 'task_id')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.task_id is not None:
            result['task_id'] = self.task_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('task_id') is not None:
            self.task_id = m.get('task_id')
        return self


class GetBashcmdResultRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        task_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 异步bash指令执行的任务ID
        self.task_id = task_id

    def validate(self):
        self.validate_required(self.task_id, 'task_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.task_id is not None:
            result['task_id'] = self.task_id
        return result

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


class GetBashcmdResultResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        err_msg: str = None,
        finish_time: str = None,
        results: List[SingleExecResult] = None,
        start_time: str = None,
        status: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 错误信息。内容为指令无法下发到机器上的详细原因
        self.err_msg = err_msg
        # 执行结束时间
        self.finish_time = finish_time
        # 执行的结果
        self.results = results
        # 执行开始时间
        self.start_time = start_time
        # 执行结果状态。取值列表：EXECUTING：执行中；SUCCESS：执行成功；FAILED：执行失败；IGNORED：已忽略；TIME_OUT：已超时
        self.status = status

    def validate(self):
        if self.results:
            for k in self.results:
                if k:
                    k.validate()
        self.validate_required(self.status, 'status')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.err_msg is not None:
            result['err_msg'] = self.err_msg
        if self.finish_time is not None:
            result['finish_time'] = self.finish_time
        result['results'] = []
        if self.results is not None:
            for k in self.results:
                result['results'].append(k.to_map() if k else None)
        if self.start_time is not None:
            result['start_time'] = self.start_time
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('err_msg') is not None:
            self.err_msg = m.get('err_msg')
        if m.get('finish_time') is not None:
            self.finish_time = m.get('finish_time')
        self.results = []
        if m.get('results') is not None:
            for k in m.get('results'):
                temp_model = SingleExecResult()
                self.results.append(temp_model.from_map(k))
        if m.get('start_time') is not None:
            self.start_time = m.get('start_time')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class CheckCloudconfigBgreleaseRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CheckCloudconfigBgreleaseResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        enabled: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否已开通
        self.enabled = enabled

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.enabled is not None:
            result['enabled'] = self.enabled
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        return self


class CheckCloudconfigBgdeploymentcellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        require_release: bool = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # require_release
        self.require_release = require_release
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.require_release is not None:
            result['require_release'] = self.require_release
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('require_release') is not None:
            self.require_release = m.get('require_release')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CheckCloudconfigBgdeploymentcellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        enabled: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否已开通
        self.enabled = enabled

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.enabled is not None:
            result['enabled'] = self.enabled
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        return self


class CheckCloudconfigAppserviceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CheckCloudconfigAppserviceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        enabled: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否已开通
        self.enabled = enabled

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.enabled is not None:
            result['enabled'] = self.enabled
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        return self


class CheckCloudconfigSharedmwRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CheckCloudconfigSharedmwResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        enabled: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否已开通
        self.enabled = enabled

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.enabled is not None:
            result['enabled'] = self.enabled
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        return self


class CheckCloudconfigVonereleaseRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CheckCloudconfigVonereleaseResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        enabled: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否使用
        self.enabled = enabled

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.enabled is not None:
            result['enabled'] = self.enabled
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        return self


class CheckCloudconfigVoneappopsRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CheckCloudconfigVoneappopsResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        enabled: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否使用
        self.enabled = enabled

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.enabled is not None:
            result['enabled'] = self.enabled
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        return self


class CheckCloudconfigOlduiRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CheckCloudconfigOlduiResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        enabled: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否使用
        self.enabled = enabled

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.enabled is not None:
            result['enabled'] = self.enabled
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        return self


class CheckCloudconfigXdclbforbiddenRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CheckCloudconfigXdclbforbiddenResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        forbidden: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 是否禁用
        self.forbidden = forbidden

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.forbidden is not None:
            result['forbidden'] = self.forbidden
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('forbidden') is not None:
            self.forbidden = m.get('forbidden')
        return self


class QueryCloudconfigOpenapiconfigRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryCloudconfigOpenapiconfigResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        config: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 配置内容
        self.config = config

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.config is not None:
            result['config'] = self.config
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('config') is not None:
            self.config = m.get('config')
        return self


class CountAppsPkgRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_ids: List[str] = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用 id 列表
        self.app_ids = app_ids
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.app_ids, 'app_ids')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_ids is not None:
            result['app_ids'] = self.app_ids
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_ids') is not None:
            self.app_ids = m.get('app_ids')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CountAppsPkgResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: List[Pair] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用包个数，键为应用ID，值为对应包个数
        self.data = data

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['data'] = []
        if self.data is not None:
            for k in self.data:
                result['data'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.data = []
        if m.get('data') is not None:
            for k in m.get('data'):
                temp_model = Pair()
                self.data.append(temp_model.from_map(k))
        return self


class QueryAppUnitresourcesRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_ids: List[str] = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用 id 列表
        self.app_ids = app_ids
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.app_ids, 'app_ids')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_ids is not None:
            result['app_ids'] = self.app_ids
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_ids') is not None:
            self.app_ids = m.get('app_ids')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryAppUnitresourcesResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        resources: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 资源统计
        self.resources = resources

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.resources is not None:
            result['resources'] = self.resources
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('resources') is not None:
            self.resources = m.get('resources')
        return self


class QueryOauthTokenRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryOauthTokenResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        access_expired_time: str = None,
        access_token: str = None,
        customer_id: str = None,
        refresh_expired_time: str = None,
        refresh_token: str = None,
        tenant: str = None,
        tenant_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 过期时间
        self.access_expired_time = access_expired_time
        # access token
        self.access_token = access_token
        # 用户 id
        self.customer_id = customer_id
        # 过期时间
        self.refresh_expired_time = refresh_expired_time
        # refresh token
        self.refresh_token = refresh_token
        # 租户名
        self.tenant = tenant
        # 租户 ID
        self.tenant_id = tenant_id

    def validate(self):
        if self.access_expired_time is not None:
            self.validate_pattern(self.access_expired_time, 'access_expired_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.refresh_expired_time is not None:
            self.validate_pattern(self.refresh_expired_time, 'refresh_expired_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.access_expired_time is not None:
            result['access_expired_time'] = self.access_expired_time
        if self.access_token is not None:
            result['access_token'] = self.access_token
        if self.customer_id is not None:
            result['customer_id'] = self.customer_id
        if self.refresh_expired_time is not None:
            result['refresh_expired_time'] = self.refresh_expired_time
        if self.refresh_token is not None:
            result['refresh_token'] = self.refresh_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.tenant_id is not None:
            result['tenant_id'] = self.tenant_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('access_expired_time') is not None:
            self.access_expired_time = m.get('access_expired_time')
        if m.get('access_token') is not None:
            self.access_token = m.get('access_token')
        if m.get('customer_id') is not None:
            self.customer_id = m.get('customer_id')
        if m.get('refresh_expired_time') is not None:
            self.refresh_expired_time = m.get('refresh_expired_time')
        if m.get('refresh_token') is not None:
            self.refresh_token = m.get('refresh_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('tenant_id') is not None:
            self.tenant_id = m.get('tenant_id')
        return self


class UpdateOauthTokenRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        access_expired_time: str = None,
        access_token: str = None,
        customer_id: str = None,
        refresh_expired_time: str = None,
        refresh_token: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 过期时间
        self.access_expired_time = access_expired_time
        # access token
        self.access_token = access_token
        # 用户 ID
        self.customer_id = customer_id
        # 过期时间
        self.refresh_expired_time = refresh_expired_time
        # refresh token
        self.refresh_token = refresh_token
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.access_expired_time, 'access_expired_time')
        if self.access_expired_time is not None:
            self.validate_pattern(self.access_expired_time, 'access_expired_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.access_token, 'access_token')
        self.validate_required(self.customer_id, 'customer_id')
        self.validate_required(self.refresh_expired_time, 'refresh_expired_time')
        if self.refresh_expired_time is not None:
            self.validate_pattern(self.refresh_expired_time, 'refresh_expired_time', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.refresh_token, 'refresh_token')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.access_expired_time is not None:
            result['access_expired_time'] = self.access_expired_time
        if self.access_token is not None:
            result['access_token'] = self.access_token
        if self.customer_id is not None:
            result['customer_id'] = self.customer_id
        if self.refresh_expired_time is not None:
            result['refresh_expired_time'] = self.refresh_expired_time
        if self.refresh_token is not None:
            result['refresh_token'] = self.refresh_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('access_expired_time') is not None:
            self.access_expired_time = m.get('access_expired_time')
        if m.get('access_token') is not None:
            self.access_token = m.get('access_token')
        if m.get('customer_id') is not None:
            self.customer_id = m.get('customer_id')
        if m.get('refresh_expired_time') is not None:
            self.refresh_expired_time = m.get('refresh_expired_time')
        if m.get('refresh_token') is not None:
            self.refresh_token = m.get('refresh_token')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateOauthTokenResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class DeleteOauthTokenRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class DeleteOauthTokenResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class QueryBaseinfoDeploymentzonesRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryBaseinfoDeploymentzonesResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        deployment_zones: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 部署可用区列表
        self.deployment_zones = deployment_zones

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.deployment_zones is not None:
            result['deployment_zones'] = self.deployment_zones
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('deployment_zones') is not None:
            self.deployment_zones = m.get('deployment_zones')
        return self


class GetBgreleaseArrangementRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetBgreleaseArrangementResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        arrangement: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 概览内容
        self.arrangement = arrangement

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.arrangement is not None:
            result['arrangement'] = self.arrangement
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('arrangement') is not None:
            self.arrangement = m.get('arrangement')
        return self


class QueryBgreleaseArrangementRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        plan_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 发布单ID
        self.plan_id = plan_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.plan_id is not None:
            result['plan_id'] = self.plan_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryBgreleaseArrangementResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        arrangements: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 蓝绿发布概览列表
        self.arrangements = arrangements

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.arrangements is not None:
            result['arrangements'] = self.arrangements
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('arrangements') is not None:
            self.arrangements = m.get('arrangements')
        return self


class QueryBgreleaseArrangementprogressRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryBgreleaseArrangementprogressResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        progresses: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 进度
        self.progresses = progresses

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.progresses is not None:
            result['progresses'] = self.progresses
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('progresses') is not None:
            self.progresses = m.get('progresses')
        return self


class QueryBgreleaseTaskprogressRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryBgreleaseTaskprogressResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        progresses: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 进度
        self.progresses = progresses

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.progresses is not None:
            result['progresses'] = self.progresses
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('progresses') is not None:
            self.progresses = m.get('progresses')
        return self


class ExecBgreleaseArrangementRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ExecBgreleaseArrangementResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        arrangement: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 概览
        self.arrangement = arrangement

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.arrangement is not None:
            result['arrangement'] = self.arrangement
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('arrangement') is not None:
            self.arrangement = m.get('arrangement')
        return self


class ConfirmBgreleaseArrangementRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ConfirmBgreleaseArrangementResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        arrangement: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 概览
        self.arrangement = arrangement

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.arrangement is not None:
            result['arrangement'] = self.arrangement
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('arrangement') is not None:
            self.arrangement = m.get('arrangement')
        return self


class ConfirmBgreleaseArrangementvalidationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ConfirmBgreleaseArrangementvalidationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        arrangement: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 概览
        self.arrangement = arrangement

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.arrangement is not None:
            result['arrangement'] = self.arrangement
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('arrangement') is not None:
            self.arrangement = m.get('arrangement')
        return self


class RetryBgreleaseArrangementRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 发布概览ID
        self.arrangement_id = arrangement_id
        # 发布单
        self.plan_id = plan_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RetryBgreleaseArrangementResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        arrangement: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 概览
        self.arrangement = arrangement

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.arrangement is not None:
            result['arrangement'] = self.arrangement
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('arrangement') is not None:
            self.arrangement = m.get('arrangement')
        return self


class RetryBgreleaseTaskRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        retry_info: RetryInfo = None,
        task_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # retry_info
        self.retry_info = retry_info
        # 任务ID
        self.task_id = task_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.retry_info, 'retry_info')
        if self.retry_info:
            self.retry_info.validate()
        self.validate_required(self.task_id, 'task_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_id
        if self.retry_info is not None:
            result['retry_info'] = self.retry_info.to_map()
        if self.task_id is not None:
            result['task_id'] = self.task_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('retry_info') is not None:
            temp_model = RetryInfo()
            self.retry_info = temp_model.from_map(m['retry_info'])
        if m.get('task_id') is not None:
            self.task_id = m.get('task_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RetryBgreleaseTaskResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        arrangement: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 概览
        self.arrangement = arrangement

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.arrangement is not None:
            result['arrangement'] = self.arrangement
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('arrangement') is not None:
            self.arrangement = m.get('arrangement')
        return self


class SkipBgreleaseTaskRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        task_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # 任务ID
        self.task_id = task_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.task_id, 'task_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_id
        if self.task_id is not None:
            result['task_id'] = self.task_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('task_id') is not None:
            self.task_id = m.get('task_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SkipBgreleaseTaskResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        arrangement: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 概览
        self.arrangement = arrangement

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.arrangement is not None:
            result['arrangement'] = self.arrangement
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('arrangement') is not None:
            self.arrangement = m.get('arrangement')
        return self


class SkipBgreleaseArrangementRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SkipBgreleaseArrangementResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        arrangement: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 概览
        self.arrangement = arrangement

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.arrangement is not None:
            result['arrangement'] = self.arrangement
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('arrangement') is not None:
            self.arrangement = m.get('arrangement')
        return self


class CancelBgreleaseArrangementRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CancelBgreleaseArrangementResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        arrangement: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 概览
        self.arrangement = arrangement

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.arrangement is not None:
            result['arrangement'] = self.arrangement
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('arrangement') is not None:
            self.arrangement = m.get('arrangement')
        return self


class RollbackBgreleaseArrangementRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        rollback_info: RollbackInfo = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # rollback_info
        self.rollback_info = rollback_info
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.rollback_info, 'rollback_info')
        if self.rollback_info:
            self.rollback_info.validate()
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_id
        if self.rollback_info is not None:
            result['rollback_info'] = self.rollback_info.to_map()
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('rollback_info') is not None:
            temp_model = RollbackInfo()
            self.rollback_info = temp_model.from_map(m['rollback_info'])
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RollbackBgreleaseArrangementResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        arrangement: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 概览
        self.arrangement = arrangement

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.arrangement is not None:
            result['arrangement'] = self.arrangement
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('arrangement') is not None:
            self.arrangement = m.get('arrangement')
        return self


class RetryrollbackBgreleaseArrangementRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        rollback_info: RollbackInfo = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # rollback_info
        self.rollback_info = rollback_info
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.rollback_info, 'rollback_info')
        if self.rollback_info:
            self.rollback_info.validate()
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_id
        if self.rollback_info is not None:
            result['rollback_info'] = self.rollback_info.to_map()
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('rollback_info') is not None:
            temp_model = RollbackInfo()
            self.rollback_info = temp_model.from_map(m['rollback_info'])
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RetryrollbackBgreleaseArrangementResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        arrangement: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 概览
        self.arrangement = arrangement

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.arrangement is not None:
            result['arrangement'] = self.arrangement
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('arrangement') is not None:
            self.arrangement = m.get('arrangement')
        return self


class ConfirmrollbackBgreleaseArrangementRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        retry_rollbacked: bool = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # retry_rollbacked
        self.retry_rollbacked = retry_rollbacked
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.retry_rollbacked, 'retry_rollbacked')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_id
        if self.retry_rollbacked is not None:
            result['retry_rollbacked'] = self.retry_rollbacked
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('retry_rollbacked') is not None:
            self.retry_rollbacked = m.get('retry_rollbacked')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ConfirmrollbackBgreleaseArrangementResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        arrangement: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 概览
        self.arrangement = arrangement

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.arrangement is not None:
            result['arrangement'] = self.arrangement
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('arrangement') is not None:
            self.arrangement = m.get('arrangement')
        return self


class SwitchBgreleaseGraytrafficRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_id: str = None,
        executor_id: str = None,
        executor_name: str = None,
        from_aliyun: bool = None,
        plan_id: str = None,
        proportion: int = None,
        target_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用ID
        self.app_id = app_id
        # 执行人
        self.executor_id = executor_id
        # 执行人
        self.executor_name = executor_name
        # 来自阿里云用户
        self.from_aliyun = from_aliyun
        # 发布单ID
        self.plan_id = plan_id
        # 比率
        self.proportion = proportion
        # 目标ID
        self.target_id = target_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.proportion, 'proportion')
        self.validate_required(self.target_id, 'target_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_id is not None:
            result['app_id'] = self.app_id
        if self.executor_id is not None:
            result['executor_id'] = self.executor_id
        if self.executor_name is not None:
            result['executor_name'] = self.executor_name
        if self.from_aliyun is not None:
            result['from_aliyun'] = self.from_aliyun
        if self.plan_id is not None:
            result['plan_id'] = self.plan_id
        if self.proportion is not None:
            result['proportion'] = self.proportion
        if self.target_id is not None:
            result['target_id'] = self.target_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_id') is not None:
            self.app_id = m.get('app_id')
        if m.get('executor_id') is not None:
            self.executor_id = m.get('executor_id')
        if m.get('executor_name') is not None:
            self.executor_name = m.get('executor_name')
        if m.get('from_aliyun') is not None:
            self.from_aliyun = m.get('from_aliyun')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('proportion') is not None:
            self.proportion = m.get('proportion')
        if m.get('target_id') is not None:
            self.target_id = m.get('target_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SwitchBgreleaseGraytrafficResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        process_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 灰度引流进程ID
        self.process_id = process_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.process_id is not None:
            result['process_id'] = self.process_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('process_id') is not None:
            self.process_id = m.get('process_id')
        return self


class RollbackBgreleaseGraytrafficRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        plan_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # 发布单ID
        self.plan_id = plan_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RollbackBgreleaseGraytrafficResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        process_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 回滚进程ID
        self.process_id = process_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.process_id is not None:
            result['process_id'] = self.process_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('process_id') is not None:
            self.process_id = m.get('process_id')
        return self


class QueryBgreleaseGrayprogressRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 概览ID
        self.arrangement_id = arrangement_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryBgreleaseGrayprogressResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        progresses: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 进度
        self.progresses = progresses

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.progresses is not None:
            result['progresses'] = self.progresses
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('progresses') is not None:
            self.progresses = m.get('progresses')
        return self


class GetGrayProcessRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # ID
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetGrayProcessResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        process_definition: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 进程信息
        self.process_definition = process_definition

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.process_definition is not None:
            result['process_definition'] = self.process_definition
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('process_definition') is not None:
            self.process_definition = m.get('process_definition')
        return self


class QueryGrayProgressRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # ID
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryGrayProgressResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        progresses: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 进度
        self.progresses = progresses

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.progresses is not None:
            result['progresses'] = self.progresses
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('progresses') is not None:
            self.progresses = m.get('progresses')
        return self


class ReinitGrayProcessRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # ID
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ReinitGrayProcessResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        process_definition: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 进程信息
        self.process_definition = process_definition

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.process_definition is not None:
            result['process_definition'] = self.process_definition
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('process_definition') is not None:
            self.process_definition = m.get('process_definition')
        return self


class RetryGrayTaskRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        process_id: str = None,
        retry_info: RetryInfo = None,
        task_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 进程 ID
        self.process_id = process_id
        # retry_info
        self.retry_info = retry_info
        # 任务ID
        self.task_id = task_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.process_id, 'process_id')
        self.validate_required(self.retry_info, 'retry_info')
        if self.retry_info:
            self.retry_info.validate()
        self.validate_required(self.task_id, 'task_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.process_id is not None:
            result['process_id'] = self.process_id
        if self.retry_info is not None:
            result['retry_info'] = self.retry_info.to_map()
        if self.task_id is not None:
            result['task_id'] = self.task_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('process_id') is not None:
            self.process_id = m.get('process_id')
        if m.get('retry_info') is not None:
            temp_model = RetryInfo()
            self.retry_info = temp_model.from_map(m['retry_info'])
        if m.get('task_id') is not None:
            self.task_id = m.get('task_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RetryGrayTaskResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        process_definition: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 进程信息
        self.process_definition = process_definition

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.process_definition is not None:
            result['process_definition'] = self.process_definition
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('process_definition') is not None:
            self.process_definition = m.get('process_definition')
        return self


class SkipGrayTaskRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        process_id: str = None,
        task_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 进程 ID
        self.process_id = process_id
        # 任务ID
        self.task_id = task_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.process_id, 'process_id')
        self.validate_required(self.task_id, 'task_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.process_id is not None:
            result['process_id'] = self.process_id
        if self.task_id is not None:
            result['task_id'] = self.task_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('process_id') is not None:
            self.process_id = m.get('process_id')
        if m.get('task_id') is not None:
            self.task_id = m.get('task_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SkipGrayTaskResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        process_definition: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 进程信息
        self.process_definition = process_definition

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.process_definition is not None:
            result['process_definition'] = self.process_definition
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('process_definition') is not None:
            self.process_definition = m.get('process_definition')
        return self


class QueryMachineRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        page_no: int = None,
        page_size: int = None,
        parent_id: str = None,
        process_definition_id: str = None,
        service_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 当前页
        self.page_no = page_no
        # 页大小，默认 20
        self.page_size = page_size
        # 父节点ID
        self.parent_id = parent_id
        # pd id
        self.process_definition_id = process_definition_id
        # 对应发布服务 ID
        self.service_id = service_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.page_no is not None:
            result['page_no'] = self.page_no
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.parent_id is not None:
            result['parent_id'] = self.parent_id
        if self.process_definition_id is not None:
            result['process_definition_id'] = self.process_definition_id
        if self.service_id is not None:
            result['service_id'] = self.service_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('page_no') is not None:
            self.page_no = m.get('page_no')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('parent_id') is not None:
            self.parent_id = m.get('parent_id')
        if m.get('process_definition_id') is not None:
            self.process_definition_id = m.get('process_definition_id')
        if m.get('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryMachineResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machines: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 发布机器信息
        self.machines = machines

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machines is not None:
            result['machines'] = self.machines
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machines') is not None:
            self.machines = m.get('machines')
        return self


class GetMachineRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 发布机器 ID
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetMachineResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 发布机器信息
        self.machine = machine

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine is not None:
            result['machine'] = self.machine
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine') is not None:
            self.machine = m.get('machine')
        return self


class QueryMachineProgressRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 发布机器ID
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryMachineProgressResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        progresses: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 进度
        self.progresses = progresses

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.progresses is not None:
            result['progresses'] = self.progresses
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('progresses') is not None:
            self.progresses = m.get('progresses')
        return self


class RetryMachineRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        retry_info: RetryInfo = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 发布机器 ID
        self.id = id
        # retry_info
        self.retry_info = retry_info
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.retry_info, 'retry_info')
        if self.retry_info:
            self.retry_info.validate()
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.retry_info is not None:
            result['retry_info'] = self.retry_info.to_map()
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('retry_info') is not None:
            temp_model = RetryInfo()
            self.retry_info = temp_model.from_map(m['retry_info'])
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RetryMachineResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 发布机器信息
        self.machine = machine

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine is not None:
            result['machine'] = self.machine
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine') is not None:
            self.machine = m.get('machine')
        return self


class SkipMachineRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 机器ID
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SkipMachineResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 机器信息
        self.machine = machine

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine is not None:
            result['machine'] = self.machine
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine') is not None:
            self.machine = m.get('machine')
        return self


class CancelMachineRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 发布机器 ID
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CancelMachineResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 机器信息
        self.machine = machine

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine is not None:
            result['machine'] = self.machine
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine') is not None:
            self.machine = m.get('machine')
        return self


class ExecMachineRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 机器 ID
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ExecMachineResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 机器信息
        self.machine = machine

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine is not None:
            result['machine'] = self.machine
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine') is not None:
            self.machine = m.get('machine')
        return self


class QueryMachinegroupProgressRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # ID
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryMachinegroupProgressResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        progresses: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 进度
        self.progresses = progresses

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.progresses is not None:
            result['progresses'] = self.progresses
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('progresses') is not None:
            self.progresses = m.get('progresses')
        return self


class RetryMachinegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        retry_info: RetryInfo = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 分组 ID
        self.id = id
        # retry info
        self.retry_info = retry_info
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.retry_info, 'retry_info')
        if self.retry_info:
            self.retry_info.validate()
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.retry_info is not None:
            result['retry_info'] = self.retry_info.to_map()
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('retry_info') is not None:
            temp_model = RetryInfo()
            self.retry_info = temp_model.from_map(m['retry_info'])
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RetryMachinegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine_group: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 机器分组信息
        self.machine_group = machine_group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine_group is not None:
            result['machine_group'] = self.machine_group
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine_group') is not None:
            self.machine_group = m.get('machine_group')
        return self


class SkipMachinegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 分组 ID
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SkipMachinegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine_group: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 分组
        self.machine_group = machine_group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine_group is not None:
            result['machine_group'] = self.machine_group
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine_group') is not None:
            self.machine_group = m.get('machine_group')
        return self


class CancelMachinegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 分组 ID
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CancelMachinegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine_group: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 机器分组
        self.machine_group = machine_group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine_group is not None:
            result['machine_group'] = self.machine_group
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine_group') is not None:
            self.machine_group = m.get('machine_group')
        return self


class DeleteMachinegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        recursive: bool = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # ID
        self.id = id
        # recursive
        self.recursive = recursive
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.recursive, 'recursive')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.recursive is not None:
            result['recursive'] = self.recursive
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('recursive') is not None:
            self.recursive = m.get('recursive')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class DeleteMachinegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine_group: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 机器分组
        self.machine_group = machine_group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine_group is not None:
            result['machine_group'] = self.machine_group
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine_group') is not None:
            self.machine_group = m.get('machine_group')
        return self


class UpdateMachinegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        machine_group_id: str = None,
        machine_ids: List[str] = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 分组 ID
        self.machine_group_id = machine_group_id
        # 发布机器 ID
        self.machine_ids = machine_ids
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.machine_group_id, 'machine_group_id')
        self.validate_required(self.machine_ids, 'machine_ids')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.machine_group_id is not None:
            result['machine_group_id'] = self.machine_group_id
        if self.machine_ids is not None:
            result['machine_ids'] = self.machine_ids
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('machine_group_id') is not None:
            self.machine_group_id = m.get('machine_group_id')
        if m.get('machine_ids') is not None:
            self.machine_ids = m.get('machine_ids')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateMachinegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine_group: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 机器分组信息
        self.machine_group = machine_group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine_group is not None:
            result['machine_group'] = self.machine_group
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine_group') is not None:
            self.machine_group = m.get('machine_group')
        return self


class ConfirmMachinegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 分组id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ConfirmMachinegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine_group: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 分组信息
        self.machine_group = machine_group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine_group is not None:
            result['machine_group'] = self.machine_group
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine_group') is not None:
            self.machine_group = m.get('machine_group')
        return self


class BatchqueryMachinegroupProgressRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        page_no: int = None,
        page_size: int = None,
        parent_id: str = None,
        plan_id: str = None,
        process_definition_id: str = None,
        service_id: str = None,
        state: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 当前页，默认 1
        self.page_no = page_no
        # 分页大小，默认 20
        self.page_size = page_size
        # 父节点 ID
        self.parent_id = parent_id
        # 发布单 ID
        self.plan_id = plan_id
        # 发布进程 ID
        self.process_definition_id = process_definition_id
        # 发布服务 ID
        self.service_id = service_id
        # 状态
        self.state = state
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.page_no is not None:
            result['page_no'] = self.page_no
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.parent_id is not None:
            result['parent_id'] = self.parent_id
        if self.plan_id is not None:
            result['plan_id'] = self.plan_id
        if self.process_definition_id is not None:
            result['process_definition_id'] = self.process_definition_id
        if self.service_id is not None:
            result['service_id'] = self.service_id
        if self.state is not None:
            result['state'] = self.state
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('page_no') is not None:
            self.page_no = m.get('page_no')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('parent_id') is not None:
            self.parent_id = m.get('parent_id')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('process_definition_id') is not None:
            self.process_definition_id = m.get('process_definition_id')
        if m.get('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class BatchqueryMachinegroupProgressResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine_groups: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 机器分组列表
        self.machine_groups = machine_groups

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine_groups is not None:
            result['machine_groups'] = self.machine_groups
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine_groups') is not None:
            self.machine_groups = m.get('machine_groups')
        return self


class ConfirmMachinegroupReserveRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        reserved: bool = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 分组 ID
        self.id = id
        # 是否需要预确认分组
        self.reserved = reserved
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.reserved, 'reserved')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.reserved is not None:
            result['reserved'] = self.reserved
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('reserved') is not None:
            self.reserved = m.get('reserved')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ConfirmMachinegroupReserveResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine_group: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 分组信息
        self.machine_group = machine_group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine_group is not None:
            result['machine_group'] = self.machine_group
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine_group') is not None:
            self.machine_group = m.get('machine_group')
        return self


class UpdateMachinegroupSlbmountweightRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        from_aliyun: bool = None,
        machine_group_id: str = None,
        slb_mount_info_list: List[str] = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # from_aliyun
        self.from_aliyun = from_aliyun
        # 分组 ID
        self.machine_group_id = machine_group_id
        # 挂载权重信息列表
        self.slb_mount_info_list = slb_mount_info_list
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.machine_group_id, 'machine_group_id')
        self.validate_required(self.slb_mount_info_list, 'slb_mount_info_list')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.from_aliyun is not None:
            result['from_aliyun'] = self.from_aliyun
        if self.machine_group_id is not None:
            result['machine_group_id'] = self.machine_group_id
        if self.slb_mount_info_list is not None:
            result['slb_mount_info_list'] = self.slb_mount_info_list
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('from_aliyun') is not None:
            self.from_aliyun = m.get('from_aliyun')
        if m.get('machine_group_id') is not None:
            self.machine_group_id = m.get('machine_group_id')
        if m.get('slb_mount_info_list') is not None:
            self.slb_mount_info_list = m.get('slb_mount_info_list')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateMachinegroupSlbmountweightResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        request_ids: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 请求 ID，用于追踪后续结果
        self.request_ids = request_ids

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.request_ids is not None:
            result['request_ids'] = self.request_ids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('request_ids') is not None:
            self.request_ids = m.get('request_ids')
        return self


class QueryMachinegroupSlbmountprogressRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        machine_group_id: str = None,
        request_ids: List[str] = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 分组ID
        self.machine_group_id = machine_group_id
        # 请求 ID 列表
        self.request_ids = request_ids
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.machine_group_id, 'machine_group_id')
        self.validate_required(self.request_ids, 'request_ids')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.machine_group_id is not None:
            result['machine_group_id'] = self.machine_group_id
        if self.request_ids is not None:
            result['request_ids'] = self.request_ids
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('machine_group_id') is not None:
            self.machine_group_id = m.get('machine_group_id')
        if m.get('request_ids') is not None:
            self.request_ids = m.get('request_ids')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryMachinegroupSlbmountprogressResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        executor_progress: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 执行进度
        self.executor_progress = executor_progress

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.executor_progress is not None:
            result['executor_progress'] = self.executor_progress
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('executor_progress') is not None:
            self.executor_progress = m.get('executor_progress')
        return self


class QueryMachinegroupSlbmountRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 分组 id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryMachinegroupSlbmountResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        slb_mount_info_list: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # SLB 挂载信息
        self.slb_mount_info_list = slb_mount_info_list

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.slb_mount_info_list is not None:
            result['slb_mount_info_list'] = self.slb_mount_info_list
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('slb_mount_info_list') is not None:
            self.slb_mount_info_list = m.get('slb_mount_info_list')
        return self


class GetMachinegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        with_machines: bool = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 分组 ID
        self.id = id
        # 是否带上机器信息，默认 false
        self.with_machines = with_machines
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.with_machines is not None:
            result['with_machines'] = self.with_machines
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('with_machines') is not None:
            self.with_machines = m.get('with_machines')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetMachinegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        machine_group: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 分组信息
        self.machine_group = machine_group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.machine_group is not None:
            result['machine_group'] = self.machine_group
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('machine_group') is not None:
            self.machine_group = m.get('machine_group')
        return self


class SkipMachinetaskRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        machine_id: str = None,
        task_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 机器 ID
        self.machine_id = machine_id
        # 任务 ID
        self.task_id = task_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.machine_id, 'machine_id')
        self.validate_required(self.task_id, 'task_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.machine_id is not None:
            result['machine_id'] = self.machine_id
        if self.task_id is not None:
            result['task_id'] = self.task_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('machine_id') is not None:
            self.machine_id = m.get('machine_id')
        if m.get('task_id') is not None:
            self.task_id = m.get('task_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SkipMachinetaskResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        progress: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 进度
        self.progress = progress

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('progress') is not None:
            self.progress = m.get('progress')
        return self


class RetryMachinetaskRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        machine_id: str = None,
        retry_info: RetryInfo = None,
        task_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 机器 ID
        self.machine_id = machine_id
        # retry_info
        self.retry_info = retry_info
        # 任务 ID
        self.task_id = task_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.machine_id, 'machine_id')
        self.validate_required(self.retry_info, 'retry_info')
        if self.retry_info:
            self.retry_info.validate()
        self.validate_required(self.task_id, 'task_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.machine_id is not None:
            result['machine_id'] = self.machine_id
        if self.retry_info is not None:
            result['retry_info'] = self.retry_info.to_map()
        if self.task_id is not None:
            result['task_id'] = self.task_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('machine_id') is not None:
            self.machine_id = m.get('machine_id')
        if m.get('retry_info') is not None:
            temp_model = RetryInfo()
            self.retry_info = temp_model.from_map(m['retry_info'])
        if m.get('task_id') is not None:
            self.task_id = m.get('task_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RetryMachinetaskResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        progress: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 执行进度
        self.progress = progress

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('progress') is not None:
            self.progress = m.get('progress')
        return self


class QueryMetaCellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryMetaCellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        cells: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 部署单元列表
        self.cells = cells

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.cells is not None:
            result['cells'] = self.cells
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('cells') is not None:
            self.cells = m.get('cells')
        return self


class CreateMetaDeploymentcellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        deployment_cell: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # deployment_cell
        self.deployment_cell = deployment_cell
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.deployment_cell, 'deployment_cell')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.deployment_cell is not None:
            result['deployment_cell'] = self.deployment_cell
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('deployment_cell') is not None:
            self.deployment_cell = m.get('deployment_cell')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateMetaDeploymentcellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        deployment_cell: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # deployment cell
        self.deployment_cell = deployment_cell

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.deployment_cell is not None:
            result['deployment_cell'] = self.deployment_cell
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('deployment_cell') is not None:
            self.deployment_cell = m.get('deployment_cell')
        return self


class UpdateMetaDeploymentcellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        deployment_cell: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # deployment_cell
        self.deployment_cell = deployment_cell
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.deployment_cell, 'deployment_cell')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.deployment_cell is not None:
            result['deployment_cell'] = self.deployment_cell
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('deployment_cell') is not None:
            self.deployment_cell = m.get('deployment_cell')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateMetaDeploymentcellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        deployment_cell: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # deployment cell
        self.deployment_cell = deployment_cell

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.deployment_cell is not None:
            result['deployment_cell'] = self.deployment_cell
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('deployment_cell') is not None:
            self.deployment_cell = m.get('deployment_cell')
        return self


class GetMetaDeploymentcellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id

    def validate(self):
        self.validate_required(self.id, 'id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        return result

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


class GetMetaDeploymentcellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        deployment_cell: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # deployment cell
        self.deployment_cell = deployment_cell

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.deployment_cell is not None:
            result['deployment_cell'] = self.deployment_cell
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('deployment_cell') is not None:
            self.deployment_cell = m.get('deployment_cell')
        return self


class QueryMetaDeploymentcellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        ids: List[str] = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # ids
        self.ids = ids
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.ids is not None:
            result['ids'] = self.ids
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('ids') is not None:
            self.ids = m.get('ids')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryMetaDeploymentcellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        deployment_cells: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # deployment cells
        self.deployment_cells = deployment_cells

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.deployment_cells is not None:
            result['deployment_cells'] = self.deployment_cells
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('deployment_cells') is not None:
            self.deployment_cells = m.get('deployment_cells')
        return self


class CreateNotificationConfigRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        cloud_web_url: str = None,
        enabled: bool = None,
        modified_version: int = None,
        receivers: List[str] = None,
        type: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # cloud web url
        self.cloud_web_url = cloud_web_url
        # 是否开启，默认关闭
        self.enabled = enabled
        # modified_version
        self.modified_version = modified_version
        # 接受者
        self.receivers = receivers
        # 类型
        self.type = type
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.cloud_web_url, 'cloud_web_url')
        self.validate_required(self.modified_version, 'modified_version')
        self.validate_required(self.receivers, 'receivers')
        self.validate_required(self.type, 'type')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.cloud_web_url is not None:
            result['cloud_web_url'] = self.cloud_web_url
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.modified_version is not None:
            result['modified_version'] = self.modified_version
        if self.receivers is not None:
            result['receivers'] = self.receivers
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('cloud_web_url') is not None:
            self.cloud_web_url = m.get('cloud_web_url')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('modified_version') is not None:
            self.modified_version = m.get('modified_version')
        if m.get('receivers') is not None:
            self.receivers = m.get('receivers')
        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 CreateNotificationConfigResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        config: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # config
        self.config = config

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.config is not None:
            result['config'] = self.config
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('config') is not None:
            self.config = m.get('config')
        return self


class UpdateNotificationConfigRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        cloud_web_url: str = None,
        enabled: bool = None,
        id: str = None,
        modified_version: int = None,
        receivers: List[str] = None,
        type: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # cloud web url
        self.cloud_web_url = cloud_web_url
        # 是否开启
        self.enabled = enabled
        # id
        self.id = id
        # modified_version
        self.modified_version = modified_version
        # 接受者
        self.receivers = receivers
        # 类型
        self.type = type
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.cloud_web_url, 'cloud_web_url')
        self.validate_required(self.id, 'id')
        self.validate_required(self.modified_version, 'modified_version')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.cloud_web_url is not None:
            result['cloud_web_url'] = self.cloud_web_url
        if self.enabled is not None:
            result['enabled'] = self.enabled
        if self.id is not None:
            result['id'] = self.id
        if self.modified_version is not None:
            result['modified_version'] = self.modified_version
        if self.receivers is not None:
            result['receivers'] = self.receivers
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('cloud_web_url') is not None:
            self.cloud_web_url = m.get('cloud_web_url')
        if m.get('enabled') is not None:
            self.enabled = m.get('enabled')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('modified_version') is not None:
            self.modified_version = m.get('modified_version')
        if m.get('receivers') is not None:
            self.receivers = m.get('receivers')
        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 UpdateNotificationConfigResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        config: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # config
        self.config = config

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.config is not None:
            result['config'] = self.config
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('config') is not None:
            self.config = m.get('config')
        return self


class QueryNotificationConfigRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryNotificationConfigResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        configs: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 通知配置列表
        self.configs = configs

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.configs is not None:
            result['configs'] = self.configs
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('configs') is not None:
            self.configs = m.get('configs')
        return self


class DeleteNotificationConfigRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class DeleteNotificationConfigResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        success: bool = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 成功
        self.success = success

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('success') is not None:
            self.success = m.get('success')
        return self


class QueryOperatorRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        customer_id: str = None,
        page_no: int = None,
        page_size: int = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 用户 ID
        self.customer_id = customer_id
        # 当前页
        self.page_no = page_no
        # 分页大小
        self.page_size = page_size
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.customer_id, 'customer_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.customer_id is not None:
            result['customer_id'] = self.customer_id
        if self.page_no is not None:
            result['page_no'] = self.page_no
        if self.page_size is not None:
            result['page_size'] = self.page_size
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('customer_id') is not None:
            self.customer_id = m.get('customer_id')
        if m.get('page_no') is not None:
            self.page_no = m.get('page_no')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryOperatorResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        operators: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 操作人列表
        self.operators = operators

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.operators is not None:
            result['operators'] = self.operators
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('operators') is not None:
            self.operators = m.get('operators')
        return self


class RollbackPlanServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        plan_id: str = None,
        rollback_info: RollbackInfo = None,
        service: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 发布单ID
        self.plan_id = plan_id
        # rollback_info
        self.rollback_info = rollback_info
        # 发布服务
        self.service = service
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.plan_id, 'plan_id')
        self.validate_required(self.rollback_info, 'rollback_info')
        if self.rollback_info:
            self.rollback_info.validate()
        self.validate_required(self.service, 'service')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.plan_id is not None:
            result['plan_id'] = self.plan_id
        if self.rollback_info is not None:
            result['rollback_info'] = self.rollback_info.to_map()
        if self.service is not None:
            result['service'] = self.service
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('plan_id') is not None:
            self.plan_id = m.get('plan_id')
        if m.get('rollback_info') is not None:
            temp_model = RollbackInfo()
            self.rollback_info = temp_model.from_map(m['rollback_info'])
        if m.get('service') is not None:
            self.service = m.get('service')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RollbackPlanServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        plan: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 发布单信息
        self.plan = plan

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.plan is not None:
            result['plan'] = self.plan
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('plan') is not None:
            self.plan = m.get('plan')
        return self


class CreatePlanRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        data: str = None,
        from_aliyun: bool = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # data
        self.data = data
        # from aliyun
        self.from_aliyun = from_aliyun
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.data, 'data')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.data is not None:
            result['data'] = self.data
        if self.from_aliyun is not None:
            result['from_aliyun'] = self.from_aliyun
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('from_aliyun') is not None:
            self.from_aliyun = m.get('from_aliyun')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreatePlanResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        plan: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # plan
        self.plan = plan

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.plan is not None:
            result['plan'] = self.plan
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('plan') is not None:
            self.plan = m.get('plan')
        return self


class CheckPlanRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        data: str = None,
        from_aliyun: bool = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # data
        self.data = data
        # from_aliyun
        self.from_aliyun = from_aliyun
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.data, 'data')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.data is not None:
            result['data'] = self.data
        if self.from_aliyun is not None:
            result['from_aliyun'] = self.from_aliyun
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('from_aliyun') is not None:
            self.from_aliyun = m.get('from_aliyun')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CheckPlanResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: str = None,
        error_reasons: List[str] = None,
        validation_messages: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # data
        self.data = data
        # error_reasons
        self.error_reasons = error_reasons
        # validation_messages
        self.validation_messages = validation_messages

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        if self.error_reasons is not None:
            result['error_reasons'] = self.error_reasons
        if self.validation_messages is not None:
            result['validation_messages'] = self.validation_messages
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('error_reasons') is not None:
            self.error_reasons = m.get('error_reasons')
        if m.get('validation_messages') is not None:
            self.validation_messages = m.get('validation_messages')
        return self


class CheckPlanOperationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        data: str = None,
        from_aliyun: bool = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # data
        self.data = data
        # from_aliyun
        self.from_aliyun = from_aliyun
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.data, 'data')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.data is not None:
            result['data'] = self.data
        if self.from_aliyun is not None:
            result['from_aliyun'] = self.from_aliyun
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('from_aliyun') is not None:
            self.from_aliyun = m.get('from_aliyun')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CheckPlanOperationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: str = None,
        error_reasons: List[str] = None,
        validation_messages: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # data
        self.data = data
        # error_messages
        self.error_reasons = error_reasons
        # validation_messages
        self.validation_messages = validation_messages

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        if self.error_reasons is not None:
            result['error_reasons'] = self.error_reasons
        if self.validation_messages is not None:
            result['validation_messages'] = self.validation_messages
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('error_reasons') is not None:
            self.error_reasons = m.get('error_reasons')
        if m.get('validation_messages') is not None:
            self.validation_messages = m.get('validation_messages')
        return self


class CreatePlanOperationRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        data: str = None,
        from_aliyun: bool = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # data
        self.data = data
        # from_aliyun
        self.from_aliyun = from_aliyun
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.data, 'data')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.data is not None:
            result['data'] = self.data
        if self.from_aliyun is not None:
            result['from_aliyun'] = self.from_aliyun
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('data') is not None:
            self.data = m.get('data')
        if m.get('from_aliyun') is not None:
            self.from_aliyun = m.get('from_aliyun')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreatePlanOperationResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        ops_plan: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # ops_plan
        self.ops_plan = ops_plan

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.ops_plan is not None:
            result['ops_plan'] = self.ops_plan
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('ops_plan') is not None:
            self.ops_plan = m.get('ops_plan')
        return self


class CreatePlanAdvancedRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        ops_plan: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # plan
        self.ops_plan = ops_plan
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.ops_plan, 'ops_plan')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.ops_plan is not None:
            result['ops_plan'] = self.ops_plan
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('ops_plan') is not None:
            self.ops_plan = m.get('ops_plan')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreatePlanAdvancedResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        ops_plan: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # ops_plan
        self.ops_plan = ops_plan

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.ops_plan is not None:
            result['ops_plan'] = self.ops_plan
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('ops_plan') is not None:
            self.ops_plan = m.get('ops_plan')
        return self


class ReinitPlanRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ReinitPlanResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        ops_plan: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # ops_plan
        self.ops_plan = ops_plan

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.ops_plan is not None:
            result['ops_plan'] = self.ops_plan
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('ops_plan') is not None:
            self.ops_plan = m.get('ops_plan')
        return self


class GetPlanRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetPlanResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        ops_plan: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 发布单详情
        self.ops_plan = ops_plan

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.ops_plan is not None:
            result['ops_plan'] = self.ops_plan
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('ops_plan') is not None:
            self.ops_plan = m.get('ops_plan')
        return self


class GetPlanBasicRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        show_basic: bool = None,
        time_series_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # show_basic
        self.show_basic = show_basic
        # time_series_id
        self.time_series_id = time_series_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.time_series_id, 'time_series_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.show_basic is not None:
            result['show_basic'] = self.show_basic
        if self.time_series_id is not None:
            result['time_series_id'] = self.time_series_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('show_basic') is not None:
            self.show_basic = m.get('show_basic')
        if m.get('time_series_id') is not None:
            self.time_series_id = m.get('time_series_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetPlanBasicResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        ops_plan: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # ops_plan
        self.ops_plan = ops_plan

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.ops_plan is not None:
            result['ops_plan'] = self.ops_plan
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('ops_plan') is not None:
            self.ops_plan = m.get('ops_plan')
        return self


class GetPlanProgressRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetPlanProgressResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        progress: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # progress
        self.progress = progress

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('progress') is not None:
            self.progress = m.get('progress')
        return self


class QueryPlanRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        gmt_create_end: str = None,
        gmt_create_start: str = None,
        initial_by_tag: str = None,
        name: str = None,
        ops_modes: List[str] = None,
        ops_types: List[str] = None,
        page_no: int = None,
        page_size: int = None,
        plan_ids: List[str] = None,
        plan_time_serials_id: str = None,
        release_modes: List[str] = None,
        service_name: str = None,
        states: List[str] = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # gmtCreateEnd
        self.gmt_create_end = gmt_create_end
        # gmtCreateStart
        self.gmt_create_start = gmt_create_start
        # initialByTag
        self.initial_by_tag = initial_by_tag
        # name
        self.name = name
        # opsModes
        self.ops_modes = ops_modes
        # ops_types
        self.ops_types = ops_types
        # page no
        self.page_no = page_no
        # page size
        self.page_size = page_size
        # plan_ids
        self.plan_ids = plan_ids
        # plan_time_serials_id
        self.plan_time_serials_id = plan_time_serials_id
        # releaseModes
        self.release_modes = release_modes
        # serviceName
        self.service_name = service_name
        # states
        self.states = states
        # workspace
        self.workspace = workspace

    def validate(self):
        if self.gmt_create_end is not None:
            self.validate_pattern(self.gmt_create_end, 'gmt_create_end', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.gmt_create_start is not None:
            self.validate_pattern(self.gmt_create_start, 'gmt_create_start', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.gmt_create_end is not None:
            result['gmt_create_end'] = self.gmt_create_end
        if self.gmt_create_start is not None:
            result['gmt_create_start'] = self.gmt_create_start
        if self.initial_by_tag is not None:
            result['initial_by_tag'] = self.initial_by_tag
        if self.name is not None:
            result['name'] = self.name
        if self.ops_modes is not None:
            result['ops_modes'] = self.ops_modes
        if self.ops_types is not None:
            result['ops_types'] = self.ops_types
        if self.page_no is not None:
            result['page_no'] = self.page_no
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.plan_ids is not None:
            result['plan_ids'] = self.plan_ids
        if self.plan_time_serials_id is not None:
            result['plan_time_serials_id'] = self.plan_time_serials_id
        if self.release_modes is not None:
            result['release_modes'] = self.release_modes
        if self.service_name is not None:
            result['service_name'] = self.service_name
        if self.states is not None:
            result['states'] = self.states
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('gmt_create_end') is not None:
            self.gmt_create_end = m.get('gmt_create_end')
        if m.get('gmt_create_start') is not None:
            self.gmt_create_start = m.get('gmt_create_start')
        if m.get('initial_by_tag') is not None:
            self.initial_by_tag = m.get('initial_by_tag')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('ops_modes') is not None:
            self.ops_modes = m.get('ops_modes')
        if m.get('ops_types') is not None:
            self.ops_types = m.get('ops_types')
        if m.get('page_no') is not None:
            self.page_no = m.get('page_no')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('plan_ids') is not None:
            self.plan_ids = m.get('plan_ids')
        if m.get('plan_time_serials_id') is not None:
            self.plan_time_serials_id = m.get('plan_time_serials_id')
        if m.get('release_modes') is not None:
            self.release_modes = m.get('release_modes')
        if m.get('service_name') is not None:
            self.service_name = m.get('service_name')
        if m.get('states') is not None:
            self.states = m.get('states')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryPlanResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        list: List[str] = None,
        page_no: int = None,
        page_size: int = None,
        total_size: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 列表
        self.list = list
        # page_no
        self.page_no = page_no
        # page_size
        self.page_size = page_size
        # total_size
        self.total_size = total_size

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.list is not None:
            result['list'] = self.list
        if self.page_no is not None:
            result['page_no'] = self.page_no
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_size is not None:
            result['total_size'] = self.total_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('list') is not None:
            self.list = m.get('list')
        if m.get('page_no') is not None:
            self.page_no = m.get('page_no')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_size') is not None:
            self.total_size = m.get('total_size')
        return self


class CountPlanStateRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        gmt_create_end: str = None,
        gmt_create_start: str = None,
        initial_by_tag: str = None,
        name: str = None,
        ops_modes: List[str] = None,
        ops_types: List[str] = None,
        page_no: int = None,
        page_size: int = None,
        plan_ids: List[str] = None,
        plan_time_serials_id: str = None,
        release_modes: List[str] = None,
        service_name: str = None,
        states: List[str] = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # gmt_create_end
        self.gmt_create_end = gmt_create_end
        # gmtCreateStart
        self.gmt_create_start = gmt_create_start
        # initial_by_tag
        self.initial_by_tag = initial_by_tag
        # name
        self.name = name
        # ops_modes
        self.ops_modes = ops_modes
        # ops_types
        self.ops_types = ops_types
        # page no
        self.page_no = page_no
        # page size
        self.page_size = page_size
        # plan ids
        self.plan_ids = plan_ids
        # plan_time_serials_id
        self.plan_time_serials_id = plan_time_serials_id
        # release_modes
        self.release_modes = release_modes
        # service_name
        self.service_name = service_name
        # states
        self.states = states
        # workspace
        self.workspace = workspace

    def validate(self):
        if self.gmt_create_end is not None:
            self.validate_pattern(self.gmt_create_end, 'gmt_create_end', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.gmt_create_start is not None:
            self.validate_pattern(self.gmt_create_start, 'gmt_create_start', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.gmt_create_end is not None:
            result['gmt_create_end'] = self.gmt_create_end
        if self.gmt_create_start is not None:
            result['gmt_create_start'] = self.gmt_create_start
        if self.initial_by_tag is not None:
            result['initial_by_tag'] = self.initial_by_tag
        if self.name is not None:
            result['name'] = self.name
        if self.ops_modes is not None:
            result['ops_modes'] = self.ops_modes
        if self.ops_types is not None:
            result['ops_types'] = self.ops_types
        if self.page_no is not None:
            result['page_no'] = self.page_no
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.plan_ids is not None:
            result['plan_ids'] = self.plan_ids
        if self.plan_time_serials_id is not None:
            result['plan_time_serials_id'] = self.plan_time_serials_id
        if self.release_modes is not None:
            result['release_modes'] = self.release_modes
        if self.service_name is not None:
            result['service_name'] = self.service_name
        if self.states is not None:
            result['states'] = self.states
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('gmt_create_end') is not None:
            self.gmt_create_end = m.get('gmt_create_end')
        if m.get('gmt_create_start') is not None:
            self.gmt_create_start = m.get('gmt_create_start')
        if m.get('initial_by_tag') is not None:
            self.initial_by_tag = m.get('initial_by_tag')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('ops_modes') is not None:
            self.ops_modes = m.get('ops_modes')
        if m.get('ops_types') is not None:
            self.ops_types = m.get('ops_types')
        if m.get('page_no') is not None:
            self.page_no = m.get('page_no')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('plan_ids') is not None:
            self.plan_ids = m.get('plan_ids')
        if m.get('plan_time_serials_id') is not None:
            self.plan_time_serials_id = m.get('plan_time_serials_id')
        if m.get('release_modes') is not None:
            self.release_modes = m.get('release_modes')
        if m.get('service_name') is not None:
            self.service_name = m.get('service_name')
        if m.get('states') is not None:
            self.states = m.get('states')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CountPlanStateResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        state_counts: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # state_counts
        self.state_counts = state_counts

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.state_counts is not None:
            result['state_counts'] = self.state_counts
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('state_counts') is not None:
            self.state_counts = m.get('state_counts')
        return self


class ExecPlanRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ExecPlanResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        ops_plan: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # ops_plan
        self.ops_plan = ops_plan

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.ops_plan is not None:
            result['ops_plan'] = self.ops_plan
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('ops_plan') is not None:
            self.ops_plan = m.get('ops_plan')
        return self


class RetryPlanRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RetryPlanResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        ops_plan: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # ops plan
        self.ops_plan = ops_plan

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.ops_plan is not None:
            result['ops_plan'] = self.ops_plan
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('ops_plan') is not None:
            self.ops_plan = m.get('ops_plan')
        return self


class CancelPlanRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        reason: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # reason
        self.reason = reason
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.reason is not None:
            result['reason'] = self.reason
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('reason') is not None:
            self.reason = m.get('reason')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CancelPlanResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        ops_plan: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # ops_plan
        self.ops_plan = ops_plan

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.ops_plan is not None:
            result['ops_plan'] = self.ops_plan
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('ops_plan') is not None:
            self.ops_plan = m.get('ops_plan')
        return self


class RollbackPlanRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        rollback_info: RollbackInfo = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # rollback_info
        self.rollback_info = rollback_info
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.rollback_info, 'rollback_info')
        if self.rollback_info:
            self.rollback_info.validate()
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.rollback_info is not None:
            result['rollback_info'] = self.rollback_info.to_map()
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('rollback_info') is not None:
            temp_model = RollbackInfo()
            self.rollback_info = temp_model.from_map(m['rollback_info'])
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RollbackPlanResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        ops_plan: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # ops_plan
        self.ops_plan = ops_plan

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.ops_plan is not None:
            result['ops_plan'] = self.ops_plan
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('ops_plan') is not None:
            self.ops_plan = m.get('ops_plan')
        return self


class GetTaskSummaryRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetTaskSummaryResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        task: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # task
        self.task = task

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.task is not None:
            result['task'] = self.task
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('task') is not None:
            self.task = m.get('task')
        return self


class SkipTaskRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SkipTaskResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        task: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # task
        self.task = task

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.task is not None:
            result['task'] = self.task
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('task') is not None:
            self.task = m.get('task')
        return self


class RetryTaskRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RetryTaskResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        task: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # task
        self.task = task

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.task is not None:
            result['task'] = self.task
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('task') is not None:
            self.task = m.get('task')
        return self


class QueryRoleRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        from_aliyun: bool = None,
        page_size: int = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # from_aliyun
        self.from_aliyun = from_aliyun
        # page_size
        self.page_size = page_size
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.page_size, 'page_size')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.from_aliyun is not None:
            result['from_aliyun'] = self.from_aliyun
        if self.page_size is not None:
            result['page_size'] = self.page_size
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('from_aliyun') is not None:
            self.from_aliyun = m.get('from_aliyun')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryRoleResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        roles: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 角色信息
        self.roles = roles

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.roles is not None:
            result['roles'] = self.roles
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('roles') is not None:
            self.roles = m.get('roles')
        return self


class CreateServicegroupcollectionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        process_definition_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # arrangement_id
        self.arrangement_id = arrangement_id
        # process_definition_id
        self.process_definition_id = process_definition_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.process_definition_id, 'process_definition_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.process_definition_id is not None:
            result['process_definition_id'] = self.process_definition_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('process_definition_id') is not None:
            self.process_definition_id = m.get('process_definition_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateServicegroupcollectionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        collection: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 集合信息
        self.collection = collection

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.collection is not None:
            result['collection'] = self.collection
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('collection') is not None:
            self.collection = m.get('collection')
        return self


class DeleteServicegroupcollectionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        process_definition_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # arrangement_id
        self.arrangement_id = arrangement_id
        # process_definition_id
        self.process_definition_id = process_definition_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.process_definition_id, 'process_definition_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.process_definition_id is not None:
            result['process_definition_id'] = self.process_definition_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('process_definition_id') is not None:
            self.process_definition_id = m.get('process_definition_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class DeleteServicegroupcollectionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        collections: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 集合
        self.collections = collections

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.collections is not None:
            result['collections'] = self.collections
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('collections') is not None:
            self.collections = m.get('collections')
        return self


class RetryServicegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RetryServicegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        group: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # group
        self.group = group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('group') is not None:
            self.group = m.get('group')
        return self


class ExecServicegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ExecServicegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        group: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 分组
        self.group = group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('group') is not None:
            self.group = m.get('group')
        return self


class SkipServicegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SkipServicegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        group: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 分组
        self.group = group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('group') is not None:
            self.group = m.get('group')
        return self


class CreateServicegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        append: bool = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # append
        self.append = append
        # service_group_id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.append is not None:
            result['append'] = self.append
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('append') is not None:
            self.append = m.get('append')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateServicegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        group: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 分组
        self.group = group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('group') is not None:
            self.group = m.get('group')
        return self


class DeleteServicegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class DeleteServicegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        group: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 分组
        self.group = group

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('group') is not None:
            self.group = m.get('group')
        return self


class SwitchServicegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        service_group_id: str = None,
        service_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # service_group_id
        self.service_group_id = service_group_id
        # service_id
        self.service_id = service_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.service_group_id, 'service_group_id')
        self.validate_required(self.service_id, 'service_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.service_group_id is not None:
            result['service_group_id'] = self.service_group_id
        if self.service_id is not None:
            result['service_id'] = self.service_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('service_group_id') is not None:
            self.service_group_id = m.get('service_group_id')
        if m.get('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SwitchServicegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        groups: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # groups
        self.groups = groups

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.groups is not None:
            result['groups'] = self.groups
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('groups') is not None:
            self.groups = m.get('groups')
        return self


class GetServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        with_machine_groups: bool = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # 是否带上机器信息
        self.with_machine_groups = with_machine_groups
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.with_machine_groups is not None:
            result['with_machine_groups'] = self.with_machine_groups
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('with_machine_groups') is not None:
            self.with_machine_groups = m.get('with_machine_groups')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class GetServiceProgressRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetServiceProgressResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        progress: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 进度
        self.progress = progress

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('progress') is not None:
            self.progress = m.get('progress')
        return self


class QueryServiceProgressRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        depth: int = None,
        gmt_create_end: str = None,
        gmt_create_start: str = None,
        ids: List[str] = None,
        name: str = None,
        ops_types: List[str] = None,
        page_no: int = None,
        page_size: int = None,
        process_definition_id: str = None,
        service_group_collection_id: str = None,
        service_paas_id: str = None,
        state: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # depth
        self.depth = depth
        # gmt_create_end
        self.gmt_create_end = gmt_create_end
        # gmt_create_start
        self.gmt_create_start = gmt_create_start
        # ids
        self.ids = ids
        # name
        self.name = name
        # ops_types
        self.ops_types = ops_types
        # page_no
        self.page_no = page_no
        # page_size
        self.page_size = page_size
        # process_definition_id
        self.process_definition_id = process_definition_id
        # service_group_collection_id
        self.service_group_collection_id = service_group_collection_id
        # service_paas_id
        self.service_paas_id = service_paas_id
        # state
        self.state = state
        # workspace
        self.workspace = workspace

    def validate(self):
        if self.gmt_create_end is not None:
            self.validate_pattern(self.gmt_create_end, 'gmt_create_end', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.gmt_create_start is not None:
            self.validate_pattern(self.gmt_create_start, 'gmt_create_start', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.depth is not None:
            result['depth'] = self.depth
        if self.gmt_create_end is not None:
            result['gmt_create_end'] = self.gmt_create_end
        if self.gmt_create_start is not None:
            result['gmt_create_start'] = self.gmt_create_start
        if self.ids is not None:
            result['ids'] = self.ids
        if self.name is not None:
            result['name'] = self.name
        if self.ops_types is not None:
            result['ops_types'] = self.ops_types
        if self.page_no is not None:
            result['page_no'] = self.page_no
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.process_definition_id is not None:
            result['process_definition_id'] = self.process_definition_id
        if self.service_group_collection_id is not None:
            result['service_group_collection_id'] = self.service_group_collection_id
        if self.service_paas_id is not None:
            result['service_paas_id'] = self.service_paas_id
        if self.state is not None:
            result['state'] = self.state
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('depth') is not None:
            self.depth = m.get('depth')
        if m.get('gmt_create_end') is not None:
            self.gmt_create_end = m.get('gmt_create_end')
        if m.get('gmt_create_start') is not None:
            self.gmt_create_start = m.get('gmt_create_start')
        if m.get('ids') is not None:
            self.ids = m.get('ids')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('ops_types') is not None:
            self.ops_types = m.get('ops_types')
        if m.get('page_no') is not None:
            self.page_no = m.get('page_no')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('process_definition_id') is not None:
            self.process_definition_id = m.get('process_definition_id')
        if m.get('service_group_collection_id') is not None:
            self.service_group_collection_id = m.get('service_group_collection_id')
        if m.get('service_paas_id') is not None:
            self.service_paas_id = m.get('service_paas_id')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryServiceProgressResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        progresses: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # progresses
        self.progresses = progresses

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.progresses is not None:
            result['progresses'] = self.progresses
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('progresses') is not None:
            self.progresses = m.get('progresses')
        return self


class QueryServiceSlbmountRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        service_id: str = None,
        slb_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # service_id
        self.service_id = service_id
        # slb_id
        self.slb_id = slb_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.service_id, 'service_id')
        self.validate_required(self.slb_id, 'slb_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.service_id is not None:
            result['service_id'] = self.service_id
        if self.slb_id is not None:
            result['slb_id'] = self.slb_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('slb_id') is not None:
            self.slb_id = m.get('slb_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryServiceSlbmountResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        mount_info_list: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # mout_info_list
        self.mount_info_list = mount_info_list

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.mount_info_list is not None:
            result['mount_info_list'] = self.mount_info_list
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('mount_info_list') is not None:
            self.mount_info_list = m.get('mount_info_list')
        return self


class BatchqueryServiceSlbmountRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        service_id: str = None,
        slb_ids: List[str] = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # service_id
        self.service_id = service_id
        # slb_ids
        self.slb_ids = slb_ids
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.service_id, 'service_id')
        self.validate_required(self.slb_ids, 'slb_ids')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.service_id is not None:
            result['service_id'] = self.service_id
        if self.slb_ids is not None:
            result['slb_ids'] = self.slb_ids
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('slb_ids') is not None:
            self.slb_ids = m.get('slb_ids')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class BatchqueryServiceSlbmountResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        mount_info_list: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # slb_info_list
        self.mount_info_list = mount_info_list

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.mount_info_list is not None:
            result['mount_info_list'] = self.mount_info_list
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('mount_info_list') is not None:
            self.mount_info_list = m.get('mount_info_list')
        return self


class UpdateServiceSlbmountRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        mount_info: List[Pair] = None,
        region_identity: str = None,
        service_id: str = None,
        slb_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 权重
        self.mount_info = mount_info
        # region_identity
        self.region_identity = region_identity
        # service_id
        self.service_id = service_id
        # slb_id
        self.slb_id = slb_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.mount_info, 'mount_info')
        if self.mount_info:
            for k in self.mount_info:
                if k:
                    k.validate()
        self.validate_required(self.region_identity, 'region_identity')
        self.validate_required(self.service_id, 'service_id')
        self.validate_required(self.slb_id, 'slb_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        result['mount_info'] = []
        if self.mount_info is not None:
            for k in self.mount_info:
                result['mount_info'].append(k.to_map() if k else None)
        if self.region_identity is not None:
            result['region_identity'] = self.region_identity
        if self.service_id is not None:
            result['service_id'] = self.service_id
        if self.slb_id is not None:
            result['slb_id'] = self.slb_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        self.mount_info = []
        if m.get('mount_info') is not None:
            for k in m.get('mount_info'):
                temp_model = Pair()
                self.mount_info.append(temp_model.from_map(k))
        if m.get('region_identity') is not None:
            self.region_identity = m.get('region_identity')
        if m.get('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('slb_id') is not None:
            self.slb_id = m.get('slb_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateServiceSlbmountResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        process_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # process_id
        self.process_id = process_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.process_id is not None:
            result['process_id'] = self.process_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('process_id') is not None:
            self.process_id = m.get('process_id')
        return self


class QueryServiceSlbmountprogressRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        process_id: str = None,
        region_identity: str = None,
        service_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # process_id
        self.process_id = process_id
        # region_identity
        self.region_identity = region_identity
        # service_id
        self.service_id = service_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.process_id, 'process_id')
        self.validate_required(self.region_identity, 'region_identity')
        self.validate_required(self.service_id, 'service_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.process_id is not None:
            result['process_id'] = self.process_id
        if self.region_identity is not None:
            result['region_identity'] = self.region_identity
        if self.service_id is not None:
            result['service_id'] = self.service_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('process_id') is not None:
            self.process_id = m.get('process_id')
        if m.get('region_identity') is not None:
            self.region_identity = m.get('region_identity')
        if m.get('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryServiceSlbmountprogressResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        progress: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 执行进度
        self.progress = progress

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('progress') is not None:
            self.progress = m.get('progress')
        return self


class QueryServiceLatestsuccessRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        service_paas_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # service_paas_id
        self.service_paas_id = service_paas_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.service_paas_id, 'service_paas_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.service_paas_id is not None:
            result['service_paas_id'] = self.service_paas_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('service_paas_id') is not None:
            self.service_paas_id = m.get('service_paas_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryServiceLatestsuccessResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class ReinitServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ReinitServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class ExecServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ExecServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class CancelServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        reason: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # reason
        self.reason = reason
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.reason is not None:
            result['reason'] = self.reason
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('reason') is not None:
            self.reason = m.get('reason')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CancelServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class SkipServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SkipServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class StartServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class StartServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class ConfirmServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ConfirmServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class SetServiceMachinegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        group_mount: int = None,
        group_strategy_type: str = None,
        machine_groups: List[str] = None,
        need_beta: bool = None,
        service_id: str = None,
        use_default_setup: bool = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 分组数
        self.group_mount = group_mount
        # groupStrategyType
        self.group_strategy_type = group_strategy_type
        # machine_groups
        self.machine_groups = machine_groups
        # need_beta
        self.need_beta = need_beta
        # service_id
        self.service_id = service_id
        # use_default_setup
        self.use_default_setup = use_default_setup
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.service_id, 'service_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.group_mount is not None:
            result['group_mount'] = self.group_mount
        if self.group_strategy_type is not None:
            result['group_strategy_type'] = self.group_strategy_type
        if self.machine_groups is not None:
            result['machine_groups'] = self.machine_groups
        if self.need_beta is not None:
            result['need_beta'] = self.need_beta
        if self.service_id is not None:
            result['service_id'] = self.service_id
        if self.use_default_setup is not None:
            result['use_default_setup'] = self.use_default_setup
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('group_mount') is not None:
            self.group_mount = m.get('group_mount')
        if m.get('group_strategy_type') is not None:
            self.group_strategy_type = m.get('group_strategy_type')
        if m.get('machine_groups') is not None:
            self.machine_groups = m.get('machine_groups')
        if m.get('need_beta') is not None:
            self.need_beta = m.get('need_beta')
        if m.get('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('use_default_setup') is not None:
            self.use_default_setup = m.get('use_default_setup')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SetServiceMachinegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class ReinitServiceMachinegroupRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ReinitServiceMachinegroupResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class ListServiceRollbackversionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        limit: int = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # limit
        self.limit = limit
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.limit is not None:
            result['limit'] = self.limit
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('limit') is not None:
            self.limit = m.get('limit')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ListServiceRollbackversionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        services: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # services
        self.services = services

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('services') is not None:
            self.services = m.get('services')
        return self


class QueryServiceRollbackversionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        depth: int = None,
        gmt_create_end: str = None,
        gmt_create_start: str = None,
        ids: List[str] = None,
        name: str = None,
        ops_types: List[str] = None,
        page_no: int = None,
        page_size: int = None,
        process_definition_id: str = None,
        service_group_collection_id: str = None,
        service_paas_id: str = None,
        state: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # depth
        self.depth = depth
        # gmt_create_end
        self.gmt_create_end = gmt_create_end
        # gmt_create_start
        self.gmt_create_start = gmt_create_start
        # ids
        self.ids = ids
        # name
        self.name = name
        # ops_types
        self.ops_types = ops_types
        # page_no
        self.page_no = page_no
        # page_size
        self.page_size = page_size
        # process_definition_id
        self.process_definition_id = process_definition_id
        # service_group_collection_id
        self.service_group_collection_id = service_group_collection_id
        # service_paas_id
        self.service_paas_id = service_paas_id
        # state
        self.state = state
        # workspace
        self.workspace = workspace

    def validate(self):
        if self.gmt_create_end is not None:
            self.validate_pattern(self.gmt_create_end, 'gmt_create_end', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.gmt_create_start is not None:
            self.validate_pattern(self.gmt_create_start, 'gmt_create_start', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.process_definition_id, 'process_definition_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.depth is not None:
            result['depth'] = self.depth
        if self.gmt_create_end is not None:
            result['gmt_create_end'] = self.gmt_create_end
        if self.gmt_create_start is not None:
            result['gmt_create_start'] = self.gmt_create_start
        if self.ids is not None:
            result['ids'] = self.ids
        if self.name is not None:
            result['name'] = self.name
        if self.ops_types is not None:
            result['ops_types'] = self.ops_types
        if self.page_no is not None:
            result['page_no'] = self.page_no
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.process_definition_id is not None:
            result['process_definition_id'] = self.process_definition_id
        if self.service_group_collection_id is not None:
            result['service_group_collection_id'] = self.service_group_collection_id
        if self.service_paas_id is not None:
            result['service_paas_id'] = self.service_paas_id
        if self.state is not None:
            result['state'] = self.state
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('depth') is not None:
            self.depth = m.get('depth')
        if m.get('gmt_create_end') is not None:
            self.gmt_create_end = m.get('gmt_create_end')
        if m.get('gmt_create_start') is not None:
            self.gmt_create_start = m.get('gmt_create_start')
        if m.get('ids') is not None:
            self.ids = m.get('ids')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('ops_types') is not None:
            self.ops_types = m.get('ops_types')
        if m.get('page_no') is not None:
            self.page_no = m.get('page_no')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('process_definition_id') is not None:
            self.process_definition_id = m.get('process_definition_id')
        if m.get('service_group_collection_id') is not None:
            self.service_group_collection_id = m.get('service_group_collection_id')
        if m.get('service_paas_id') is not None:
            self.service_paas_id = m.get('service_paas_id')
        if m.get('state') is not None:
            self.state = m.get('state')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class QueryServiceRollbackversionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        versions: List[Pair] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 版本
        self.versions = versions

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['versions'] = []
        if self.versions is not None:
            for k in self.versions:
                result['versions'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.versions = []
        if m.get('versions') is not None:
            for k in m.get('versions'):
                temp_model = Pair()
                self.versions.append(temp_model.from_map(k))
        return self


class RollbackServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        rollback_info: RollbackInfo = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # rollback_info
        self.rollback_info = rollback_info
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.rollback_info, 'rollback_info')
        if self.rollback_info:
            self.rollback_info.validate()
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.rollback_info is not None:
            result['rollback_info'] = self.rollback_info.to_map()
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('rollback_info') is not None:
            temp_model = RollbackInfo()
            self.rollback_info = temp_model.from_map(m['rollback_info'])
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RollbackServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 回滚信息
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class ConfirmrollbackServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        retry_rollbacked: bool = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # retry_rollbacked
        self.retry_rollbacked = retry_rollbacked
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.retry_rollbacked, 'retry_rollbacked')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.retry_rollbacked is not None:
            result['retry_rollbacked'] = self.retry_rollbacked
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('retry_rollbacked') is not None:
            self.retry_rollbacked = m.get('retry_rollbacked')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class ConfirmrollbackServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class RetryrollbackServiceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        rollback_info: RollbackInfo = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # rollback_info
        self.rollback_info = rollback_info
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.rollback_info, 'rollback_info')
        if self.rollback_info:
            self.rollback_info.validate()
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.id
        if self.rollback_info is not None:
            result['rollback_info'] = self.rollback_info.to_map()
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('rollback_info') is not None:
            temp_model = RollbackInfo()
            self.rollback_info = temp_model.from_map(m['rollback_info'])
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RetryrollbackServiceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class GetServiceArrangementRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        node_id: str = None,
        service_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # node_id
        self.node_id = node_id
        # service_id
        self.service_id = service_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.node_id, 'node_id')
        self.validate_required(self.service_id, 'service_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.node_id is not None:
            result['node_id'] = self.node_id
        if self.service_id is not None:
            result['service_id'] = self.service_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('node_id') is not None:
            self.node_id = m.get('node_id')
        if m.get('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetServiceArrangementResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        execution_detail: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # execution_detail
        self.execution_detail = execution_detail

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.execution_detail is not None:
            result['execution_detail'] = self.execution_detail
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('execution_detail') is not None:
            self.execution_detail = m.get('execution_detail')
        return self


class RetryServiceArrangementRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        service_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # arrangement_id
        self.arrangement_id = arrangement_id
        # service_id
        self.service_id = service_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.service_id, 'service_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.service_id is not None:
            result['service_id'] = self.service_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class RetryServiceArrangementResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class SkipServiceArrangementRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        arrangement_id: str = None,
        service_id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # arrangement_id
        self.arrangement_id = arrangement_id
        # service_id
        self.service_id = service_id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.arrangement_id, 'arrangement_id')
        self.validate_required(self.service_id, 'service_id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.arrangement_id is not None:
            result['arrangement_id'] = self.arrangement_id
        if self.service_id is not None:
            result['service_id'] = self.service_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('arrangement_id') is not None:
            self.arrangement_id = m.get('arrangement_id')
        if m.get('service_id') is not None:
            self.service_id = m.get('service_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class SkipServiceArrangementResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class QueryOperationlogRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        event: str = None,
        page_no: int = None,
        page_size: int = None,
        result: bool = None,
        target_id: str = None,
        target_type: str = None,
        user_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # event
        self.event = event
        # page_no
        self.page_no = page_no
        # page_size
        self.page_size = page_size
        # result
        self.result = result
        # target_id
        self.target_id = target_id
        # target_type
        self.target_type = target_type
        # user_id
        self.user_id = user_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.event is not None:
            result['event'] = self.event
        if self.page_no is not None:
            result['page_no'] = self.page_no
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.result is not None:
            result['result'] = self.result
        if self.target_id is not None:
            result['target_id'] = self.target_id
        if self.target_type is not None:
            result['target_type'] = self.target_type
        if self.user_id is not None:
            result['user_id'] = self.user_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('event') is not None:
            self.event = m.get('event')
        if m.get('page_no') is not None:
            self.page_no = m.get('page_no')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('result') is not None:
            self.result = m.get('result')
        if m.get('target_id') is not None:
            self.target_id = m.get('target_id')
        if m.get('target_type') is not None:
            self.target_type = m.get('target_type')
        if m.get('user_id') is not None:
            self.user_id = m.get('user_id')
        return self


class QueryOperationlogResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        list: List[str] = None,
        page_no: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # list
        self.list = list
        # page_no
        self.page_no = page_no
        # page_size
        self.page_size = page_size
        # total_count
        self.total_count = total_count

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.list is not None:
            result['list'] = self.list
        if self.page_no is not None:
            result['page_no'] = self.page_no
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('list') is not None:
            self.list = m.get('list')
        if m.get('page_no') is not None:
            self.page_no = m.get('page_no')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class QueryOperationlogTimelineRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        customer_id: str = None,
        gmt_from: str = None,
        gmt_to: str = None,
        module: str = None,
        operation_status: str = None,
        operation_target: str = None,
        operation_type: str = None,
        operator_id: str = None,
        page_no: int = None,
        page_size: int = None,
        status: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # customer_id
        self.customer_id = customer_id
        # gmt_from
        self.gmt_from = gmt_from
        # gmt_to
        self.gmt_to = gmt_to
        # module
        self.module = module
        # operation_status
        self.operation_status = operation_status
        # operation_target
        self.operation_target = operation_target
        # operation_type
        self.operation_type = operation_type
        # operator_id
        self.operator_id = operator_id
        # page_no
        self.page_no = page_no
        # page_size
        self.page_size = page_size
        # status
        self.status = status
        # workspace
        self.workspace = workspace

    def validate(self):
        if self.gmt_from is not None:
            self.validate_pattern(self.gmt_from, 'gmt_from', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        if self.gmt_to is not None:
            self.validate_pattern(self.gmt_to, 'gmt_to', '\\d{4}[-]\\d{1,2}[-]\\d{1,2}[T]\\d{2}:\\d{2}:\\d{2}[Z]')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.customer_id is not None:
            result['customer_id'] = self.customer_id
        if self.gmt_from is not None:
            result['gmt_from'] = self.gmt_from
        if self.gmt_to is not None:
            result['gmt_to'] = self.gmt_to
        if self.module is not None:
            result['module'] = self.module
        if self.operation_status is not None:
            result['operation_status'] = self.operation_status
        if self.operation_target is not None:
            result['operation_target'] = self.operation_target
        if self.operation_type is not None:
            result['operation_type'] = self.operation_type
        if self.operator_id is not None:
            result['operator_id'] = self.operator_id
        if self.page_no is not None:
            result['page_no'] = self.page_no
        if self.page_size is not None:
            result['page_size'] = 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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('customer_id') is not None:
            self.customer_id = m.get('customer_id')
        if m.get('gmt_from') is not None:
            self.gmt_from = m.get('gmt_from')
        if m.get('gmt_to') is not None:
            self.gmt_to = m.get('gmt_to')
        if m.get('module') is not None:
            self.module = m.get('module')
        if m.get('operation_status') is not None:
            self.operation_status = m.get('operation_status')
        if m.get('operation_target') is not None:
            self.operation_target = m.get('operation_target')
        if m.get('operation_type') is not None:
            self.operation_type = m.get('operation_type')
        if m.get('operator_id') is not None:
            self.operator_id = m.get('operator_id')
        if m.get('page_no') is not None:
            self.page_no = m.get('page_no')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        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 QueryOperationlogTimelineResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        list: List[str] = None,
        page_no: int = None,
        page_size: int = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # list
        self.list = list
        # page_no
        self.page_no = page_no
        # page_size
        self.page_size = page_size
        # total_count
        self.total_count = total_count

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.list is not None:
            result['list'] = self.list
        if self.page_no is not None:
            result['page_no'] = self.page_no
        if self.page_size is not None:
            result['page_size'] = self.page_size
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('list') is not None:
            self.list = m.get('list')
        if m.get('page_no') is not None:
            self.page_no = m.get('page_no')
        if m.get('page_size') is not None:
            self.page_size = m.get('page_size')
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class GetServiceDetailRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        id: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # id
        self.id = id
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.id, 'id')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.id is not None:
            result['id'] = self.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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetServiceDetailResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        service: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # service
        self.service = service

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('service') is not None:
            self.service = m.get('service')
        return self


class CreateMetaCellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        request: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # request
        self.request = request
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.request, 'request')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.request is not None:
            result['request'] = self.request
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('request') is not None:
            self.request = m.get('request')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class CreateMetaCellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        data: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # data
        self.data = data

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.data is not None:
            result['data'] = self.data
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('data') is not None:
            self.data = m.get('data')
        return self


class UpdateMetaCellRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        request: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # request
        self.request = request
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.request, 'request')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.request is not None:
            result['request'] = self.request
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('request') is not None:
            self.request = m.get('request')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class UpdateMetaCellResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class AddMetaMasterzonerelRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        request: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # request
        self.request = request
        # workspace
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.request, 'request')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.request is not None:
            result['request'] = self.request
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('request') is not None:
            self.request = m.get('request')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class AddMetaMasterzonerelResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class AssignComputerRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        application_name: str = None,
        auto_ops: bool = None,
        computer_cells: List[ComputerCell] = None,
        computer_ids: List[str] = None,
        init_data_disk: bool = None,
        init_sys_disk: bool = None,
        req_biz_id: str = None,
        service_name: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用的完整名称
        self.application_name = application_name
        # 是否启用自动运维，默认为**False**\
        self.auto_ops = auto_ops
        # 计算资源与cell的关系，如果不指定会根据分配的应用、服务实例以及computer的zone信息由系统决定，如果无法决定会导致失败，建议在指定了service_name参数的情形下指定该参数
        self.computer_cells = computer_cells
        # 计算资源id，可以指定多个
        self.computer_ids = computer_ids
        # 是否重新初始化数据磁盘，默认为**False**\
        self.init_data_disk = init_data_disk
        # 是否重新初始化系统磁盘，默认为**False**\
        self.init_sys_disk = init_sys_disk
        # 请求业务id，用于幂等性控制等，需要客户端提供并保证唯一。最大64位单字节字符
        self.req_biz_id = req_biz_id
        # 目标服务实例名称
        self.service_name = service_name
        # 目标工作空间名称
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.application_name, 'application_name')
        if self.computer_cells:
            for k in self.computer_cells:
                if k:
                    k.validate()
        self.validate_required(self.service_name, 'service_name')
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.application_name is not None:
            result['application_name'] = self.application_name
        if self.auto_ops is not None:
            result['auto_ops'] = self.auto_ops
        result['computer_cells'] = []
        if self.computer_cells is not None:
            for k in self.computer_cells:
                result['computer_cells'].append(k.to_map() if k else None)
        if self.computer_ids is not None:
            result['computer_ids'] = self.computer_ids
        if self.init_data_disk is not None:
            result['init_data_disk'] = self.init_data_disk
        if self.init_sys_disk is not None:
            result['init_sys_disk'] = self.init_sys_disk
        if self.req_biz_id is not None:
            result['req_biz_id'] = self.req_biz_id
        if self.service_name is not None:
            result['service_name'] = self.service_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('application_name') is not None:
            self.application_name = m.get('application_name')
        if m.get('auto_ops') is not None:
            self.auto_ops = m.get('auto_ops')
        self.computer_cells = []
        if m.get('computer_cells') is not None:
            for k in m.get('computer_cells'):
                temp_model = ComputerCell()
                self.computer_cells.append(temp_model.from_map(k))
        if m.get('computer_ids') is not None:
            self.computer_ids = m.get('computer_ids')
        if m.get('init_data_disk') is not None:
            self.init_data_disk = m.get('init_data_disk')
        if m.get('init_sys_disk') is not None:
            self.init_sys_disk = m.get('init_sys_disk')
        if m.get('req_biz_id') is not None:
            self.req_biz_id = m.get('req_biz_id')
        if m.get('service_name') is not None:
            self.service_name = m.get('service_name')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class AssignComputerResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        task_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 请求的id
        self.task_id = task_id

    def validate(self):
        self.validate_required(self.task_id, 'task_id')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.task_id is not None:
            result['task_id'] = self.task_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('task_id') is not None:
            self.task_id = m.get('task_id')
        return self


class ReleaseComputerRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        computer_ids: List[str] = None,
        req_biz_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 计算资源id，可以指定多个
        self.computer_ids = computer_ids
        # 请求业务id，用于幂等性控制等，需要客户端提供并保证唯一。最大64位单字节字符
        self.req_biz_id = req_biz_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.computer_ids is not None:
            result['computer_ids'] = self.computer_ids
        if self.req_biz_id is not None:
            result['req_biz_id'] = self.req_biz_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('computer_ids') is not None:
            self.computer_ids = m.get('computer_ids')
        if m.get('req_biz_id') is not None:
            self.req_biz_id = m.get('req_biz_id')
        return self


class ReleaseComputerResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        task_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 请求的id
        self.task_id = task_id

    def validate(self):
        self.validate_required(self.task_id, 'task_id')

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.task_id is not None:
            result['task_id'] = self.task_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('task_id') is not None:
            self.task_id = m.get('task_id')
        return self


class GetTaskRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        req_biz_id: str = None,
        task_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 请求的业务号，当`task_id`参数指定时该参数会被忽略
        self.req_biz_id = req_biz_id
        # 异步请求的id， 当`req_biz_id`参数指定时可以不指定该参数，如果指定了该参数则忽略`req_biz_id`参数
        self.task_id = task_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.req_biz_id is not None:
            result['req_biz_id'] = self.req_biz_id
        if self.task_id is not None:
            result['task_id'] = self.task_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('req_biz_id') is not None:
            self.req_biz_id = m.get('req_biz_id')
        if m.get('task_id') is not None:
            self.task_id = m.get('task_id')
        return self


class GetTaskResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        creation_time: str = None,
        execution_results: List[TaskResult] = None,
        id: str = None,
        req_biz_id: str = None,
        status: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 
        # 异步请求创建的时间和日期。采用UTC时间，按照[ISO8601](https://zh.wikipedia.org/wiki/ISO_8601)标准表示，格式为：`YYYY-MM-DDThh:mm:ssZ`
        # 
        self.creation_time = creation_time
        # 异步请求中任务的执行结果，key为任务操作对象id比如某个资源的id，value为操作结果
        self.execution_results = execution_results
        # 异步请求唯一标识
        self.id = id
        # 异步请求业务号
        self.req_biz_id = req_biz_id
        # 异步请求状态，取值：
        # INIT：初始化中；
        # READY：待执行；
        # PROCESSING：执行中；
        # COMPLETED：执行完成
        # 
        self.status = status

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.creation_time is not None:
            result['creation_time'] = self.creation_time
        result['execution_results'] = []
        if self.execution_results is not None:
            for k in self.execution_results:
                result['execution_results'].append(k.to_map() if k else None)
        if self.id is not None:
            result['id'] = self.id
        if self.req_biz_id is not None:
            result['req_biz_id'] = self.req_biz_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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('creation_time') is not None:
            self.creation_time = m.get('creation_time')
        self.execution_results = []
        if m.get('execution_results') is not None:
            for k in m.get('execution_results'):
                temp_model = TaskResult()
                self.execution_results.append(temp_model.from_map(k))
        if m.get('id') is not None:
            self.id = m.get('id')
        if m.get('req_biz_id') is not None:
            self.req_biz_id = m.get('req_biz_id')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class CreateComputerRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        description: str = None,
        image_id: str = None,
        instance_count: int = None,
        name: str = None,
        paasword: str = None,
        region: str = None,
        deploy_type: str = None,
        security_group_id: str = None,
        spec_id: str = None,
        system_disk_size: str = None,
        system_disk_type: str = None,
        v_switch_id: str = None,
        workspace: str = None,
        zone: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 实例描述
        self.description = description
        # 镜像文件ID，启动实例时选择的镜像资源。
        self.image_id = image_id
        # 创建的实例数量。默认为 1 台
        self.instance_count = instance_count
        # 实例名称前缀。可包含小写字母(a-z)，数字(0-9) 和中划线(-)，以字母开头，中划线不能结尾或连续使用，2 ~ 40 个字符。
        self.name = name
        # 实例的密码。长度为8至30个字符，必须同时包含大小写英文字母、数字和特殊符号中的三类字符。特殊符号可以是：
        # ()`~!@#^&*-_+=|{}[]:;'<>,.?/\
        # 其中，Windows实例不能以斜线号（/）为密码首字符。
        self.paasword = paasword
        # 实例所在地域
        self.region = region
        # image 或者 package
        self.deploy_type = deploy_type
        # 新创建实例所属于的安全组ID，同一个安全组内的实例之间可以互相访问。
        self.security_group_id = security_group_id
        # 实例的资源规格。
        self.spec_id = spec_id
        # 单位 G。系统盘大小，需根据选择的 image 类型决定。
        self.system_disk_size = system_disk_size
        # 系统盘类型
        self.system_disk_type = system_disk_type
        # VPC类型的实例，需要指定虚拟交换机ID。
        self.v_switch_id = v_switch_id
        # 实例所在工作空间
        self.workspace = workspace
        # 实例所在可用区
        self.zone = zone

    def validate(self):
        self.validate_required(self.image_id, 'image_id')
        if self.paasword is not None:
            self.validate_max_length(self.paasword, 'paasword', 30)
        self.validate_required(self.region, 'region')
        self.validate_required(self.security_group_id, 'security_group_id')
        self.validate_required(self.spec_id, 'spec_id')
        self.validate_required(self.system_disk_size, 'system_disk_size')
        self.validate_required(self.system_disk_type, 'system_disk_type')
        self.validate_required(self.workspace, 'workspace')
        self.validate_required(self.zone, 'zone')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.description is not None:
            result['description'] = self.description
        if self.image_id is not None:
            result['image_id'] = self.image_id
        if self.instance_count is not None:
            result['instance_count'] = self.instance_count
        if self.name is not None:
            result['name'] = self.name
        if self.paasword is not None:
            result['paasword'] = self.paasword
        if self.region is not None:
            result['region'] = self.region
        if self.deploy_type is not None:
            result['deploy_type'] = self.deploy_type
        if self.security_group_id is not None:
            result['security_group_id'] = self.security_group_id
        if self.spec_id is not None:
            result['spec_id'] = self.spec_id
        if self.system_disk_size is not None:
            result['system_disk_size'] = self.system_disk_size
        if self.system_disk_type is not None:
            result['system_disk_type'] = self.system_disk_type
        if self.v_switch_id is not None:
            result['v_switch_id'] = self.v_switch_id
        if self.workspace is not None:
            result['workspace'] = self.workspace
        if self.zone is not None:
            result['zone'] = self.zone
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('image_id') is not None:
            self.image_id = m.get('image_id')
        if m.get('instance_count') is not None:
            self.instance_count = m.get('instance_count')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('paasword') is not None:
            self.paasword = m.get('paasword')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('deploy_type') is not None:
            self.deploy_type = m.get('deploy_type')
        if m.get('security_group_id') is not None:
            self.security_group_id = m.get('security_group_id')
        if m.get('spec_id') is not None:
            self.spec_id = m.get('spec_id')
        if m.get('system_disk_size') is not None:
            self.system_disk_size = m.get('system_disk_size')
        if m.get('system_disk_type') is not None:
            self.system_disk_type = m.get('system_disk_type')
        if m.get('v_switch_id') is not None:
            self.v_switch_id = m.get('v_switch_id')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        if m.get('zone') is not None:
            self.zone = m.get('zone')
        return self


class CreateComputerResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        computer_ids: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 实例 id
        self.computer_ids = computer_ids

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.computer_ids is not None:
            result['computer_ids'] = self.computer_ids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('computer_ids') is not None:
            self.computer_ids = m.get('computer_ids')
        return self


class CreateSidecarRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        description: str = None,
        sidecar_name: str = None,
        scope: str = None,
        scope_identity: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # sidecar描述
        self.description = description
        # sidecar名称
        self.sidecar_name = sidecar_name
        # sidecar生效范围：workspace、workspace_group、region
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        self.scope_identity = scope_identity

    def validate(self):
        self.validate_required(self.sidecar_name, 'sidecar_name')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.description is not None:
            result['description'] = self.description
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        return self


class CreateSidecarResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class ListSidecarRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        pagination_query: PaginationQuery = None,
        scope: str = None,
        scope_identity: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 分页请求体
        self.pagination_query = pagination_query
        # sidecar生效范围：workspace、workspace_group、region
        self.scope = scope
        # scope对应的唯一标识符
        self.scope_identity = scope_identity

    def validate(self):
        if self.pagination_query:
            self.pagination_query.validate()
        self.validate_required(self.scope, 'scope')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.pagination_query is not None:
            result['pagination_query'] = self.pagination_query.to_map()
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('pagination_query') is not None:
            temp_model = PaginationQuery()
            self.pagination_query = temp_model.from_map(m['pagination_query'])
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        return self


class ListSidecarResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        sidecars: List[Sidecar] = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # sidecar元信息结构体列表
        self.sidecars = sidecars
        # 总记录条数
        self.total_count = total_count

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['sidecars'] = []
        if self.sidecars is not None:
            for k in self.sidecars:
                result['sidecars'].append(k.to_map() if k else None)
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.sidecars = []
        if m.get('sidecars') is not None:
            for k in m.get('sidecars'):
                temp_model = Sidecar()
                self.sidecars.append(temp_model.from_map(k))
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class CreateSidecarVersionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        description: str = None,
        release_note: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_name: str = None,
        sidecar_version: str = None,
        template: str = None,
        template_configs: List[SidecarTemplateConfig] = None,
        type: str = None,
        version_period: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # sidecar版本描述
        self.description = description
        # release note
        self.release_note = release_note
        # sidecar生效范围：workspace、workspace_group、region
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace_name
        self.scope_identity = scope_identity
        # sidecar名称
        self.sidecar_name = sidecar_name
        # sidecar版本号
        self.sidecar_version = sidecar_version
        # 模板内容
        self.template = template
        # sidecar模板配置
        self.template_configs = template_configs
        # sidecar版本类型
        self.type = type
        # 版本周期：alpha/beta/release
        self.version_period = version_period

    def validate(self):
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_name, 'sidecar_name')
        self.validate_required(self.sidecar_version, 'sidecar_version')
        self.validate_required(self.template, 'template')
        self.validate_required(self.template_configs, 'template_configs')
        if self.template_configs:
            for k in self.template_configs:
                if k:
                    k.validate()
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.description is not None:
            result['description'] = self.description
        if self.release_note is not None:
            result['release_note'] = self.release_note
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        if self.sidecar_version is not None:
            result['sidecar_version'] = self.sidecar_version
        if self.template is not None:
            result['template'] = self.template
        result['template_configs'] = []
        if self.template_configs is not None:
            for k in self.template_configs:
                result['template_configs'].append(k.to_map() if k else None)
        if self.type is not None:
            result['type'] = self.type
        if self.version_period is not None:
            result['version_period'] = self.version_period
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('release_note') is not None:
            self.release_note = m.get('release_note')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        if m.get('sidecar_version') is not None:
            self.sidecar_version = m.get('sidecar_version')
        if m.get('template') is not None:
            self.template = m.get('template')
        self.template_configs = []
        if m.get('template_configs') is not None:
            for k in m.get('template_configs'):
                temp_model = SidecarTemplateConfig()
                self.template_configs.append(temp_model.from_map(k))
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('version_period') is not None:
            self.version_period = m.get('version_period')
        return self


class CreateSidecarVersionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class ListSidecarVersionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        pagination_query: PaginationQuery = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_name: str = None,
        sidecar_version: str = None,
        status: int = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 分页查询请求体
        self.pagination_query = pagination_query
        # sidecar生效范围：workspace、workspace_group、region
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        self.scope_identity = scope_identity
        # sidecar名称
        self.sidecar_name = sidecar_name
        # sidecar版本号
        self.sidecar_version = sidecar_version
        # 版本状态
        self.status = status

    def validate(self):
        if self.pagination_query:
            self.pagination_query.validate()
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_name, 'sidecar_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.pagination_query is not None:
            result['pagination_query'] = self.pagination_query.to_map()
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        if self.sidecar_version is not None:
            result['sidecar_version'] = self.sidecar_version
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('pagination_query') is not None:
            temp_model = PaginationQuery()
            self.pagination_query = temp_model.from_map(m['pagination_query'])
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        if m.get('sidecar_version') is not None:
            self.sidecar_version = m.get('sidecar_version')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class ListSidecarVersionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        sidecar_release_versions: List[SidecarReleaseVersion] = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # sidecar发布版本列表
        self.sidecar_release_versions = sidecar_release_versions
        # 总记录条数
        self.total_count = total_count

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['sidecar_release_versions'] = []
        if self.sidecar_release_versions is not None:
            for k in self.sidecar_release_versions:
                result['sidecar_release_versions'].append(k.to_map() if k else None)
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.sidecar_release_versions = []
        if m.get('sidecar_release_versions') is not None:
            for k in m.get('sidecar_release_versions'):
                temp_model = SidecarReleaseVersion()
                self.sidecar_release_versions.append(temp_model.from_map(k))
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class GetSidecarVersionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_name: str = None,
        sidecar_version: str = None,
        type: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # sidecar生效范围：workspace、workspace_group、region
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        self.scope_identity = scope_identity
        # sidecar版本
        self.sidecar_name = sidecar_name
        # sidecar版本号
        self.sidecar_version = sidecar_version
        # sidecar版本类型
        self.type = type

    def validate(self):
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_name, 'sidecar_name')
        self.validate_required(self.sidecar_version, 'sidecar_version')
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        if self.sidecar_version is not None:
            result['sidecar_version'] = self.sidecar_version
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        if m.get('sidecar_version') is not None:
            self.sidecar_version = m.get('sidecar_version')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class GetSidecarVersionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        sidecar_release_version: SidecarReleaseVersion = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # sidecar发布版本
        self.sidecar_release_version = sidecar_release_version

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.sidecar_release_version is not None:
            result['sidecar_release_version'] = self.sidecar_release_version.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('sidecar_release_version') is not None:
            temp_model = SidecarReleaseVersion()
            self.sidecar_release_version = temp_model.from_map(m['sidecar_release_version'])
        return self


class CreateSidecarRuleRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        description: str = None,
        level: int = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_version_instance_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 规则描述
        self.description = description
        # 规则优先级
        self.level = level
        # sidecar生效范围：workspace、workspace_group、region
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar版本实例id
        self.sidecar_version_instance_id = sidecar_version_instance_id

    def validate(self):
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_version_instance_id, 'sidecar_version_instance_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.description is not None:
            result['description'] = self.description
        if self.level is not None:
            result['level'] = self.level
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_version_instance_id is not None:
            result['sidecar_version_instance_id'] = self.sidecar_version_instance_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_version_instance_id') is not None:
            self.sidecar_version_instance_id = m.get('sidecar_version_instance_id')
        return self


class CreateSidecarRuleResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class GetSidecarRuleRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_version_instance_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # sidecar生效范围：workspace、workspace_group、region
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar版本id
        self.sidecar_version_instance_id = sidecar_version_instance_id

    def validate(self):
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_version_instance_id, 'sidecar_version_instance_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_version_instance_id is not None:
            result['sidecar_version_instance_id'] = self.sidecar_version_instance_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_version_instance_id') is not None:
            self.sidecar_version_instance_id = m.get('sidecar_version_instance_id')
        return self


class GetSidecarRuleResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        sidecar_rule: SidecarRule = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # sidecar rule结构体
        self.sidecar_rule = sidecar_rule

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.sidecar_rule is not None:
            result['sidecar_rule'] = self.sidecar_rule.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('sidecar_rule') is not None:
            temp_model = SidecarRule()
            self.sidecar_rule = temp_model.from_map(m['sidecar_rule'])
        return self


class ListSidecarRuleRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        pagination_query: PaginationQuery = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_name: str = None,
        status: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 分页查询
        self.pagination_query = pagination_query
        # sidecar生效范围：workspace、workspace_group、region
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar名称
        self.sidecar_name = sidecar_name
        # 规则状态
        self.status = status

    def validate(self):
        if self.pagination_query:
            self.pagination_query.validate()
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.pagination_query is not None:
            result['pagination_query'] = self.pagination_query.to_map()
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('pagination_query') is not None:
            temp_model = PaginationQuery()
            self.pagination_query = temp_model.from_map(m['pagination_query'])
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class ListSidecarRuleResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        sidecar_rules: List[SidecarRule] = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # sidecar规则详情列表
        self.sidecar_rules = sidecar_rules
        # 总记录条数
        self.total_count = total_count

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['sidecar_rules'] = []
        if self.sidecar_rules is not None:
            for k in self.sidecar_rules:
                result['sidecar_rules'].append(k.to_map() if k else None)
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.sidecar_rules = []
        if m.get('sidecar_rules') is not None:
            for k in m.get('sidecar_rules'):
                temp_model = SidecarRule()
                self.sidecar_rules.append(temp_model.from_map(k))
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class CreateSidecarInstanceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        description: str = None,
        instance_name: str = None,
        params: str = None,
        rule: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_release_version_id: str = None,
        params_configs: List[SidecarParamsConfig] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 规则描述
        self.description = description
        # 实例名称
        self.instance_name = instance_name
        # 环境参数模板
        self.params = params
        # 自定义规则内容
        self.rule = rule
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar版本id
        # 
        self.sidecar_release_version_id = sidecar_release_version_id
        # sidecar环境参数配置
        # 
        self.params_configs = params_configs

    def validate(self):
        self.validate_required(self.instance_name, 'instance_name')
        self.validate_required(self.rule, 'rule')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_release_version_id, 'sidecar_release_version_id')
        self.validate_required(self.params_configs, 'params_configs')
        if self.params_configs:
            for k in self.params_configs:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.description is not None:
            result['description'] = self.description
        if self.instance_name is not None:
            result['instance_name'] = self.instance_name
        if self.params is not None:
            result['params'] = self.params
        if self.rule is not None:
            result['rule'] = self.rule
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_release_version_id is not None:
            result['sidecar_release_version_id'] = self.sidecar_release_version_id
        result['params_configs'] = []
        if self.params_configs is not None:
            for k in self.params_configs:
                result['params_configs'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('instance_name') is not None:
            self.instance_name = m.get('instance_name')
        if m.get('params') is not None:
            self.params = m.get('params')
        if m.get('rule') is not None:
            self.rule = m.get('rule')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_release_version_id') is not None:
            self.sidecar_release_version_id = m.get('sidecar_release_version_id')
        self.params_configs = []
        if m.get('params_configs') is not None:
            for k in m.get('params_configs'):
                temp_model = SidecarParamsConfig()
                self.params_configs.append(temp_model.from_map(k))
        return self


class CreateSidecarInstanceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class ListSidecarInstanceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        instance_name: str = None,
        pagination_query: PaginationQuery = None,
        scope: str = None,
        scope_identity: str = None,
        status: int = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 版本实例名称
        self.instance_name = instance_name
        # 分页查询
        self.pagination_query = pagination_query
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # 版本实例状态
        self.status = status

    def validate(self):
        if self.pagination_query:
            self.pagination_query.validate()
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.instance_name is not None:
            result['instance_name'] = self.instance_name
        if self.pagination_query is not None:
            result['pagination_query'] = self.pagination_query.to_map()
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('instance_name') is not None:
            self.instance_name = m.get('instance_name')
        if m.get('pagination_query') is not None:
            temp_model = PaginationQuery()
            self.pagination_query = temp_model.from_map(m['pagination_query'])
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class ListSidecarInstanceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        sidecar_version_instances: List[SidecarVersionInstance] = None,
        total_count: int = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # sidecar版本实例列表
        self.sidecar_version_instances = sidecar_version_instances
        # 总记录条数
        self.total_count = total_count

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['sidecar_version_instances'] = []
        if self.sidecar_version_instances is not None:
            for k in self.sidecar_version_instances:
                result['sidecar_version_instances'].append(k.to_map() if k else None)
        if self.total_count is not None:
            result['total_count'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.sidecar_version_instances = []
        if m.get('sidecar_version_instances') is not None:
            for k in m.get('sidecar_version_instances'):
                temp_model = SidecarVersionInstance()
                self.sidecar_version_instances.append(temp_model.from_map(k))
        if m.get('total_count') is not None:
            self.total_count = m.get('total_count')
        return self


class GetSidecarInstanceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        instance_name: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_release_version_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 版本实例名称
        self.instance_name = instance_name
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar版本id
        self.sidecar_release_version_id = sidecar_release_version_id

    def validate(self):
        self.validate_required(self.instance_name, 'instance_name')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_release_version_id, 'sidecar_release_version_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.instance_name is not None:
            result['instance_name'] = self.instance_name
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_release_version_id is not None:
            result['sidecar_release_version_id'] = self.sidecar_release_version_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('instance_name') is not None:
            self.instance_name = m.get('instance_name')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_release_version_id') is not None:
            self.sidecar_release_version_id = m.get('sidecar_release_version_id')
        return self


class GetSidecarInstanceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        sidecar_version_instance: SidecarVersionInstance = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # sidecar版本实例
        self.sidecar_version_instance = sidecar_version_instance

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.sidecar_version_instance is not None:
            result['sidecar_version_instance'] = self.sidecar_version_instance.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('sidecar_version_instance') is not None:
            temp_model = SidecarVersionInstance()
            self.sidecar_version_instance = temp_model.from_map(m['sidecar_version_instance'])
        return self


class GetSidecarRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识符
        self.scope_identity = scope_identity
        # sidecar名称
        self.sidecar_name = sidecar_name

    def validate(self):
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_name, 'sidecar_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        return self


class GetSidecarResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        sidecar: Sidecar = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # sidecar类型
        self.sidecar = sidecar

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.sidecar is not None:
            result['sidecar'] = self.sidecar.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('sidecar') is not None:
            temp_model = Sidecar()
            self.sidecar = temp_model.from_map(m['sidecar'])
        return self


class UpdateSidecarRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        description: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_name: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # sidecar类型描述
        self.description = description
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar名称
        self.sidecar_name = sidecar_name

    def validate(self):
        self.validate_required(self.description, 'description')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_name, 'sidecar_name')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.description is not None:
            result['description'] = self.description
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        return self


class UpdateSidecarResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class DeleteSidecarRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        sidecar_name: str = None,
        scope: str = None,
        scope_identity: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # sidecar名称
        self.sidecar_name = sidecar_name
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity

    def validate(self):
        self.validate_required(self.sidecar_name, 'sidecar_name')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        return self


class DeleteSidecarResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class UpdateSidecarVersionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        description: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_name: str = None,
        sidecar_version: str = None,
        status: int = None,
        template: str = None,
        template_configs: List[SidecarTemplateConfig] = None,
        type: str = None,
        version_period: str = None,
        release_note: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # sidecar版本描述
        self.description = description
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        self.scope_identity = scope_identity
        # sidecar名称
        self.sidecar_name = sidecar_name
        # sidecar版本号
        self.sidecar_version = sidecar_version
        # 版本状态
        self.status = status
        # sidecar模板内容
        self.template = template
        # sidecar模板配置
        self.template_configs = template_configs
        # sidecar版本类型
        self.type = type
        # 版本周期：alpha/beta/release
        # 
        self.version_period = version_period
        # 版本特性
        self.release_note = release_note

    def validate(self):
        self.validate_required(self.description, 'description')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_name, 'sidecar_name')
        self.validate_required(self.sidecar_version, 'sidecar_version')
        self.validate_required(self.status, 'status')
        self.validate_required(self.template, 'template')
        self.validate_required(self.template_configs, 'template_configs')
        if self.template_configs:
            for k in self.template_configs:
                if k:
                    k.validate()
        self.validate_required(self.type, 'type')
        self.validate_required(self.version_period, 'version_period')
        self.validate_required(self.release_note, 'release_note')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.description is not None:
            result['description'] = self.description
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        if self.sidecar_version is not None:
            result['sidecar_version'] = self.sidecar_version
        if self.status is not None:
            result['status'] = self.status
        if self.template is not None:
            result['template'] = self.template
        result['template_configs'] = []
        if self.template_configs is not None:
            for k in self.template_configs:
                result['template_configs'].append(k.to_map() if k else None)
        if self.type is not None:
            result['type'] = self.type
        if self.version_period is not None:
            result['version_period'] = self.version_period
        if self.release_note is not None:
            result['release_note'] = self.release_note
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        if m.get('sidecar_version') is not None:
            self.sidecar_version = m.get('sidecar_version')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('template') is not None:
            self.template = m.get('template')
        self.template_configs = []
        if m.get('template_configs') is not None:
            for k in m.get('template_configs'):
                temp_model = SidecarTemplateConfig()
                self.template_configs.append(temp_model.from_map(k))
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('version_period') is not None:
            self.version_period = m.get('version_period')
        if m.get('release_note') is not None:
            self.release_note = m.get('release_note')
        return self


class UpdateSidecarVersionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class DeleteSidecarVersionRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_name: str = None,
        sidecar_version: str = None,
        type: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar名称
        self.sidecar_name = sidecar_name
        # sidecar版本号
        self.sidecar_version = sidecar_version
        # sidecar版本类型
        self.type = type

    def validate(self):
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_name, 'sidecar_name')
        self.validate_required(self.sidecar_version, 'sidecar_version')
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        if self.sidecar_version is not None:
            result['sidecar_version'] = self.sidecar_version
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        if m.get('sidecar_version') is not None:
            self.sidecar_version = m.get('sidecar_version')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class DeleteSidecarVersionResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class UpdateSidecarInstanceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        description: str = None,
        instance_name: str = None,
        params: str = None,
        rule: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_release_version_id: str = None,
        params_configs: List[SidecarParamsConfig] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 版本实例描述
        # 
        self.description = description
        # 版本实例名称
        self.instance_name = instance_name
        # 环境模板参数
        self.params = params
        # 自定义规则内容
        self.rule = rule
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar版本id
        # 
        self.sidecar_release_version_id = sidecar_release_version_id
        # sidecar环境参数配置
        self.params_configs = params_configs

    def validate(self):
        self.validate_required(self.instance_name, 'instance_name')
        self.validate_required(self.rule, 'rule')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_release_version_id, 'sidecar_release_version_id')
        self.validate_required(self.params_configs, 'params_configs')
        if self.params_configs:
            for k in self.params_configs:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.description is not None:
            result['description'] = self.description
        if self.instance_name is not None:
            result['instance_name'] = self.instance_name
        if self.params is not None:
            result['params'] = self.params
        if self.rule is not None:
            result['rule'] = self.rule
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_release_version_id is not None:
            result['sidecar_release_version_id'] = self.sidecar_release_version_id
        result['params_configs'] = []
        if self.params_configs is not None:
            for k in self.params_configs:
                result['params_configs'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('instance_name') is not None:
            self.instance_name = m.get('instance_name')
        if m.get('params') is not None:
            self.params = m.get('params')
        if m.get('rule') is not None:
            self.rule = m.get('rule')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_release_version_id') is not None:
            self.sidecar_release_version_id = m.get('sidecar_release_version_id')
        self.params_configs = []
        if m.get('params_configs') is not None:
            for k in m.get('params_configs'):
                temp_model = SidecarParamsConfig()
                self.params_configs.append(temp_model.from_map(k))
        return self


class UpdateSidecarInstanceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class DeleteSidecarInstanceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        instance_name: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_release_version_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 版本实例名称
        # 
        self.instance_name = instance_name
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar版本id
        # 
        self.sidecar_release_version_id = sidecar_release_version_id

    def validate(self):
        self.validate_required(self.instance_name, 'instance_name')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_release_version_id, 'sidecar_release_version_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.instance_name is not None:
            result['instance_name'] = self.instance_name
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_release_version_id is not None:
            result['sidecar_release_version_id'] = self.sidecar_release_version_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('instance_name') is not None:
            self.instance_name = m.get('instance_name')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_release_version_id') is not None:
            self.sidecar_release_version_id = m.get('sidecar_release_version_id')
        return self


class DeleteSidecarInstanceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class UpdateSidecarRuleRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        description: str = None,
        level: int = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_version_instance_id: str = None,
        status: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 规则描述
        # 
        self.description = description
        # 规则优先级
        self.level = level
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar版本实例id
        self.sidecar_version_instance_id = sidecar_version_instance_id
        # 规则状态
        self.status = status

    def validate(self):
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_version_instance_id, 'sidecar_version_instance_id')
        self.validate_required(self.status, 'status')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.description is not None:
            result['description'] = self.description
        if self.level is not None:
            result['level'] = self.level
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_version_instance_id is not None:
            result['sidecar_version_instance_id'] = self.sidecar_version_instance_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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('level') is not None:
            self.level = m.get('level')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_version_instance_id') is not None:
            self.sidecar_version_instance_id = m.get('sidecar_version_instance_id')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class UpdateSidecarRuleResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class DeleteSidecarRuleRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_version_instance_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar版本实例id
        self.sidecar_version_instance_id = sidecar_version_instance_id

    def validate(self):
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_version_instance_id, 'sidecar_version_instance_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_version_instance_id is not None:
            result['sidecar_version_instance_id'] = self.sidecar_version_instance_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_version_instance_id') is not None:
            self.sidecar_version_instance_id = m.get('sidecar_version_instance_id')
        return self


class DeleteSidecarRuleResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class UpdateSidecarVersionstatusRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_name: str = None,
        sidecar_version: str = None,
        status: int = None,
        status_reason: str = None,
        type: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar名称
        self.sidecar_name = sidecar_name
        # sidecar版本号
        self.sidecar_version = sidecar_version
        # 版本状态
        self.status = status
        # 发布、下线、废弃原因
        self.status_reason = status_reason
        # sidecar版本类型
        self.type = type

    def validate(self):
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_name, 'sidecar_name')
        self.validate_required(self.sidecar_version, 'sidecar_version')
        self.validate_required(self.status, 'status')
        self.validate_required(self.status_reason, 'status_reason')
        self.validate_required(self.type, 'type')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_name is not None:
            result['sidecar_name'] = self.sidecar_name
        if self.sidecar_version is not None:
            result['sidecar_version'] = self.sidecar_version
        if self.status is not None:
            result['status'] = self.status
        if self.status_reason is not None:
            result['status_reason'] = self.status_reason
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_name') is not None:
            self.sidecar_name = m.get('sidecar_name')
        if m.get('sidecar_version') is not None:
            self.sidecar_version = m.get('sidecar_version')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('status_reason') is not None:
            self.status_reason = m.get('status_reason')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class UpdateSidecarVersionstatusResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class UpdateSidecarInstancestatusRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        instance_name: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_release_version_id: str = None,
        status: int = None,
        status_reason: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 版本实例名称
        self.instance_name = instance_name
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar版本id
        self.sidecar_release_version_id = sidecar_release_version_id
        # 版本实例状态
        self.status = status
        # 发布、下线、废弃原因
        self.status_reason = status_reason

    def validate(self):
        self.validate_required(self.instance_name, 'instance_name')
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_release_version_id, 'sidecar_release_version_id')
        self.validate_required(self.status, 'status')
        self.validate_required(self.status_reason, 'status_reason')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.instance_name is not None:
            result['instance_name'] = self.instance_name
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_release_version_id is not None:
            result['sidecar_release_version_id'] = self.sidecar_release_version_id
        if self.status is not None:
            result['status'] = self.status
        if self.status_reason is not None:
            result['status_reason'] = self.status_reason
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('instance_name') is not None:
            self.instance_name = m.get('instance_name')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_release_version_id') is not None:
            self.sidecar_release_version_id = m.get('sidecar_release_version_id')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('status_reason') is not None:
            self.status_reason = m.get('status_reason')
        return self


class UpdateSidecarInstancestatusResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class UpdateSidecarRulestatusRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        scope: str = None,
        scope_identity: str = None,
        sidecar_version_instance_id: str = None,
        status: int = None,
        status_reason: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # sidecar生效范围：workspace、workspace_group、region
        # 
        self.scope = scope
        # scope对应的唯一标识，例如workspace对应workspace id
        # 
        self.scope_identity = scope_identity
        # sidecar版本实例id
        self.sidecar_version_instance_id = sidecar_version_instance_id
        # 规则状态
        self.status = status
        # 发布、下线、废弃原因
        self.status_reason = status_reason

    def validate(self):
        self.validate_required(self.scope, 'scope')
        self.validate_required(self.scope_identity, 'scope_identity')
        self.validate_required(self.sidecar_version_instance_id, 'sidecar_version_instance_id')
        self.validate_required(self.status, 'status')
        self.validate_required(self.status_reason, 'status_reason')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.scope is not None:
            result['scope'] = self.scope
        if self.scope_identity is not None:
            result['scope_identity'] = self.scope_identity
        if self.sidecar_version_instance_id is not None:
            result['sidecar_version_instance_id'] = self.sidecar_version_instance_id
        if self.status is not None:
            result['status'] = self.status
        if self.status_reason is not None:
            result['status_reason'] = self.status_reason
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('scope') is not None:
            self.scope = m.get('scope')
        if m.get('scope_identity') is not None:
            self.scope_identity = m.get('scope_identity')
        if m.get('sidecar_version_instance_id') is not None:
            self.sidecar_version_instance_id = m.get('sidecar_version_instance_id')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('status_reason') is not None:
            self.status_reason = m.get('status_reason')
        return self


class UpdateSidecarRulestatusResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class CreateAppbaselineSidecarRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        category: str = None,
        conditions: List[SidecarCondition] = None,
        enable: bool = None,
        sidecar_version: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名
        self.app_name = app_name
        # sidecar类型
        self.category = category
        # 应用基线适用条件，网商仅能指定workspaceGroups属性，并且只能指定一个workspaceGroup
        self.conditions = conditions
        # 是否开启sidecar
        self.enable = enable
        # sidecar版本号
        self.sidecar_version = sidecar_version

    def validate(self):
        self.validate_required(self.app_name, 'app_name')
        self.validate_required(self.category, 'category')
        self.validate_required(self.conditions, 'conditions')
        if self.conditions:
            for k in self.conditions:
                if k:
                    k.validate()
        self.validate_required(self.enable, 'enable')
        self.validate_required(self.sidecar_version, 'sidecar_version')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.category is not None:
            result['category'] = self.category
        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.enable is not None:
            result['enable'] = self.enable
        if self.sidecar_version is not None:
            result['sidecar_version'] = self.sidecar_version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('category') is not None:
            self.category = m.get('category')
        self.conditions = []
        if m.get('conditions') is not None:
            for k in m.get('conditions'):
                temp_model = SidecarCondition()
                self.conditions.append(temp_model.from_map(k))
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('sidecar_version') is not None:
            self.sidecar_version = m.get('sidecar_version')
        return self


class CreateAppbaselineSidecarResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        appbaseline_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用基线ID
        self.appbaseline_id = appbaseline_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.appbaseline_id is not None:
            result['appbaseline_id'] = self.appbaseline_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('appbaseline_id') is not None:
            self.appbaseline_id = m.get('appbaseline_id')
        return self


class ListAppbaselineSidecarRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        category: str = None,
        condition: SidecarCondition = None,
        sidecar_version: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名
        self.app_name = app_name
        # sidecar类型
        self.category = category
        # 过滤条件，网商仅能指定workspaceGroups属性
        self.condition = condition
        # sidecar版本号
        self.sidecar_version = sidecar_version

    def validate(self):
        self.validate_required(self.app_name, 'app_name')
        if self.condition:
            self.condition.validate()

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.category is not None:
            result['category'] = self.category
        if self.condition is not None:
            result['condition'] = self.condition.to_map()
        if self.sidecar_version is not None:
            result['sidecar_version'] = self.sidecar_version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('category') is not None:
            self.category = m.get('category')
        if m.get('condition') is not None:
            temp_model = SidecarCondition()
            self.condition = temp_model.from_map(m['condition'])
        if m.get('sidecar_version') is not None:
            self.sidecar_version = m.get('sidecar_version')
        return self


class ListAppbaselineSidecarResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        appbaselines: List[AppBaselineSidecarConfig] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用基线列表
        self.appbaselines = appbaselines

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['appbaselines'] = []
        if self.appbaselines is not None:
            for k in self.appbaselines:
                result['appbaselines'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.appbaselines = []
        if m.get('appbaselines') is not None:
            for k in m.get('appbaselines'):
                temp_model = AppBaselineSidecarConfig()
                self.appbaselines.append(temp_model.from_map(k))
        return self


class DeleteAppbaselineSidecarRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        appbaseline_id: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用基线ID
        self.appbaseline_id = appbaseline_id

    def validate(self):
        self.validate_required(self.appbaseline_id, 'appbaseline_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.appbaseline_id is not None:
            result['appbaseline_id'] = self.appbaseline_id
        return result

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


class DeleteAppbaselineSidecarResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class UpdateAppbaselineSidecarRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        appbaseline_id: str = None,
        enable: bool = None,
        sidecar_version: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用sidecar基线id
        self.appbaseline_id = appbaseline_id
        # 是否开启sidecar
        self.enable = enable
        # sidecar版本号
        self.sidecar_version = sidecar_version

    def validate(self):
        self.validate_required(self.appbaseline_id, 'appbaseline_id')
        self.validate_required(self.enable, 'enable')
        self.validate_required(self.sidecar_version, 'sidecar_version')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.appbaseline_id is not None:
            result['appbaseline_id'] = self.appbaseline_id
        if self.enable is not None:
            result['enable'] = self.enable
        if self.sidecar_version is not None:
            result['sidecar_version'] = self.sidecar_version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('appbaseline_id') is not None:
            self.appbaseline_id = m.get('appbaseline_id')
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('sidecar_version') is not None:
            self.sidecar_version = m.get('sidecar_version')
        return self


class UpdateAppbaselineSidecarResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        return result

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


class SaveAppbaselineSidecarRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        app_name: str = None,
        category: str = None,
        conditions: List[SidecarCondition] = None,
        enable: bool = None,
        sidecar_version: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 应用名
        self.app_name = app_name
        # sidecar类型
        self.category = category
        # 应用基线适用条件，网商仅能指定workspaceGroups属性，并且只能指定一个workspaceGroup
        self.conditions = conditions
        # 是否开启sidecar
        self.enable = enable
        # sidecar版本号
        self.sidecar_version = sidecar_version

    def validate(self):
        self.validate_required(self.app_name, 'app_name')
        self.validate_required(self.category, 'category')
        self.validate_required(self.conditions, 'conditions')
        if self.conditions:
            for k in self.conditions:
                if k:
                    k.validate()
        self.validate_required(self.enable, 'enable')
        self.validate_required(self.sidecar_version, 'sidecar_version')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.app_name is not None:
            result['app_name'] = self.app_name
        if self.category is not None:
            result['category'] = self.category
        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.enable is not None:
            result['enable'] = self.enable
        if self.sidecar_version is not None:
            result['sidecar_version'] = self.sidecar_version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('app_name') is not None:
            self.app_name = m.get('app_name')
        if m.get('category') is not None:
            self.category = m.get('category')
        self.conditions = []
        if m.get('conditions') is not None:
            for k in m.get('conditions'):
                temp_model = SidecarCondition()
                self.conditions.append(temp_model.from_map(k))
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('sidecar_version') is not None:
            self.sidecar_version = m.get('sidecar_version')
        return self


class SaveAppbaselineSidecarResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        appbaseline_id: str = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 应用基线ID
        self.appbaseline_id = appbaseline_id

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.appbaseline_id is not None:
            result['appbaseline_id'] = self.appbaseline_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('appbaseline_id') is not None:
            self.appbaseline_id = m.get('appbaseline_id')
        return self


class GetWorkspaceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        workspace: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 所属工作空间名称
        self.workspace = workspace

    def validate(self):
        self.validate_required(self.workspace, 'workspace')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('workspace') is not None:
            self.workspace = m.get('workspace')
        return self


class GetWorkspaceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        create_time: str = None,
        id: str = None,
        name: str = None,
        network_type: str = None,
        region: str = None,
        tenant: str = None,
        update_time: str = None,
        zones: List[str] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 创建时间
        self.create_time = create_time
        # workspace 名称
        self.id = id
        # workspace 显示名称
        self.name = name
        # 网络类型
        self.network_type = network_type
        # workspace所在regionId
        self.region = region
        # 所属租户名称
        self.tenant = tenant
        # 最近更新时间
        self.update_time = update_time
        # workspace所在zoneId列表
        self.zones = zones

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.create_time is not None:
            result['create_time'] = self.create_time
        if self.id is not None:
            result['id'] = self.id
        if self.name is not None:
            result['name'] = self.name
        if self.network_type is not None:
            result['network_type'] = self.network_type
        if self.region is not None:
            result['region'] = self.region
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.update_time is not None:
            result['update_time'] = self.update_time
        if self.zones is not None:
            result['zones'] = self.zones
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('create_time') is not None:
            self.create_time = m.get('create_time')
        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('network_type') is not None:
            self.network_type = m.get('network_type')
        if m.get('region') is not None:
            self.region = m.get('region')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('update_time') is not None:
            self.update_time = m.get('update_time')
        if m.get('zones') is not None:
            self.zones = m.get('zones')
        return self


class QueryWorkspaceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        status: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # 工作空间状态。输入示例：status.1=CREATED
        self.status = status

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        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('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('status') is not None:
            self.status = m.get('status')
        return self


class QueryWorkspaceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        groups: List[OpsGroup] = None,
        workspaces: List[Workspace] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # 此应用下所有计算容器分组运维状态详情
        self.groups = groups
        # 查询结果，workspace列表
        self.workspaces = workspaces

    def validate(self):
        self.validate_required(self.groups, 'groups')
        if self.groups:
            for k in self.groups:
                if k:
                    k.validate()
        self.validate_required(self.workspaces, 'workspaces')
        if self.workspaces:
            for k in self.workspaces:
                if k:
                    k.validate()

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        result['groups'] = []
        if self.groups is not None:
            for k in self.groups:
                result['groups'].append(k.to_map() if k else None)
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.groups = []
        if m.get('groups') is not None:
            for k in m.get('groups'):
                temp_model = OpsGroup()
                self.groups.append(temp_model.from_map(k))
        self.workspaces = []
        if m.get('workspaces') is not None:
            for k in m.get('workspaces'):
                temp_model = Workspace()
                self.workspaces.append(temp_model.from_map(k))
        return self


class CreateWorkspaceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
        display_name: str = None,
        name: str = None,
        network_type: str = None,
        region_id: str = None,
        zone_ids: List[str] = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant
        # workspace 显示名称
        self.display_name = display_name
        # workspace名称
        self.name = name
        # 网络类型
        self.network_type = network_type
        # 地域id
        self.region_id = region_id
        # 机房ID
        self.zone_ids = zone_ids

    def validate(self):
        self.validate_required(self.display_name, 'display_name')
        self.validate_required(self.name, 'name')
        self.validate_required(self.network_type, 'network_type')
        self.validate_required(self.region_id, 'region_id')

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        if self.display_name is not None:
            result['display_name'] = self.display_name
        if self.name is not None:
            result['name'] = self.name
        if self.network_type is not None:
            result['network_type'] = self.network_type
        if self.region_id is not None:
            result['region_id'] = self.region_id
        if self.zone_ids is not None:
            result['zone_ids'] = self.zone_ids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('auth_token') is not None:
            self.auth_token = m.get('auth_token')
        if m.get('tenant') is not None:
            self.tenant = m.get('tenant')
        if m.get('display_name') is not None:
            self.display_name = m.get('display_name')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('network_type') is not None:
            self.network_type = m.get('network_type')
        if m.get('region_id') is not None:
            self.region_id = m.get('region_id')
        if m.get('zone_ids') is not None:
            self.zone_ids = m.get('zone_ids')
        return self


class CreateWorkspaceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        workspace: Workspace = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # workspace
        self.workspace = workspace

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        if self.workspace is not None:
            result['workspace'] = self.workspace.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        if m.get('workspace') is not None:
            temp_model = Workspace()
            self.workspace = temp_model.from_map(m['workspace'])
        return self


class ListWorkspaceRequest(TeaModel):
    def __init__(
        self,
        auth_token: str = None,
        tenant: str = None,
    ):
        self.auth_token = auth_token
        self.tenant = tenant

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        if self.auth_token is not None:
            result['auth_token'] = self.auth_token
        if self.tenant is not None:
            result['tenant'] = self.tenant
        return result

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


class ListWorkspaceResponse(TeaModel):
    def __init__(
        self,
        req_msg_id: str = None,
        result_code: str = None,
        result_msg: str = None,
        workspaces: List[Workspace] = None,
    ):
        self.req_msg_id = req_msg_id
        self.result_code = result_code
        self.result_msg = result_msg
        # workspace列表。
        self.workspaces = workspaces

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

    def to_map(self):
        result = dict()
        if self.req_msg_id is not None:
            result['req_msg_id'] = self.req_msg_id
        if self.result_code is not None:
            result['result_code'] = self.result_code
        if self.result_msg is not None:
            result['result_msg'] = self.result_msg
        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('req_msg_id') is not None:
            self.req_msg_id = m.get('req_msg_id')
        if m.get('result_code') is not None:
            self.result_code = m.get('result_code')
        if m.get('result_msg') is not None:
            self.result_msg = m.get('result_msg')
        self.workspaces = []
        if m.get('workspaces') is not None:
            for k in m.get('workspaces'):
                temp_model = Workspace()
                self.workspaces.append(temp_model.from_map(k))
        return self


