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


class AiServiceConfig(TeaModel):
    def __init__(
        self,
        address: str = None,
        api_keys: List[str] = None,
        enable_health_check: bool = None,
        protocols: List[str] = None,
        provider: str = None,
    ):
        self.address = address
        self.api_keys = api_keys
        self.enable_health_check = enable_health_check
        self.protocols = protocols
        self.provider = provider

    def validate(self):
        pass

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

        result = dict()
        if self.address is not None:
            result['address'] = self.address
        if self.api_keys is not None:
            result['apiKeys'] = self.api_keys
        if self.enable_health_check is not None:
            result['enableHealthCheck'] = self.enable_health_check
        if self.protocols is not None:
            result['protocols'] = self.protocols
        if self.provider is not None:
            result['provider'] = self.provider
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('address') is not None:
            self.address = m.get('address')
        if m.get('apiKeys') is not None:
            self.api_keys = m.get('apiKeys')
        if m.get('enableHealthCheck') is not None:
            self.enable_health_check = m.get('enableHealthCheck')
        if m.get('protocols') is not None:
            self.protocols = m.get('protocols')
        if m.get('provider') is not None:
            self.provider = m.get('provider')
        return self


class AkSkIdentityConfig(TeaModel):
    def __init__(
        self,
        ak: str = None,
        generate_mode: str = None,
        sk: str = None,
        type: str = None,
    ):
        self.ak = ak
        self.generate_mode = generate_mode
        self.sk = sk
        self.type = type

    def validate(self):
        pass

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

        result = dict()
        if self.ak is not None:
            result['ak'] = self.ak
        if self.generate_mode is not None:
            result['generateMode'] = self.generate_mode
        if self.sk is not None:
            result['sk'] = self.sk
        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('ak') is not None:
            self.ak = m.get('ak')
        if m.get('generateMode') is not None:
            self.generate_mode = m.get('generateMode')
        if m.get('sk') is not None:
            self.sk = m.get('sk')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ApiKeyIdentityConfigApikeySource(TeaModel):
    def __init__(
        self,
        source: str = None,
        value: str = None,
    ):
        self.source = source
        self.value = value

    def validate(self):
        pass

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

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


class ApiKeyIdentityConfig(TeaModel):
    def __init__(
        self,
        apikey: str = None,
        apikey_source: ApiKeyIdentityConfigApikeySource = None,
        generate_mode: str = None,
        type: str = None,
    ):
        self.apikey = apikey
        self.apikey_source = apikey_source
        self.generate_mode = generate_mode
        self.type = type

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

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

        result = dict()
        if self.apikey is not None:
            result['apikey'] = self.apikey
        if self.apikey_source is not None:
            result['apikeySource'] = self.apikey_source.to_map()
        if self.generate_mode is not None:
            result['generateMode'] = self.generate_mode
        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('apikey') is not None:
            self.apikey = m.get('apikey')
        if m.get('apikeySource') is not None:
            temp_model = ApiKeyIdentityConfigApikeySource()
            self.apikey_source = temp_model.from_map(m['apikeySource'])
        if m.get('generateMode') is not None:
            self.generate_mode = m.get('generateMode')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ApiRouteConflictInfoConflictsDetailsConflictingMatchOperationInfo(TeaModel):
    def __init__(
        self,
        name: str = None,
        operation_id: str = None,
    ):
        self.name = name
        self.operation_id = operation_id

    def validate(self):
        pass

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

        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.operation_id is not None:
            result['operationId'] = self.operation_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('operationId') is not None:
            self.operation_id = m.get('operationId')
        return self


class HttpRouteMatchHeaders(TeaModel):
    def __init__(
        self,
        name: str = None,
        type: str = None,
        value: str = None,
    ):
        self.name = name
        self.type = type
        self.value = value

    def validate(self):
        pass

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

        result = dict()
        if self.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 HttpRouteMatchPath(TeaModel):
    def __init__(
        self,
        type: str = None,
        value: str = None,
    ):
        self.type = type
        self.value = value

    def validate(self):
        pass

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

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

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


class HttpRouteMatchQueryParams(TeaModel):
    def __init__(
        self,
        name: str = None,
        type: str = None,
        value: str = None,
    ):
        self.name = name
        self.type = type
        self.value = value

    def validate(self):
        pass

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

        result = dict()
        if self.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 HttpRouteMatch(TeaModel):
    def __init__(
        self,
        headers: List[HttpRouteMatchHeaders] = None,
        ignore_uri_case: bool = None,
        methods: List[str] = None,
        path: HttpRouteMatchPath = None,
        query_params: List[HttpRouteMatchQueryParams] = None,
    ):
        self.headers = headers
        self.ignore_uri_case = ignore_uri_case
        self.methods = methods
        self.path = path
        self.query_params = query_params

    def validate(self):
        if self.headers:
            for k in self.headers:
                if k:
                    k.validate()
        if self.path:
            self.path.validate()
        if self.query_params:
            for k in self.query_params:
                if k:
                    k.validate()

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

        result = dict()
        result['headers'] = []
        if self.headers is not None:
            for k in self.headers:
                result['headers'].append(k.to_map() if k else None)
        if self.ignore_uri_case is not None:
            result['ignoreUriCase'] = self.ignore_uri_case
        if self.methods is not None:
            result['methods'] = self.methods
        if self.path is not None:
            result['path'] = self.path.to_map()
        result['queryParams'] = []
        if self.query_params is not None:
            for k in self.query_params:
                result['queryParams'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.headers = []
        if m.get('headers') is not None:
            for k in m.get('headers'):
                temp_model = HttpRouteMatchHeaders()
                self.headers.append(temp_model.from_map(k))
        if m.get('ignoreUriCase') is not None:
            self.ignore_uri_case = m.get('ignoreUriCase')
        if m.get('methods') is not None:
            self.methods = m.get('methods')
        if m.get('path') is not None:
            temp_model = HttpRouteMatchPath()
            self.path = temp_model.from_map(m['path'])
        self.query_params = []
        if m.get('queryParams') is not None:
            for k in m.get('queryParams'):
                temp_model = HttpRouteMatchQueryParams()
                self.query_params.append(temp_model.from_map(k))
        return self


class ApiRouteConflictInfoConflictsDetailsConflictingMatch(TeaModel):
    def __init__(
        self,
        match: HttpRouteMatch = None,
        operation_info: ApiRouteConflictInfoConflictsDetailsConflictingMatchOperationInfo = None,
    ):
        self.match = match
        self.operation_info = operation_info

    def validate(self):
        if self.match:
            self.match.validate()
        if self.operation_info:
            self.operation_info.validate()

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

        result = dict()
        if self.match is not None:
            result['match'] = self.match.to_map()
        if self.operation_info is not None:
            result['operationInfo'] = self.operation_info.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('match') is not None:
            temp_model = HttpRouteMatch()
            self.match = temp_model.from_map(m['match'])
        if m.get('operationInfo') is not None:
            temp_model = ApiRouteConflictInfoConflictsDetailsConflictingMatchOperationInfo()
            self.operation_info = temp_model.from_map(m['operationInfo'])
        return self


class ApiRouteConflictInfoConflictsDetailsDetectedMatchOperationInfo(TeaModel):
    def __init__(
        self,
        name: str = None,
        operation_id: str = None,
    ):
        self.name = name
        self.operation_id = operation_id

    def validate(self):
        pass

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

        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.operation_id is not None:
            result['operationId'] = self.operation_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('operationId') is not None:
            self.operation_id = m.get('operationId')
        return self


class ApiRouteConflictInfoConflictsDetailsDetectedMatch(TeaModel):
    def __init__(
        self,
        match: HttpRouteMatch = None,
        operation_info: ApiRouteConflictInfoConflictsDetailsDetectedMatchOperationInfo = None,
    ):
        self.match = match
        self.operation_info = operation_info

    def validate(self):
        if self.match:
            self.match.validate()
        if self.operation_info:
            self.operation_info.validate()

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

        result = dict()
        if self.match is not None:
            result['match'] = self.match.to_map()
        if self.operation_info is not None:
            result['operationInfo'] = self.operation_info.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('match') is not None:
            temp_model = HttpRouteMatch()
            self.match = temp_model.from_map(m['match'])
        if m.get('operationInfo') is not None:
            temp_model = ApiRouteConflictInfoConflictsDetailsDetectedMatchOperationInfo()
            self.operation_info = temp_model.from_map(m['operationInfo'])
        return self


class ApiRouteConflictInfoConflictsDetails(TeaModel):
    def __init__(
        self,
        conflicting_match: ApiRouteConflictInfoConflictsDetailsConflictingMatch = None,
        detected_match: ApiRouteConflictInfoConflictsDetailsDetectedMatch = None,
        level: str = None,
    ):
        self.conflicting_match = conflicting_match
        self.detected_match = detected_match
        self.level = level

    def validate(self):
        if self.conflicting_match:
            self.conflicting_match.validate()
        if self.detected_match:
            self.detected_match.validate()

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

        result = dict()
        if self.conflicting_match is not None:
            result['conflictingMatch'] = self.conflicting_match.to_map()
        if self.detected_match is not None:
            result['detectedMatch'] = self.detected_match.to_map()
        if self.level is not None:
            result['level'] = self.level
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('conflictingMatch') is not None:
            temp_model = ApiRouteConflictInfoConflictsDetailsConflictingMatch()
            self.conflicting_match = temp_model.from_map(m['conflictingMatch'])
        if m.get('detectedMatch') is not None:
            temp_model = ApiRouteConflictInfoConflictsDetailsDetectedMatch()
            self.detected_match = temp_model.from_map(m['detectedMatch'])
        if m.get('level') is not None:
            self.level = m.get('level')
        return self


class ApiRouteConflictInfoConflictsEnvironmentInfo(TeaModel):
    def __init__(
        self,
        environment_id: str = None,
        name: str = None,
    ):
        self.environment_id = environment_id
        self.name = name

    def validate(self):
        pass

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

        result = dict()
        if self.environment_id is not None:
            result['environmentId'] = self.environment_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('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class ApiRouteConflictInfoConflictsRouteInfo(TeaModel):
    def __init__(
        self,
        name: str = None,
        route_id: str = None,
    ):
        self.name = name
        self.route_id = route_id

    def validate(self):
        pass

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

        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.route_id is not None:
            result['routeId'] = self.route_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('routeId') is not None:
            self.route_id = m.get('routeId')
        return self


class ApiRouteConflictInfoConflicts(TeaModel):
    def __init__(
        self,
        details: List[ApiRouteConflictInfoConflictsDetails] = None,
        environment_info: ApiRouteConflictInfoConflictsEnvironmentInfo = None,
        resource_id: str = None,
        resource_name: str = None,
        resource_type: str = None,
        route_info: ApiRouteConflictInfoConflictsRouteInfo = None,
    ):
        self.details = details
        self.environment_info = environment_info
        self.resource_id = resource_id
        self.resource_name = resource_name
        self.resource_type = resource_type
        self.route_info = route_info

    def validate(self):
        if self.details:
            for k in self.details:
                if k:
                    k.validate()
        if self.environment_info:
            self.environment_info.validate()
        if self.route_info:
            self.route_info.validate()

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

        result = dict()
        result['details'] = []
        if self.details is not None:
            for k in self.details:
                result['details'].append(k.to_map() if k else None)
        if self.environment_info is not None:
            result['environmentInfo'] = self.environment_info.to_map()
        if self.resource_id is not None:
            result['resourceId'] = self.resource_id
        if self.resource_name is not None:
            result['resourceName'] = self.resource_name
        if self.resource_type is not None:
            result['resourceType'] = self.resource_type
        if self.route_info is not None:
            result['routeInfo'] = self.route_info.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.details = []
        if m.get('details') is not None:
            for k in m.get('details'):
                temp_model = ApiRouteConflictInfoConflictsDetails()
                self.details.append(temp_model.from_map(k))
        if m.get('environmentInfo') is not None:
            temp_model = ApiRouteConflictInfoConflictsEnvironmentInfo()
            self.environment_info = temp_model.from_map(m['environmentInfo'])
        if m.get('resourceId') is not None:
            self.resource_id = m.get('resourceId')
        if m.get('resourceName') is not None:
            self.resource_name = m.get('resourceName')
        if m.get('resourceType') is not None:
            self.resource_type = m.get('resourceType')
        if m.get('routeInfo') is not None:
            temp_model = ApiRouteConflictInfoConflictsRouteInfo()
            self.route_info = temp_model.from_map(m['routeInfo'])
        return self


class ApiRouteConflictInfoDomainInfo(TeaModel):
    def __init__(
        self,
        domain_id: str = None,
        name: str = None,
    ):
        self.domain_id = domain_id
        self.name = name

    def validate(self):
        pass

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

        result = dict()
        if self.domain_id is not None:
            result['domainId'] = self.domain_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('domainId') is not None:
            self.domain_id = m.get('domainId')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class ApiRouteConflictInfo(TeaModel):
    def __init__(
        self,
        conflicts: List[ApiRouteConflictInfoConflicts] = None,
        domain_info: ApiRouteConflictInfoDomainInfo = None,
    ):
        self.conflicts = conflicts
        self.domain_info = domain_info

    def validate(self):
        if self.conflicts:
            for k in self.conflicts:
                if k:
                    k.validate()
        if self.domain_info:
            self.domain_info.validate()

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        self.conflicts = []
        if m.get('conflicts') is not None:
            for k in m.get('conflicts'):
                temp_model = ApiRouteConflictInfoConflicts()
                self.conflicts.append(temp_model.from_map(k))
        if m.get('domainInfo') is not None:
            temp_model = ApiRouteConflictInfoDomainInfo()
            self.domain_info = temp_model.from_map(m['domainInfo'])
        return self


class Attachment(TeaModel):
    def __init__(
        self,
        attach_resource_ids: List[str] = None,
        attach_resource_type: str = None,
        environment_id: str = None,
        gateway_id: str = None,
        policy_attachment_id: str = None,
    ):
        self.attach_resource_ids = attach_resource_ids
        self.attach_resource_type = attach_resource_type
        self.environment_id = environment_id
        self.gateway_id = gateway_id
        self.policy_attachment_id = policy_attachment_id

    def validate(self):
        pass

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

        result = dict()
        if self.attach_resource_ids is not None:
            result['attachResourceIds'] = self.attach_resource_ids
        if self.attach_resource_type is not None:
            result['attachResourceType'] = self.attach_resource_type
        if self.environment_id is not None:
            result['environmentId'] = self.environment_id
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_id
        if self.policy_attachment_id is not None:
            result['policyAttachmentId'] = self.policy_attachment_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('attachResourceIds') is not None:
            self.attach_resource_ids = m.get('attachResourceIds')
        if m.get('attachResourceType') is not None:
            self.attach_resource_type = m.get('attachResourceType')
        if m.get('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        if m.get('policyAttachmentId') is not None:
            self.policy_attachment_id = m.get('policyAttachmentId')
        return self


class AuthorizationResourceInfo(TeaModel):
    def __init__(
        self,
        environment_id: str = None,
        parent_resource_id: str = None,
        resource_id: str = None,
    ):
        self.environment_id = environment_id
        self.parent_resource_id = parent_resource_id
        self.resource_id = resource_id

    def validate(self):
        pass

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

        result = dict()
        if self.environment_id is not None:
            result['environmentId'] = self.environment_id
        if self.parent_resource_id is not None:
            result['parentResourceId'] = self.parent_resource_id
        if self.resource_id is not None:
            result['resourceId'] = self.resource_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('parentResourceId') is not None:
            self.parent_resource_id = m.get('parentResourceId')
        if m.get('resourceId') is not None:
            self.resource_id = m.get('resourceId')
        return self


class BackendServices(TeaModel):
    def __init__(
        self,
        name: str = None,
        port: int = None,
        protocol: str = None,
        service_id: str = None,
        version: str = None,
        weight: int = None,
    ):
        self.name = name
        self.port = port
        self.protocol = protocol
        self.service_id = service_id
        self.version = version
        self.weight = weight

    def validate(self):
        pass

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

        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.port is not None:
            result['port'] = self.port
        if self.protocol is not None:
            result['protocol'] = self.protocol
        if self.service_id is not None:
            result['serviceId'] = self.service_id
        if self.version is not None:
            result['version'] = self.version
        if self.weight is not None:
            result['weight'] = self.weight
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('port') is not None:
            self.port = m.get('port')
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        if m.get('serviceId') is not None:
            self.service_id = m.get('serviceId')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class Backend(TeaModel):
    def __init__(
        self,
        scene: str = None,
        services: List[BackendServices] = None,
    ):
        self.scene = scene
        self.services = services

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

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

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

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


class CheckServiceLinkedRoleResult(TeaModel):
    def __init__(
        self,
        existed: bool = None,
    ):
        self.existed = existed

    def validate(self):
        pass

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

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

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


class DashboardFilter(TeaModel):
    def __init__(
        self,
        route_name: str = None,
    ):
        self.route_name = route_name

    def validate(self):
        pass

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

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

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


class DomainInfo(TeaModel):
    def __init__(
        self,
        cert_identifier: str = None,
        create_from: str = None,
        create_timestamp: int = None,
        domain_id: str = None,
        force_https: bool = None,
        name: str = None,
        protocol: str = None,
        resource_group_id: str = None,
        status: str = None,
        update_timestamp: int = None,
    ):
        self.cert_identifier = cert_identifier
        self.create_from = create_from
        self.create_timestamp = create_timestamp
        self.domain_id = domain_id
        self.force_https = force_https
        self.name = name
        self.protocol = protocol
        self.resource_group_id = resource_group_id
        self.status = status
        self.update_timestamp = update_timestamp

    def validate(self):
        pass

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

        result = dict()
        if self.cert_identifier is not None:
            result['certIdentifier'] = self.cert_identifier
        if self.create_from is not None:
            result['createFrom'] = self.create_from
        if self.create_timestamp is not None:
            result['createTimestamp'] = self.create_timestamp
        if self.domain_id is not None:
            result['domainId'] = self.domain_id
        if self.force_https is not None:
            result['forceHttps'] = self.force_https
        if self.name is not None:
            result['name'] = self.name
        if self.protocol is not None:
            result['protocol'] = self.protocol
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.status is not None:
            result['status'] = self.status
        if self.update_timestamp is not None:
            result['updateTimestamp'] = self.update_timestamp
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('certIdentifier') is not None:
            self.cert_identifier = m.get('certIdentifier')
        if m.get('createFrom') is not None:
            self.create_from = m.get('createFrom')
        if m.get('createTimestamp') is not None:
            self.create_timestamp = m.get('createTimestamp')
        if m.get('domainId') is not None:
            self.domain_id = m.get('domainId')
        if m.get('forceHttps') is not None:
            self.force_https = m.get('forceHttps')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('status') is not None:
            self.status = m.get('status')
        if m.get('updateTimestamp') is not None:
            self.update_timestamp = m.get('updateTimestamp')
        return self


class GatewayInfoVpcInfo(TeaModel):
    def __init__(
        self,
        name: str = None,
        vpc_id: str = None,
    ):
        self.name = name
        self.vpc_id = vpc_id

    def validate(self):
        pass

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

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

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


class GatewayInfo(TeaModel):
    def __init__(
        self,
        engine_version: str = None,
        gateway_id: str = None,
        name: str = None,
        vpc_info: GatewayInfoVpcInfo = None,
    ):
        self.engine_version = engine_version
        self.gateway_id = gateway_id
        self.name = name
        self.vpc_info = vpc_info

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

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

        result = dict()
        if self.engine_version is not None:
            result['engineVersion'] = self.engine_version
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_id
        if self.name is not None:
            result['name'] = self.name
        if self.vpc_info is not None:
            result['vpcInfo'] = self.vpc_info.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('engineVersion') is not None:
            self.engine_version = m.get('engineVersion')
        if m.get('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('vpcInfo') is not None:
            temp_model = GatewayInfoVpcInfo()
            self.vpc_info = temp_model.from_map(m['vpcInfo'])
        return self


class SubDomainInfo(TeaModel):
    def __init__(
        self,
        domain_id: str = None,
        name: str = None,
        network_type: str = None,
        protocol: str = None,
    ):
        self.domain_id = domain_id
        self.name = name
        self.network_type = network_type
        self.protocol = protocol

    def validate(self):
        pass

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

        result = dict()
        if self.domain_id is not None:
            result['domainId'] = self.domain_id
        if self.name is not None:
            result['name'] = self.name
        if self.network_type is not None:
            result['networkType'] = self.network_type
        if self.protocol is not None:
            result['protocol'] = self.protocol
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('domainId') is not None:
            self.domain_id = m.get('domainId')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('networkType') is not None:
            self.network_type = m.get('networkType')
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        return self


class EnvironmentInfo(TeaModel):
    def __init__(
        self,
        alias: str = None,
        create_timestamp: int = None,
        default: bool = None,
        description: str = None,
        environment_id: str = None,
        gateway_info: GatewayInfo = None,
        name: str = None,
        resource_group_id: str = None,
        sub_domain_infos: List[SubDomainInfo] = None,
        update_timestamp: int = None,
    ):
        self.alias = alias
        self.create_timestamp = create_timestamp
        self.default = default
        self.description = description
        self.environment_id = environment_id
        self.gateway_info = gateway_info
        self.name = name
        self.resource_group_id = resource_group_id
        self.sub_domain_infos = sub_domain_infos
        self.update_timestamp = update_timestamp

    def validate(self):
        if self.gateway_info:
            self.gateway_info.validate()
        if self.sub_domain_infos:
            for k in self.sub_domain_infos:
                if k:
                    k.validate()

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

        result = dict()
        if self.alias is not None:
            result['alias'] = self.alias
        if self.create_timestamp is not None:
            result['createTimestamp'] = self.create_timestamp
        if self.default is not None:
            result['default'] = self.default
        if self.description is not None:
            result['description'] = self.description
        if self.environment_id is not None:
            result['environmentId'] = self.environment_id
        if self.gateway_info is not None:
            result['gatewayInfo'] = self.gateway_info.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        result['subDomainInfos'] = []
        if self.sub_domain_infos is not None:
            for k in self.sub_domain_infos:
                result['subDomainInfos'].append(k.to_map() if k else None)
        if self.update_timestamp is not None:
            result['updateTimestamp'] = self.update_timestamp
        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('createTimestamp') is not None:
            self.create_timestamp = m.get('createTimestamp')
        if m.get('default') is not None:
            self.default = m.get('default')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('gatewayInfo') is not None:
            temp_model = GatewayInfo()
            self.gateway_info = temp_model.from_map(m['gatewayInfo'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.sub_domain_infos = []
        if m.get('subDomainInfos') is not None:
            for k in m.get('subDomainInfos'):
                temp_model = SubDomainInfo()
                self.sub_domain_infos.append(temp_model.from_map(k))
        if m.get('updateTimestamp') is not None:
            self.update_timestamp = m.get('updateTimestamp')
        return self


class GatewayLogConfigSlsConfig(TeaModel):
    def __init__(
        self,
        enable: bool = None,
    ):
        self.enable = enable

    def validate(self):
        pass

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

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

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


class GatewayLogConfig(TeaModel):
    def __init__(
        self,
        sls_config: GatewayLogConfigSlsConfig = None,
    ):
        self.sls_config = sls_config

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

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

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

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


class HttpApiApiInfoEnvironmentsGatewayInfo(TeaModel):
    def __init__(
        self,
        gateway_id: str = None,
        name: str = None,
    ):
        self.gateway_id = gateway_id
        self.name = name

    def validate(self):
        pass

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

        result = dict()
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_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('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class HttpApiBackendMatchCondition(TeaModel):
    def __init__(
        self,
        key: str = None,
        operator: str = None,
        type: str = None,
        value: str = None,
    ):
        self.key = key
        self.operator = operator
        self.type = type
        self.value = value

    def validate(self):
        pass

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

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


class HttpApiBackendMatchConditions(TeaModel):
    def __init__(
        self,
        conditions: List[HttpApiBackendMatchCondition] = None,
        default: bool = None,
    ):
        self.conditions = conditions
        self.default = default

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

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

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

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


class HttpApiApiInfoEnvironmentsServiceConfigs(TeaModel):
    def __init__(
        self,
        gateway_service_id: str = None,
        match: HttpApiBackendMatchConditions = None,
        name: str = None,
        port: str = None,
        protocol: str = None,
        service_id: str = None,
        version: str = None,
        weight: int = None,
    ):
        self.gateway_service_id = gateway_service_id
        self.match = match
        self.name = name
        self.port = port
        self.protocol = protocol
        self.service_id = service_id
        self.version = version
        self.weight = weight

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

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

        result = dict()
        if self.gateway_service_id is not None:
            result['gatewayServiceId'] = self.gateway_service_id
        if self.match is not None:
            result['match'] = self.match.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.port is not None:
            result['port'] = self.port
        if self.protocol is not None:
            result['protocol'] = self.protocol
        if self.service_id is not None:
            result['serviceId'] = self.service_id
        if self.version is not None:
            result['version'] = self.version
        if self.weight is not None:
            result['weight'] = self.weight
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('gatewayServiceId') is not None:
            self.gateway_service_id = m.get('gatewayServiceId')
        if m.get('match') is not None:
            temp_model = HttpApiBackendMatchConditions()
            self.match = temp_model.from_map(m['match'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('port') is not None:
            self.port = m.get('port')
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        if m.get('serviceId') is not None:
            self.service_id = m.get('serviceId')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class HttpApiApiInfoEnvironmentsSubDomains(TeaModel):
    def __init__(
        self,
        domain_id: str = None,
        name: str = None,
        network_type: str = None,
        protocol: str = None,
    ):
        self.domain_id = domain_id
        self.name = name
        self.network_type = network_type
        self.protocol = protocol

    def validate(self):
        pass

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

        result = dict()
        if self.domain_id is not None:
            result['domainId'] = self.domain_id
        if self.name is not None:
            result['name'] = self.name
        if self.network_type is not None:
            result['networkType'] = self.network_type
        if self.protocol is not None:
            result['protocol'] = self.protocol
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('domainId') is not None:
            self.domain_id = m.get('domainId')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('networkType') is not None:
            self.network_type = m.get('networkType')
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        return self


class HttpApiDomainInfo(TeaModel):
    def __init__(
        self,
        domain_id: str = None,
        name: str = None,
        protocol: str = None,
    ):
        self.domain_id = domain_id
        self.name = name
        self.protocol = protocol

    def validate(self):
        pass

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

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

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


class HttpApiApiInfoEnvironments(TeaModel):
    def __init__(
        self,
        alias: str = None,
        backend_scene: str = None,
        backend_type: str = None,
        custom_domains: List[HttpApiDomainInfo] = None,
        deploy_status: str = None,
        environment_id: str = None,
        gateway_info: HttpApiApiInfoEnvironmentsGatewayInfo = None,
        name: str = None,
        service_configs: List[HttpApiApiInfoEnvironmentsServiceConfigs] = None,
        sub_domains: List[HttpApiApiInfoEnvironmentsSubDomains] = None,
    ):
        self.alias = alias
        self.backend_scene = backend_scene
        self.backend_type = backend_type
        self.custom_domains = custom_domains
        self.deploy_status = deploy_status
        self.environment_id = environment_id
        self.gateway_info = gateway_info
        self.name = name
        self.service_configs = service_configs
        self.sub_domains = sub_domains

    def validate(self):
        if self.custom_domains:
            for k in self.custom_domains:
                if k:
                    k.validate()
        if self.gateway_info:
            self.gateway_info.validate()
        if self.service_configs:
            for k in self.service_configs:
                if k:
                    k.validate()
        if self.sub_domains:
            for k in self.sub_domains:
                if k:
                    k.validate()

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

        result = dict()
        if self.alias is not None:
            result['alias'] = self.alias
        if self.backend_scene is not None:
            result['backendScene'] = self.backend_scene
        if self.backend_type is not None:
            result['backendType'] = self.backend_type
        result['customDomains'] = []
        if self.custom_domains is not None:
            for k in self.custom_domains:
                result['customDomains'].append(k.to_map() if k else None)
        if self.deploy_status is not None:
            result['deployStatus'] = self.deploy_status
        if self.environment_id is not None:
            result['environmentId'] = self.environment_id
        if self.gateway_info is not None:
            result['gatewayInfo'] = self.gateway_info.to_map()
        if self.name is not None:
            result['name'] = self.name
        result['serviceConfigs'] = []
        if self.service_configs is not None:
            for k in self.service_configs:
                result['serviceConfigs'].append(k.to_map() if k else None)
        result['subDomains'] = []
        if self.sub_domains is not None:
            for k in self.sub_domains:
                result['subDomains'].append(k.to_map() if k else None)
        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('backendScene') is not None:
            self.backend_scene = m.get('backendScene')
        if m.get('backendType') is not None:
            self.backend_type = m.get('backendType')
        self.custom_domains = []
        if m.get('customDomains') is not None:
            for k in m.get('customDomains'):
                temp_model = HttpApiDomainInfo()
                self.custom_domains.append(temp_model.from_map(k))
        if m.get('deployStatus') is not None:
            self.deploy_status = m.get('deployStatus')
        if m.get('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('gatewayInfo') is not None:
            temp_model = HttpApiApiInfoEnvironmentsGatewayInfo()
            self.gateway_info = temp_model.from_map(m['gatewayInfo'])
        if m.get('name') is not None:
            self.name = m.get('name')
        self.service_configs = []
        if m.get('serviceConfigs') is not None:
            for k in m.get('serviceConfigs'):
                temp_model = HttpApiApiInfoEnvironmentsServiceConfigs()
                self.service_configs.append(temp_model.from_map(k))
        self.sub_domains = []
        if m.get('subDomains') is not None:
            for k in m.get('subDomains'):
                temp_model = HttpApiApiInfoEnvironmentsSubDomains()
                self.sub_domains.append(temp_model.from_map(k))
        return self


class HttpApiApiInfoIngressInfoEnvironmentInfo(TeaModel):
    def __init__(
        self,
        environment_id: str = None,
    ):
        self.environment_id = environment_id

    def validate(self):
        pass

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

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

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


class HttpApiApiInfoIngressInfoK8sClusterInfo(TeaModel):
    def __init__(
        self,
        cluster_id: str = None,
    ):
        self.cluster_id = cluster_id

    def validate(self):
        pass

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

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

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


class HttpApiApiInfoIngressInfo(TeaModel):
    def __init__(
        self,
        environment_info: HttpApiApiInfoIngressInfoEnvironmentInfo = None,
        ingress_class: str = None,
        k_8s_cluster_info: HttpApiApiInfoIngressInfoK8sClusterInfo = None,
        override_ingress_ip: bool = None,
        source_id: str = None,
        watch_namespace: str = None,
    ):
        self.environment_info = environment_info
        self.ingress_class = ingress_class
        self.k_8s_cluster_info = k_8s_cluster_info
        self.override_ingress_ip = override_ingress_ip
        self.source_id = source_id
        self.watch_namespace = watch_namespace

    def validate(self):
        if self.environment_info:
            self.environment_info.validate()
        if self.k_8s_cluster_info:
            self.k_8s_cluster_info.validate()

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

        result = dict()
        if self.environment_info is not None:
            result['environmentInfo'] = self.environment_info.to_map()
        if self.ingress_class is not None:
            result['ingressClass'] = self.ingress_class
        if self.k_8s_cluster_info is not None:
            result['k8sClusterInfo'] = self.k_8s_cluster_info.to_map()
        if self.override_ingress_ip is not None:
            result['overrideIngressIp'] = self.override_ingress_ip
        if self.source_id is not None:
            result['sourceId'] = self.source_id
        if self.watch_namespace is not None:
            result['watchNamespace'] = self.watch_namespace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('environmentInfo') is not None:
            temp_model = HttpApiApiInfoIngressInfoEnvironmentInfo()
            self.environment_info = temp_model.from_map(m['environmentInfo'])
        if m.get('ingressClass') is not None:
            self.ingress_class = m.get('ingressClass')
        if m.get('k8sClusterInfo') is not None:
            temp_model = HttpApiApiInfoIngressInfoK8sClusterInfo()
            self.k_8s_cluster_info = temp_model.from_map(m['k8sClusterInfo'])
        if m.get('overrideIngressIp') is not None:
            self.override_ingress_ip = m.get('overrideIngressIp')
        if m.get('sourceId') is not None:
            self.source_id = m.get('sourceId')
        if m.get('watchNamespace') is not None:
            self.watch_namespace = m.get('watchNamespace')
        return self


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

    def validate(self):
        pass

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

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

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


class HttpApiDeployConfigPolicyConfigs(TeaModel):
    def __init__(
        self,
        ai_fallback_config: HttpApiDeployConfigPolicyConfigsAiFallbackConfig = None,
        enable: bool = None,
        type: str = None,
    ):
        self.ai_fallback_config = ai_fallback_config
        self.enable = enable
        self.type = type

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

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

        result = dict()
        if self.ai_fallback_config is not None:
            result['aiFallbackConfig'] = self.ai_fallback_config.to_map()
        if self.enable is not None:
            result['enable'] = self.enable
        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('aiFallbackConfig') is not None:
            temp_model = HttpApiDeployConfigPolicyConfigsAiFallbackConfig()
            self.ai_fallback_config = temp_model.from_map(m['aiFallbackConfig'])
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class HttpApiDeployConfigServiceConfigs(TeaModel):
    def __init__(
        self,
        model_name: str = None,
        model_name_pattern: str = None,
        service_id: str = None,
        weight: int = None,
    ):
        self.model_name = model_name
        self.model_name_pattern = model_name_pattern
        self.service_id = service_id
        self.weight = weight

    def validate(self):
        pass

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

        result = dict()
        if self.model_name is not None:
            result['modelName'] = self.model_name
        if self.model_name_pattern is not None:
            result['modelNamePattern'] = self.model_name_pattern
        if self.service_id is not None:
            result['serviceId'] = self.service_id
        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('modelName') is not None:
            self.model_name = m.get('modelName')
        if m.get('modelNamePattern') is not None:
            self.model_name_pattern = m.get('modelNamePattern')
        if m.get('serviceId') is not None:
            self.service_id = m.get('serviceId')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class HttpApiDeployConfig(TeaModel):
    def __init__(
        self,
        auto_deploy: bool = None,
        backend_scene: str = None,
        custom_domain_ids: List[str] = None,
        environment_id: str = None,
        policy_configs: List[HttpApiDeployConfigPolicyConfigs] = None,
        service_configs: List[HttpApiDeployConfigServiceConfigs] = None,
    ):
        self.auto_deploy = auto_deploy
        self.backend_scene = backend_scene
        self.custom_domain_ids = custom_domain_ids
        self.environment_id = environment_id
        self.policy_configs = policy_configs
        self.service_configs = service_configs

    def validate(self):
        if self.policy_configs:
            for k in self.policy_configs:
                if k:
                    k.validate()
        if self.service_configs:
            for k in self.service_configs:
                if k:
                    k.validate()

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

        result = dict()
        if self.auto_deploy is not None:
            result['autoDeploy'] = self.auto_deploy
        if self.backend_scene is not None:
            result['backendScene'] = self.backend_scene
        if self.custom_domain_ids is not None:
            result['customDomainIds'] = self.custom_domain_ids
        if self.environment_id is not None:
            result['environmentId'] = self.environment_id
        result['policyConfigs'] = []
        if self.policy_configs is not None:
            for k in self.policy_configs:
                result['policyConfigs'].append(k.to_map() if k else None)
        result['serviceConfigs'] = []
        if self.service_configs is not None:
            for k in self.service_configs:
                result['serviceConfigs'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('autoDeploy') is not None:
            self.auto_deploy = m.get('autoDeploy')
        if m.get('backendScene') is not None:
            self.backend_scene = m.get('backendScene')
        if m.get('customDomainIds') is not None:
            self.custom_domain_ids = m.get('customDomainIds')
        if m.get('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        self.policy_configs = []
        if m.get('policyConfigs') is not None:
            for k in m.get('policyConfigs'):
                temp_model = HttpApiDeployConfigPolicyConfigs()
                self.policy_configs.append(temp_model.from_map(k))
        self.service_configs = []
        if m.get('serviceConfigs') is not None:
            for k in m.get('serviceConfigs'):
                temp_model = HttpApiDeployConfigServiceConfigs()
                self.service_configs.append(temp_model.from_map(k))
        return self


class HttpApiVersionInfo(TeaModel):
    def __init__(
        self,
        enable: bool = None,
        header_name: str = None,
        query_name: str = None,
        scheme: str = None,
        version: str = None,
    ):
        self.enable = enable
        self.header_name = header_name
        self.query_name = query_name
        self.scheme = scheme
        self.version = version

    def validate(self):
        pass

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

        result = dict()
        if self.enable is not None:
            result['enable'] = self.enable
        if self.header_name is not None:
            result['headerName'] = self.header_name
        if self.query_name is not None:
            result['queryName'] = self.query_name
        if self.scheme is not None:
            result['scheme'] = self.scheme
        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('enable') is not None:
            self.enable = m.get('enable')
        if m.get('headerName') is not None:
            self.header_name = m.get('headerName')
        if m.get('queryName') is not None:
            self.query_name = m.get('queryName')
        if m.get('scheme') is not None:
            self.scheme = m.get('scheme')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class HttpApiApiInfo(TeaModel):
    def __init__(
        self,
        ai_protocols: List[str] = None,
        base_path: str = None,
        deploy_configs: List[HttpApiDeployConfig] = None,
        description: str = None,
        environments: List[HttpApiApiInfoEnvironments] = None,
        http_api_id: str = None,
        ingress_info: HttpApiApiInfoIngressInfo = None,
        name: str = None,
        protocols: List[str] = None,
        resource_group_id: str = None,
        type: str = None,
        version_info: HttpApiVersionInfo = None,
    ):
        self.ai_protocols = ai_protocols
        self.base_path = base_path
        self.deploy_configs = deploy_configs
        self.description = description
        self.environments = environments
        self.http_api_id = http_api_id
        self.ingress_info = ingress_info
        self.name = name
        self.protocols = protocols
        self.resource_group_id = resource_group_id
        self.type = type
        self.version_info = version_info

    def validate(self):
        if self.deploy_configs:
            for k in self.deploy_configs:
                if k:
                    k.validate()
        if self.environments:
            for k in self.environments:
                if k:
                    k.validate()
        if self.ingress_info:
            self.ingress_info.validate()
        if self.version_info:
            self.version_info.validate()

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

        result = dict()
        if self.ai_protocols is not None:
            result['aiProtocols'] = self.ai_protocols
        if self.base_path is not None:
            result['basePath'] = self.base_path
        result['deployConfigs'] = []
        if self.deploy_configs is not None:
            for k in self.deploy_configs:
                result['deployConfigs'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        result['environments'] = []
        if self.environments is not None:
            for k in self.environments:
                result['environments'].append(k.to_map() if k else None)
        if self.http_api_id is not None:
            result['httpApiId'] = self.http_api_id
        if self.ingress_info is not None:
            result['ingressInfo'] = self.ingress_info.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.protocols is not None:
            result['protocols'] = self.protocols
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.type is not None:
            result['type'] = self.type
        if self.version_info is not None:
            result['versionInfo'] = self.version_info.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aiProtocols') is not None:
            self.ai_protocols = m.get('aiProtocols')
        if m.get('basePath') is not None:
            self.base_path = m.get('basePath')
        self.deploy_configs = []
        if m.get('deployConfigs') is not None:
            for k in m.get('deployConfigs'):
                temp_model = HttpApiDeployConfig()
                self.deploy_configs.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        self.environments = []
        if m.get('environments') is not None:
            for k in m.get('environments'):
                temp_model = HttpApiApiInfoEnvironments()
                self.environments.append(temp_model.from_map(k))
        if m.get('httpApiId') is not None:
            self.http_api_id = m.get('httpApiId')
        if m.get('ingressInfo') is not None:
            temp_model = HttpApiApiInfoIngressInfo()
            self.ingress_info = temp_model.from_map(m['ingressInfo'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('protocols') is not None:
            self.protocols = m.get('protocols')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('versionInfo') is not None:
            temp_model = HttpApiVersionInfo()
            self.version_info = temp_model.from_map(m['versionInfo'])
        return self


class HttpApiInfoByName(TeaModel):
    def __init__(
        self,
        name: str = None,
        type: str = None,
        version_enabled: bool = None,
        versioned_http_apis: List[HttpApiApiInfo] = None,
    ):
        self.name = name
        self.type = type
        self.version_enabled = version_enabled
        self.versioned_http_apis = versioned_http_apis

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

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

        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.type is not None:
            result['type'] = self.type
        if self.version_enabled is not None:
            result['versionEnabled'] = self.version_enabled
        result['versionedHttpApis'] = []
        if self.versioned_http_apis is not None:
            for k in self.versioned_http_apis:
                result['versionedHttpApis'].append(k.to_map() if k else None)
        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('versionEnabled') is not None:
            self.version_enabled = m.get('versionEnabled')
        self.versioned_http_apis = []
        if m.get('versionedHttpApis') is not None:
            for k in m.get('versionedHttpApis'):
                temp_model = HttpApiApiInfo()
                self.versioned_http_apis.append(temp_model.from_map(k))
        return self


class HttpApiMockContract(TeaModel):
    def __init__(
        self,
        enable: bool = None,
        response_code: int = None,
        response_content: str = None,
    ):
        self.enable = enable
        self.response_code = response_code
        self.response_content = response_content

    def validate(self):
        pass

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

        result = dict()
        if self.enable is not None:
            result['enable'] = self.enable
        if self.response_code is not None:
            result['responseCode'] = self.response_code
        if self.response_content is not None:
            result['responseContent'] = self.response_content
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('responseCode') is not None:
            self.response_code = m.get('responseCode')
        if m.get('responseContent') is not None:
            self.response_content = m.get('responseContent')
        return self


class HttpApiParameter(TeaModel):
    def __init__(
        self,
        default_value: str = None,
        description: str = None,
        example_value: str = None,
        name: str = None,
        required: bool = None,
        type: str = None,
    ):
        self.default_value = default_value
        self.description = description
        self.example_value = example_value
        # This parameter is required.
        self.name = name
        self.required = required
        # This parameter is required.
        self.type = type

    def validate(self):
        pass

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

        result = dict()
        if self.default_value is not None:
            result['defaultValue'] = self.default_value
        if self.description is not None:
            result['description'] = self.description
        if self.example_value is not None:
            result['exampleValue'] = self.example_value
        if self.name is not None:
            result['name'] = self.name
        if self.required is not None:
            result['required'] = self.required
        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('defaultValue') is not None:
            self.default_value = m.get('defaultValue')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('exampleValue') is not None:
            self.example_value = m.get('exampleValue')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('required') is not None:
            self.required = m.get('required')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class HttpApiRequestContractBody(TeaModel):
    def __init__(
        self,
        content_type: str = None,
        description: str = None,
        example: str = None,
        json_schema: str = None,
    ):
        self.content_type = content_type
        self.description = description
        self.example = example
        self.json_schema = json_schema

    def validate(self):
        pass

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

        result = dict()
        if self.content_type is not None:
            result['contentType'] = self.content_type
        if self.description is not None:
            result['description'] = self.description
        if self.example is not None:
            result['example'] = self.example
        if self.json_schema is not None:
            result['jsonSchema'] = self.json_schema
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('contentType') is not None:
            self.content_type = m.get('contentType')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('example') is not None:
            self.example = m.get('example')
        if m.get('jsonSchema') is not None:
            self.json_schema = m.get('jsonSchema')
        return self


class HttpApiRequestContract(TeaModel):
    def __init__(
        self,
        body: HttpApiRequestContractBody = None,
        header_parameters: List[HttpApiParameter] = None,
        path_parameters: List[HttpApiParameter] = None,
        query_parameters: List[HttpApiParameter] = None,
    ):
        self.body = body
        self.header_parameters = header_parameters
        self.path_parameters = path_parameters
        self.query_parameters = query_parameters

    def validate(self):
        if self.body:
            self.body.validate()
        if self.header_parameters:
            for k in self.header_parameters:
                if k:
                    k.validate()
        if self.path_parameters:
            for k in self.path_parameters:
                if k:
                    k.validate()
        if self.query_parameters:
            for k in self.query_parameters:
                if k:
                    k.validate()

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

        result = dict()
        if self.body is not None:
            result['body'] = self.body.to_map()
        result['headerParameters'] = []
        if self.header_parameters is not None:
            for k in self.header_parameters:
                result['headerParameters'].append(k.to_map() if k else None)
        result['pathParameters'] = []
        if self.path_parameters is not None:
            for k in self.path_parameters:
                result['pathParameters'].append(k.to_map() if k else None)
        result['queryParameters'] = []
        if self.query_parameters is not None:
            for k in self.query_parameters:
                result['queryParameters'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('body') is not None:
            temp_model = HttpApiRequestContractBody()
            self.body = temp_model.from_map(m['body'])
        self.header_parameters = []
        if m.get('headerParameters') is not None:
            for k in m.get('headerParameters'):
                temp_model = HttpApiParameter()
                self.header_parameters.append(temp_model.from_map(k))
        self.path_parameters = []
        if m.get('pathParameters') is not None:
            for k in m.get('pathParameters'):
                temp_model = HttpApiParameter()
                self.path_parameters.append(temp_model.from_map(k))
        self.query_parameters = []
        if m.get('queryParameters') is not None:
            for k in m.get('queryParameters'):
                temp_model = HttpApiParameter()
                self.query_parameters.append(temp_model.from_map(k))
        return self


class HttpApiResponseContractItems(TeaModel):
    def __init__(
        self,
        code: int = None,
        description: str = None,
        example: str = None,
        json_schema: str = None,
    ):
        self.code = code
        self.description = description
        self.example = example
        self.json_schema = json_schema

    def validate(self):
        pass

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

        result = dict()
        if self.code is not None:
            result['code'] = self.code
        if self.description is not None:
            result['description'] = self.description
        if self.example is not None:
            result['example'] = self.example
        if self.json_schema is not None:
            result['jsonSchema'] = self.json_schema
        return result

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


class HttpApiResponseContract(TeaModel):
    def __init__(
        self,
        content_type: str = None,
        items: List[HttpApiResponseContractItems] = None,
    ):
        # This parameter is required.
        self.content_type = content_type
        self.items = items

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

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

        result = dict()
        if self.content_type is not None:
            result['contentType'] = self.content_type
        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('contentType') is not None:
            self.content_type = m.get('contentType')
        self.items = []
        if m.get('items') is not None:
            for k in m.get('items'):
                temp_model = HttpApiResponseContractItems()
                self.items.append(temp_model.from_map(k))
        return self


class HttpApiOperation(TeaModel):
    def __init__(
        self,
        description: str = None,
        method: str = None,
        mock: HttpApiMockContract = None,
        name: str = None,
        path: str = None,
        request: HttpApiRequestContract = None,
        response: HttpApiResponseContract = None,
    ):
        self.description = description
        # This parameter is required.
        self.method = method
        self.mock = mock
        # This parameter is required.
        self.name = name
        # This parameter is required.
        self.path = path
        self.request = request
        self.response = response

    def validate(self):
        if self.mock:
            self.mock.validate()
        if self.request:
            self.request.validate()
        if self.response:
            self.response.validate()

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.method is not None:
            result['method'] = self.method
        if self.mock is not None:
            result['mock'] = self.mock.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.path is not None:
            result['path'] = self.path
        if self.request is not None:
            result['request'] = self.request.to_map()
        if self.response is not None:
            result['response'] = self.response.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('method') is not None:
            self.method = m.get('method')
        if m.get('mock') is not None:
            temp_model = HttpApiMockContract()
            self.mock = temp_model.from_map(m['mock'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('path') is not None:
            self.path = m.get('path')
        if m.get('request') is not None:
            temp_model = HttpApiRequestContract()
            self.request = temp_model.from_map(m['request'])
        if m.get('response') is not None:
            temp_model = HttpApiResponseContract()
            self.response = temp_model.from_map(m['response'])
        return self


class HttpApiOperationInfo(TeaModel):
    def __init__(
        self,
        create_timestamp: int = None,
        description: str = None,
        method: str = None,
        mock: HttpApiMockContract = None,
        name: str = None,
        operation_id: str = None,
        path: str = None,
        request: HttpApiRequestContract = None,
        response: HttpApiResponseContract = None,
    ):
        self.create_timestamp = create_timestamp
        self.description = description
        self.method = method
        self.mock = mock
        self.name = name
        self.operation_id = operation_id
        self.path = path
        self.request = request
        self.response = response

    def validate(self):
        if self.mock:
            self.mock.validate()
        if self.request:
            self.request.validate()
        if self.response:
            self.response.validate()

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

        result = dict()
        if self.create_timestamp is not None:
            result['createTimestamp'] = self.create_timestamp
        if self.description is not None:
            result['description'] = self.description
        if self.method is not None:
            result['method'] = self.method
        if self.mock is not None:
            result['mock'] = self.mock.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.operation_id is not None:
            result['operationId'] = self.operation_id
        if self.path is not None:
            result['path'] = self.path
        if self.request is not None:
            result['request'] = self.request.to_map()
        if self.response is not None:
            result['response'] = self.response.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('createTimestamp') is not None:
            self.create_timestamp = m.get('createTimestamp')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('method') is not None:
            self.method = m.get('method')
        if m.get('mock') is not None:
            temp_model = HttpApiMockContract()
            self.mock = temp_model.from_map(m['mock'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('operationId') is not None:
            self.operation_id = m.get('operationId')
        if m.get('path') is not None:
            self.path = m.get('path')
        if m.get('request') is not None:
            temp_model = HttpApiRequestContract()
            self.request = temp_model.from_map(m['request'])
        if m.get('response') is not None:
            temp_model = HttpApiResponseContract()
            self.response = temp_model.from_map(m['response'])
        return self


class HttpApiPublishRevisionInfoCloudProductConfigContainerServiceConfigs(TeaModel):
    def __init__(
        self,
        gateway_service_id: str = None,
        match: HttpApiBackendMatchConditions = None,
        name: str = None,
        namespace: str = None,
        port: int = None,
        protocol: str = None,
        weight: str = None,
    ):
        self.gateway_service_id = gateway_service_id
        self.match = match
        self.name = name
        self.namespace = namespace
        self.port = port
        self.protocol = protocol
        self.weight = weight

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

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

        result = dict()
        if self.gateway_service_id is not None:
            result['gatewayServiceId'] = self.gateway_service_id
        if self.match is not None:
            result['match'] = self.match.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.namespace is not None:
            result['namespace'] = self.namespace
        if self.port is not None:
            result['port'] = self.port
        if self.protocol is not None:
            result['protocol'] = self.protocol
        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('gatewayServiceId') is not None:
            self.gateway_service_id = m.get('gatewayServiceId')
        if m.get('match') is not None:
            temp_model = HttpApiBackendMatchConditions()
            self.match = temp_model.from_map(m['match'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        if m.get('port') is not None:
            self.port = m.get('port')
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class HttpApiPublishRevisionInfoCloudProductConfigFunctionConfigs(TeaModel):
    def __init__(
        self,
        gateway_service_id: str = None,
        match: HttpApiBackendMatchConditions = None,
        name: str = None,
        qualifier: str = None,
        weight: int = None,
    ):
        self.gateway_service_id = gateway_service_id
        self.match = match
        self.name = name
        self.qualifier = qualifier
        self.weight = weight

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

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

        result = dict()
        if self.gateway_service_id is not None:
            result['gatewayServiceId'] = self.gateway_service_id
        if self.match is not None:
            result['match'] = self.match.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.qualifier is not None:
            result['qualifier'] = self.qualifier
        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('gatewayServiceId') is not None:
            self.gateway_service_id = m.get('gatewayServiceId')
        if m.get('match') is not None:
            temp_model = HttpApiBackendMatchConditions()
            self.match = temp_model.from_map(m['match'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('qualifier') is not None:
            self.qualifier = m.get('qualifier')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class HttpApiPublishRevisionInfoCloudProductConfigMseNacosConfigs(TeaModel):
    def __init__(
        self,
        gateway_service_id: str = None,
        group_name: str = None,
        match: HttpApiBackendMatchConditions = None,
        name: str = None,
        namespace: str = None,
        weight: int = None,
    ):
        self.gateway_service_id = gateway_service_id
        self.group_name = group_name
        self.match = match
        self.name = name
        self.namespace = namespace
        self.weight = weight

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

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

        result = dict()
        if self.gateway_service_id is not None:
            result['gatewayServiceId'] = self.gateway_service_id
        if self.group_name is not None:
            result['groupName'] = self.group_name
        if self.match is not None:
            result['match'] = self.match.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.namespace is not None:
            result['namespace'] = self.namespace
        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('gatewayServiceId') is not None:
            self.gateway_service_id = m.get('gatewayServiceId')
        if m.get('groupName') is not None:
            self.group_name = m.get('groupName')
        if m.get('match') is not None:
            temp_model = HttpApiBackendMatchConditions()
            self.match = temp_model.from_map(m['match'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class HttpApiPublishRevisionInfoCloudProductConfig(TeaModel):
    def __init__(
        self,
        cloud_product_type: str = None,
        container_service_configs: List[HttpApiPublishRevisionInfoCloudProductConfigContainerServiceConfigs] = None,
        function_configs: List[HttpApiPublishRevisionInfoCloudProductConfigFunctionConfigs] = None,
        mse_nacos_configs: List[HttpApiPublishRevisionInfoCloudProductConfigMseNacosConfigs] = None,
    ):
        self.cloud_product_type = cloud_product_type
        self.container_service_configs = container_service_configs
        self.function_configs = function_configs
        self.mse_nacos_configs = mse_nacos_configs

    def validate(self):
        if self.container_service_configs:
            for k in self.container_service_configs:
                if k:
                    k.validate()
        if self.function_configs:
            for k in self.function_configs:
                if k:
                    k.validate()
        if self.mse_nacos_configs:
            for k in self.mse_nacos_configs:
                if k:
                    k.validate()

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

        result = dict()
        if self.cloud_product_type is not None:
            result['cloudProductType'] = self.cloud_product_type
        result['containerServiceConfigs'] = []
        if self.container_service_configs is not None:
            for k in self.container_service_configs:
                result['containerServiceConfigs'].append(k.to_map() if k else None)
        result['functionConfigs'] = []
        if self.function_configs is not None:
            for k in self.function_configs:
                result['functionConfigs'].append(k.to_map() if k else None)
        result['mseNacosConfigs'] = []
        if self.mse_nacos_configs is not None:
            for k in self.mse_nacos_configs:
                result['mseNacosConfigs'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('cloudProductType') is not None:
            self.cloud_product_type = m.get('cloudProductType')
        self.container_service_configs = []
        if m.get('containerServiceConfigs') is not None:
            for k in m.get('containerServiceConfigs'):
                temp_model = HttpApiPublishRevisionInfoCloudProductConfigContainerServiceConfigs()
                self.container_service_configs.append(temp_model.from_map(k))
        self.function_configs = []
        if m.get('functionConfigs') is not None:
            for k in m.get('functionConfigs'):
                temp_model = HttpApiPublishRevisionInfoCloudProductConfigFunctionConfigs()
                self.function_configs.append(temp_model.from_map(k))
        self.mse_nacos_configs = []
        if m.get('mseNacosConfigs') is not None:
            for k in m.get('mseNacosConfigs'):
                temp_model = HttpApiPublishRevisionInfoCloudProductConfigMseNacosConfigs()
                self.mse_nacos_configs.append(temp_model.from_map(k))
        return self


class HttpApiPublishRevisionInfoDnsConfigs(TeaModel):
    def __init__(
        self,
        dns_list: List[str] = None,
        match: HttpApiBackendMatchConditions = None,
        weight: int = None,
    ):
        self.dns_list = dns_list
        self.match = match
        self.weight = weight

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

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

        result = dict()
        if self.dns_list is not None:
            result['dnsList'] = self.dns_list
        if self.match is not None:
            result['match'] = self.match.to_map()
        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('dnsList') is not None:
            self.dns_list = m.get('dnsList')
        if m.get('match') is not None:
            temp_model = HttpApiBackendMatchConditions()
            self.match = temp_model.from_map(m['match'])
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class HttpApiPublishRevisionInfoEnvironmentInfoGatewayInfo(TeaModel):
    def __init__(
        self,
        gateway_id: str = None,
        name: str = None,
    ):
        self.gateway_id = gateway_id
        self.name = name

    def validate(self):
        pass

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

        result = dict()
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_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('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class HttpApiPublishRevisionInfoEnvironmentInfo(TeaModel):
    def __init__(
        self,
        alias: str = None,
        environment_id: str = None,
        gateway_info: HttpApiPublishRevisionInfoEnvironmentInfoGatewayInfo = None,
        name: str = None,
    ):
        self.alias = alias
        self.environment_id = environment_id
        self.gateway_info = gateway_info
        self.name = name

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

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

        result = dict()
        if self.alias is not None:
            result['alias'] = self.alias
        if self.environment_id is not None:
            result['environmentId'] = self.environment_id
        if self.gateway_info is not None:
            result['gatewayInfo'] = self.gateway_info.to_map()
        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('alias') is not None:
            self.alias = m.get('alias')
        if m.get('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('gatewayInfo') is not None:
            temp_model = HttpApiPublishRevisionInfoEnvironmentInfoGatewayInfo()
            self.gateway_info = temp_model.from_map(m['gatewayInfo'])
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class HttpApiPublishRevisionInfoServiceConfigs(TeaModel):
    def __init__(
        self,
        gateway_service_id: str = None,
        match: HttpApiBackendMatchConditions = None,
        port: int = None,
        protocol: str = None,
        version: str = None,
        weight: int = None,
    ):
        self.gateway_service_id = gateway_service_id
        self.match = match
        self.port = port
        self.protocol = protocol
        self.version = version
        self.weight = weight

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

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

        result = dict()
        if self.gateway_service_id is not None:
            result['gatewayServiceId'] = self.gateway_service_id
        if self.match is not None:
            result['match'] = self.match.to_map()
        if self.port is not None:
            result['port'] = self.port
        if self.protocol is not None:
            result['protocol'] = self.protocol
        if self.version is not None:
            result['version'] = self.version
        if self.weight is not None:
            result['weight'] = self.weight
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('gatewayServiceId') is not None:
            self.gateway_service_id = m.get('gatewayServiceId')
        if m.get('match') is not None:
            temp_model = HttpApiBackendMatchConditions()
            self.match = temp_model.from_map(m['match'])
        if m.get('port') is not None:
            self.port = m.get('port')
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class HttpApiPublishRevisionInfoVipConfigs(TeaModel):
    def __init__(
        self,
        endpoints: List[str] = None,
        match: HttpApiBackendMatchConditions = None,
        weight: int = None,
    ):
        self.endpoints = endpoints
        self.match = match
        self.weight = weight

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

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

        result = dict()
        if self.endpoints is not None:
            result['endpoints'] = self.endpoints
        if self.match is not None:
            result['match'] = self.match.to_map()
        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('endpoints') is not None:
            self.endpoints = m.get('endpoints')
        if m.get('match') is not None:
            temp_model = HttpApiBackendMatchConditions()
            self.match = temp_model.from_map(m['match'])
        if m.get('weight') is not None:
            self.weight = m.get('weight')
        return self


class HttpApiPublishRevisionInfo(TeaModel):
    def __init__(
        self,
        backend_scene: str = None,
        backend_type: str = None,
        cloud_product_config: HttpApiPublishRevisionInfoCloudProductConfig = None,
        create_timestamp: int = None,
        custom_domains: List[HttpApiDomainInfo] = None,
        dns_configs: List[HttpApiPublishRevisionInfoDnsConfigs] = None,
        environment_info: HttpApiPublishRevisionInfoEnvironmentInfo = None,
        is_current_version: bool = None,
        operations: List[HttpApiOperationInfo] = None,
        revision_id: str = None,
        service_configs: List[HttpApiPublishRevisionInfoServiceConfigs] = None,
        sub_domains: List[HttpApiDomainInfo] = None,
        vip_configs: List[HttpApiPublishRevisionInfoVipConfigs] = None,
    ):
        self.backend_scene = backend_scene
        self.backend_type = backend_type
        self.cloud_product_config = cloud_product_config
        self.create_timestamp = create_timestamp
        self.custom_domains = custom_domains
        self.dns_configs = dns_configs
        self.environment_info = environment_info
        self.is_current_version = is_current_version
        self.operations = operations
        self.revision_id = revision_id
        self.service_configs = service_configs
        self.sub_domains = sub_domains
        self.vip_configs = vip_configs

    def validate(self):
        if self.cloud_product_config:
            self.cloud_product_config.validate()
        if self.custom_domains:
            for k in self.custom_domains:
                if k:
                    k.validate()
        if self.dns_configs:
            for k in self.dns_configs:
                if k:
                    k.validate()
        if self.environment_info:
            self.environment_info.validate()
        if self.operations:
            for k in self.operations:
                if k:
                    k.validate()
        if self.service_configs:
            for k in self.service_configs:
                if k:
                    k.validate()
        if self.sub_domains:
            for k in self.sub_domains:
                if k:
                    k.validate()
        if self.vip_configs:
            for k in self.vip_configs:
                if k:
                    k.validate()

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

        result = dict()
        if self.backend_scene is not None:
            result['backendScene'] = self.backend_scene
        if self.backend_type is not None:
            result['backendType'] = self.backend_type
        if self.cloud_product_config is not None:
            result['cloudProductConfig'] = self.cloud_product_config.to_map()
        if self.create_timestamp is not None:
            result['createTimestamp'] = self.create_timestamp
        result['customDomains'] = []
        if self.custom_domains is not None:
            for k in self.custom_domains:
                result['customDomains'].append(k.to_map() if k else None)
        result['dnsConfigs'] = []
        if self.dns_configs is not None:
            for k in self.dns_configs:
                result['dnsConfigs'].append(k.to_map() if k else None)
        if self.environment_info is not None:
            result['environmentInfo'] = self.environment_info.to_map()
        if self.is_current_version is not None:
            result['isCurrentVersion'] = self.is_current_version
        result['operations'] = []
        if self.operations is not None:
            for k in self.operations:
                result['operations'].append(k.to_map() if k else None)
        if self.revision_id is not None:
            result['revisionId'] = self.revision_id
        result['serviceConfigs'] = []
        if self.service_configs is not None:
            for k in self.service_configs:
                result['serviceConfigs'].append(k.to_map() if k else None)
        result['subDomains'] = []
        if self.sub_domains is not None:
            for k in self.sub_domains:
                result['subDomains'].append(k.to_map() if k else None)
        result['vipConfigs'] = []
        if self.vip_configs is not None:
            for k in self.vip_configs:
                result['vipConfigs'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('backendScene') is not None:
            self.backend_scene = m.get('backendScene')
        if m.get('backendType') is not None:
            self.backend_type = m.get('backendType')
        if m.get('cloudProductConfig') is not None:
            temp_model = HttpApiPublishRevisionInfoCloudProductConfig()
            self.cloud_product_config = temp_model.from_map(m['cloudProductConfig'])
        if m.get('createTimestamp') is not None:
            self.create_timestamp = m.get('createTimestamp')
        self.custom_domains = []
        if m.get('customDomains') is not None:
            for k in m.get('customDomains'):
                temp_model = HttpApiDomainInfo()
                self.custom_domains.append(temp_model.from_map(k))
        self.dns_configs = []
        if m.get('dnsConfigs') is not None:
            for k in m.get('dnsConfigs'):
                temp_model = HttpApiPublishRevisionInfoDnsConfigs()
                self.dns_configs.append(temp_model.from_map(k))
        if m.get('environmentInfo') is not None:
            temp_model = HttpApiPublishRevisionInfoEnvironmentInfo()
            self.environment_info = temp_model.from_map(m['environmentInfo'])
        if m.get('isCurrentVersion') is not None:
            self.is_current_version = m.get('isCurrentVersion')
        self.operations = []
        if m.get('operations') is not None:
            for k in m.get('operations'):
                temp_model = HttpApiOperationInfo()
                self.operations.append(temp_model.from_map(k))
        if m.get('revisionId') is not None:
            self.revision_id = m.get('revisionId')
        self.service_configs = []
        if m.get('serviceConfigs') is not None:
            for k in m.get('serviceConfigs'):
                temp_model = HttpApiPublishRevisionInfoServiceConfigs()
                self.service_configs.append(temp_model.from_map(k))
        self.sub_domains = []
        if m.get('subDomains') is not None:
            for k in m.get('subDomains'):
                temp_model = HttpApiDomainInfo()
                self.sub_domains.append(temp_model.from_map(k))
        self.vip_configs = []
        if m.get('vipConfigs') is not None:
            for k in m.get('vipConfigs'):
                temp_model = HttpApiPublishRevisionInfoVipConfigs()
                self.vip_configs.append(temp_model.from_map(k))
        return self


class HttpApiVersionConfig(TeaModel):
    def __init__(
        self,
        enable: bool = None,
        header_name: str = None,
        query_name: str = None,
        scheme: str = None,
        version: str = None,
    ):
        self.enable = enable
        self.header_name = header_name
        self.query_name = query_name
        self.scheme = scheme
        self.version = version

    def validate(self):
        pass

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

        result = dict()
        if self.enable is not None:
            result['enable'] = self.enable
        if self.header_name is not None:
            result['headerName'] = self.header_name
        if self.query_name is not None:
            result['queryName'] = self.query_name
        if self.scheme is not None:
            result['scheme'] = self.scheme
        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('enable') is not None:
            self.enable = m.get('enable')
        if m.get('headerName') is not None:
            self.header_name = m.get('headerName')
        if m.get('queryName') is not None:
            self.query_name = m.get('queryName')
        if m.get('scheme') is not None:
            self.scheme = m.get('scheme')
        if m.get('version') is not None:
            self.version = m.get('version')
        return self


class HttpDubboTranscoderMothedMapListParamMapsList(TeaModel):
    def __init__(
        self,
        extract_key: str = None,
        extract_key_spec: str = None,
        mapping_type: str = None,
    ):
        self.extract_key = extract_key
        self.extract_key_spec = extract_key_spec
        self.mapping_type = mapping_type

    def validate(self):
        pass

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

        result = dict()
        if self.extract_key is not None:
            result['extractKey'] = self.extract_key
        if self.extract_key_spec is not None:
            result['extractKeySpec'] = self.extract_key_spec
        if self.mapping_type is not None:
            result['mappingType'] = self.mapping_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('extractKey') is not None:
            self.extract_key = m.get('extractKey')
        if m.get('extractKeySpec') is not None:
            self.extract_key_spec = m.get('extractKeySpec')
        if m.get('mappingType') is not None:
            self.mapping_type = m.get('mappingType')
        return self


class HttpDubboTranscoderMothedMapList(TeaModel):
    def __init__(
        self,
        dubbo_mothed_name: str = None,
        http_mothed: str = None,
        mothedpath: str = None,
        param_maps_list: List[HttpDubboTranscoderMothedMapListParamMapsList] = None,
        pass_through_all_headers: str = None,
        pass_through_list: List[str] = None,
    ):
        self.dubbo_mothed_name = dubbo_mothed_name
        self.http_mothed = http_mothed
        self.mothedpath = mothedpath
        self.param_maps_list = param_maps_list
        self.pass_through_all_headers = pass_through_all_headers
        self.pass_through_list = pass_through_list

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

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

        result = dict()
        if self.dubbo_mothed_name is not None:
            result['dubboMothedName'] = self.dubbo_mothed_name
        if self.http_mothed is not None:
            result['httpMothed'] = self.http_mothed
        if self.mothedpath is not None:
            result['mothedpath'] = self.mothedpath
        result['paramMapsList'] = []
        if self.param_maps_list is not None:
            for k in self.param_maps_list:
                result['paramMapsList'].append(k.to_map() if k else None)
        if self.pass_through_all_headers is not None:
            result['passThroughAllHeaders'] = self.pass_through_all_headers
        if self.pass_through_list is not None:
            result['passThroughList'] = self.pass_through_list
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dubboMothedName') is not None:
            self.dubbo_mothed_name = m.get('dubboMothedName')
        if m.get('httpMothed') is not None:
            self.http_mothed = m.get('httpMothed')
        if m.get('mothedpath') is not None:
            self.mothedpath = m.get('mothedpath')
        self.param_maps_list = []
        if m.get('paramMapsList') is not None:
            for k in m.get('paramMapsList'):
                temp_model = HttpDubboTranscoderMothedMapListParamMapsList()
                self.param_maps_list.append(temp_model.from_map(k))
        if m.get('passThroughAllHeaders') is not None:
            self.pass_through_all_headers = m.get('passThroughAllHeaders')
        if m.get('passThroughList') is not None:
            self.pass_through_list = m.get('passThroughList')
        return self


class HttpDubboTranscoder(TeaModel):
    def __init__(
        self,
        dubbo_service_group: str = None,
        dubbo_service_name: str = None,
        dubbo_service_version: str = None,
        mothed_map_list: List[HttpDubboTranscoderMothedMapList] = None,
    ):
        self.dubbo_service_group = dubbo_service_group
        self.dubbo_service_name = dubbo_service_name
        self.dubbo_service_version = dubbo_service_version
        self.mothed_map_list = mothed_map_list

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

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

        result = dict()
        if self.dubbo_service_group is not None:
            result['dubboServiceGroup'] = self.dubbo_service_group
        if self.dubbo_service_name is not None:
            result['dubboServiceName'] = self.dubbo_service_name
        if self.dubbo_service_version is not None:
            result['dubboServiceVersion'] = self.dubbo_service_version
        result['mothedMapList'] = []
        if self.mothed_map_list is not None:
            for k in self.mothed_map_list:
                result['mothedMapList'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('dubboServiceGroup') is not None:
            self.dubbo_service_group = m.get('dubboServiceGroup')
        if m.get('dubboServiceName') is not None:
            self.dubbo_service_name = m.get('dubboServiceName')
        if m.get('dubboServiceVersion') is not None:
            self.dubbo_service_version = m.get('dubboServiceVersion')
        self.mothed_map_list = []
        if m.get('mothedMapList') is not None:
            for k in m.get('mothedMapList'):
                temp_model = HttpDubboTranscoderMothedMapList()
                self.mothed_map_list.append(temp_model.from_map(k))
        return self


class HttpRouteDomainInfos(TeaModel):
    def __init__(
        self,
        domain_id: str = None,
        name: str = None,
        protocol: str = None,
    ):
        self.domain_id = domain_id
        self.name = name
        self.protocol = protocol

    def validate(self):
        pass

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

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

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


class HttpRouteEnvironmentInfoGatewayInfo(TeaModel):
    def __init__(
        self,
        gateway_id: str = None,
        name: str = None,
    ):
        self.gateway_id = gateway_id
        self.name = name

    def validate(self):
        pass

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

        result = dict()
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_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('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class HttpRouteEnvironmentInfoSubDomains(TeaModel):
    def __init__(
        self,
        domain_id: str = None,
        name: str = None,
        network_type: str = None,
        protocol: str = None,
    ):
        self.domain_id = domain_id
        self.name = name
        self.network_type = network_type
        self.protocol = protocol

    def validate(self):
        pass

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

        result = dict()
        if self.domain_id is not None:
            result['domainId'] = self.domain_id
        if self.name is not None:
            result['name'] = self.name
        if self.network_type is not None:
            result['networkType'] = self.network_type
        if self.protocol is not None:
            result['protocol'] = self.protocol
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('domainId') is not None:
            self.domain_id = m.get('domainId')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('networkType') is not None:
            self.network_type = m.get('networkType')
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        return self


class HttpRouteEnvironmentInfo(TeaModel):
    def __init__(
        self,
        alias: str = None,
        environment_id: str = None,
        gateway_info: HttpRouteEnvironmentInfoGatewayInfo = None,
        name: str = None,
        sub_domains: List[HttpRouteEnvironmentInfoSubDomains] = None,
    ):
        self.alias = alias
        self.environment_id = environment_id
        self.gateway_info = gateway_info
        self.name = name
        self.sub_domains = sub_domains

    def validate(self):
        if self.gateway_info:
            self.gateway_info.validate()
        if self.sub_domains:
            for k in self.sub_domains:
                if k:
                    k.validate()

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

        result = dict()
        if self.alias is not None:
            result['alias'] = self.alias
        if self.environment_id is not None:
            result['environmentId'] = self.environment_id
        if self.gateway_info is not None:
            result['gatewayInfo'] = self.gateway_info.to_map()
        if self.name is not None:
            result['name'] = self.name
        result['subDomains'] = []
        if self.sub_domains is not None:
            for k in self.sub_domains:
                result['subDomains'].append(k.to_map() if k else None)
        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('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('gatewayInfo') is not None:
            temp_model = HttpRouteEnvironmentInfoGatewayInfo()
            self.gateway_info = temp_model.from_map(m['gatewayInfo'])
        if m.get('name') is not None:
            self.name = m.get('name')
        self.sub_domains = []
        if m.get('subDomains') is not None:
            for k in m.get('subDomains'):
                temp_model = HttpRouteEnvironmentInfoSubDomains()
                self.sub_domains.append(temp_model.from_map(k))
        return self


class HttpRoute(TeaModel):
    def __init__(
        self,
        backend: Backend = None,
        create_timestamp: int = None,
        deploy_status: str = None,
        description: str = None,
        domain_infos: List[HttpRouteDomainInfos] = None,
        environment_info: HttpRouteEnvironmentInfo = None,
        match: HttpRouteMatch = None,
        name: str = None,
        route_id: str = None,
        update_timestamp: int = None,
    ):
        self.backend = backend
        self.create_timestamp = create_timestamp
        self.deploy_status = deploy_status
        self.description = description
        self.domain_infos = domain_infos
        self.environment_info = environment_info
        self.match = match
        self.name = name
        self.route_id = route_id
        self.update_timestamp = update_timestamp

    def validate(self):
        if self.backend:
            self.backend.validate()
        if self.domain_infos:
            for k in self.domain_infos:
                if k:
                    k.validate()
        if self.environment_info:
            self.environment_info.validate()
        if self.match:
            self.match.validate()

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

        result = dict()
        if self.backend is not None:
            result['backend'] = self.backend.to_map()
        if self.create_timestamp is not None:
            result['createTimestamp'] = self.create_timestamp
        if self.deploy_status is not None:
            result['deployStatus'] = self.deploy_status
        if self.description is not None:
            result['description'] = self.description
        result['domainInfos'] = []
        if self.domain_infos is not None:
            for k in self.domain_infos:
                result['domainInfos'].append(k.to_map() if k else None)
        if self.environment_info is not None:
            result['environmentInfo'] = self.environment_info.to_map()
        if self.match is not None:
            result['match'] = self.match.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.route_id is not None:
            result['routeId'] = self.route_id
        if self.update_timestamp is not None:
            result['updateTimestamp'] = self.update_timestamp
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('backend') is not None:
            temp_model = Backend()
            self.backend = temp_model.from_map(m['backend'])
        if m.get('createTimestamp') is not None:
            self.create_timestamp = m.get('createTimestamp')
        if m.get('deployStatus') is not None:
            self.deploy_status = m.get('deployStatus')
        if m.get('description') is not None:
            self.description = m.get('description')
        self.domain_infos = []
        if m.get('domainInfos') is not None:
            for k in m.get('domainInfos'):
                temp_model = HttpRouteDomainInfos()
                self.domain_infos.append(temp_model.from_map(k))
        if m.get('environmentInfo') is not None:
            temp_model = HttpRouteEnvironmentInfo()
            self.environment_info = temp_model.from_map(m['environmentInfo'])
        if m.get('match') is not None:
            temp_model = HttpRouteMatch()
            self.match = temp_model.from_map(m['match'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('routeId') is not None:
            self.route_id = m.get('routeId')
        if m.get('updateTimestamp') is not None:
            self.update_timestamp = m.get('updateTimestamp')
        return self


class JwtIdentityConfigJwtPayloadConfig(TeaModel):
    def __init__(
        self,
        payload_key_name: str = None,
        payload_key_value: str = None,
    ):
        self.payload_key_name = payload_key_name
        self.payload_key_value = payload_key_value

    def validate(self):
        pass

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

        result = dict()
        if self.payload_key_name is not None:
            result['payloadKeyName'] = self.payload_key_name
        if self.payload_key_value is not None:
            result['payloadKeyValue'] = self.payload_key_value
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('payloadKeyName') is not None:
            self.payload_key_name = m.get('payloadKeyName')
        if m.get('payloadKeyValue') is not None:
            self.payload_key_value = m.get('payloadKeyValue')
        return self


class JwtIdentityConfigJwtTokenConfig(TeaModel):
    def __init__(
        self,
        key: str = None,
        pass_: bool = None,
        position: str = None,
        prefix: str = None,
    ):
        self.key = key
        self.pass_ = pass_
        self.position = position
        self.prefix = prefix

    def validate(self):
        pass

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

        result = dict()
        if self.key is not None:
            result['key'] = self.key
        if self.pass_ is not None:
            result['pass'] = self.pass_
        if self.position is not None:
            result['position'] = self.position
        if self.prefix is not None:
            result['prefix'] = self.prefix
        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('pass') is not None:
            self.pass_ = m.get('pass')
        if m.get('position') is not None:
            self.position = m.get('position')
        if m.get('prefix') is not None:
            self.prefix = m.get('prefix')
        return self


class JwtIdentityConfig(TeaModel):
    def __init__(
        self,
        jwks: str = None,
        jwt_payload_config: JwtIdentityConfigJwtPayloadConfig = None,
        jwt_token_config: JwtIdentityConfigJwtTokenConfig = None,
        secret_type: str = None,
        type: str = None,
    ):
        self.jwks = jwks
        self.jwt_payload_config = jwt_payload_config
        self.jwt_token_config = jwt_token_config
        self.secret_type = secret_type
        self.type = type

    def validate(self):
        if self.jwt_payload_config:
            self.jwt_payload_config.validate()
        if self.jwt_token_config:
            self.jwt_token_config.validate()

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

        result = dict()
        if self.jwks is not None:
            result['jwks'] = self.jwks
        if self.jwt_payload_config is not None:
            result['jwtPayloadConfig'] = self.jwt_payload_config.to_map()
        if self.jwt_token_config is not None:
            result['jwtTokenConfig'] = self.jwt_token_config.to_map()
        if self.secret_type is not None:
            result['secretType'] = self.secret_type
        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('jwks') is not None:
            self.jwks = m.get('jwks')
        if m.get('jwtPayloadConfig') is not None:
            temp_model = JwtIdentityConfigJwtPayloadConfig()
            self.jwt_payload_config = temp_model.from_map(m['jwtPayloadConfig'])
        if m.get('jwtTokenConfig') is not None:
            temp_model = JwtIdentityConfigJwtTokenConfig()
            self.jwt_token_config = temp_model.from_map(m['jwtTokenConfig'])
        if m.get('secretType') is not None:
            self.secret_type = m.get('secretType')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class PolicyClassInfo(TeaModel):
    def __init__(
        self,
        alias: str = None,
        attachable_resource_types: List[str] = None,
        class_id: str = None,
        config_example: str = None,
        deprecated: bool = None,
        description: str = None,
        direction: str = None,
        enable_log: bool = None,
        execute_priority: str = None,
        execute_stage: str = None,
        name: str = None,
        type: str = None,
        version: str = None,
    ):
        self.alias = alias
        self.attachable_resource_types = attachable_resource_types
        self.class_id = class_id
        self.config_example = config_example
        self.deprecated = deprecated
        self.description = description
        self.direction = direction
        self.enable_log = enable_log
        self.execute_priority = execute_priority
        self.execute_stage = execute_stage
        self.name = name
        self.type = type
        self.version = version

    def validate(self):
        pass

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

        result = dict()
        if self.alias is not None:
            result['alias'] = self.alias
        if self.attachable_resource_types is not None:
            result['attachableResourceTypes'] = self.attachable_resource_types
        if self.class_id is not None:
            result['classId'] = self.class_id
        if self.config_example is not None:
            result['configExample'] = self.config_example
        if self.deprecated is not None:
            result['deprecated'] = self.deprecated
        if self.description is not None:
            result['description'] = self.description
        if self.direction is not None:
            result['direction'] = self.direction
        if self.enable_log is not None:
            result['enableLog'] = self.enable_log
        if self.execute_priority is not None:
            result['executePriority'] = self.execute_priority
        if self.execute_stage is not None:
            result['executeStage'] = self.execute_stage
        if self.name is not None:
            result['name'] = self.name
        if self.type is not None:
            result['type'] = self.type
        if self.version is not None:
            result['version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alias') is not None:
            self.alias = m.get('alias')
        if m.get('attachableResourceTypes') is not None:
            self.attachable_resource_types = m.get('attachableResourceTypes')
        if m.get('classId') is not None:
            self.class_id = m.get('classId')
        if m.get('configExample') is not None:
            self.config_example = m.get('configExample')
        if m.get('deprecated') is not None:
            self.deprecated = m.get('deprecated')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('direction') is not None:
            self.direction = m.get('direction')
        if m.get('enableLog') is not None:
            self.enable_log = m.get('enableLog')
        if m.get('executePriority') is not None:
            self.execute_priority = m.get('executePriority')
        if m.get('executeStage') is not None:
            self.execute_stage = m.get('executeStage')
        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('version') is not None:
            self.version = m.get('version')
        return self


class PolicyDetailInfo(TeaModel):
    def __init__(
        self,
        class_id: str = None,
        class_name: str = None,
        config: str = None,
        description: str = None,
        name: str = None,
        policy_id: str = None,
    ):
        self.class_id = class_id
        self.class_name = class_name
        self.config = config
        self.description = description
        self.name = name
        self.policy_id = policy_id

    def validate(self):
        pass

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

        result = dict()
        if self.class_id is not None:
            result['classId'] = self.class_id
        if self.class_name is not None:
            result['className'] = self.class_name
        if self.config is not None:
            result['config'] = self.config
        if self.description is not None:
            result['description'] = self.description
        if self.name is not None:
            result['name'] = self.name
        if self.policy_id is not None:
            result['policyId'] = self.policy_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('classId') is not None:
            self.class_id = m.get('classId')
        if m.get('className') is not None:
            self.class_name = m.get('className')
        if m.get('config') is not None:
            self.config = m.get('config')
        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('policyId') is not None:
            self.policy_id = m.get('policyId')
        return self


class PolicyInfo(TeaModel):
    def __init__(
        self,
        attachments: List[Attachment] = None,
        class_alias: str = None,
        class_name: str = None,
        config: str = None,
        direction: str = None,
        execute_priority: str = None,
        execute_stage: str = None,
        name: str = None,
        policy_id: str = None,
        type: str = None,
    ):
        self.attachments = attachments
        self.class_alias = class_alias
        self.class_name = class_name
        self.config = config
        self.direction = direction
        self.execute_priority = execute_priority
        self.execute_stage = execute_stage
        self.name = name
        self.policy_id = policy_id
        self.type = type

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

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

        result = dict()
        result['attachments'] = []
        if self.attachments is not None:
            for k in self.attachments:
                result['attachments'].append(k.to_map() if k else None)
        if self.class_alias is not None:
            result['classAlias'] = self.class_alias
        if self.class_name is not None:
            result['className'] = self.class_name
        if self.config is not None:
            result['config'] = self.config
        if self.direction is not None:
            result['direction'] = self.direction
        if self.execute_priority is not None:
            result['executePriority'] = self.execute_priority
        if self.execute_stage is not None:
            result['executeStage'] = self.execute_stage
        if self.name is not None:
            result['name'] = self.name
        if self.policy_id is not None:
            result['policyId'] = self.policy_id
        if self.type is not None:
            result['type'] = self.type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.attachments = []
        if m.get('attachments') is not None:
            for k in m.get('attachments'):
                temp_model = Attachment()
                self.attachments.append(temp_model.from_map(k))
        if m.get('classAlias') is not None:
            self.class_alias = m.get('classAlias')
        if m.get('className') is not None:
            self.class_name = m.get('className')
        if m.get('config') is not None:
            self.config = m.get('config')
        if m.get('direction') is not None:
            self.direction = m.get('direction')
        if m.get('executePriority') is not None:
            self.execute_priority = m.get('executePriority')
        if m.get('executeStage') is not None:
            self.execute_stage = m.get('executeStage')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('policyId') is not None:
            self.policy_id = m.get('policyId')
        if m.get('type') is not None:
            self.type = m.get('type')
        return self


class ResourceStatistic(TeaModel):
    def __init__(
        self,
        resource_count: int = None,
        resource_type: str = None,
    ):
        self.resource_count = resource_count
        self.resource_type = resource_type

    def validate(self):
        pass

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

        result = dict()
        if self.resource_count is not None:
            result['resourceCount'] = self.resource_count
        if self.resource_type is not None:
            result['resourceType'] = self.resource_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('resourceCount') is not None:
            self.resource_count = m.get('resourceCount')
        if m.get('resourceType') is not None:
            self.resource_type = m.get('resourceType')
        return self


class ServicePorts(TeaModel):
    def __init__(
        self,
        name: str = None,
        port: int = None,
        protocol: str = None,
    ):
        self.name = name
        self.port = port
        self.protocol = protocol

    def validate(self):
        pass

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

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


class ServiceHealthCheck(TeaModel):
    def __init__(
        self,
        enable: bool = None,
        healthy_threshold: int = None,
        http_host: str = None,
        http_path: str = None,
        interval: int = None,
        protocol: str = None,
        timeout: int = None,
        unhealthy_threshold: int = None,
    ):
        self.enable = enable
        self.healthy_threshold = healthy_threshold
        self.http_host = http_host
        self.http_path = http_path
        self.interval = interval
        self.protocol = protocol
        self.timeout = timeout
        self.unhealthy_threshold = unhealthy_threshold

    def validate(self):
        pass

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

        result = dict()
        if self.enable is not None:
            result['enable'] = self.enable
        if self.healthy_threshold is not None:
            result['healthyThreshold'] = self.healthy_threshold
        if self.http_host is not None:
            result['httpHost'] = self.http_host
        if self.http_path is not None:
            result['httpPath'] = self.http_path
        if self.interval is not None:
            result['interval'] = self.interval
        if self.protocol is not None:
            result['protocol'] = self.protocol
        if self.timeout is not None:
            result['timeout'] = self.timeout
        if self.unhealthy_threshold is not None:
            result['unhealthyThreshold'] = self.unhealthy_threshold
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('enable') is not None:
            self.enable = m.get('enable')
        if m.get('healthyThreshold') is not None:
            self.healthy_threshold = m.get('healthyThreshold')
        if m.get('httpHost') is not None:
            self.http_host = m.get('httpHost')
        if m.get('httpPath') is not None:
            self.http_path = m.get('httpPath')
        if m.get('interval') is not None:
            self.interval = m.get('interval')
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        if m.get('timeout') is not None:
            self.timeout = m.get('timeout')
        if m.get('unhealthyThreshold') is not None:
            self.unhealthy_threshold = m.get('unhealthyThreshold')
        return self


class Service(TeaModel):
    def __init__(
        self,
        addresses: List[str] = None,
        ai_service_config: AiServiceConfig = None,
        create_timestamp: int = None,
        gateway_id: str = None,
        group_name: str = None,
        health_check: ServiceHealthCheck = None,
        health_status: str = None,
        name: str = None,
        namespace: str = None,
        ports: List[ServicePorts] = None,
        protocol: str = None,
        qualifier: str = None,
        resource_group_id: str = None,
        service_id: str = None,
        source_type: str = None,
        unhealthy_endpoints: List[str] = None,
        update_timestamp: int = None,
    ):
        self.addresses = addresses
        self.ai_service_config = ai_service_config
        self.create_timestamp = create_timestamp
        self.gateway_id = gateway_id
        self.group_name = group_name
        self.health_check = health_check
        self.health_status = health_status
        self.name = name
        self.namespace = namespace
        self.ports = ports
        self.protocol = protocol
        self.qualifier = qualifier
        self.resource_group_id = resource_group_id
        self.service_id = service_id
        self.source_type = source_type
        self.unhealthy_endpoints = unhealthy_endpoints
        self.update_timestamp = update_timestamp

    def validate(self):
        if self.ai_service_config:
            self.ai_service_config.validate()
        if self.health_check:
            self.health_check.validate()
        if self.ports:
            for k in self.ports:
                if k:
                    k.validate()

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

        result = dict()
        if self.addresses is not None:
            result['addresses'] = self.addresses
        if self.ai_service_config is not None:
            result['aiServiceConfig'] = self.ai_service_config.to_map()
        if self.create_timestamp is not None:
            result['createTimestamp'] = self.create_timestamp
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_id
        if self.group_name is not None:
            result['groupName'] = self.group_name
        if self.health_check is not None:
            result['healthCheck'] = self.health_check.to_map()
        if self.health_status is not None:
            result['healthStatus'] = self.health_status
        if self.name is not None:
            result['name'] = self.name
        if self.namespace is not None:
            result['namespace'] = self.namespace
        result['ports'] = []
        if self.ports is not None:
            for k in self.ports:
                result['ports'].append(k.to_map() if k else None)
        if self.protocol is not None:
            result['protocol'] = self.protocol
        if self.qualifier is not None:
            result['qualifier'] = self.qualifier
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.service_id is not None:
            result['serviceId'] = self.service_id
        if self.source_type is not None:
            result['sourceType'] = self.source_type
        if self.unhealthy_endpoints is not None:
            result['unhealthyEndpoints'] = self.unhealthy_endpoints
        if self.update_timestamp is not None:
            result['updateTimestamp'] = self.update_timestamp
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('addresses') is not None:
            self.addresses = m.get('addresses')
        if m.get('aiServiceConfig') is not None:
            temp_model = AiServiceConfig()
            self.ai_service_config = temp_model.from_map(m['aiServiceConfig'])
        if m.get('createTimestamp') is not None:
            self.create_timestamp = m.get('createTimestamp')
        if m.get('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        if m.get('groupName') is not None:
            self.group_name = m.get('groupName')
        if m.get('healthCheck') is not None:
            temp_model = ServiceHealthCheck()
            self.health_check = temp_model.from_map(m['healthCheck'])
        if m.get('healthStatus') is not None:
            self.health_status = m.get('healthStatus')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('namespace') is not None:
            self.namespace = m.get('namespace')
        self.ports = []
        if m.get('ports') is not None:
            for k in m.get('ports'):
                temp_model = ServicePorts()
                self.ports.append(temp_model.from_map(k))
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        if m.get('qualifier') is not None:
            self.qualifier = m.get('qualifier')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('serviceId') is not None:
            self.service_id = m.get('serviceId')
        if m.get('sourceType') is not None:
            self.source_type = m.get('sourceType')
        if m.get('unhealthyEndpoints') is not None:
            self.unhealthy_endpoints = m.get('unhealthyEndpoints')
        if m.get('updateTimestamp') is not None:
            self.update_timestamp = m.get('updateTimestamp')
        return self


class ServiceLinkedRole(TeaModel):
    def __init__(
        self,
        arn: str = None,
        assume_role_policy_document: str = None,
        create_date: str = None,
        description: str = None,
        is_service_linked_role: bool = None,
        role_id: str = None,
        role_name: str = None,
        role_principal_name: str = None,
    ):
        self.arn = arn
        self.assume_role_policy_document = assume_role_policy_document
        self.create_date = create_date
        self.description = description
        self.is_service_linked_role = is_service_linked_role
        self.role_id = role_id
        self.role_name = role_name
        self.role_principal_name = role_principal_name

    def validate(self):
        pass

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

        result = dict()
        if self.arn is not None:
            result['arn'] = self.arn
        if self.assume_role_policy_document is not None:
            result['assumeRolePolicyDocument'] = self.assume_role_policy_document
        if self.create_date is not None:
            result['createDate'] = self.create_date
        if self.description is not None:
            result['description'] = self.description
        if self.is_service_linked_role is not None:
            result['isServiceLinkedRole'] = self.is_service_linked_role
        if self.role_id is not None:
            result['roleId'] = self.role_id
        if self.role_name is not None:
            result['roleName'] = self.role_name
        if self.role_principal_name is not None:
            result['rolePrincipalName'] = self.role_principal_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('arn') is not None:
            self.arn = m.get('arn')
        if m.get('assumeRolePolicyDocument') is not None:
            self.assume_role_policy_document = m.get('assumeRolePolicyDocument')
        if m.get('createDate') is not None:
            self.create_date = m.get('createDate')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('isServiceLinkedRole') is not None:
            self.is_service_linked_role = m.get('isServiceLinkedRole')
        if m.get('roleId') is not None:
            self.role_id = m.get('roleId')
        if m.get('roleName') is not None:
            self.role_name = m.get('roleName')
        if m.get('rolePrincipalName') is not None:
            self.role_principal_name = m.get('rolePrincipalName')
        return self


class SslCertMetaInfo(TeaModel):
    def __init__(
        self,
        algorithm: str = None,
        cert_id: int = None,
        cert_identifier: str = None,
        cert_name: str = None,
        common_name: str = None,
        domain: str = None,
        domain_match_cert: bool = None,
        fingerprint: str = None,
        instance_id: str = None,
        is_chain_completed: bool = None,
        issuer: str = None,
        key_size: str = None,
        md_5: str = None,
        not_after_timestamp: int = None,
        not_before_timestamp: int = None,
        sans: str = None,
        serial_no: str = None,
        sha_2: str = None,
        sign_algorithm: str = None,
    ):
        self.algorithm = algorithm
        self.cert_id = cert_id
        self.cert_identifier = cert_identifier
        self.cert_name = cert_name
        self.common_name = common_name
        self.domain = domain
        self.domain_match_cert = domain_match_cert
        self.fingerprint = fingerprint
        self.instance_id = instance_id
        self.is_chain_completed = is_chain_completed
        self.issuer = issuer
        self.key_size = key_size
        self.md_5 = md_5
        self.not_after_timestamp = not_after_timestamp
        self.not_before_timestamp = not_before_timestamp
        self.sans = sans
        self.serial_no = serial_no
        self.sha_2 = sha_2
        self.sign_algorithm = sign_algorithm

    def validate(self):
        pass

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

        result = dict()
        if self.algorithm is not None:
            result['algorithm'] = self.algorithm
        if self.cert_id is not None:
            result['certId'] = self.cert_id
        if self.cert_identifier is not None:
            result['certIdentifier'] = self.cert_identifier
        if self.cert_name is not None:
            result['certName'] = self.cert_name
        if self.common_name is not None:
            result['commonName'] = self.common_name
        if self.domain is not None:
            result['domain'] = self.domain
        if self.domain_match_cert is not None:
            result['domainMatchCert'] = self.domain_match_cert
        if self.fingerprint is not None:
            result['fingerprint'] = self.fingerprint
        if self.instance_id is not None:
            result['instanceId'] = self.instance_id
        if self.is_chain_completed is not None:
            result['isChainCompleted'] = self.is_chain_completed
        if self.issuer is not None:
            result['issuer'] = self.issuer
        if self.key_size is not None:
            result['keySize'] = self.key_size
        if self.md_5 is not None:
            result['md5'] = self.md_5
        if self.not_after_timestamp is not None:
            result['notAfterTimestamp'] = self.not_after_timestamp
        if self.not_before_timestamp is not None:
            result['notBeforeTimestamp'] = self.not_before_timestamp
        if self.sans is not None:
            result['sans'] = self.sans
        if self.serial_no is not None:
            result['serialNo'] = self.serial_no
        if self.sha_2 is not None:
            result['sha2'] = self.sha_2
        if self.sign_algorithm is not None:
            result['signAlgorithm'] = self.sign_algorithm
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('algorithm') is not None:
            self.algorithm = m.get('algorithm')
        if m.get('certId') is not None:
            self.cert_id = m.get('certId')
        if m.get('certIdentifier') is not None:
            self.cert_identifier = m.get('certIdentifier')
        if m.get('certName') is not None:
            self.cert_name = m.get('certName')
        if m.get('commonName') is not None:
            self.common_name = m.get('commonName')
        if m.get('domain') is not None:
            self.domain = m.get('domain')
        if m.get('domainMatchCert') is not None:
            self.domain_match_cert = m.get('domainMatchCert')
        if m.get('fingerprint') is not None:
            self.fingerprint = m.get('fingerprint')
        if m.get('instanceId') is not None:
            self.instance_id = m.get('instanceId')
        if m.get('isChainCompleted') is not None:
            self.is_chain_completed = m.get('isChainCompleted')
        if m.get('issuer') is not None:
            self.issuer = m.get('issuer')
        if m.get('keySize') is not None:
            self.key_size = m.get('keySize')
        if m.get('md5') is not None:
            self.md_5 = m.get('md5')
        if m.get('notAfterTimestamp') is not None:
            self.not_after_timestamp = m.get('notAfterTimestamp')
        if m.get('notBeforeTimestamp') is not None:
            self.not_before_timestamp = m.get('notBeforeTimestamp')
        if m.get('sans') is not None:
            self.sans = m.get('sans')
        if m.get('serialNo') is not None:
            self.serial_no = m.get('serialNo')
        if m.get('sha2') is not None:
            self.sha_2 = m.get('sha2')
        if m.get('signAlgorithm') is not None:
            self.sign_algorithm = m.get('signAlgorithm')
        return self


class AddGatewaySecurityGroupRuleRequest(TeaModel):
    def __init__(
        self,
        description: str = None,
        port_ranges: List[str] = None,
        security_group_id: str = None,
    ):
        # Description of the security group rule.
        self.description = description
        # Port ranges.
        self.port_ranges = port_ranges
        # Security group ID.
        self.security_group_id = security_group_id

    def validate(self):
        pass

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

        result = dict()
        if self.description is not None:
            result['description'] = self.description
        if self.port_ranges is not None:
            result['portRanges'] = self.port_ranges
        if self.security_group_id is not None:
            result['securityGroupId'] = self.security_group_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('portRanges') is not None:
            self.port_ranges = m.get('portRanges')
        if m.get('securityGroupId') is not None:
            self.security_group_id = m.get('securityGroupId')
        return self


class AddGatewaySecurityGroupRuleResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response status code.
        self.code = code
        # Response message.
        self.message = message
        # Request ID.
        self.request_id = request_id

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class CreateDomainRequest(TeaModel):
    def __init__(
        self,
        ca_cert_identifier: str = None,
        cert_identifier: str = None,
        force_https: bool = None,
        http_2option: str = None,
        name: str = None,
        protocol: str = None,
        resource_group_id: str = None,
        tls_max: str = None,
        tls_min: str = None,
    ):
        # CA Certificate Identifier.
        self.ca_cert_identifier = ca_cert_identifier
        # Certificate Unique Identifier.
        self.cert_identifier = cert_identifier
        # Set the HTTPS protocol type, whether to enable forced HTTPS redirection.
        self.force_https = force_https
        # HTTP/2 settings.
        self.http_2option = http_2option
        # Domain name.
        # 
        # This parameter is required.
        self.name = name
        # The protocol type supported by the domain.
        # 
        # - HTTP: Supports only HTTP protocol.
        # - HTTPS: Supports only HTTPS protocol.
        # 
        # This parameter is required.
        self.protocol = protocol
        self.resource_group_id = resource_group_id
        # Maximum TLS protocol version, supports up to TLS 1.3.
        self.tls_max = tls_max
        # Minimum TLS protocol version, supports down to TLS 1.0.
        self.tls_min = tls_min

    def validate(self):
        pass

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

        result = dict()
        if self.ca_cert_identifier is not None:
            result['caCertIdentifier'] = self.ca_cert_identifier
        if self.cert_identifier is not None:
            result['certIdentifier'] = self.cert_identifier
        if self.force_https is not None:
            result['forceHttps'] = self.force_https
        if self.http_2option is not None:
            result['http2Option'] = self.http_2option
        if self.name is not None:
            result['name'] = self.name
        if self.protocol is not None:
            result['protocol'] = self.protocol
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.tls_max is not None:
            result['tlsMax'] = self.tls_max
        if self.tls_min is not None:
            result['tlsMin'] = self.tls_min
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('caCertIdentifier') is not None:
            self.ca_cert_identifier = m.get('caCertIdentifier')
        if m.get('certIdentifier') is not None:
            self.cert_identifier = m.get('certIdentifier')
        if m.get('forceHttps') is not None:
            self.force_https = m.get('forceHttps')
        if m.get('http2Option') is not None:
            self.http_2option = m.get('http2Option')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('tlsMax') is not None:
            self.tls_max = m.get('tlsMax')
        if m.get('tlsMin') is not None:
            self.tls_min = m.get('tlsMin')
        return self


class CreateDomainResponseBodyData(TeaModel):
    def __init__(
        self,
        domain_id: str = None,
    ):
        # Domain ID.
        self.domain_id = domain_id

    def validate(self):
        pass

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

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

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


class CreateDomainResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: CreateDomainResponseBodyData = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response code.
        self.code = code
        # Response data.
        self.data = data
        # Response message.
        self.message = message
        # Request ID, used for tracing the API call chain.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class CreateEnvironmentRequest(TeaModel):
    def __init__(
        self,
        alias: str = None,
        description: str = None,
        gateway_id: str = None,
        name: str = None,
        resource_group_id: str = None,
    ):
        # Environment alias.
        # 
        # This parameter is required.
        self.alias = alias
        # Description of the environment, which can include information such as the purpose of the environment and its owner.
        self.description = description
        # Gateway ID.
        # 
        # This parameter is required.
        self.gateway_id = gateway_id
        # Environment name.
        # 
        # This parameter is required.
        self.name = name
        self.resource_group_id = resource_group_id

    def validate(self):
        pass

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

        result = dict()
        if self.alias is not None:
            result['alias'] = self.alias
        if self.description is not None:
            result['description'] = self.description
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_id
        if self.name is not None:
            result['name'] = self.name
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('alias') is not None:
            self.alias = m.get('alias')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        return self


class CreateEnvironmentResponseBodyData(TeaModel):
    def __init__(
        self,
        environment_id: str = None,
    ):
        # Environment ID.
        self.environment_id = environment_id

    def validate(self):
        pass

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

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

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


class CreateEnvironmentResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: CreateEnvironmentResponseBodyData = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response code.
        self.code = code
        # Response data.
        self.data = data
        # Response message.
        self.message = message
        # Request ID, used for tracing the API call chain.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class CreateHttpApiRequestIngressConfig(TeaModel):
    def __init__(
        self,
        environment_id: str = None,
        ingress_class: str = None,
        override_ingress_ip: bool = None,
        source_id: str = None,
        watch_namespace: str = None,
    ):
        # Environment ID.
        self.environment_id = environment_id
        # Ingress Class being listened to.
        self.ingress_class = ingress_class
        # Whether to update the address in the Ingress Status.
        self.override_ingress_ip = override_ingress_ip
        # Source ID.
        self.source_id = source_id
        # Namespace being watched.
        self.watch_namespace = watch_namespace

    def validate(self):
        pass

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

        result = dict()
        if self.environment_id is not None:
            result['environmentId'] = self.environment_id
        if self.ingress_class is not None:
            result['ingressClass'] = self.ingress_class
        if self.override_ingress_ip is not None:
            result['overrideIngressIp'] = self.override_ingress_ip
        if self.source_id is not None:
            result['sourceId'] = self.source_id
        if self.watch_namespace is not None:
            result['watchNamespace'] = self.watch_namespace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('ingressClass') is not None:
            self.ingress_class = m.get('ingressClass')
        if m.get('overrideIngressIp') is not None:
            self.override_ingress_ip = m.get('overrideIngressIp')
        if m.get('sourceId') is not None:
            self.source_id = m.get('sourceId')
        if m.get('watchNamespace') is not None:
            self.watch_namespace = m.get('watchNamespace')
        return self


class CreateHttpApiRequest(TeaModel):
    def __init__(
        self,
        ai_protocols: List[str] = None,
        base_path: str = None,
        deploy_configs: List[HttpApiDeployConfig] = None,
        description: str = None,
        ingress_config: CreateHttpApiRequestIngressConfig = None,
        name: str = None,
        protocols: List[str] = None,
        resource_group_id: str = None,
        type: str = None,
        version_config: HttpApiVersionConfig = None,
    ):
        self.ai_protocols = ai_protocols
        # Base path of the API, which must start with a \\"/\\".
        self.base_path = base_path
        self.deploy_configs = deploy_configs
        # Description of the API.
        self.description = description
        # Configuration information for the HTTP Ingress API.
        self.ingress_config = ingress_config
        # Name of the API.
        # 
        # This parameter is required.
        self.name = name
        # List of API access protocols.
        self.protocols = protocols
        self.resource_group_id = resource_group_id
        # Type of the HTTP API.
        # - Http
        # - Rest
        # - WebSocket
        # - HttpIngress
        self.type = type
        # Versioning configuration for the API.
        self.version_config = version_config

    def validate(self):
        if self.deploy_configs:
            for k in self.deploy_configs:
                if k:
                    k.validate()
        if self.ingress_config:
            self.ingress_config.validate()
        if self.version_config:
            self.version_config.validate()

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

        result = dict()
        if self.ai_protocols is not None:
            result['aiProtocols'] = self.ai_protocols
        if self.base_path is not None:
            result['basePath'] = self.base_path
        result['deployConfigs'] = []
        if self.deploy_configs is not None:
            for k in self.deploy_configs:
                result['deployConfigs'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.ingress_config is not None:
            result['ingressConfig'] = self.ingress_config.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.protocols is not None:
            result['protocols'] = self.protocols
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.type is not None:
            result['type'] = self.type
        if self.version_config is not None:
            result['versionConfig'] = self.version_config.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aiProtocols') is not None:
            self.ai_protocols = m.get('aiProtocols')
        if m.get('basePath') is not None:
            self.base_path = m.get('basePath')
        self.deploy_configs = []
        if m.get('deployConfigs') is not None:
            for k in m.get('deployConfigs'):
                temp_model = HttpApiDeployConfig()
                self.deploy_configs.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('ingressConfig') is not None:
            temp_model = CreateHttpApiRequestIngressConfig()
            self.ingress_config = temp_model.from_map(m['ingressConfig'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('protocols') is not None:
            self.protocols = m.get('protocols')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('type') is not None:
            self.type = m.get('type')
        if m.get('versionConfig') is not None:
            temp_model = HttpApiVersionConfig()
            self.version_config = temp_model.from_map(m['versionConfig'])
        return self


class CreateHttpApiResponseBodyData(TeaModel):
    def __init__(
        self,
        http_api_id: str = None,
        name: str = None,
    ):
        # HTTP API ID.
        self.http_api_id = http_api_id
        # Name of the API.
        self.name = name

    def validate(self):
        pass

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

        result = dict()
        if self.http_api_id is not None:
            result['httpApiId'] = self.http_api_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('httpApiId') is not None:
            self.http_api_id = m.get('httpApiId')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class CreateHttpApiResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: CreateHttpApiResponseBodyData = None,
        message: str = None,
        request_id: str = None,
    ):
        # Status code.
        self.code = code
        # API information.
        self.data = data
        # Response message.
        self.message = message
        # Request ID.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class CreateHttpApiOperationRequest(TeaModel):
    def __init__(
        self,
        operations: List[HttpApiOperation] = None,
    ):
        # List of operation definitions.
        self.operations = operations

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

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

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

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


class CreateHttpApiOperationResponseBodyDataOperations(TeaModel):
    def __init__(
        self,
        operation_id: str = None,
    ):
        # Operation ID.
        self.operation_id = operation_id

    def validate(self):
        pass

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

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

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


class CreateHttpApiOperationResponseBodyData(TeaModel):
    def __init__(
        self,
        operations: List[CreateHttpApiOperationResponseBodyDataOperations] = None,
    ):
        # Operation information.
        self.operations = operations

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

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

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

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


class CreateHttpApiOperationResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: CreateHttpApiOperationResponseBodyData = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response status code.
        self.code = code
        # Operation information.
        self.data = data
        # Response message.
        self.message = message
        # Request ID.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class DeleteDomainResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response code.
        self.code = code
        # Response message.
        self.message = message
        # Request ID, used for tracing the API call chain.
        self.request_id = request_id

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class DeleteEnvironmentResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response code.
        self.code = code
        # Response message.
        self.message = message
        # Request ID, used for tracing the request chain.
        self.request_id = request_id

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class DeleteGatewayResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response status code.
        self.code = code
        # Response message.
        self.message = message
        # Request ID.
        self.request_id = request_id

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class DeleteHttpApiResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response status code.
        self.code = code
        # Response message.
        self.message = message
        # Request ID.
        self.request_id = request_id

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class DeleteHttpApiOperationResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response status code.
        self.code = code
        # Response message,
        self.message = message
        # Request ID.
        self.request_id = request_id

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class GetDomainRequest(TeaModel):
    def __init__(
        self,
        with_statistics: bool = None,
    ):
        self.with_statistics = with_statistics

    def validate(self):
        pass

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

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

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


class GetDomainResponseBodyDataStatisticsInfo(TeaModel):
    def __init__(
        self,
        resource_statistics: List[ResourceStatistic] = None,
        total_count: str = None,
    ):
        self.resource_statistics = resource_statistics
        self.total_count = total_count

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

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

        result = dict()
        result['resourceStatistics'] = []
        if self.resource_statistics is not None:
            for k in self.resource_statistics:
                result['resourceStatistics'].append(k.to_map() if k else None)
        if self.total_count is not None:
            result['totalCount'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.resource_statistics = []
        if m.get('resourceStatistics') is not None:
            for k in m.get('resourceStatistics'):
                temp_model = ResourceStatistic()
                self.resource_statistics.append(temp_model.from_map(k))
        if m.get('totalCount') is not None:
            self.total_count = m.get('totalCount')
        return self


class GetDomainResponseBodyData(TeaModel):
    def __init__(
        self,
        algorithm: str = None,
        ca_cert_indentifier: str = None,
        cert_indentifier: str = None,
        cert_name: str = None,
        create_from: str = None,
        create_timestamp: int = None,
        default: bool = None,
        domain_id: str = None,
        force_https: bool = None,
        http_2option: str = None,
        issuer: str = None,
        name: str = None,
        not_after_timstamp: int = None,
        not_before_timestamp: int = None,
        protocol: str = None,
        resource_group_id: str = None,
        sans: str = None,
        statistics_info: GetDomainResponseBodyDataStatisticsInfo = None,
        tls_max: str = None,
        tls_min: str = None,
        updatetimestamp: int = None,
    ):
        # Encryption algorithm name
        self.algorithm = algorithm
        # Cloud Shield CA certificate identity.
        self.ca_cert_indentifier = ca_cert_indentifier
        # Cloud Shield certificate identity.
        self.cert_indentifier = cert_indentifier
        # Certificate name
        self.cert_name = cert_name
        # Where it was created from.
        self.create_from = create_from
        # Creation timestamp.
        self.create_timestamp = create_timestamp
        # Whether it is the default domain.
        self.default = default
        # Domain ID.
        self.domain_id = domain_id
        # Setting for HTTPS protocol type, whether to enable forced HTTPS redirection.
        self.force_https = force_https
        # HTTP/2 setting.
        self.http_2option = http_2option
        # Certificate issuer.
        self.issuer = issuer
        # Domain name.
        self.name = name
        # Certificate expiration time.
        self.not_after_timstamp = not_after_timstamp
        # Certificate effective time.
        self.not_before_timestamp = not_before_timestamp
        # The protocol types supported by the domain.
        # 
        # - HTTP: Supports only HTTP protocol.
        # - HTTPS: Supports only HTTPS protocol.
        self.protocol = protocol
        self.resource_group_id = resource_group_id
        # All domain names bound to the certificate.
        self.sans = sans
        self.statistics_info = statistics_info
        # Maximum TLS protocol version, supports up to TLS 1.3.
        self.tls_max = tls_max
        # Minimum TLS protocol version, supports down to TLS 1.0.
        self.tls_min = tls_min
        # Update timestamp.
        self.updatetimestamp = updatetimestamp

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

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

        result = dict()
        if self.algorithm is not None:
            result['algorithm'] = self.algorithm
        if self.ca_cert_indentifier is not None:
            result['caCertIndentifier'] = self.ca_cert_indentifier
        if self.cert_indentifier is not None:
            result['certIndentifier'] = self.cert_indentifier
        if self.cert_name is not None:
            result['certName'] = self.cert_name
        if self.create_from is not None:
            result['createFrom'] = self.create_from
        if self.create_timestamp is not None:
            result['createTimestamp'] = self.create_timestamp
        if self.default is not None:
            result['default'] = self.default
        if self.domain_id is not None:
            result['domainId'] = self.domain_id
        if self.force_https is not None:
            result['forceHttps'] = self.force_https
        if self.http_2option is not None:
            result['http2Option'] = self.http_2option
        if self.issuer is not None:
            result['issuer'] = self.issuer
        if self.name is not None:
            result['name'] = self.name
        if self.not_after_timstamp is not None:
            result['notAfterTimstamp'] = self.not_after_timstamp
        if self.not_before_timestamp is not None:
            result['notBeforeTimestamp'] = self.not_before_timestamp
        if self.protocol is not None:
            result['protocol'] = self.protocol
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.sans is not None:
            result['sans'] = self.sans
        if self.statistics_info is not None:
            result['statisticsInfo'] = self.statistics_info.to_map()
        if self.tls_max is not None:
            result['tlsMax'] = self.tls_max
        if self.tls_min is not None:
            result['tlsMin'] = self.tls_min
        if self.updatetimestamp is not None:
            result['updatetimestamp'] = self.updatetimestamp
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('algorithm') is not None:
            self.algorithm = m.get('algorithm')
        if m.get('caCertIndentifier') is not None:
            self.ca_cert_indentifier = m.get('caCertIndentifier')
        if m.get('certIndentifier') is not None:
            self.cert_indentifier = m.get('certIndentifier')
        if m.get('certName') is not None:
            self.cert_name = m.get('certName')
        if m.get('createFrom') is not None:
            self.create_from = m.get('createFrom')
        if m.get('createTimestamp') is not None:
            self.create_timestamp = m.get('createTimestamp')
        if m.get('default') is not None:
            self.default = m.get('default')
        if m.get('domainId') is not None:
            self.domain_id = m.get('domainId')
        if m.get('forceHttps') is not None:
            self.force_https = m.get('forceHttps')
        if m.get('http2Option') is not None:
            self.http_2option = m.get('http2Option')
        if m.get('issuer') is not None:
            self.issuer = m.get('issuer')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('notAfterTimstamp') is not None:
            self.not_after_timstamp = m.get('notAfterTimstamp')
        if m.get('notBeforeTimestamp') is not None:
            self.not_before_timestamp = m.get('notBeforeTimestamp')
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('sans') is not None:
            self.sans = m.get('sans')
        if m.get('statisticsInfo') is not None:
            temp_model = GetDomainResponseBodyDataStatisticsInfo()
            self.statistics_info = temp_model.from_map(m['statisticsInfo'])
        if m.get('tlsMax') is not None:
            self.tls_max = m.get('tlsMax')
        if m.get('tlsMin') is not None:
            self.tls_min = m.get('tlsMin')
        if m.get('updatetimestamp') is not None:
            self.updatetimestamp = m.get('updatetimestamp')
        return self


class GetDomainResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: GetDomainResponseBodyData = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response code.
        self.code = code
        # Response data.
        self.data = data
        # Response message.
        self.message = message
        # Request ID, used for tracing the API call chain.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class GetEnvironmentRequest(TeaModel):
    def __init__(
        self,
        with_statistics: bool = None,
        with_vpc_info: bool = None,
    ):
        self.with_statistics = with_statistics
        # Option for vpc info.
        self.with_vpc_info = with_vpc_info

    def validate(self):
        pass

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

        result = dict()
        if self.with_statistics is not None:
            result['withStatistics'] = self.with_statistics
        if self.with_vpc_info is not None:
            result['withVpcInfo'] = self.with_vpc_info
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('withStatistics') is not None:
            self.with_statistics = m.get('withStatistics')
        if m.get('withVpcInfo') is not None:
            self.with_vpc_info = m.get('withVpcInfo')
        return self


class GetEnvironmentResponseBodyDataStatisticsInfo(TeaModel):
    def __init__(
        self,
        resource_statistics: List[ResourceStatistic] = None,
        total_count: int = None,
    ):
        self.resource_statistics = resource_statistics
        self.total_count = total_count

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

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

        result = dict()
        result['resourceStatistics'] = []
        if self.resource_statistics is not None:
            for k in self.resource_statistics:
                result['resourceStatistics'].append(k.to_map() if k else None)
        if self.total_count is not None:
            result['totalCount'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.resource_statistics = []
        if m.get('resourceStatistics') is not None:
            for k in m.get('resourceStatistics'):
                temp_model = ResourceStatistic()
                self.resource_statistics.append(temp_model.from_map(k))
        if m.get('totalCount') is not None:
            self.total_count = m.get('totalCount')
        return self


class GetEnvironmentResponseBodyData(TeaModel):
    def __init__(
        self,
        alias: str = None,
        create_timestamp: int = None,
        default: bool = None,
        description: str = None,
        environment_id: str = None,
        gateway_info: GatewayInfo = None,
        name: str = None,
        resource_group_id: str = None,
        statistics_info: GetEnvironmentResponseBodyDataStatisticsInfo = None,
        sub_domain_infos: List[SubDomainInfo] = None,
        update_timestamp: int = None,
    ):
        # Environment alias.
        self.alias = alias
        # Creation timestamp.
        self.create_timestamp = create_timestamp
        # Whether it is the default environment.
        self.default = default
        # Environment description.
        self.description = description
        # Environment ID.
        self.environment_id = environment_id
        # Gateway information
        self.gateway_info = gateway_info
        # Environment name.
        self.name = name
        self.resource_group_id = resource_group_id
        self.statistics_info = statistics_info
        # List of subdomains.
        self.sub_domain_infos = sub_domain_infos
        # Update timestamp.
        self.update_timestamp = update_timestamp

    def validate(self):
        if self.gateway_info:
            self.gateway_info.validate()
        if self.statistics_info:
            self.statistics_info.validate()
        if self.sub_domain_infos:
            for k in self.sub_domain_infos:
                if k:
                    k.validate()

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

        result = dict()
        if self.alias is not None:
            result['alias'] = self.alias
        if self.create_timestamp is not None:
            result['createTimestamp'] = self.create_timestamp
        if self.default is not None:
            result['default'] = self.default
        if self.description is not None:
            result['description'] = self.description
        if self.environment_id is not None:
            result['environmentId'] = self.environment_id
        if self.gateway_info is not None:
            result['gatewayInfo'] = self.gateway_info.to_map()
        if self.name is not None:
            result['name'] = self.name
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.statistics_info is not None:
            result['statisticsInfo'] = self.statistics_info.to_map()
        result['subDomainInfos'] = []
        if self.sub_domain_infos is not None:
            for k in self.sub_domain_infos:
                result['subDomainInfos'].append(k.to_map() if k else None)
        if self.update_timestamp is not None:
            result['updateTimestamp'] = self.update_timestamp
        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('createTimestamp') is not None:
            self.create_timestamp = m.get('createTimestamp')
        if m.get('default') is not None:
            self.default = m.get('default')
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('gatewayInfo') is not None:
            temp_model = GatewayInfo()
            self.gateway_info = temp_model.from_map(m['gatewayInfo'])
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('statisticsInfo') is not None:
            temp_model = GetEnvironmentResponseBodyDataStatisticsInfo()
            self.statistics_info = temp_model.from_map(m['statisticsInfo'])
        self.sub_domain_infos = []
        if m.get('subDomainInfos') is not None:
            for k in m.get('subDomainInfos'):
                temp_model = SubDomainInfo()
                self.sub_domain_infos.append(temp_model.from_map(k))
        if m.get('updateTimestamp') is not None:
            self.update_timestamp = m.get('updateTimestamp')
        return self


class GetEnvironmentResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: GetEnvironmentResponseBodyData = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response code.
        self.code = code
        # Response data.
        self.data = data
        # Response message.
        self.message = message
        # Request ID, used for tracing the API call chain.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class GetGatewayResponseBodyDataEnvironments(TeaModel):
    def __init__(
        self,
        alias: str = None,
        environment_id: str = None,
        name: str = None,
    ):
        # The environment alias.
        self.alias = alias
        # Environment ID.
        self.environment_id = environment_id
        # The environment name。
        self.name = name

    def validate(self):
        pass

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

        result = dict()
        if self.alias is not None:
            result['alias'] = self.alias
        if self.environment_id is not None:
            result['environmentId'] = self.environment_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('alias') is not None:
            self.alias = m.get('alias')
        if m.get('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('name') is not None:
            self.name = m.get('name')
        return self


class GetGatewayResponseBodyDataLoadBalancersPorts(TeaModel):
    def __init__(
        self,
        port: int = None,
        protocol: str = None,
    ):
        # Port number.
        self.port = port
        # Protocol:
        # - TCP
        # - UDP
        self.protocol = protocol

    def validate(self):
        pass

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

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

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


class GetGatewayResponseBodyDataLoadBalancers(TeaModel):
    def __init__(
        self,
        address: str = None,
        address_ip_version: str = None,
        address_type: str = None,
        gateway_default: bool = None,
        load_balancer_id: str = None,
        mode: str = None,
        ports: List[GetGatewayResponseBodyDataLoadBalancersPorts] = None,
        status: str = None,
        type: str = None,
    ):
        # The address of the load balancer.
        self.address = address
        # The IP version of the protocol:
        # - ipv4: IPv4 type.
        # - ipv6: IPv6 type.
        self.address_ip_version = address_ip_version
        # Load balancer address type:
        # - Internet: Public.
        # - Intranet: Private.
        self.address_type = address_type
        # Whether it is the default entry address for the gateway.
        self.gateway_default = gateway_default
        # Load balancer ID.
        self.load_balancer_id = load_balancer_id
        # The provision mode of the load balancer for the gateway:
        # - Managed: Managed by the Cloud Native API Gateway.
        self.mode = mode
        # List of listening ports.
        self.ports = ports
        # The status of the load balancer:
        # - Ready: Available.
        # - NotCreate: Not associated with an instance.
        self.status = status
        # The type of load balancer:
        # - NLB: Network Load Balancer.
        # - CLB: Classic Load Balancer.
        self.type = type

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

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

        result = dict()
        if self.address is not None:
            result['address'] = self.address
        if self.address_ip_version is not None:
            result['addressIpVersion'] = self.address_ip_version
        if self.address_type is not None:
            result['addressType'] = self.address_type
        if self.gateway_default is not None:
            result['gatewayDefault'] = self.gateway_default
        if self.load_balancer_id is not None:
            result['loadBalancerId'] = self.load_balancer_id
        if self.mode is not None:
            result['mode'] = self.mode
        result['ports'] = []
        if self.ports is not None:
            for k in self.ports:
                result['ports'].append(k.to_map() if k else None)
        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('address') is not None:
            self.address = m.get('address')
        if m.get('addressIpVersion') is not None:
            self.address_ip_version = m.get('addressIpVersion')
        if m.get('addressType') is not None:
            self.address_type = m.get('addressType')
        if m.get('gatewayDefault') is not None:
            self.gateway_default = m.get('gatewayDefault')
        if m.get('loadBalancerId') is not None:
            self.load_balancer_id = m.get('loadBalancerId')
        if m.get('mode') is not None:
            self.mode = m.get('mode')
        self.ports = []
        if m.get('ports') is not None:
            for k in m.get('ports'):
                temp_model = GetGatewayResponseBodyDataLoadBalancersPorts()
                self.ports.append(temp_model.from_map(k))
        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 GetGatewayResponseBodyDataSecurityGroup(TeaModel):
    def __init__(
        self,
        name: str = None,
        security_group_id: str = None,
    ):
        # Security group name.
        self.name = name
        # Security group ID.
        self.security_group_id = security_group_id

    def validate(self):
        pass

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

        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.security_group_id is not None:
            result['securityGroupId'] = self.security_group_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('securityGroupId') is not None:
            self.security_group_id = m.get('securityGroupId')
        return self


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

    def validate(self):
        pass

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

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

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


class GetGatewayResponseBodyDataVSwitch(TeaModel):
    def __init__(
        self,
        name: str = None,
        v_switch_id: str = None,
    ):
        # Virtual switch name.
        self.name = name
        # Virtual switch ID.
        self.v_switch_id = v_switch_id

    def validate(self):
        pass

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

        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.v_switch_id is not None:
            result['vSwitchId'] = self.v_switch_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('vSwitchId') is not None:
            self.v_switch_id = m.get('vSwitchId')
        return self


class GetGatewayResponseBodyDataVpc(TeaModel):
    def __init__(
        self,
        name: str = None,
        vpc_id: str = None,
    ):
        # VPC gateway name.
        self.name = name
        # VPC network ID.
        self.vpc_id = vpc_id

    def validate(self):
        pass

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

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

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


class GetGatewayResponseBodyDataZonesVSwitch(TeaModel):
    def __init__(
        self,
        name: str = None,
        v_switch_id: str = None,
    ):
        # Virtual switch name.
        self.name = name
        # Virtual switch ID.
        self.v_switch_id = v_switch_id

    def validate(self):
        pass

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

        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.v_switch_id is not None:
            result['vSwitchId'] = self.v_switch_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('vSwitchId') is not None:
            self.v_switch_id = m.get('vSwitchId')
        return self


class GetGatewayResponseBodyDataZones(TeaModel):
    def __init__(
        self,
        name: str = None,
        v_switch: GetGatewayResponseBodyDataZonesVSwitch = None,
        zone_id: str = None,
    ):
        # Availability zone name.
        self.name = name
        # Virtual switch.
        self.v_switch = v_switch
        # Availability zone ID.
        self.zone_id = zone_id

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

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

        result = dict()
        if self.name is not None:
            result['name'] = self.name
        if self.v_switch is not None:
            result['vSwitch'] = self.v_switch.to_map()
        if self.zone_id is not None:
            result['zoneId'] = self.zone_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('vSwitch') is not None:
            temp_model = GetGatewayResponseBodyDataZonesVSwitch()
            self.v_switch = temp_model.from_map(m['vSwitch'])
        if m.get('zoneId') is not None:
            self.zone_id = m.get('zoneId')
        return self


class GetGatewayResponseBodyData(TeaModel):
    def __init__(
        self,
        charge_type: str = None,
        create_from: str = None,
        create_timestamp: int = None,
        environments: List[GetGatewayResponseBodyDataEnvironments] = None,
        expire_timestamp: int = None,
        gateway_id: str = None,
        load_balancers: List[GetGatewayResponseBodyDataLoadBalancers] = None,
        name: str = None,
        replicas: str = None,
        resource_group_id: str = None,
        security_group: GetGatewayResponseBodyDataSecurityGroup = None,
        spec: str = None,
        status: str = None,
        tags: List[GetGatewayResponseBodyDataTags] = None,
        target_version: str = None,
        update_timestamp: int = None,
        v_switch: GetGatewayResponseBodyDataVSwitch = None,
        version: str = None,
        vpc: GetGatewayResponseBodyDataVpc = None,
        zones: List[GetGatewayResponseBodyDataZones] = None,
    ):
        # Charge type
        # - POSTPAY: Postpaid (pay-as-you-go)
        # - PREPAY: Prepaid (subscription)
        self.charge_type = charge_type
        # Source of gateway creation:
        # - Console: Console.
        self.create_from = create_from
        # Creation timestamp. Unit: milliseconds.
        self.create_timestamp = create_timestamp
        # List of environments associated with the gateway.
        self.environments = environments
        # Expiration timestamp for subscription. Unit: milliseconds.
        self.expire_timestamp = expire_timestamp
        # Gateway ID.
        self.gateway_id = gateway_id
        # List of entry addresses for the gateway.
        self.load_balancers = load_balancers
        # Gateway name.
        self.name = name
        # Number of gateway instance nodes.
        self.replicas = replicas
        self.resource_group_id = resource_group_id
        # The security group of the gateway.
        self.security_group = security_group
        # Gateway specification:
        # - apigw.small.x1: Small specification.
        self.spec = spec
        # Gateway status:
        # - Running: Running.
        # - Creating: Creating.
        # - CreateFailed: Creation failed.
        # - Upgrading: Upgrading.
        # - UpgradeFailed: Upgrade failed.
        # - Restarting: Restarting.
        # - RestartFailed: Restart failed.
        # - Deleting: Deleting.
        # - DeleteFailed: Deletion failed.
        self.status = status
        self.tags = tags
        # Target version of the gateway. When it is inconsistent with the current version, an upgrade can be performed.
        self.target_version = target_version
        # Update timestamp. Unit: milliseconds.
        self.update_timestamp = update_timestamp
        # The virtual switch associated with the gateway.
        self.v_switch = v_switch
        # Gateway version.
        self.version = version
        # The VPC (Virtual Private Cloud) associated with the gateway.
        self.vpc = vpc
        # List of availability zones associated with the gateway.
        self.zones = zones

    def validate(self):
        if self.environments:
            for k in self.environments:
                if k:
                    k.validate()
        if self.load_balancers:
            for k in self.load_balancers:
                if k:
                    k.validate()
        if self.security_group:
            self.security_group.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()
        if self.v_switch:
            self.v_switch.validate()
        if self.vpc:
            self.vpc.validate()
        if self.zones:
            for k in self.zones:
                if k:
                    k.validate()

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

        result = dict()
        if self.charge_type is not None:
            result['chargeType'] = self.charge_type
        if self.create_from is not None:
            result['createFrom'] = self.create_from
        if self.create_timestamp is not None:
            result['createTimestamp'] = self.create_timestamp
        result['environments'] = []
        if self.environments is not None:
            for k in self.environments:
                result['environments'].append(k.to_map() if k else None)
        if self.expire_timestamp is not None:
            result['expireTimestamp'] = self.expire_timestamp
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_id
        result['loadBalancers'] = []
        if self.load_balancers is not None:
            for k in self.load_balancers:
                result['loadBalancers'].append(k.to_map() if k else None)
        if self.name is not None:
            result['name'] = self.name
        if self.replicas is not None:
            result['replicas'] = self.replicas
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.security_group is not None:
            result['securityGroup'] = self.security_group.to_map()
        if self.spec is not None:
            result['spec'] = self.spec
        if self.status is not None:
            result['status'] = self.status
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.target_version is not None:
            result['targetVersion'] = self.target_version
        if self.update_timestamp is not None:
            result['updateTimestamp'] = self.update_timestamp
        if self.v_switch is not None:
            result['vSwitch'] = self.v_switch.to_map()
        if self.version is not None:
            result['version'] = self.version
        if self.vpc is not None:
            result['vpc'] = self.vpc.to_map()
        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('chargeType') is not None:
            self.charge_type = m.get('chargeType')
        if m.get('createFrom') is not None:
            self.create_from = m.get('createFrom')
        if m.get('createTimestamp') is not None:
            self.create_timestamp = m.get('createTimestamp')
        self.environments = []
        if m.get('environments') is not None:
            for k in m.get('environments'):
                temp_model = GetGatewayResponseBodyDataEnvironments()
                self.environments.append(temp_model.from_map(k))
        if m.get('expireTimestamp') is not None:
            self.expire_timestamp = m.get('expireTimestamp')
        if m.get('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        self.load_balancers = []
        if m.get('loadBalancers') is not None:
            for k in m.get('loadBalancers'):
                temp_model = GetGatewayResponseBodyDataLoadBalancers()
                self.load_balancers.append(temp_model.from_map(k))
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('replicas') is not None:
            self.replicas = m.get('replicas')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('securityGroup') is not None:
            temp_model = GetGatewayResponseBodyDataSecurityGroup()
            self.security_group = temp_model.from_map(m['securityGroup'])
        if m.get('spec') is not None:
            self.spec = m.get('spec')
        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 = GetGatewayResponseBodyDataTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('targetVersion') is not None:
            self.target_version = m.get('targetVersion')
        if m.get('updateTimestamp') is not None:
            self.update_timestamp = m.get('updateTimestamp')
        if m.get('vSwitch') is not None:
            temp_model = GetGatewayResponseBodyDataVSwitch()
            self.v_switch = temp_model.from_map(m['vSwitch'])
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('vpc') is not None:
            temp_model = GetGatewayResponseBodyDataVpc()
            self.vpc = temp_model.from_map(m['vpc'])
        self.zones = []
        if m.get('zones') is not None:
            for k in m.get('zones'):
                temp_model = GetGatewayResponseBodyDataZones()
                self.zones.append(temp_model.from_map(k))
        return self


class GetGatewayResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: GetGatewayResponseBodyData = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response status code.
        self.code = code
        # Response data.
        self.data = data
        # Response message.
        self.message = message
        # Request ID.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class GetHttpApiResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: HttpApiApiInfo = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response status code.
        self.code = code
        # API information.
        self.data = data
        # Response message.
        self.message = message
        # Request ID.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class GetHttpApiOperationResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: HttpApiOperationInfo = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response status code.
        self.code = code
        # Operation information.
        self.data = data
        # Response message.
        self.message = message
        # Request ID.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class GetHttpApiRouteResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: HttpRoute = None,
        message: str = None,
        request_id: str = None,
    ):
        self.code = code
        self.data = data
        self.message = message
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class ListDomainsRequest(TeaModel):
    def __init__(
        self,
        gateway_id: str = None,
        name_like: str = None,
        page_number: int = None,
        page_size: int = None,
        resource_group_id: str = None,
    ):
        # Gateway Id.
        self.gateway_id = gateway_id
        # Domain name, fuzzy search.
        self.name_like = name_like
        # Page number, default is 1.
        self.page_number = page_number
        # Number of items per page, default is 10.
        self.page_size = page_size
        self.resource_group_id = resource_group_id

    def validate(self):
        pass

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

        result = dict()
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_id
        if self.name_like is not None:
            result['nameLike'] = self.name_like
        if self.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        if m.get('nameLike') is not None:
            self.name_like = m.get('nameLike')
        if m.get('pageNumber') is not None:
            self.page_number = m.get('pageNumber')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        return self


class ListDomainsResponseBodyData(TeaModel):
    def __init__(
        self,
        items: List[DomainInfo] = None,
        page_number: int = None,
        page_size: int = None,
        total_size: int = None,
    ):
        # List of domain information.
        self.items = items
        # Page number.
        self.page_number = page_number
        # Number of items per page.
        self.page_size = page_size
        # Total number of items.
        self.total_size = total_size

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

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

        result = dict()
        result['items'] = []
        if self.items is not None:
            for k in self.items:
                result['items'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.total_size is not None:
            result['totalSize'] = self.total_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.items = []
        if m.get('items') is not None:
            for k in m.get('items'):
                temp_model = DomainInfo()
                self.items.append(temp_model.from_map(k))
        if m.get('pageNumber') is not None:
            self.page_number = m.get('pageNumber')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        if m.get('totalSize') is not None:
            self.total_size = m.get('totalSize')
        return self


class ListDomainsResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: ListDomainsResponseBodyData = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response code.
        self.code = code
        # Response data.
        self.data = data
        # Response message.
        self.message = message
        # Request ID, used for tracing the API call chain.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class ListEnvironmentsRequest(TeaModel):
    def __init__(
        self,
        alias_like: str = None,
        gateway_id: str = None,
        gateway_name_like: str = None,
        name_like: str = None,
        page_number: int = None,
        page_size: int = None,
        resource_group_id: str = None,
    ):
        # Environment alias, fuzzy search.
        self.alias_like = alias_like
        # Gateway ID, exact search.
        self.gateway_id = gateway_id
        # Gateway name, fuzzy search.
        self.gateway_name_like = gateway_name_like
        # Environment name, fuzzy search.
        self.name_like = name_like
        # Page number, default is 1.
        self.page_number = page_number
        # Page size, default is 10.
        self.page_size = page_size
        self.resource_group_id = resource_group_id

    def validate(self):
        pass

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

        result = dict()
        if self.alias_like is not None:
            result['aliasLike'] = self.alias_like
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_id
        if self.gateway_name_like is not None:
            result['gatewayNameLike'] = self.gateway_name_like
        if self.name_like is not None:
            result['nameLike'] = self.name_like
        if self.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aliasLike') is not None:
            self.alias_like = m.get('aliasLike')
        if m.get('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        if m.get('gatewayNameLike') is not None:
            self.gateway_name_like = m.get('gatewayNameLike')
        if m.get('nameLike') is not None:
            self.name_like = m.get('nameLike')
        if m.get('pageNumber') is not None:
            self.page_number = m.get('pageNumber')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        return self


class ListEnvironmentsResponseBodyData(TeaModel):
    def __init__(
        self,
        items: List[EnvironmentInfo] = None,
        page_number: int = None,
        page_size: int = None,
        total_size: int = None,
    ):
        # List of environment information.
        self.items = items
        # Page number.
        self.page_number = page_number
        # Number of items per page.
        self.page_size = page_size
        # Total number of items.
        self.total_size = total_size

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

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

        result = dict()
        result['items'] = []
        if self.items is not None:
            for k in self.items:
                result['items'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.total_size is not None:
            result['totalSize'] = self.total_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.items = []
        if m.get('items') is not None:
            for k in m.get('items'):
                temp_model = EnvironmentInfo()
                self.items.append(temp_model.from_map(k))
        if m.get('pageNumber') is not None:
            self.page_number = m.get('pageNumber')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        if m.get('totalSize') is not None:
            self.total_size = m.get('totalSize')
        return self


class ListEnvironmentsResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: ListEnvironmentsResponseBodyData = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response code.
        self.code = code
        # Paged query environment list response.
        self.data = data
        # Response message.
        self.message = message
        # Request ID, used for tracing the call chain.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


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

    def validate(self):
        pass

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

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

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


class ListGatewaysRequest(TeaModel):
    def __init__(
        self,
        gateway_id: str = None,
        keyword: str = None,
        name: str = None,
        page_number: int = None,
        page_size: int = None,
        resource_group_id: str = None,
        tags: List[ListGatewaysRequestTags] = None,
    ):
        # Query exactly by gateway ID.
        self.gateway_id = gateway_id
        # Keyword, search with full match, case-insensitive.
        self.keyword = keyword
        # Query exactly by gateway name.
        self.name = name
        # Page number.
        self.page_number = page_number
        # Page size.
        self.page_size = page_size
        self.resource_group_id = resource_group_id
        self.tags = tags

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

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

        result = dict()
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_id
        if self.keyword is not None:
            result['keyword'] = self.keyword
        if self.name is not None:
            result['name'] = self.name
        if self.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        if m.get('keyword') is not None:
            self.keyword = m.get('keyword')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('pageNumber') is not None:
            self.page_number = m.get('pageNumber')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        self.tags = []
        if m.get('tags') is not None:
            for k in m.get('tags'):
                temp_model = ListGatewaysRequestTags()
                self.tags.append(temp_model.from_map(k))
        return self


class ListGatewaysShrinkRequest(TeaModel):
    def __init__(
        self,
        gateway_id: str = None,
        keyword: str = None,
        name: str = None,
        page_number: int = None,
        page_size: int = None,
        resource_group_id: str = None,
        tags_shrink: str = None,
    ):
        # Query exactly by gateway ID.
        self.gateway_id = gateway_id
        # Keyword, search with full match, case-insensitive.
        self.keyword = keyword
        # Query exactly by gateway name.
        self.name = name
        # Page number.
        self.page_number = page_number
        # Page size.
        self.page_size = page_size
        self.resource_group_id = resource_group_id
        self.tags_shrink = tags_shrink

    def validate(self):
        pass

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

        result = dict()
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_id
        if self.keyword is not None:
            result['keyword'] = self.keyword
        if self.name is not None:
            result['name'] = self.name
        if self.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.tags_shrink is not None:
            result['tags'] = self.tags_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        if m.get('keyword') is not None:
            self.keyword = m.get('keyword')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('pageNumber') is not None:
            self.page_number = m.get('pageNumber')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('tags') is not None:
            self.tags_shrink = m.get('tags')
        return self


class ListGatewaysResponseBodyDataItemsLoadBalancersPorts(TeaModel):
    def __init__(
        self,
        port: int = None,
        protocol: str = None,
    ):
        # Port number.
        self.port = port
        # Protocol:
        # - TCP
        # - UDP
        self.protocol = protocol

    def validate(self):
        pass

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

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

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


class ListGatewaysResponseBodyDataItemsLoadBalancers(TeaModel):
    def __init__(
        self,
        address: str = None,
        address_ip_version: str = None,
        address_type: str = None,
        gateway_default: bool = None,
        load_balancer_id: str = None,
        mode: str = None,
        ports: List[ListGatewaysResponseBodyDataItemsLoadBalancersPorts] = None,
        status: str = None,
        type: str = None,
    ):
        # Load balancer address.
        self.address = address
        # IP version:
        # - ipv4: IPv4.
        # - ipv6: IPv6.
        self.address_ip_version = address_ip_version
        # Load balancer address type:
        # - Internet: Public network.
        # - Intranet: Private network.
        self.address_type = address_type
        # Indicates whether this is the default entry address for the gateway.
        self.gateway_default = gateway_default
        # Load balancer ID.
        self.load_balancer_id = load_balancer_id
        # Mode of load balancer provision for the gateway:
        # - Managed: Managed by the Cloud Native API Gateway.
        self.mode = mode
        # List of listening ports.
        self.ports = ports
        # Status of the load balancer:
        # - Ready: Available.
        # - NotCreate: No associated instance.
        self.status = status
        # Type of load balancer for the gateway:
        # - NLB: Network Load Balancer.
        # - CLB: Classic Load Balancer.
        self.type = type

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

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

        result = dict()
        if self.address is not None:
            result['address'] = self.address
        if self.address_ip_version is not None:
            result['addressIpVersion'] = self.address_ip_version
        if self.address_type is not None:
            result['addressType'] = self.address_type
        if self.gateway_default is not None:
            result['gatewayDefault'] = self.gateway_default
        if self.load_balancer_id is not None:
            result['loadBalancerId'] = self.load_balancer_id
        if self.mode is not None:
            result['mode'] = self.mode
        result['ports'] = []
        if self.ports is not None:
            for k in self.ports:
                result['ports'].append(k.to_map() if k else None)
        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('address') is not None:
            self.address = m.get('address')
        if m.get('addressIpVersion') is not None:
            self.address_ip_version = m.get('addressIpVersion')
        if m.get('addressType') is not None:
            self.address_type = m.get('addressType')
        if m.get('gatewayDefault') is not None:
            self.gateway_default = m.get('gatewayDefault')
        if m.get('loadBalancerId') is not None:
            self.load_balancer_id = m.get('loadBalancerId')
        if m.get('mode') is not None:
            self.mode = m.get('mode')
        self.ports = []
        if m.get('ports') is not None:
            for k in m.get('ports'):
                temp_model = ListGatewaysResponseBodyDataItemsLoadBalancersPorts()
                self.ports.append(temp_model.from_map(k))
        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 ListGatewaysResponseBodyDataItemsSecurityGroup(TeaModel):
    def __init__(
        self,
        security_group_id: str = None,
    ):
        # The Security Group ID.
        self.security_group_id = security_group_id

    def validate(self):
        pass

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

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

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


class ListGatewaysResponseBodyDataItemsTags(TeaModel):
    def __init__(
        self,
        tag_key: str = None,
        tag_value: str = None,
    ):
        self.tag_key = tag_key
        self.tag_value = tag_value

    def validate(self):
        pass

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

        result = dict()
        if self.tag_key is not None:
            result['tagKey'] = self.tag_key
        if self.tag_value is not None:
            result['tagValue'] = self.tag_value
        return result

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


class ListGatewaysResponseBodyDataItemsVSwitch(TeaModel):
    def __init__(
        self,
        v_switch_id: str = None,
    ):
        # The vSwitch ID.
        self.v_switch_id = v_switch_id

    def validate(self):
        pass

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

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

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


class ListGatewaysResponseBodyDataItemsVpc(TeaModel):
    def __init__(
        self,
        vpc_id: str = None,
    ):
        # The VPC ID.
        self.vpc_id = vpc_id

    def validate(self):
        pass

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

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

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


class ListGatewaysResponseBodyDataItemsZonesVSwitch(TeaModel):
    def __init__(
        self,
        v_switch_id: str = None,
    ):
        # The vSwitch ID.
        self.v_switch_id = v_switch_id

    def validate(self):
        pass

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

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

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


class ListGatewaysResponseBodyDataItemsZones(TeaModel):
    def __init__(
        self,
        v_switch: ListGatewaysResponseBodyDataItemsZonesVSwitch = None,
        zone_id: str = None,
    ):
        # The vSwitch.
        self.v_switch = v_switch
        # The ID of the current zone.
        self.zone_id = zone_id

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

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

        result = dict()
        if self.v_switch is not None:
            result['vSwitch'] = self.v_switch.to_map()
        if self.zone_id is not None:
            result['zoneId'] = self.zone_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('vSwitch') is not None:
            temp_model = ListGatewaysResponseBodyDataItemsZonesVSwitch()
            self.v_switch = temp_model.from_map(m['vSwitch'])
        if m.get('zoneId') is not None:
            self.zone_id = m.get('zoneId')
        return self


class ListGatewaysResponseBodyDataItems(TeaModel):
    def __init__(
        self,
        charge_type: str = None,
        create_from: str = None,
        create_timestamp: int = None,
        expire_timestamp: int = None,
        gateway_id: str = None,
        load_balancers: List[ListGatewaysResponseBodyDataItemsLoadBalancers] = None,
        name: str = None,
        replicas: str = None,
        resource_group_id: str = None,
        security_group: ListGatewaysResponseBodyDataItemsSecurityGroup = None,
        spec: str = None,
        status: str = None,
        tags: List[ListGatewaysResponseBodyDataItemsTags] = None,
        target_version: str = None,
        update_timestamp: int = None,
        v_switch: ListGatewaysResponseBodyDataItemsVSwitch = None,
        version: str = None,
        vpc: ListGatewaysResponseBodyDataItemsVpc = None,
        zones: List[ListGatewaysResponseBodyDataItemsZones] = None,
    ):
        # Charge type
        # 
        # - POSTPAY: Postpaid (pay-as-you-go)
        # - PREPAY: Prepaid (subscription)
        self.charge_type = charge_type
        # Source of gateway creation:
        # - Console: Console.
        self.create_from = create_from
        # Creation timestamp, in milliseconds.
        self.create_timestamp = create_timestamp
        # Expiration timestamp for the prepaid (annual or monthly) plan. Unit: milliseconds.
        self.expire_timestamp = expire_timestamp
        # Gateway ID.
        self.gateway_id = gateway_id
        # List of gateway entry addresses.
        self.load_balancers = load_balancers
        # Gateway name.
        self.name = name
        # Number of gateway instance nodes.
        self.replicas = replicas
        self.resource_group_id = resource_group_id
        # The Security Group.
        self.security_group = security_group
        # Gateway specification:
        # - apigw.small.x1: Small specification.
        self.spec = spec
        # Gateway status:
        # - Running: Running.
        # - Creating: Creating.
        # - CreateFailed: Creation failed.
        # - Upgrading: Upgrading.
        # - UpgradeFailed: Upgrade failed.
        # - Restarting: Restarting.
        # - RestartFailed: Restart failed.
        # - Deleting: Deleting.
        # - DeleteFailed: Deletion failed.
        self.status = status
        self.tags = tags
        # Target version of the gateway. When it is inconsistent with `version`, a version upgrade can be performed.
        self.target_version = target_version
        # Update timestamp. Unit: milliseconds.
        self.update_timestamp = update_timestamp
        self.v_switch = v_switch
        # Gateway version.
        self.version = version
        self.vpc = vpc
        self.zones = zones

    def validate(self):
        if self.load_balancers:
            for k in self.load_balancers:
                if k:
                    k.validate()
        if self.security_group:
            self.security_group.validate()
        if self.tags:
            for k in self.tags:
                if k:
                    k.validate()
        if self.v_switch:
            self.v_switch.validate()
        if self.vpc:
            self.vpc.validate()
        if self.zones:
            for k in self.zones:
                if k:
                    k.validate()

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

        result = dict()
        if self.charge_type is not None:
            result['chargeType'] = self.charge_type
        if self.create_from is not None:
            result['createFrom'] = self.create_from
        if self.create_timestamp is not None:
            result['createTimestamp'] = self.create_timestamp
        if self.expire_timestamp is not None:
            result['expireTimestamp'] = self.expire_timestamp
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_id
        result['loadBalancers'] = []
        if self.load_balancers is not None:
            for k in self.load_balancers:
                result['loadBalancers'].append(k.to_map() if k else None)
        if self.name is not None:
            result['name'] = self.name
        if self.replicas is not None:
            result['replicas'] = self.replicas
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.security_group is not None:
            result['securityGroup'] = self.security_group.to_map()
        if self.spec is not None:
            result['spec'] = self.spec
        if self.status is not None:
            result['status'] = self.status
        result['tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['tags'].append(k.to_map() if k else None)
        if self.target_version is not None:
            result['targetVersion'] = self.target_version
        if self.update_timestamp is not None:
            result['updateTimestamp'] = self.update_timestamp
        if self.v_switch is not None:
            result['vSwitch'] = self.v_switch.to_map()
        if self.version is not None:
            result['version'] = self.version
        if self.vpc is not None:
            result['vpc'] = self.vpc.to_map()
        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('chargeType') is not None:
            self.charge_type = m.get('chargeType')
        if m.get('createFrom') is not None:
            self.create_from = m.get('createFrom')
        if m.get('createTimestamp') is not None:
            self.create_timestamp = m.get('createTimestamp')
        if m.get('expireTimestamp') is not None:
            self.expire_timestamp = m.get('expireTimestamp')
        if m.get('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        self.load_balancers = []
        if m.get('loadBalancers') is not None:
            for k in m.get('loadBalancers'):
                temp_model = ListGatewaysResponseBodyDataItemsLoadBalancers()
                self.load_balancers.append(temp_model.from_map(k))
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('replicas') is not None:
            self.replicas = m.get('replicas')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('securityGroup') is not None:
            temp_model = ListGatewaysResponseBodyDataItemsSecurityGroup()
            self.security_group = temp_model.from_map(m['securityGroup'])
        if m.get('spec') is not None:
            self.spec = m.get('spec')
        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 = ListGatewaysResponseBodyDataItemsTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('targetVersion') is not None:
            self.target_version = m.get('targetVersion')
        if m.get('updateTimestamp') is not None:
            self.update_timestamp = m.get('updateTimestamp')
        if m.get('vSwitch') is not None:
            temp_model = ListGatewaysResponseBodyDataItemsVSwitch()
            self.v_switch = temp_model.from_map(m['vSwitch'])
        if m.get('version') is not None:
            self.version = m.get('version')
        if m.get('vpc') is not None:
            temp_model = ListGatewaysResponseBodyDataItemsVpc()
            self.vpc = temp_model.from_map(m['vpc'])
        self.zones = []
        if m.get('zones') is not None:
            for k in m.get('zones'):
                temp_model = ListGatewaysResponseBodyDataItemsZones()
                self.zones.append(temp_model.from_map(k))
        return self


class ListGatewaysResponseBodyData(TeaModel):
    def __init__(
        self,
        items: List[ListGatewaysResponseBodyDataItems] = None,
        page_number: int = None,
        page_size: int = None,
        total_size: int = None,
    ):
        # Gateway list
        self.items = items
        # Page number.
        self.page_number = page_number
        # Page size.
        self.page_size = page_size
        # Total count.
        self.total_size = total_size

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

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

        result = dict()
        result['items'] = []
        if self.items is not None:
            for k in self.items:
                result['items'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.total_size is not None:
            result['totalSize'] = self.total_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.items = []
        if m.get('items') is not None:
            for k in m.get('items'):
                temp_model = ListGatewaysResponseBodyDataItems()
                self.items.append(temp_model.from_map(k))
        if m.get('pageNumber') is not None:
            self.page_number = m.get('pageNumber')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        if m.get('totalSize') is not None:
            self.total_size = m.get('totalSize')
        return self


class ListGatewaysResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: ListGatewaysResponseBodyData = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response status code.
        self.code = code
        # Result of the gateway list query.
        self.data = data
        # Response message.
        self.message = message
        # Request ID.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class ListHttpApiOperationsRequest(TeaModel):
    def __init__(
        self,
        consumer_authorization_rule_id: str = None,
        method: str = None,
        name: str = None,
        name_like: str = None,
        page_number: int = None,
        page_size: int = None,
        path_like: str = None,
        with_consumer_in_environment_id: str = None,
        with_consumer_info_by_id: str = None,
    ):
        # Filter the operation list based on a specific consumer authorization rule ID, and the interface list in the response only contains authorized operations.
        self.consumer_authorization_rule_id = consumer_authorization_rule_id
        # List interfaces by Method.
        self.method = method
        # Search operations by exact name.
        self.name = name
        # Search operations by name prefix.
        self.name_like = name_like
        # Page number, starting from 1, default is 1 if not specified.
        self.page_number = page_number
        # Page size, valid range [1, 100], default is 10 if not specified.
        self.page_size = page_size
        # Search operations by path prefix.
        self.path_like = path_like
        # Each operation information in the response carries a list of authorization rules for the specified consumer under the specified environment ID. The withConsumerInEnvironmentId field needs to be additionally specified.
        self.with_consumer_in_environment_id = with_consumer_in_environment_id
        # Each operation information in the response carries a list of authorization rules for the specified consumer under the specified environment ID. The withConsumerInEnvironmentId field needs to be additionally specified.
        self.with_consumer_info_by_id = with_consumer_info_by_id

    def validate(self):
        pass

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

        result = dict()
        if self.consumer_authorization_rule_id is not None:
            result['consumerAuthorizationRuleId'] = self.consumer_authorization_rule_id
        if self.method is not None:
            result['method'] = self.method
        if self.name is not None:
            result['name'] = self.name
        if self.name_like is not None:
            result['nameLike'] = self.name_like
        if self.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.path_like is not None:
            result['pathLike'] = self.path_like
        if self.with_consumer_in_environment_id is not None:
            result['withConsumerInEnvironmentId'] = self.with_consumer_in_environment_id
        if self.with_consumer_info_by_id is not None:
            result['withConsumerInfoById'] = self.with_consumer_info_by_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('consumerAuthorizationRuleId') is not None:
            self.consumer_authorization_rule_id = m.get('consumerAuthorizationRuleId')
        if m.get('method') is not None:
            self.method = m.get('method')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('nameLike') is not None:
            self.name_like = m.get('nameLike')
        if m.get('pageNumber') is not None:
            self.page_number = m.get('pageNumber')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        if m.get('pathLike') is not None:
            self.path_like = m.get('pathLike')
        if m.get('withConsumerInEnvironmentId') is not None:
            self.with_consumer_in_environment_id = m.get('withConsumerInEnvironmentId')
        if m.get('withConsumerInfoById') is not None:
            self.with_consumer_info_by_id = m.get('withConsumerInfoById')
        return self


class ListHttpApiOperationsResponseBodyData(TeaModel):
    def __init__(
        self,
        items: List[HttpApiOperationInfo] = None,
        page_number: int = None,
        page_size: int = None,
        total_size: int = None,
    ):
        # List of operations.
        self.items = items
        # Page number.
        self.page_number = page_number
        # Page size.
        self.page_size = page_size
        # Total count.
        self.total_size = total_size

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

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

        result = dict()
        result['items'] = []
        if self.items is not None:
            for k in self.items:
                result['items'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.total_size is not None:
            result['totalSize'] = self.total_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.items = []
        if m.get('items') is not None:
            for k in m.get('items'):
                temp_model = HttpApiOperationInfo()
                self.items.append(temp_model.from_map(k))
        if m.get('pageNumber') is not None:
            self.page_number = m.get('pageNumber')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        if m.get('totalSize') is not None:
            self.total_size = m.get('totalSize')
        return self


class ListHttpApiOperationsResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: ListHttpApiOperationsResponseBodyData = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response status code.
        self.code = code
        # List of operations.
        self.data = data
        # Response message.
        self.message = message
        # Request ID.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class ListHttpApisRequest(TeaModel):
    def __init__(
        self,
        gateway_id: str = None,
        keyword: str = None,
        name: str = None,
        page_number: int = None,
        page_size: int = None,
        resource_group_id: str = None,
        types: str = None,
        with_auth_policy_in_environment_id: str = None,
        with_consumer_info_by_id: str = None,
        with_environment_info: bool = None,
    ):
        # Cloud-native API Gateway ID.
        self.gateway_id = gateway_id
        # Search keyword, supports fuzzy search by API name or exact search by API ID.
        self.keyword = keyword
        # Exact search by name.
        self.name = name
        # Page number, starting from 1, default is 1 if not provided.
        self.page_number = page_number
        # Page size, valid range [1, 100], default is 10 if not provided.
        self.page_size = page_size
        self.resource_group_id = resource_group_id
        # Type of HTTP API. Supports multiple types, separated by ",".
        # - Http
        # - Rest
        # - WebSocket
        # - HttpIngress
        self.types = types
        # Each API information in the response carries consumer authentication policy information under the specified environment ID.
        self.with_auth_policy_in_environment_id = with_auth_policy_in_environment_id
        # Each API information in the response carries a list of authorization rules for the specified consumer ID.
        self.with_consumer_info_by_id = with_consumer_info_by_id
        self.with_environment_info = with_environment_info

    def validate(self):
        pass

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

        result = dict()
        if self.gateway_id is not None:
            result['gatewayId'] = self.gateway_id
        if self.keyword is not None:
            result['keyword'] = self.keyword
        if self.name is not None:
            result['name'] = self.name
        if self.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.resource_group_id is not None:
            result['resourceGroupId'] = self.resource_group_id
        if self.types is not None:
            result['types'] = self.types
        if self.with_auth_policy_in_environment_id is not None:
            result['withAuthPolicyInEnvironmentId'] = self.with_auth_policy_in_environment_id
        if self.with_consumer_info_by_id is not None:
            result['withConsumerInfoById'] = self.with_consumer_info_by_id
        if self.with_environment_info is not None:
            result['withEnvironmentInfo'] = self.with_environment_info
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('gatewayId') is not None:
            self.gateway_id = m.get('gatewayId')
        if m.get('keyword') is not None:
            self.keyword = m.get('keyword')
        if m.get('name') is not None:
            self.name = m.get('name')
        if m.get('pageNumber') is not None:
            self.page_number = m.get('pageNumber')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        if m.get('resourceGroupId') is not None:
            self.resource_group_id = m.get('resourceGroupId')
        if m.get('types') is not None:
            self.types = m.get('types')
        if m.get('withAuthPolicyInEnvironmentId') is not None:
            self.with_auth_policy_in_environment_id = m.get('withAuthPolicyInEnvironmentId')
        if m.get('withConsumerInfoById') is not None:
            self.with_consumer_info_by_id = m.get('withConsumerInfoById')
        if m.get('withEnvironmentInfo') is not None:
            self.with_environment_info = m.get('withEnvironmentInfo')
        return self


class ListHttpApisResponseBodyData(TeaModel):
    def __init__(
        self,
        items: List[HttpApiInfoByName] = None,
        page_number: int = None,
        page_size: int = None,
        total_size: int = None,
    ):
        # API information.
        self.items = items
        # Page number.
        self.page_number = page_number
        # Page size.
        self.page_size = page_size
        # Total count.
        self.total_size = total_size

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

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

        result = dict()
        result['items'] = []
        if self.items is not None:
            for k in self.items:
                result['items'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['pageNumber'] = self.page_number
        if self.page_size is not None:
            result['pageSize'] = self.page_size
        if self.total_size is not None:
            result['totalSize'] = self.total_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.items = []
        if m.get('items') is not None:
            for k in m.get('items'):
                temp_model = HttpApiInfoByName()
                self.items.append(temp_model.from_map(k))
        if m.get('pageNumber') is not None:
            self.page_number = m.get('pageNumber')
        if m.get('pageSize') is not None:
            self.page_size = m.get('pageSize')
        if m.get('totalSize') is not None:
            self.total_size = m.get('totalSize')
        return self


class ListHttpApisResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: ListHttpApisResponseBodyData = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response status code.
        self.code = code
        # API list.
        self.data = data
        # Response message.
        self.message = message
        # Request ID.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class UpdateDomainRequest(TeaModel):
    def __init__(
        self,
        ca_cert_indentifier: str = None,
        cert_indentifier: str = None,
        force_https: bool = None,
        http_2option: str = None,
        protocol: str = None,
        tls_max: str = None,
        tls_min: str = None,
    ):
        # Cloud Shield CA certificate identifier.
        self.ca_cert_indentifier = ca_cert_indentifier
        # Cloud Shield certificate identifier.
        self.cert_indentifier = cert_indentifier
        # Set the HTTPS protocol type, whether to enable forced HTTPS redirection.
        self.force_https = force_https
        # HTTP/2 settings.
        self.http_2option = http_2option
        # The protocol type supported by the domain.
        # 
        # - HTTP: Supports only HTTP protocol.
        # - HTTPS: Supports only HTTPS protocol.
        # 
        # This parameter is required.
        self.protocol = protocol
        # Maximum TLS protocol version, supports up to TLS 1.3.
        self.tls_max = tls_max
        # Minimum TLS protocol version, supports down to TLS 1.0.
        self.tls_min = tls_min

    def validate(self):
        pass

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

        result = dict()
        if self.ca_cert_indentifier is not None:
            result['caCertIndentifier'] = self.ca_cert_indentifier
        if self.cert_indentifier is not None:
            result['certIndentifier'] = self.cert_indentifier
        if self.force_https is not None:
            result['forceHttps'] = self.force_https
        if self.http_2option is not None:
            result['http2Option'] = self.http_2option
        if self.protocol is not None:
            result['protocol'] = self.protocol
        if self.tls_max is not None:
            result['tlsMax'] = self.tls_max
        if self.tls_min is not None:
            result['tlsMin'] = self.tls_min
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('caCertIndentifier') is not None:
            self.ca_cert_indentifier = m.get('caCertIndentifier')
        if m.get('certIndentifier') is not None:
            self.cert_indentifier = m.get('certIndentifier')
        if m.get('forceHttps') is not None:
            self.force_https = m.get('forceHttps')
        if m.get('http2Option') is not None:
            self.http_2option = m.get('http2Option')
        if m.get('protocol') is not None:
            self.protocol = m.get('protocol')
        if m.get('tlsMax') is not None:
            self.tls_max = m.get('tlsMax')
        if m.get('tlsMin') is not None:
            self.tls_min = m.get('tlsMin')
        return self


class UpdateDomainResponseBodyData(TeaModel):
    def __init__(
        self,
        deploy_revision_id: str = None,
    ):
        # Deploy revision id.
        self.deploy_revision_id = deploy_revision_id

    def validate(self):
        pass

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

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

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


class UpdateDomainResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        data: UpdateDomainResponseBodyData = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response code.
        self.code = code
        # The returned data.
        self.data = data
        # Response message.
        self.message = message
        # Request ID, used for tracing the API call chain.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class UpdateEnvironmentRequest(TeaModel):
    def __init__(
        self,
        alias: str = None,
        description: str = None,
    ):
        # Environment alias.
        # 
        # This parameter is required.
        self.alias = alias
        # Description of the environment, which can include information such as the purpose of the environment and its users.
        self.description = description

    def validate(self):
        pass

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

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


class UpdateEnvironmentResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response code.
        self.code = code
        # Response message.
        self.message = message
        # Request ID, used for tracing the API call chain.
        self.request_id = request_id

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class UpdateHttpApiRequestIngressConfig(TeaModel):
    def __init__(
        self,
        environment_id: str = None,
        ingress_class: str = None,
        override_ingress_ip: bool = None,
        source_id: str = None,
        watch_namespace: str = None,
    ):
        # Environment ID.
        self.environment_id = environment_id
        # Ingress Class being listened to.
        self.ingress_class = ingress_class
        # Whether to update the address in the Ingress Status.
        self.override_ingress_ip = override_ingress_ip
        # Source ID.
        self.source_id = source_id
        # Watched namespace.
        self.watch_namespace = watch_namespace

    def validate(self):
        pass

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

        result = dict()
        if self.environment_id is not None:
            result['environmentId'] = self.environment_id
        if self.ingress_class is not None:
            result['ingressClass'] = self.ingress_class
        if self.override_ingress_ip is not None:
            result['overrideIngressIp'] = self.override_ingress_ip
        if self.source_id is not None:
            result['sourceId'] = self.source_id
        if self.watch_namespace is not None:
            result['watchNamespace'] = self.watch_namespace
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('environmentId') is not None:
            self.environment_id = m.get('environmentId')
        if m.get('ingressClass') is not None:
            self.ingress_class = m.get('ingressClass')
        if m.get('overrideIngressIp') is not None:
            self.override_ingress_ip = m.get('overrideIngressIp')
        if m.get('sourceId') is not None:
            self.source_id = m.get('sourceId')
        if m.get('watchNamespace') is not None:
            self.watch_namespace = m.get('watchNamespace')
        return self


class UpdateHttpApiRequest(TeaModel):
    def __init__(
        self,
        ai_protocols: List[str] = None,
        base_path: str = None,
        deploy_configs: List[HttpApiDeployConfig] = None,
        description: str = None,
        ingress_config: UpdateHttpApiRequestIngressConfig = None,
        protocols: List[str] = None,
        version_config: HttpApiVersionConfig = None,
    ):
        self.ai_protocols = ai_protocols
        # Base path of the API, which must start with a \\"/\\".
        # 
        # This parameter is required.
        self.base_path = base_path
        self.deploy_configs = deploy_configs
        # API description.
        self.description = description
        # Configuration information for the HTTP Ingress API.
        self.ingress_config = ingress_config
        # List of API access protocols.
        self.protocols = protocols
        # API versioning configuration.
        self.version_config = version_config

    def validate(self):
        if self.deploy_configs:
            for k in self.deploy_configs:
                if k:
                    k.validate()
        if self.ingress_config:
            self.ingress_config.validate()
        if self.version_config:
            self.version_config.validate()

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

        result = dict()
        if self.ai_protocols is not None:
            result['aiProtocols'] = self.ai_protocols
        if self.base_path is not None:
            result['basePath'] = self.base_path
        result['deployConfigs'] = []
        if self.deploy_configs is not None:
            for k in self.deploy_configs:
                result['deployConfigs'].append(k.to_map() if k else None)
        if self.description is not None:
            result['description'] = self.description
        if self.ingress_config is not None:
            result['ingressConfig'] = self.ingress_config.to_map()
        if self.protocols is not None:
            result['protocols'] = self.protocols
        if self.version_config is not None:
            result['versionConfig'] = self.version_config.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('aiProtocols') is not None:
            self.ai_protocols = m.get('aiProtocols')
        if m.get('basePath') is not None:
            self.base_path = m.get('basePath')
        self.deploy_configs = []
        if m.get('deployConfigs') is not None:
            for k in m.get('deployConfigs'):
                temp_model = HttpApiDeployConfig()
                self.deploy_configs.append(temp_model.from_map(k))
        if m.get('description') is not None:
            self.description = m.get('description')
        if m.get('ingressConfig') is not None:
            temp_model = UpdateHttpApiRequestIngressConfig()
            self.ingress_config = temp_model.from_map(m['ingressConfig'])
        if m.get('protocols') is not None:
            self.protocols = m.get('protocols')
        if m.get('versionConfig') is not None:
            temp_model = HttpApiVersionConfig()
            self.version_config = temp_model.from_map(m['versionConfig'])
        return self


class UpdateHttpApiResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response status code.
        self.code = code
        # Response message.
        self.message = message
        # Request ID.
        self.request_id = request_id

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class UpdateHttpApiOperationRequest(TeaModel):
    def __init__(
        self,
        operation: HttpApiOperation = None,
    ):
        # operation definition.
        self.operation = operation

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

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

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

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


class UpdateHttpApiOperationResponseBody(TeaModel):
    def __init__(
        self,
        code: str = None,
        message: str = None,
        request_id: str = None,
    ):
        # Response status code.
        self.code = code
        # Response message.
        self.message = message
        # Request ID.
        self.request_id = request_id

    def validate(self):
        pass

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

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

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


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

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

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

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

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


