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


class AddImageRequestContainerImageSpecRegistryCredential(TeaModel):
    def __init__(
        self,
        password: str = None,
        server: str = None,
        user_name: str = None,
    ):
        # The password of the logon user.
        self.password = password
        # The registered address of the image repository.
        self.server = server
        # The username of the logon user.
        self.user_name = user_name

    def validate(self):
        pass

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

        result = dict()
        if self.password is not None:
            result['Password'] = self.password
        if self.server is not None:
            result['Server'] = self.server
        if self.user_name is not None:
            result['UserName'] = self.user_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Password') is not None:
            self.password = m.get('Password')
        if m.get('Server') is not None:
            self.server = m.get('Server')
        if m.get('UserName') is not None:
            self.user_name = m.get('UserName')
        return self


class AddImageRequestContainerImageSpec(TeaModel):
    def __init__(
        self,
        is_acrenterprise: bool = None,
        is_acrregistry: bool = None,
        registry_credential: AddImageRequestContainerImageSpecRegistryCredential = None,
        registry_cri_id: str = None,
        registry_url: str = None,
    ):
        # Whether the instance is an Alibaba Cloud image repository Enterprise Edition.
        # 
        # *   True
        # *   False
        self.is_acrenterprise = is_acrenterprise
        # Whether it is an Alibaba Cloud image repository.
        # 
        # *   True
        # *   False
        self.is_acrregistry = is_acrregistry
        # The authentication of the private image repository.
        self.registry_credential = registry_credential
        # The ID of the Container Registry Enterprise Edition image repository.
        self.registry_cri_id = registry_cri_id
        # The endpoint of the container image.
        self.registry_url = registry_url

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

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

        result = dict()
        if self.is_acrenterprise is not None:
            result['IsACREnterprise'] = self.is_acrenterprise
        if self.is_acrregistry is not None:
            result['IsACRRegistry'] = self.is_acrregistry
        if self.registry_credential is not None:
            result['RegistryCredential'] = self.registry_credential.to_map()
        if self.registry_cri_id is not None:
            result['RegistryCriId'] = self.registry_cri_id
        if self.registry_url is not None:
            result['RegistryUrl'] = self.registry_url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('IsACREnterprise') is not None:
            self.is_acrenterprise = m.get('IsACREnterprise')
        if m.get('IsACRRegistry') is not None:
            self.is_acrregistry = m.get('IsACRRegistry')
        if m.get('RegistryCredential') is not None:
            temp_model = AddImageRequestContainerImageSpecRegistryCredential()
            self.registry_credential = temp_model.from_map(m['RegistryCredential'])
        if m.get('RegistryCriId') is not None:
            self.registry_cri_id = m.get('RegistryCriId')
        if m.get('RegistryUrl') is not None:
            self.registry_url = m.get('RegistryUrl')
        return self


class AddImageRequestVMImageSpec(TeaModel):
    def __init__(
        self,
        image_id: str = None,
    ):
        # The image ID.
        self.image_id = image_id

    def validate(self):
        pass

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

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

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


class AddImageRequest(TeaModel):
    def __init__(
        self,
        container_image_spec: AddImageRequestContainerImageSpec = None,
        description: str = None,
        image_type: str = None,
        image_version: str = None,
        name: str = None,
        vmimage_spec: AddImageRequestVMImageSpec = None,
    ):
        # The configurations of the container image.
        self.container_image_spec = container_image_spec
        # The description of the image.
        self.description = description
        # The type of the images. Valid values:
        # 
        # *   VM: virtual machine image.
        # *   Container: the container image.
        self.image_type = image_type
        # The version of the image.
        self.image_version = image_version
        # The name of the custom image.
        # 
        # This parameter is required.
        self.name = name
        # The image configuration of the virtual machine.
        self.vmimage_spec = vmimage_spec

    def validate(self):
        if self.container_image_spec:
            self.container_image_spec.validate()
        if self.vmimage_spec:
            self.vmimage_spec.validate()

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

        result = dict()
        if self.container_image_spec is not None:
            result['ContainerImageSpec'] = self.container_image_spec.to_map()
        if self.description is not None:
            result['Description'] = self.description
        if self.image_type is not None:
            result['ImageType'] = self.image_type
        if self.image_version is not None:
            result['ImageVersion'] = self.image_version
        if self.name is not None:
            result['Name'] = self.name
        if self.vmimage_spec is not None:
            result['VMImageSpec'] = self.vmimage_spec.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ContainerImageSpec') is not None:
            temp_model = AddImageRequestContainerImageSpec()
            self.container_image_spec = temp_model.from_map(m['ContainerImageSpec'])
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ImageType') is not None:
            self.image_type = m.get('ImageType')
        if m.get('ImageVersion') is not None:
            self.image_version = m.get('ImageVersion')
        if m.get('Name') is not None:
            self.name = m.get('Name')
        if m.get('VMImageSpec') is not None:
            temp_model = AddImageRequestVMImageSpec()
            self.vmimage_spec = temp_model.from_map(m['VMImageSpec'])
        return self


class AddImageShrinkRequest(TeaModel):
    def __init__(
        self,
        container_image_spec_shrink: str = None,
        description: str = None,
        image_type: str = None,
        image_version: str = None,
        name: str = None,
        vmimage_spec_shrink: str = None,
    ):
        # The configurations of the container image.
        self.container_image_spec_shrink = container_image_spec_shrink
        # The description of the image.
        self.description = description
        # The type of the images. Valid values:
        # 
        # *   VM: virtual machine image.
        # *   Container: the container image.
        self.image_type = image_type
        # The version of the image.
        self.image_version = image_version
        # The name of the custom image.
        # 
        # This parameter is required.
        self.name = name
        # The image configuration of the virtual machine.
        self.vmimage_spec_shrink = vmimage_spec_shrink

    def validate(self):
        pass

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

        result = dict()
        if self.container_image_spec_shrink is not None:
            result['ContainerImageSpec'] = self.container_image_spec_shrink
        if self.description is not None:
            result['Description'] = self.description
        if self.image_type is not None:
            result['ImageType'] = self.image_type
        if self.image_version is not None:
            result['ImageVersion'] = self.image_version
        if self.name is not None:
            result['Name'] = self.name
        if self.vmimage_spec_shrink is not None:
            result['VMImageSpec'] = self.vmimage_spec_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ContainerImageSpec') is not None:
            self.container_image_spec_shrink = m.get('ContainerImageSpec')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('ImageType') is not None:
            self.image_type = m.get('ImageType')
        if m.get('ImageVersion') is not None:
            self.image_version = m.get('ImageVersion')
        if m.get('Name') is not None:
            self.name = m.get('Name')
        if m.get('VMImageSpec') is not None:
            self.vmimage_spec_shrink = m.get('VMImageSpec')
        return self


class AddImageResponseBody(TeaModel):
    def __init__(
        self,
        image_id: str = None,
        request_id: str = None,
        success: bool = None,
    ):
        # The image ID.
        self.image_id = image_id
        # The request ID.
        self.request_id = request_id
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true
        # *   false
        self.success = success

    def validate(self):
        pass

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

        result = dict()
        if self.image_id is not None:
            result['ImageId'] = self.image_id
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ImageId') is not None:
            self.image_id = m.get('ImageId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


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

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

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

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

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


class CreateActionPlanRequestRegions(TeaModel):
    def __init__(
        self,
        region_id: str = None,
        security_group_id: List[str] = None,
        security_group_ids: List[str] = None,
        v_switch_ids: List[str] = None,
    ):
        # The region ID.
        self.region_id = region_id
        # The list of security groups available for the execution plan in the region. You can have 0 to 5 security groups.
        self.security_group_id = security_group_id
        self.security_group_ids = security_group_ids
        # The list of VSwitches available for the execution plan in the region. Supports 0 to 5 VSwitches.
        self.v_switch_ids = v_switch_ids

    def validate(self):
        pass

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

        result = dict()
        if self.region_id is not None:
            result['RegionId'] = self.region_id
        if self.security_group_id is not None:
            result['SecurityGroupId'] = self.security_group_id
        if self.security_group_ids is not None:
            result['SecurityGroupIds'] = self.security_group_ids
        if self.v_switch_ids is not None:
            result['VSwitchIds'] = self.v_switch_ids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('RegionId') is not None:
            self.region_id = m.get('RegionId')
        if m.get('SecurityGroupId') is not None:
            self.security_group_id = m.get('SecurityGroupId')
        if m.get('SecurityGroupIds') is not None:
            self.security_group_ids = m.get('SecurityGroupIds')
        if m.get('VSwitchIds') is not None:
            self.v_switch_ids = m.get('VSwitchIds')
        return self


class CreateActionPlanRequestResources(TeaModel):
    def __init__(
        self,
        cores: float = None,
        memory: float = None,
    ):
        # The number of CPUs in the running environment.
        self.cores = cores
        # The memory size of the running environment. Unit: GiB.
        self.memory = memory

    def validate(self):
        pass

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

        result = dict()
        if self.cores is not None:
            result['Cores'] = self.cores
        if self.memory is not None:
            result['Memory'] = self.memory
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Cores') is not None:
            self.cores = m.get('Cores')
        if m.get('Memory') is not None:
            self.memory = m.get('Memory')
        return self


class CreateActionPlanRequest(TeaModel):
    def __init__(
        self,
        action_plan_name: str = None,
        allocation_spec: str = None,
        app_id: str = None,
        desired_capacity: float = None,
        level: str = None,
        prolog_script: str = None,
        regions: List[CreateActionPlanRequestRegions] = None,
        resource_type: str = None,
        resources: List[CreateActionPlanRequestResources] = None,
        script: str = None,
    ):
        # The name of the execution plan.
        self.action_plan_name = action_plan_name
        # The type of the resource.
        # 
        # *   Standard
        # *   Dedicated: You must enable a whitelist for use.
        # *   Economic: You must enable a whitelist for use.
        self.allocation_spec = allocation_spec
        # The ID of the application.
        self.app_id = app_id
        # The expected scale of resources for the execution plan. If the ResourceType parameter is set to VcpuCapacity, the execution plan is expected to have 10000 vCPUs.
        self.desired_capacity = desired_capacity
        # The computing power level. This value is valid only when the resource type is Economic. The following disk categories are supported:
        # 
        # *   General
        # *   Performance
        # 
        # Default value: General
        self.level = level
        # The pre-processing script. Base64 encoding is required.
        self.prolog_script = prolog_script
        # The list of resource configurations in the region where the execution plan runs.
        self.regions = regions
        # Target resource type: the capacity of vCPUs or the number of execution nodes. Valid values:
        # 
        # *   VCpuCapacity
        # *   ExecutorCapacity
        self.resource_type = resource_type
        # The list of resource configurations of the execution plan runtime environment. You can configure 1 to 10 resources.
        self.resources = resources
        # The running-job script. Base64 encoding is required.
        self.script = script

    def validate(self):
        if self.regions:
            for k in self.regions:
                if k:
                    k.validate()
        if self.resources:
            for k in self.resources:
                if k:
                    k.validate()

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

        result = dict()
        if self.action_plan_name is not None:
            result['ActionPlanName'] = self.action_plan_name
        if self.allocation_spec is not None:
            result['AllocationSpec'] = self.allocation_spec
        if self.app_id is not None:
            result['AppId'] = self.app_id
        if self.desired_capacity is not None:
            result['DesiredCapacity'] = self.desired_capacity
        if self.level is not None:
            result['Level'] = self.level
        if self.prolog_script is not None:
            result['PrologScript'] = self.prolog_script
        result['Regions'] = []
        if self.regions is not None:
            for k in self.regions:
                result['Regions'].append(k.to_map() if k else None)
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        result['Resources'] = []
        if self.resources is not None:
            for k in self.resources:
                result['Resources'].append(k.to_map() if k else None)
        if self.script is not None:
            result['Script'] = self.script
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ActionPlanName') is not None:
            self.action_plan_name = m.get('ActionPlanName')
        if m.get('AllocationSpec') is not None:
            self.allocation_spec = m.get('AllocationSpec')
        if m.get('AppId') is not None:
            self.app_id = m.get('AppId')
        if m.get('DesiredCapacity') is not None:
            self.desired_capacity = m.get('DesiredCapacity')
        if m.get('Level') is not None:
            self.level = m.get('Level')
        if m.get('PrologScript') is not None:
            self.prolog_script = m.get('PrologScript')
        self.regions = []
        if m.get('Regions') is not None:
            for k in m.get('Regions'):
                temp_model = CreateActionPlanRequestRegions()
                self.regions.append(temp_model.from_map(k))
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        self.resources = []
        if m.get('Resources') is not None:
            for k in m.get('Resources'):
                temp_model = CreateActionPlanRequestResources()
                self.resources.append(temp_model.from_map(k))
        if m.get('Script') is not None:
            self.script = m.get('Script')
        return self


class CreateActionPlanShrinkRequest(TeaModel):
    def __init__(
        self,
        action_plan_name: str = None,
        allocation_spec: str = None,
        app_id: str = None,
        desired_capacity: float = None,
        level: str = None,
        prolog_script: str = None,
        regions_shrink: str = None,
        resource_type: str = None,
        resources_shrink: str = None,
        script: str = None,
    ):
        # The name of the execution plan.
        self.action_plan_name = action_plan_name
        # The type of the resource.
        # 
        # *   Standard
        # *   Dedicated: You must enable a whitelist for use.
        # *   Economic: You must enable a whitelist for use.
        self.allocation_spec = allocation_spec
        # The ID of the application.
        self.app_id = app_id
        # The expected scale of resources for the execution plan. If the ResourceType parameter is set to VcpuCapacity, the execution plan is expected to have 10000 vCPUs.
        self.desired_capacity = desired_capacity
        # The computing power level. This value is valid only when the resource type is Economic. The following disk categories are supported:
        # 
        # *   General
        # *   Performance
        # 
        # Default value: General
        self.level = level
        # The pre-processing script. Base64 encoding is required.
        self.prolog_script = prolog_script
        # The list of resource configurations in the region where the execution plan runs.
        self.regions_shrink = regions_shrink
        # Target resource type: the capacity of vCPUs or the number of execution nodes. Valid values:
        # 
        # *   VCpuCapacity
        # *   ExecutorCapacity
        self.resource_type = resource_type
        # The list of resource configurations of the execution plan runtime environment. You can configure 1 to 10 resources.
        self.resources_shrink = resources_shrink
        # The running-job script. Base64 encoding is required.
        self.script = script

    def validate(self):
        pass

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

        result = dict()
        if self.action_plan_name is not None:
            result['ActionPlanName'] = self.action_plan_name
        if self.allocation_spec is not None:
            result['AllocationSpec'] = self.allocation_spec
        if self.app_id is not None:
            result['AppId'] = self.app_id
        if self.desired_capacity is not None:
            result['DesiredCapacity'] = self.desired_capacity
        if self.level is not None:
            result['Level'] = self.level
        if self.prolog_script is not None:
            result['PrologScript'] = self.prolog_script
        if self.regions_shrink is not None:
            result['Regions'] = self.regions_shrink
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.resources_shrink is not None:
            result['Resources'] = self.resources_shrink
        if self.script is not None:
            result['Script'] = self.script
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ActionPlanName') is not None:
            self.action_plan_name = m.get('ActionPlanName')
        if m.get('AllocationSpec') is not None:
            self.allocation_spec = m.get('AllocationSpec')
        if m.get('AppId') is not None:
            self.app_id = m.get('AppId')
        if m.get('DesiredCapacity') is not None:
            self.desired_capacity = m.get('DesiredCapacity')
        if m.get('Level') is not None:
            self.level = m.get('Level')
        if m.get('PrologScript') is not None:
            self.prolog_script = m.get('PrologScript')
        if m.get('Regions') is not None:
            self.regions_shrink = m.get('Regions')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('Resources') is not None:
            self.resources_shrink = m.get('Resources')
        if m.get('Script') is not None:
            self.script = m.get('Script')
        return self


class CreateActionPlanResponseBody(TeaModel):
    def __init__(
        self,
        action_plan_id: str = None,
        request_id: str = None,
    ):
        # The ID of the execution plan.
        self.action_plan_id = action_plan_id
        # The 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.action_plan_id is not None:
            result['ActionPlanId'] = self.action_plan_id
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ActionPlanId') is not None:
            self.action_plan_id = m.get('ActionPlanId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


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

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

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

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

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


class CreateJobRequestDependencyPolicyJobDependency(TeaModel):
    def __init__(
        self,
        job_id: str = None,
        type: str = None,
    ):
        # The ID of the job.
        # 
        # This parameter is required.
        self.job_id = job_id
        # The type of the dependency. Valid values:
        # 
        # *   AfterSucceeded: **All subtasks** of the dependent job or array job succeed. The exit code is 0.
        # *   AfterFailed: **All subtasks** of the dependent job or array job fail. The exit code is not 0.
        # *   AfterAny: The dependent job completes (succeeds or fails).
        # *   AfterCorresponding: The subtask corresponding to the dependent array job succeeds. The exit code is 0.
        # 
        # Default value: AfterSucceeded.
        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.job_id is not None:
            result['JobId'] = self.job_id
        if self.type is not None:
            result['Type'] = self.type
        return result

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


class CreateJobRequestDependencyPolicy(TeaModel):
    def __init__(
        self,
        job_dependency: List[CreateJobRequestDependencyPolicyJobDependency] = None,
    ):
        # The job dependency. A maximum of 10 groups.
        self.job_dependency = job_dependency

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

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

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

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


class CreateJobRequestDeploymentPolicyNetwork(TeaModel):
    def __init__(
        self,
        enable_external_ip_address: bool = None,
        vswitch: List[str] = None,
    ):
        # Whether the job creates a public IP address.
        # 
        # *   true: creates a public IP address.
        # *   false: does not create a public IP address.
        # 
        # Default value: false.
        self.enable_external_ip_address = enable_external_ip_address
        # The VSwitch array.
        self.vswitch = vswitch

    def validate(self):
        pass

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

        result = dict()
        if self.enable_external_ip_address is not None:
            result['EnableExternalIpAddress'] = self.enable_external_ip_address
        if self.vswitch is not None:
            result['Vswitch'] = self.vswitch
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('EnableExternalIpAddress') is not None:
            self.enable_external_ip_address = m.get('EnableExternalIpAddress')
        if m.get('Vswitch') is not None:
            self.vswitch = m.get('Vswitch')
        return self


class CreateJobRequestDeploymentPolicyTag(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # The key of the job tag. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot contain http:// or https://. The tag key cannot start with acs: or aliyun.
        # 
        # This parameter is required.
        self.key = key
        # The value of the job tag. You can specify empty strings as tag values. The tag value can be up to 128 characters in length and cannot contain http:// or https://.
        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 CreateJobRequestDeploymentPolicy(TeaModel):
    def __init__(
        self,
        allocation_spec: str = None,
        level: str = None,
        network: CreateJobRequestDeploymentPolicyNetwork = None,
        pool: str = None,
        priority: int = None,
        tag: List[CreateJobRequestDeploymentPolicyTag] = None,
    ):
        # The resource type,
        # 
        # *   Standard
        # *   Dedicated: You must enable a whitelist for use.
        # *   Economic: You must enable a whitelist for use.
        self.allocation_spec = allocation_spec
        # The computing power level. This value is valid only when the resource type is Economic. The following disk categories are supported:
        # 
        # *   General
        # *   Performance
        # 
        # Default value: General.
        self.level = level
        # The network configuration information.
        self.network = network
        # The resource pool of the job.
        self.pool = pool
        # The priorities of the jobs. A larger value indicates a higher job scheduling priority. Valid values: 1 to 100.
        self.priority = priority
        # The tag information of the job. A maximum of 20 groups.
        self.tag = tag

    def validate(self):
        if self.network:
            self.network.validate()
        if self.tag:
            for k in self.tag:
                if k:
                    k.validate()

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

        result = dict()
        if self.allocation_spec is not None:
            result['AllocationSpec'] = self.allocation_spec
        if self.level is not None:
            result['Level'] = self.level
        if self.network is not None:
            result['Network'] = self.network.to_map()
        if self.pool is not None:
            result['Pool'] = self.pool
        if self.priority is not None:
            result['Priority'] = self.priority
        result['Tag'] = []
        if self.tag is not None:
            for k in self.tag:
                result['Tag'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('AllocationSpec') is not None:
            self.allocation_spec = m.get('AllocationSpec')
        if m.get('Level') is not None:
            self.level = m.get('Level')
        if m.get('Network') is not None:
            temp_model = CreateJobRequestDeploymentPolicyNetwork()
            self.network = temp_model.from_map(m['Network'])
        if m.get('Pool') is not None:
            self.pool = m.get('Pool')
        if m.get('Priority') is not None:
            self.priority = m.get('Priority')
        self.tag = []
        if m.get('Tag') is not None:
            for k in m.get('Tag'):
                temp_model = CreateJobRequestDeploymentPolicyTag()
                self.tag.append(temp_model.from_map(k))
        return self


class CreateJobRequestSecurityPolicySecurityGroup(TeaModel):
    def __init__(
        self,
        security_group_ids: List[str] = None,
    ):
        # The array of security group IDs.
        self.security_group_ids = security_group_ids

    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_ids is not None:
            result['SecurityGroupIds'] = self.security_group_ids
        return result

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


class CreateJobRequestSecurityPolicy(TeaModel):
    def __init__(
        self,
        security_group: CreateJobRequestSecurityPolicySecurityGroup = None,
    ):
        # The security group ID.
        self.security_group = security_group

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

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

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

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


class CreateJobRequestTasksExecutorPolicyArraySpec(TeaModel):
    def __init__(
        self,
        index_end: int = None,
        index_start: int = None,
        index_step: int = None,
    ):
        # The end value of the array job index. Valid values: 0 to 4999. The value must be greater than or equal to the value of IndexStart.
        self.index_end = index_end
        # The starting value of the array job index. Valid values: 0 to 4999.
        self.index_start = index_start
        # The interval of the array job index.
        # 
        # > If the array job property is IndexStart=1,IndexEnd=5, and IndexStep=2, the array job contains three sub-jobs. The index values of the sub-jobs are 1,3, and 5. You can access the sub-jobs by using environment variables.
        self.index_step = index_step

    def validate(self):
        pass

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

        result = dict()
        if self.index_end is not None:
            result['IndexEnd'] = self.index_end
        if self.index_start is not None:
            result['IndexStart'] = self.index_start
        if self.index_step is not None:
            result['IndexStep'] = self.index_step
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('IndexEnd') is not None:
            self.index_end = m.get('IndexEnd')
        if m.get('IndexStart') is not None:
            self.index_start = m.get('IndexStart')
        if m.get('IndexStep') is not None:
            self.index_step = m.get('IndexStep')
        return self


class CreateJobRequestTasksExecutorPolicy(TeaModel):
    def __init__(
        self,
        array_spec: CreateJobRequestTasksExecutorPolicyArraySpec = None,
        max_count: int = None,
    ):
        # The details of the array job. The index value of the sub-job is passed to the running environment through environment variables to support user business program reference. Environment variables include:
        # 
        # *   EHPC_JOB_NAME: the name of the job. This parameter corresponds to the JobName parameter.
        # *   EHPC_JOB_ID: The ID of the job.
        # *   EHPC_TASK_NAME: the name of the task. This parameter corresponds to the TaskName parameter.
        # *   EHPC_EXECUTOR_ID: The ID of the execution unit.
        # *   EHPC_ARRAY_TASK_ID: the sub-job index value.
        # *   EHPC_ARRAY_TASK_COUNT: the total number of sub-jobs.
        # *   EHPC_ARRAY_TASK_MAX: the maximum sub-job index, which corresponds to the IndexStart parameter.
        # *   EHPC_ARRAY_TASK_MIN: the minimum value of the sub-job index, which corresponds to the IndexEnd parameter.
        # *   EHPC_ARRAY_TASK_STEP: the index step size of the sub-job, which corresponds to the IndexStep parameter.
        self.array_spec = array_spec
        # The maximum number of nodes to run the job.
        # 
        # > Follow the calculation formula: `MaxCount = (IndexEnd - IndexStart) / IndexStep +1`
        self.max_count = max_count

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

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

        result = dict()
        if self.array_spec is not None:
            result['ArraySpec'] = self.array_spec.to_map()
        if self.max_count is not None:
            result['MaxCount'] = self.max_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ArraySpec') is not None:
            temp_model = CreateJobRequestTasksExecutorPolicyArraySpec()
            self.array_spec = temp_model.from_map(m['ArraySpec'])
        if m.get('MaxCount') is not None:
            self.max_count = m.get('MaxCount')
        return self


class CreateJobRequestTasksTaskSpecResourceDisks(TeaModel):
    def __init__(
        self,
        size: int = None,
        type: str = None,
    ):
        # The size of the disk. Unit: GiB.
        self.size = size
        # The type of the disk. Currently, only System is supported, which indicates the system disk.
        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.size is not None:
            result['Size'] = self.size
        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('Size') is not None:
            self.size = m.get('Size')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        return self


class CreateJobRequestTasksTaskSpecResource(TeaModel):
    def __init__(
        self,
        cores: float = None,
        disks: List[CreateJobRequestTasksTaskSpecResourceDisks] = None,
        enable_ht: bool = None,
        host_name_prefix: str = None,
        instance_types: List[str] = None,
        memory: float = None,
    ):
        # The number of CPUs in the running environment.
        self.cores = cores
        # The array of the disks.
        self.disks = disks
        self.enable_ht = enable_ht
        self.host_name_prefix = host_name_prefix
        # The instance type of the running environment. A maximum of 5 groups.
        self.instance_types = instance_types
        # The memory size of the running environment. Unit: GiB.
        self.memory = memory

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

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

        result = dict()
        if self.cores is not None:
            result['Cores'] = self.cores
        result['Disks'] = []
        if self.disks is not None:
            for k in self.disks:
                result['Disks'].append(k.to_map() if k else None)
        if self.enable_ht is not None:
            result['EnableHT'] = self.enable_ht
        if self.host_name_prefix is not None:
            result['HostNamePrefix'] = self.host_name_prefix
        if self.instance_types is not None:
            result['InstanceTypes'] = self.instance_types
        if self.memory is not None:
            result['Memory'] = self.memory
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Cores') is not None:
            self.cores = m.get('Cores')
        self.disks = []
        if m.get('Disks') is not None:
            for k in m.get('Disks'):
                temp_model = CreateJobRequestTasksTaskSpecResourceDisks()
                self.disks.append(temp_model.from_map(k))
        if m.get('EnableHT') is not None:
            self.enable_ht = m.get('EnableHT')
        if m.get('HostNamePrefix') is not None:
            self.host_name_prefix = m.get('HostNamePrefix')
        if m.get('InstanceTypes') is not None:
            self.instance_types = m.get('InstanceTypes')
        if m.get('Memory') is not None:
            self.memory = m.get('Memory')
        return self


class CreateJobRequestTasksTaskSpecRetryPolicyExitCodeActions(TeaModel):
    def __init__(
        self,
        action: str = None,
        exit_code: int = None,
    ):
        # The next step behavior of the task.
        # 
        # *   Retry: The job starts a retry when a specific exit code is hit.
        # *   Exit: The job exits when a specific exit code is hit.
        # 
        # This parameter is required.
        self.action = action
        # The task exit code, which is used together with the action to form a job retry rule. Valid values: 0 to 255.
        # 
        # This parameter is required.
        self.exit_code = exit_code

    def validate(self):
        pass

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

        result = dict()
        if self.action is not None:
            result['Action'] = self.action
        if self.exit_code is not None:
            result['ExitCode'] = self.exit_code
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Action') is not None:
            self.action = m.get('Action')
        if m.get('ExitCode') is not None:
            self.exit_code = m.get('ExitCode')
        return self


class CreateJobRequestTasksTaskSpecRetryPolicy(TeaModel):
    def __init__(
        self,
        exit_code_actions: List[CreateJobRequestTasksTaskSpecRetryPolicyExitCodeActions] = None,
        retry_count: int = None,
    ):
        # The retry rule. A maximum of 10 groups.
        self.exit_code_actions = exit_code_actions
        # The maximum number of retries. Valid values: 1 to 10. Default value: 3.
        self.retry_count = retry_count

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

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        self.exit_code_actions = []
        if m.get('ExitCodeActions') is not None:
            for k in m.get('ExitCodeActions'):
                temp_model = CreateJobRequestTasksTaskSpecRetryPolicyExitCodeActions()
                self.exit_code_actions.append(temp_model.from_map(k))
        if m.get('RetryCount') is not None:
            self.retry_count = m.get('RetryCount')
        return self


class CreateJobRequestTasksTaskSpecTaskExecutorContainerEnvironmentVars(TeaModel):
    def __init__(
        self,
        name: str = None,
        value: str = None,
    ):
        # The name of the environment variable for the container. It can be 1 to 128 characters in length. Format requirement: [0-9a-zA-Z], and underscores, cannot start with a number.
        self.name = name
        # The value of the environment variable for the container. The value must be 0 to 256 bits in length.
        self.value = value

    def validate(self):
        pass

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

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

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


class CreateJobRequestTasksTaskSpecTaskExecutorContainer(TeaModel):
    def __init__(
        self,
        app_id: str = None,
        arg: List[str] = None,
        command: List[str] = None,
        environment_vars: List[CreateJobRequestTasksTaskSpecTaskExecutorContainerEnvironmentVars] = None,
        image: str = None,
        working_dir: str = None,
    ):
        # The application ID.
        self.app_id = app_id
        # The startup argument of the init container. A maximum of 10 groups.
        self.arg = arg
        # The container startup commands. You can specify up to 20 commands. Each command can be up to 256 characters in length.
        # 
        # > 
        # 
        # *   If the start command contains spaces (for example, `sleep 60s` ), the input JSON format parameter is `["sleep", "60s"]`.
        # 
        # *   If the startup command is complex, the parameter format may be a combination of `Command: ["/bin/bash"]` and `Arg:["-c", "<customized command>"]`. The `<customized command>` is a user-defined combination of commands and can contain characters such as spaces.
        self.command = command
        # The environment variables of the container. A maximum of 20 groups.
        self.environment_vars = environment_vars
        # The image of the container.
        # 
        # This parameter is required.
        self.image = image
        # The working directory of the container.
        self.working_dir = working_dir

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

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

        result = dict()
        if self.app_id is not None:
            result['AppId'] = self.app_id
        if self.arg is not None:
            result['Arg'] = self.arg
        if self.command is not None:
            result['Command'] = self.command
        result['EnvironmentVars'] = []
        if self.environment_vars is not None:
            for k in self.environment_vars:
                result['EnvironmentVars'].append(k.to_map() if k else None)
        if self.image is not None:
            result['Image'] = self.image
        if self.working_dir is not None:
            result['WorkingDir'] = self.working_dir
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('AppId') is not None:
            self.app_id = m.get('AppId')
        if m.get('Arg') is not None:
            self.arg = m.get('Arg')
        if m.get('Command') is not None:
            self.command = m.get('Command')
        self.environment_vars = []
        if m.get('EnvironmentVars') is not None:
            for k in m.get('EnvironmentVars'):
                temp_model = CreateJobRequestTasksTaskSpecTaskExecutorContainerEnvironmentVars()
                self.environment_vars.append(temp_model.from_map(k))
        if m.get('Image') is not None:
            self.image = m.get('Image')
        if m.get('WorkingDir') is not None:
            self.working_dir = m.get('WorkingDir')
        return self


class CreateJobRequestTasksTaskSpecTaskExecutorVM(TeaModel):
    def __init__(
        self,
        app_id: str = None,
        image: str = None,
        password: str = None,
        prolog_script: str = None,
        script: str = None,
    ):
        # The ID of the virtual machine application.
        self.app_id = app_id
        # The ID of the image.
        # 
        # This parameter is required.
        self.image = image
        # The logon password of the virtual machine environment. The password must be 8 to 30 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The following special characters are supported:
        # 
        # ()\\`~!@#$%^&\\*-_+=|{}[]:;\\"<>,.?/ In Windows, the password cannot contain a forward slash (/) as the first character.
        # 
        # > We recommend that you use HTTPS to send requests if you specify Password to avoid password leakage.
        self.password = password
        # The pre-processing script. Base64 encoding is required.
        self.prolog_script = prolog_script
        # The running-job script. Base64 encoding is required.
        self.script = script

    def validate(self):
        pass

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

        result = dict()
        if self.app_id is not None:
            result['AppId'] = self.app_id
        if self.image is not None:
            result['Image'] = self.image
        if self.password is not None:
            result['Password'] = self.password
        if self.prolog_script is not None:
            result['PrologScript'] = self.prolog_script
        if self.script is not None:
            result['Script'] = self.script
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('AppId') is not None:
            self.app_id = m.get('AppId')
        if m.get('Image') is not None:
            self.image = m.get('Image')
        if m.get('Password') is not None:
            self.password = m.get('Password')
        if m.get('PrologScript') is not None:
            self.prolog_script = m.get('PrologScript')
        if m.get('Script') is not None:
            self.script = m.get('Script')
        return self


class CreateJobRequestTasksTaskSpecTaskExecutor(TeaModel):
    def __init__(
        self,
        container: CreateJobRequestTasksTaskSpecTaskExecutorContainer = None,
        vm: CreateJobRequestTasksTaskSpecTaskExecutorVM = None,
    ):
        # Use the container environment.
        self.container = container
        # Use a virtual machine environment.
        self.vm = vm

    def validate(self):
        if self.container:
            self.container.validate()
        if self.vm:
            self.vm.validate()

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

        result = dict()
        if self.container is not None:
            result['Container'] = self.container.to_map()
        if self.vm is not None:
            result['VM'] = self.vm.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Container') is not None:
            temp_model = CreateJobRequestTasksTaskSpecTaskExecutorContainer()
            self.container = temp_model.from_map(m['Container'])
        if m.get('VM') is not None:
            temp_model = CreateJobRequestTasksTaskSpecTaskExecutorVM()
            self.vm = temp_model.from_map(m['VM'])
        return self


class CreateJobRequestTasksTaskSpecVolumeMount(TeaModel):
    def __init__(
        self,
        mount_options: str = None,
        mount_path: str = None,
        read_only: bool = None,
        volume_driver: str = None,
    ):
        # The list of data volume mount parameters. Each option is a key-value pair in a JSON string.
        # 
        # *   Format for mounting a NAS file system:{"server":"xxxxx-xxxxx.cn-heyuan.nas.aliyuncs.com","vers":"3","path":"/data","options":"nolock,tcp,noresvport"}
        # 
        # > server indicates the address of the mount point of the NAS file system. path indicates the subdirectory of the NAS file system. The subdirectory must start with a (/) and must already exist. vers indicates the version number of the NFS protocol used to mount the file system. We recommend that you use v3. options indicates the custom parameters in the format of "xxx,xxx,xxx".
        # 
        # *   OSS mount format:{"bucket":"xxxxx", "url":"oss-cn-heyuan-internal.aliyuncs.com","path":"/data","akId":"xxxxx","akSecret":"xxxxx"}
        # 
        # > bucket indicates the name of the OSS bucket. url indicates the endpoint of the OSS bucket. You can log on to the OSS console and obtain the endpoint on the Overview page of the destination bucket. path indicates the directory structure of the root file of the bucket. The default value is /, which requires that the directory already exists. akId indicates the AccessKey ID. akSecret indicates the AccessKey secret.
        self.mount_options = mount_options
        # The directory where the task mounts the data volume.
        # 
        # > The content of the mounted directory is overwritten by the content of the volume. Exercise caution when you use the directory.
        self.mount_path = mount_path
        # Specifies whether the volume is read-only. Default value: false.
        self.read_only = read_only
        # Currently supported data volume types.
        # 
        # *   alicloud/nas: mounts NAS.
        # *   alicloud/oss: mounts OSS.
        self.volume_driver = volume_driver

    def validate(self):
        pass

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

        result = dict()
        if self.mount_options is not None:
            result['MountOptions'] = self.mount_options
        if self.mount_path is not None:
            result['MountPath'] = self.mount_path
        if self.read_only is not None:
            result['ReadOnly'] = self.read_only
        if self.volume_driver is not None:
            result['VolumeDriver'] = self.volume_driver
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('MountOptions') is not None:
            self.mount_options = m.get('MountOptions')
        if m.get('MountPath') is not None:
            self.mount_path = m.get('MountPath')
        if m.get('ReadOnly') is not None:
            self.read_only = m.get('ReadOnly')
        if m.get('VolumeDriver') is not None:
            self.volume_driver = m.get('VolumeDriver')
        return self


class CreateJobRequestTasksTaskSpec(TeaModel):
    def __init__(
        self,
        resource: CreateJobRequestTasksTaskSpecResource = None,
        retry_policy: CreateJobRequestTasksTaskSpecRetryPolicy = None,
        task_executor: List[CreateJobRequestTasksTaskSpecTaskExecutor] = None,
        volume_mount: List[CreateJobRequestTasksTaskSpecVolumeMount] = None,
    ):
        # The resource information of the running environment.
        self.resource = resource
        # Task retry policy.
        self.retry_policy = retry_policy
        # The task execution configurations.
        # 
        # This parameter is required.
        self.task_executor = task_executor
        # The list of data volumes mounted to the task. A maximum of 10 groups.
        self.volume_mount = volume_mount

    def validate(self):
        if self.resource:
            self.resource.validate()
        if self.retry_policy:
            self.retry_policy.validate()
        if self.task_executor:
            for k in self.task_executor:
                if k:
                    k.validate()
        if self.volume_mount:
            for k in self.volume_mount:
                if k:
                    k.validate()

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

        result = dict()
        if self.resource is not None:
            result['Resource'] = self.resource.to_map()
        if self.retry_policy is not None:
            result['RetryPolicy'] = self.retry_policy.to_map()
        result['TaskExecutor'] = []
        if self.task_executor is not None:
            for k in self.task_executor:
                result['TaskExecutor'].append(k.to_map() if k else None)
        result['VolumeMount'] = []
        if self.volume_mount is not None:
            for k in self.volume_mount:
                result['VolumeMount'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Resource') is not None:
            temp_model = CreateJobRequestTasksTaskSpecResource()
            self.resource = temp_model.from_map(m['Resource'])
        if m.get('RetryPolicy') is not None:
            temp_model = CreateJobRequestTasksTaskSpecRetryPolicy()
            self.retry_policy = temp_model.from_map(m['RetryPolicy'])
        self.task_executor = []
        if m.get('TaskExecutor') is not None:
            for k in m.get('TaskExecutor'):
                temp_model = CreateJobRequestTasksTaskSpecTaskExecutor()
                self.task_executor.append(temp_model.from_map(k))
        self.volume_mount = []
        if m.get('VolumeMount') is not None:
            for k in m.get('VolumeMount'):
                temp_model = CreateJobRequestTasksTaskSpecVolumeMount()
                self.volume_mount.append(temp_model.from_map(k))
        return self


class CreateJobRequestTasks(TeaModel):
    def __init__(
        self,
        executor_policy: CreateJobRequestTasksExecutorPolicy = None,
        task_name: str = None,
        task_spec: CreateJobRequestTasksTaskSpec = None,
        task_sustainable: bool = None,
    ):
        # The task execution policy.
        self.executor_policy = executor_policy
        # The job name. It must be 2 to 32 characters in length and can contain letters, digits, and Chinese characters. It can contain hyphens (-) and underscores (_).
        self.task_name = task_name
        # The details of the task specification.
        self.task_spec = task_spec
        # Indicate whether the job is a long-running job.
        # 
        # *   true: background service the job.
        # *   false: batch jobs.
        # 
        # Default value: false.
        self.task_sustainable = task_sustainable

    def validate(self):
        if self.executor_policy:
            self.executor_policy.validate()
        if self.task_spec:
            self.task_spec.validate()

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

        result = dict()
        if self.executor_policy is not None:
            result['ExecutorPolicy'] = self.executor_policy.to_map()
        if self.task_name is not None:
            result['TaskName'] = self.task_name
        if self.task_spec is not None:
            result['TaskSpec'] = self.task_spec.to_map()
        if self.task_sustainable is not None:
            result['TaskSustainable'] = self.task_sustainable
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ExecutorPolicy') is not None:
            temp_model = CreateJobRequestTasksExecutorPolicy()
            self.executor_policy = temp_model.from_map(m['ExecutorPolicy'])
        if m.get('TaskName') is not None:
            self.task_name = m.get('TaskName')
        if m.get('TaskSpec') is not None:
            temp_model = CreateJobRequestTasksTaskSpec()
            self.task_spec = temp_model.from_map(m['TaskSpec'])
        if m.get('TaskSustainable') is not None:
            self.task_sustainable = m.get('TaskSustainable')
        return self


class CreateJobRequest(TeaModel):
    def __init__(
        self,
        dependency_policy: CreateJobRequestDependencyPolicy = None,
        deployment_policy: CreateJobRequestDeploymentPolicy = None,
        job_description: str = None,
        job_name: str = None,
        job_scheduler: str = None,
        security_policy: CreateJobRequestSecurityPolicy = None,
        tasks: List[CreateJobRequestTasks] = None,
    ):
        # Dependency policy.
        self.dependency_policy = dependency_policy
        # The resource deployment policy.
        self.deployment_policy = deployment_policy
        # The description of the job.
        self.job_description = job_description
        # The job name. The name must be 2 to 64 characters in length and can contain letters, digits, and Chinese characters. It can contain hyphens (-) and underscores (_).
        # 
        # This parameter is required.
        self.job_name = job_name
        # The type of the job scheduler.
        # 
        # *   HPC
        # *   K8S
        # 
        # Default value: HPC
        self.job_scheduler = job_scheduler
        # The security policy.
        self.security_policy = security_policy
        # The list of tasks. Only one task is supported.
        # 
        # This parameter is required.
        self.tasks = tasks

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

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

        result = dict()
        if self.dependency_policy is not None:
            result['DependencyPolicy'] = self.dependency_policy.to_map()
        if self.deployment_policy is not None:
            result['DeploymentPolicy'] = self.deployment_policy.to_map()
        if self.job_description is not None:
            result['JobDescription'] = self.job_description
        if self.job_name is not None:
            result['JobName'] = self.job_name
        if self.job_scheduler is not None:
            result['JobScheduler'] = self.job_scheduler
        if self.security_policy is not None:
            result['SecurityPolicy'] = self.security_policy.to_map()
        result['Tasks'] = []
        if self.tasks is not None:
            for k in self.tasks:
                result['Tasks'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('DependencyPolicy') is not None:
            temp_model = CreateJobRequestDependencyPolicy()
            self.dependency_policy = temp_model.from_map(m['DependencyPolicy'])
        if m.get('DeploymentPolicy') is not None:
            temp_model = CreateJobRequestDeploymentPolicy()
            self.deployment_policy = temp_model.from_map(m['DeploymentPolicy'])
        if m.get('JobDescription') is not None:
            self.job_description = m.get('JobDescription')
        if m.get('JobName') is not None:
            self.job_name = m.get('JobName')
        if m.get('JobScheduler') is not None:
            self.job_scheduler = m.get('JobScheduler')
        if m.get('SecurityPolicy') is not None:
            temp_model = CreateJobRequestSecurityPolicy()
            self.security_policy = temp_model.from_map(m['SecurityPolicy'])
        self.tasks = []
        if m.get('Tasks') is not None:
            for k in m.get('Tasks'):
                temp_model = CreateJobRequestTasks()
                self.tasks.append(temp_model.from_map(k))
        return self


class CreateJobShrinkRequest(TeaModel):
    def __init__(
        self,
        dependency_policy_shrink: str = None,
        deployment_policy_shrink: str = None,
        job_description: str = None,
        job_name: str = None,
        job_scheduler: str = None,
        security_policy_shrink: str = None,
        tasks_shrink: str = None,
    ):
        # Dependency policy.
        self.dependency_policy_shrink = dependency_policy_shrink
        # The resource deployment policy.
        self.deployment_policy_shrink = deployment_policy_shrink
        # The description of the job.
        self.job_description = job_description
        # The job name. The name must be 2 to 64 characters in length and can contain letters, digits, and Chinese characters. It can contain hyphens (-) and underscores (_).
        # 
        # This parameter is required.
        self.job_name = job_name
        # The type of the job scheduler.
        # 
        # *   HPC
        # *   K8S
        # 
        # Default value: HPC
        self.job_scheduler = job_scheduler
        # The security policy.
        self.security_policy_shrink = security_policy_shrink
        # The list of tasks. Only one task is supported.
        # 
        # This parameter is required.
        self.tasks_shrink = tasks_shrink

    def validate(self):
        pass

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

        result = dict()
        if self.dependency_policy_shrink is not None:
            result['DependencyPolicy'] = self.dependency_policy_shrink
        if self.deployment_policy_shrink is not None:
            result['DeploymentPolicy'] = self.deployment_policy_shrink
        if self.job_description is not None:
            result['JobDescription'] = self.job_description
        if self.job_name is not None:
            result['JobName'] = self.job_name
        if self.job_scheduler is not None:
            result['JobScheduler'] = self.job_scheduler
        if self.security_policy_shrink is not None:
            result['SecurityPolicy'] = self.security_policy_shrink
        if self.tasks_shrink is not None:
            result['Tasks'] = self.tasks_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('DependencyPolicy') is not None:
            self.dependency_policy_shrink = m.get('DependencyPolicy')
        if m.get('DeploymentPolicy') is not None:
            self.deployment_policy_shrink = m.get('DeploymentPolicy')
        if m.get('JobDescription') is not None:
            self.job_description = m.get('JobDescription')
        if m.get('JobName') is not None:
            self.job_name = m.get('JobName')
        if m.get('JobScheduler') is not None:
            self.job_scheduler = m.get('JobScheduler')
        if m.get('SecurityPolicy') is not None:
            self.security_policy_shrink = m.get('SecurityPolicy')
        if m.get('Tasks') is not None:
            self.tasks_shrink = m.get('Tasks')
        return self


class CreateJobResponseBodyTasks(TeaModel):
    def __init__(
        self,
        executor_ids: List[str] = None,
        task_name: str = None,
    ):
        # The list of executor IDs contained in the task.
        self.executor_ids = executor_ids
        # The name of the task.
        self.task_name = task_name

    def validate(self):
        pass

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

        result = dict()
        if self.executor_ids is not None:
            result['ExecutorIds'] = self.executor_ids
        if self.task_name is not None:
            result['TaskName'] = self.task_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ExecutorIds') is not None:
            self.executor_ids = m.get('ExecutorIds')
        if m.get('TaskName') is not None:
            self.task_name = m.get('TaskName')
        return self


class CreateJobResponseBody(TeaModel):
    def __init__(
        self,
        job_id: str = None,
        request_id: str = None,
        tasks: List[CreateJobResponseBodyTasks] = None,
    ):
        # The job ID.
        self.job_id = job_id
        # The request ID.
        self.request_id = request_id
        # The list of tasks.
        self.tasks = tasks

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

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        self.tasks = []
        if m.get('Tasks') is not None:
            for k in m.get('Tasks'):
                temp_model = CreateJobResponseBodyTasks()
                self.tasks.append(temp_model.from_map(k))
        return self


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

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

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

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

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


class CreatePoolRequestResourceLimits(TeaModel):
    def __init__(
        self,
        max_exector_num: int = None,
    ):
        # The maximum number of concurrent execution nodes in a resource pool.
        self.max_exector_num = max_exector_num

    def validate(self):
        pass

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

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

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


class CreatePoolRequest(TeaModel):
    def __init__(
        self,
        pool_name: str = None,
        priority: int = None,
        resource_limits: CreatePoolRequestResourceLimits = None,
    ):
        # The name of the resource pool.
        # 
        # *   The name can be up to 15 characters in length.
        # *   It can contain digits, uppercase letters, lowercase letters, underscores (_), and dots (.).
        # 
        # This parameter is required.
        self.pool_name = pool_name
        # The priority of the resource pool.
        # 
        # *   You can set a priority in the range of 1 to 99. The default value is 1, which is the lowest priority.
        # *   Jobs submitted to a resource pool with a higher priority level value will be scheduled before pending jobs in a resource pool with a lower priority level value, and the priority level of the resource pool takes precedence over the priority of the job.
        self.priority = priority
        # The quota of resources that users are allowed to concurrently use in a resource pool.
        self.resource_limits = resource_limits

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

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

        result = dict()
        if self.pool_name is not None:
            result['PoolName'] = self.pool_name
        if self.priority is not None:
            result['Priority'] = self.priority
        if self.resource_limits is not None:
            result['ResourceLimits'] = self.resource_limits.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('PoolName') is not None:
            self.pool_name = m.get('PoolName')
        if m.get('Priority') is not None:
            self.priority = m.get('Priority')
        if m.get('ResourceLimits') is not None:
            temp_model = CreatePoolRequestResourceLimits()
            self.resource_limits = temp_model.from_map(m['ResourceLimits'])
        return self


class CreatePoolShrinkRequest(TeaModel):
    def __init__(
        self,
        pool_name: str = None,
        priority: int = None,
        resource_limits_shrink: str = None,
    ):
        # The name of the resource pool.
        # 
        # *   The name can be up to 15 characters in length.
        # *   It can contain digits, uppercase letters, lowercase letters, underscores (_), and dots (.).
        # 
        # This parameter is required.
        self.pool_name = pool_name
        # The priority of the resource pool.
        # 
        # *   You can set a priority in the range of 1 to 99. The default value is 1, which is the lowest priority.
        # *   Jobs submitted to a resource pool with a higher priority level value will be scheduled before pending jobs in a resource pool with a lower priority level value, and the priority level of the resource pool takes precedence over the priority of the job.
        self.priority = priority
        # The quota of resources that users are allowed to concurrently use in a resource pool.
        self.resource_limits_shrink = resource_limits_shrink

    def validate(self):
        pass

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

        result = dict()
        if self.pool_name is not None:
            result['PoolName'] = self.pool_name
        if self.priority is not None:
            result['Priority'] = self.priority
        if self.resource_limits_shrink is not None:
            result['ResourceLimits'] = self.resource_limits_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('PoolName') is not None:
            self.pool_name = m.get('PoolName')
        if m.get('Priority') is not None:
            self.priority = m.get('Priority')
        if m.get('ResourceLimits') is not None:
            self.resource_limits_shrink = m.get('ResourceLimits')
        return self


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

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class DeleteActionPlanRequest(TeaModel):
    def __init__(
        self,
        action_plan_id: str = None,
    ):
        # The ID of the execution plan.
        self.action_plan_id = action_plan_id

    def validate(self):
        pass

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

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

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


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

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class DeleteJobRecordsRequest(TeaModel):
    def __init__(
        self,
        job_ids: List[str] = None,
    ):
        # The list of job IDs.
        self.job_ids = job_ids

    def validate(self):
        pass

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

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

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


class DeleteJobRecordsShrinkRequest(TeaModel):
    def __init__(
        self,
        job_ids_shrink: str = None,
    ):
        # The list of job IDs.
        self.job_ids_shrink = job_ids_shrink

    def validate(self):
        pass

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

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

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


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

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class DeleteJobsRequestJobSpecTaskSpec(TeaModel):
    def __init__(
        self,
        array_index: List[int] = None,
        task_name: str = None,
    ):
        # The list of array job indexes to be deleted.
        self.array_index = array_index
        # The name of the task to be deleted.
        self.task_name = task_name

    def validate(self):
        pass

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

        result = dict()
        if self.array_index is not None:
            result['ArrayIndex'] = self.array_index
        if self.task_name is not None:
            result['TaskName'] = self.task_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ArrayIndex') is not None:
            self.array_index = m.get('ArrayIndex')
        if m.get('TaskName') is not None:
            self.task_name = m.get('TaskName')
        return self


class DeleteJobsRequestJobSpec(TeaModel):
    def __init__(
        self,
        job_id: str = None,
        task_spec: List[DeleteJobsRequestJobSpecTaskSpec] = None,
    ):
        # The ID of the job to be deleted.\\
        # You can call the ListJobs operation to query job IDs.
        self.job_id = job_id
        # The task details of the job to be deleted.
        self.task_spec = task_spec

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

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        self.task_spec = []
        if m.get('TaskSpec') is not None:
            for k in m.get('TaskSpec'):
                temp_model = DeleteJobsRequestJobSpecTaskSpec()
                self.task_spec.append(temp_model.from_map(k))
        return self


class DeleteJobsRequest(TeaModel):
    def __init__(
        self,
        executor_ids: List[str] = None,
        job_scheduler: str = None,
        job_spec: List[DeleteJobsRequestJobSpec] = None,
    ):
        # The list of executor IDs. A maximum of 100 IDs are supported.
        self.executor_ids = executor_ids
        # The type of the job scheduler.
        # 
        # *   HPC
        # *   K8S
        # 
        # Default value: HPC
        self.job_scheduler = job_scheduler
        # The information about the job to be deleted.
        self.job_spec = job_spec

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

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

        result = dict()
        if self.executor_ids is not None:
            result['ExecutorIds'] = self.executor_ids
        if self.job_scheduler is not None:
            result['JobScheduler'] = self.job_scheduler
        result['JobSpec'] = []
        if self.job_spec is not None:
            for k in self.job_spec:
                result['JobSpec'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ExecutorIds') is not None:
            self.executor_ids = m.get('ExecutorIds')
        if m.get('JobScheduler') is not None:
            self.job_scheduler = m.get('JobScheduler')
        self.job_spec = []
        if m.get('JobSpec') is not None:
            for k in m.get('JobSpec'):
                temp_model = DeleteJobsRequestJobSpec()
                self.job_spec.append(temp_model.from_map(k))
        return self


class DeleteJobsShrinkRequest(TeaModel):
    def __init__(
        self,
        executor_ids_shrink: str = None,
        job_scheduler: str = None,
        job_spec_shrink: str = None,
    ):
        # The list of executor IDs. A maximum of 100 IDs are supported.
        self.executor_ids_shrink = executor_ids_shrink
        # The type of the job scheduler.
        # 
        # *   HPC
        # *   K8S
        # 
        # Default value: HPC
        self.job_scheduler = job_scheduler
        # The information about the job to be deleted.
        self.job_spec_shrink = job_spec_shrink

    def validate(self):
        pass

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

        result = dict()
        if self.executor_ids_shrink is not None:
            result['ExecutorIds'] = self.executor_ids_shrink
        if self.job_scheduler is not None:
            result['JobScheduler'] = self.job_scheduler
        if self.job_spec_shrink is not None:
            result['JobSpec'] = self.job_spec_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ExecutorIds') is not None:
            self.executor_ids_shrink = m.get('ExecutorIds')
        if m.get('JobScheduler') is not None:
            self.job_scheduler = m.get('JobScheduler')
        if m.get('JobSpec') is not None:
            self.job_spec_shrink = m.get('JobSpec')
        return self


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

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class DeletePoolRequest(TeaModel):
    def __init__(
        self,
        pool_name: str = None,
    ):
        # The name of the resource pool.
        # 
        # *   The value can be up to 15 characters in length.
        # *   It can contain digits, uppercase letters, lowercase letters, underscores (_), and dots (.).
        # 
        # This parameter is required.
        self.pool_name = pool_name

    def validate(self):
        pass

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

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

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


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

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class DescribeJobMetricDataRequest(TeaModel):
    def __init__(
        self,
        array_index: List[int] = None,
        job_id: str = None,
        metric_name: str = None,
        task_name: str = None,
    ):
        # The list of array job indexes.
        self.array_index = array_index
        # The job ID.
        self.job_id = job_id
        # The metrics of the job.
        self.metric_name = metric_name
        # The name of the task.
        self.task_name = task_name

    def validate(self):
        pass

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

        result = dict()
        if self.array_index is not None:
            result['ArrayIndex'] = self.array_index
        if self.job_id is not None:
            result['JobId'] = self.job_id
        if self.metric_name is not None:
            result['MetricName'] = self.metric_name
        if self.task_name is not None:
            result['TaskName'] = self.task_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ArrayIndex') is not None:
            self.array_index = m.get('ArrayIndex')
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        if m.get('MetricName') is not None:
            self.metric_name = m.get('MetricName')
        if m.get('TaskName') is not None:
            self.task_name = m.get('TaskName')
        return self


class DescribeJobMetricDataShrinkRequest(TeaModel):
    def __init__(
        self,
        array_index_shrink: str = None,
        job_id: str = None,
        metric_name: str = None,
        task_name: str = None,
    ):
        # The list of array job indexes.
        self.array_index_shrink = array_index_shrink
        # The job ID.
        self.job_id = job_id
        # The metrics of the job.
        self.metric_name = metric_name
        # The name of the task.
        self.task_name = task_name

    def validate(self):
        pass

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

        result = dict()
        if self.array_index_shrink is not None:
            result['ArrayIndex'] = self.array_index_shrink
        if self.job_id is not None:
            result['JobId'] = self.job_id
        if self.metric_name is not None:
            result['MetricName'] = self.metric_name
        if self.task_name is not None:
            result['TaskName'] = self.task_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ArrayIndex') is not None:
            self.array_index_shrink = m.get('ArrayIndex')
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        if m.get('MetricName') is not None:
            self.metric_name = m.get('MetricName')
        if m.get('TaskName') is not None:
            self.task_name = m.get('TaskName')
        return self


class DescribeJobMetricDataResponseBody(TeaModel):
    def __init__(
        self,
        data_points: str = None,
        period: int = None,
        request_id: str = None,
    ):
        # Monitoring statistics points.
        self.data_points = data_points
        # The statistical period of the monitoring data. Valid values: 15, 60, 900, and 3600. Unit: seconds.
        self.period = period
        # The 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.data_points is not None:
            result['DataPoints'] = self.data_points
        if self.period is not None:
            result['Period'] = self.period
        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('DataPoints') is not None:
            self.data_points = m.get('DataPoints')
        if m.get('Period') is not None:
            self.period = m.get('Period')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        return self


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

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

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

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

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


class DescribeJobMetricLastRequest(TeaModel):
    def __init__(
        self,
        array_index: List[int] = None,
        job_id: str = None,
        task_name: str = None,
    ):
        # The list of array job indexes.
        self.array_index = array_index
        # The job ID.
        self.job_id = job_id
        # The name of the task.
        self.task_name = task_name

    def validate(self):
        pass

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

        result = dict()
        if self.array_index is not None:
            result['ArrayIndex'] = self.array_index
        if self.job_id is not None:
            result['JobId'] = self.job_id
        if self.task_name is not None:
            result['TaskName'] = self.task_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ArrayIndex') is not None:
            self.array_index = m.get('ArrayIndex')
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        if m.get('TaskName') is not None:
            self.task_name = m.get('TaskName')
        return self


class DescribeJobMetricLastShrinkRequest(TeaModel):
    def __init__(
        self,
        array_index_shrink: str = None,
        job_id: str = None,
        task_name: str = None,
    ):
        # The list of array job indexes.
        self.array_index_shrink = array_index_shrink
        # The job ID.
        self.job_id = job_id
        # The name of the task.
        self.task_name = task_name

    def validate(self):
        pass

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

        result = dict()
        if self.array_index_shrink is not None:
            result['ArrayIndex'] = self.array_index_shrink
        if self.job_id is not None:
            result['JobId'] = self.job_id
        if self.task_name is not None:
            result['TaskName'] = self.task_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ArrayIndex') is not None:
            self.array_index_shrink = m.get('ArrayIndex')
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        if m.get('TaskName') is not None:
            self.task_name = m.get('TaskName')
        return self


class DescribeJobMetricLastResponseBodyMetrics(TeaModel):
    def __init__(
        self,
        array_index: int = None,
        metric: str = None,
    ):
        # The index of the array job.
        self.array_index = array_index
        # The monitoring item information corresponding to the array job index.
        self.metric = metric

    def validate(self):
        pass

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

        result = dict()
        if self.array_index is not None:
            result['ArrayIndex'] = self.array_index
        if self.metric is not None:
            result['Metric'] = self.metric
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ArrayIndex') is not None:
            self.array_index = m.get('ArrayIndex')
        if m.get('Metric') is not None:
            self.metric = m.get('Metric')
        return self


class DescribeJobMetricLastResponseBody(TeaModel):
    def __init__(
        self,
        metrics: List[DescribeJobMetricLastResponseBodyMetrics] = None,
        request_id: str = None,
    ):
        # The list of the JobMetric details.
        self.metrics = metrics
        # The request ID.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class GetActionPlanRequest(TeaModel):
    def __init__(
        self,
        action_plan_id: str = None,
    ):
        # The ID of the execution plan.
        self.action_plan_id = action_plan_id

    def validate(self):
        pass

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

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

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


class GetActionPlanResponseBodyRegions(TeaModel):
    def __init__(
        self,
        region_id: str = None,
        security_group_ids: List[str] = None,
        v_switch_ids: List[str] = None,
    ):
        # The region ID of the instance.
        self.region_id = region_id
        # The list of security groups available for the execution plan in the region.
        self.security_group_ids = security_group_ids
        # The list of VSwitches available for the execution plan in the region.
        self.v_switch_ids = v_switch_ids

    def validate(self):
        pass

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

        result = dict()
        if self.region_id is not None:
            result['RegionId'] = self.region_id
        if self.security_group_ids is not None:
            result['SecurityGroupIds'] = self.security_group_ids
        if self.v_switch_ids is not None:
            result['VSwitchIds'] = self.v_switch_ids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('RegionId') is not None:
            self.region_id = m.get('RegionId')
        if m.get('SecurityGroupIds') is not None:
            self.security_group_ids = m.get('SecurityGroupIds')
        if m.get('VSwitchIds') is not None:
            self.v_switch_ids = m.get('VSwitchIds')
        return self


class GetActionPlanResponseBodyResources(TeaModel):
    def __init__(
        self,
        cores: float = None,
        memory: float = None,
    ):
        # The number of CPUs in the running environment.
        self.cores = cores
        # The memory size of the running environment. Unit: GiB.
        self.memory = memory

    def validate(self):
        pass

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

        result = dict()
        if self.cores is not None:
            result['Cores'] = self.cores
        if self.memory is not None:
            result['Memory'] = self.memory
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Cores') is not None:
            self.cores = m.get('Cores')
        if m.get('Memory') is not None:
            self.memory = m.get('Memory')
        return self


class GetActionPlanResponseBody(TeaModel):
    def __init__(
        self,
        action_plan_id: str = None,
        action_plan_name: str = None,
        allocation_spec: str = None,
        app_id: str = None,
        create_time: str = None,
        desired_capacity: float = None,
        level: str = None,
        prolog_script: str = None,
        regions: List[GetActionPlanResponseBodyRegions] = None,
        request_id: str = None,
        resource_type: str = None,
        resources: List[GetActionPlanResponseBodyResources] = None,
        status: str = None,
        total_capacity: float = None,
        update_time: str = None,
    ):
        # The ID of the execution plan.
        self.action_plan_id = action_plan_id
        # The name of the execution plan.
        self.action_plan_name = action_plan_name
        # The type of the resource.
        self.allocation_spec = allocation_spec
        # The ID of the application.
        self.app_id = app_id
        # The time when the execution plan was created.
        self.create_time = create_time
        # The expected scale of resources for the execution plan. If the ResourceType parameter is set to VcpuCapacity, the execution plan is expected to have 10000 vCPUs.
        self.desired_capacity = desired_capacity
        # The computing power level.
        self.level = level
        # The pre-processing script. Base64 encoding is required.
        self.prolog_script = prolog_script
        # The list of resource configurations in the region where the execution plan runs.
        self.regions = regions
        # The request ID.
        self.request_id = request_id
        # Target resource type: the capacity of vCPUs or the number of execution nodes. Valid values:
        # 
        # *   VCpuCapacity
        # *   ExecutorCapacity
        self.resource_type = resource_type
        # The list of resource configurations of the execution plan runtime environment.
        self.resources = resources
        # The status of the execution plan. The possible values are as follows:
        # 
        # *   Active Instant tasks are dynamically managed only when the execution plan is in the Active state.
        # *   Inactive Instant tasks are no longer managed by execution plans in the Inactive state.
        # *   Deleting You cannot modify the parameters of an execution plan in this state.
        self.status = status
        # The size of the resources currently managed by the execution plan.
        self.total_capacity = total_capacity
        # The time when the execution plan was last modified.
        self.update_time = update_time

    def validate(self):
        if self.regions:
            for k in self.regions:
                if k:
                    k.validate()
        if self.resources:
            for k in self.resources:
                if k:
                    k.validate()

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

        result = dict()
        if self.action_plan_id is not None:
            result['ActionPlanId'] = self.action_plan_id
        if self.action_plan_name is not None:
            result['ActionPlanName'] = self.action_plan_name
        if self.allocation_spec is not None:
            result['AllocationSpec'] = self.allocation_spec
        if self.app_id is not None:
            result['AppId'] = self.app_id
        if self.create_time is not None:
            result['CreateTime'] = self.create_time
        if self.desired_capacity is not None:
            result['DesiredCapacity'] = self.desired_capacity
        if self.level is not None:
            result['Level'] = self.level
        if self.prolog_script is not None:
            result['PrologScript'] = self.prolog_script
        result['Regions'] = []
        if self.regions is not None:
            for k in self.regions:
                result['Regions'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        result['Resources'] = []
        if self.resources is not None:
            for k in self.resources:
                result['Resources'].append(k.to_map() if k else None)
        if self.status is not None:
            result['Status'] = self.status
        if self.total_capacity is not None:
            result['TotalCapacity'] = self.total_capacity
        if self.update_time is not None:
            result['UpdateTime'] = self.update_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ActionPlanId') is not None:
            self.action_plan_id = m.get('ActionPlanId')
        if m.get('ActionPlanName') is not None:
            self.action_plan_name = m.get('ActionPlanName')
        if m.get('AllocationSpec') is not None:
            self.allocation_spec = m.get('AllocationSpec')
        if m.get('AppId') is not None:
            self.app_id = m.get('AppId')
        if m.get('CreateTime') is not None:
            self.create_time = m.get('CreateTime')
        if m.get('DesiredCapacity') is not None:
            self.desired_capacity = m.get('DesiredCapacity')
        if m.get('Level') is not None:
            self.level = m.get('Level')
        if m.get('PrologScript') is not None:
            self.prolog_script = m.get('PrologScript')
        self.regions = []
        if m.get('Regions') is not None:
            for k in m.get('Regions'):
                temp_model = GetActionPlanResponseBodyRegions()
                self.regions.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        self.resources = []
        if m.get('Resources') is not None:
            for k in m.get('Resources'):
                temp_model = GetActionPlanResponseBodyResources()
                self.resources.append(temp_model.from_map(k))
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('TotalCapacity') is not None:
            self.total_capacity = m.get('TotalCapacity')
        if m.get('UpdateTime') is not None:
            self.update_time = m.get('UpdateTime')
        return self


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

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

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

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

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


class GetAppVersionsRequest(TeaModel):
    def __init__(
        self,
        app_name: str = None,
        image_category: str = None,
        image_type: str = None,
        page_number: int = None,
        page_size: int = None,
    ):
        # The application name.
        # 
        # This parameter is required.
        self.app_name = app_name
        # The source of the image. Valid values:
        # 
        # Public: public images provided by Alibaba Cloud.
        # 
        # Custom: the custom image that you added.
        self.image_category = image_category
        # The type of the images. Valid values:
        # 
        # VM: Virtual Machine Image
        # 
        # Container: container image
        self.image_type = image_type
        # The page number. Default value: 1.
        self.page_number = page_number
        # The number of entries to return on each page. Default value: 20.
        self.page_size = page_size

    def validate(self):
        pass

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

        result = dict()
        if self.app_name is not None:
            result['AppName'] = self.app_name
        if self.image_category is not None:
            result['ImageCategory'] = self.image_category
        if self.image_type is not None:
            result['ImageType'] = self.image_type
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('AppName') is not None:
            self.app_name = m.get('AppName')
        if m.get('ImageCategory') is not None:
            self.image_category = m.get('ImageCategory')
        if m.get('ImageType') is not None:
            self.image_type = m.get('ImageType')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        return self


class GetAppVersionsResponseBodyAppVersions(TeaModel):
    def __init__(
        self,
        image_id: str = None,
        name: str = None,
        version: str = None,
    ):
        # The image ID of the application.
        # 
        # This parameter is required.
        self.image_id = image_id
        # The application name.
        self.name = name
        # The application version.
        self.version = version

    def validate(self):
        pass

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

        result = dict()
        if self.image_id is not None:
            result['ImageId'] = self.image_id
        if self.name is not None:
            result['Name'] = self.name
        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('ImageId') is not None:
            self.image_id = m.get('ImageId')
        if m.get('Name') is not None:
            self.name = m.get('Name')
        if m.get('Version') is not None:
            self.version = m.get('Version')
        return self


class GetAppVersionsResponseBody(TeaModel):
    def __init__(
        self,
        app_versions: List[GetAppVersionsResponseBodyAppVersions] = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        success: bool = None,
        total_count: int = None,
    ):
        # The list of application versions.
        self.app_versions = app_versions
        # The page number.
        self.page_number = page_number
        # The number of entries returned per page.
        self.page_size = page_size
        # The request ID.
        self.request_id = request_id
        # Indicates whether the request was successful. Valid values:
        # 
        # true
        # 
        # false
        self.success = success
        # The total number of entries returned.
        self.total_count = total_count

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

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

        result = dict()
        result['AppVersions'] = []
        if self.app_versions is not None:
            for k in self.app_versions:
                result['AppVersions'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        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.app_versions = []
        if m.get('AppVersions') is not None:
            for k in m.get('AppVersions'):
                temp_model = GetAppVersionsResponseBodyAppVersions()
                self.app_versions.append(temp_model.from_map(k))
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


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

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

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

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

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


class GetImageRequest(TeaModel):
    def __init__(
        self,
        additional_region_ids: List[str] = None,
        image_category: str = None,
        image_id: str = None,
        image_type: str = None,
    ):
        self.additional_region_ids = additional_region_ids
        # The source of the image. Valid values:
        # 
        # *   Public: public images provided by Alibaba Cloud.
        # *   Custom: the custom image that you added.
        self.image_category = image_category
        # The image ID.
        self.image_id = image_id
        # The type of the images. Valid values:
        # 
        # *   VM: virtual machine image.
        # *   Container: the container image.
        # 
        # Default value: VM
        self.image_type = image_type

    def validate(self):
        pass

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

        result = dict()
        if self.additional_region_ids is not None:
            result['AdditionalRegionIds'] = self.additional_region_ids
        if self.image_category is not None:
            result['ImageCategory'] = self.image_category
        if self.image_id is not None:
            result['ImageId'] = self.image_id
        if self.image_type is not None:
            result['ImageType'] = self.image_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('AdditionalRegionIds') is not None:
            self.additional_region_ids = m.get('AdditionalRegionIds')
        if m.get('ImageCategory') is not None:
            self.image_category = m.get('ImageCategory')
        if m.get('ImageId') is not None:
            self.image_id = m.get('ImageId')
        if m.get('ImageType') is not None:
            self.image_type = m.get('ImageType')
        return self


class GetImageShrinkRequest(TeaModel):
    def __init__(
        self,
        additional_region_ids_shrink: str = None,
        image_category: str = None,
        image_id: str = None,
        image_type: str = None,
    ):
        self.additional_region_ids_shrink = additional_region_ids_shrink
        # The source of the image. Valid values:
        # 
        # *   Public: public images provided by Alibaba Cloud.
        # *   Custom: the custom image that you added.
        self.image_category = image_category
        # The image ID.
        self.image_id = image_id
        # The type of the images. Valid values:
        # 
        # *   VM: virtual machine image.
        # *   Container: the container image.
        # 
        # Default value: VM
        self.image_type = image_type

    def validate(self):
        pass

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

        result = dict()
        if self.additional_region_ids_shrink is not None:
            result['AdditionalRegionIds'] = self.additional_region_ids_shrink
        if self.image_category is not None:
            result['ImageCategory'] = self.image_category
        if self.image_id is not None:
            result['ImageId'] = self.image_id
        if self.image_type is not None:
            result['ImageType'] = self.image_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('AdditionalRegionIds') is not None:
            self.additional_region_ids_shrink = m.get('AdditionalRegionIds')
        if m.get('ImageCategory') is not None:
            self.image_category = m.get('ImageCategory')
        if m.get('ImageId') is not None:
            self.image_id = m.get('ImageId')
        if m.get('ImageType') is not None:
            self.image_type = m.get('ImageType')
        return self


class GetImageResponseBodyImageAdditionalRegionsInfo(TeaModel):
    def __init__(
        self,
        image_id: str = None,
        region_id: str = None,
        status: str = None,
    ):
        self.image_id = image_id
        self.region_id = region_id
        self.status = status

    def validate(self):
        pass

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

        result = dict()
        if self.image_id is not None:
            result['ImageId'] = self.image_id
        if self.region_id is not None:
            result['RegionId'] = self.region_id
        if self.status is not None:
            result['Status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ImageId') is not None:
            self.image_id = m.get('ImageId')
        if m.get('RegionId') is not None:
            self.region_id = m.get('RegionId')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class GetImageResponseBodyImageContainerImageSpecRegistryCredential(TeaModel):
    def __init__(
        self,
        password: str = None,
        server: str = None,
        user_name: str = None,
    ):
        # The password of the logon user.
        self.password = password
        # The registered address of the image repository.
        self.server = server
        # The username of the logon user.
        self.user_name = user_name

    def validate(self):
        pass

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

        result = dict()
        if self.password is not None:
            result['Password'] = self.password
        if self.server is not None:
            result['Server'] = self.server
        if self.user_name is not None:
            result['UserName'] = self.user_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Password') is not None:
            self.password = m.get('Password')
        if m.get('Server') is not None:
            self.server = m.get('Server')
        if m.get('UserName') is not None:
            self.user_name = m.get('UserName')
        return self


class GetImageResponseBodyImageContainerImageSpec(TeaModel):
    def __init__(
        self,
        architecture: str = None,
        is_acrenterprise: bool = None,
        is_acrregistry: bool = None,
        os_tag: str = None,
        platform: str = None,
        registry_credential: GetImageResponseBodyImageContainerImageSpecRegistryCredential = None,
        registry_cri_id: str = None,
        registry_url: str = None,
    ):
        self.architecture = architecture
        # Whether the instance is an Alibaba Cloud image repository Enterprise Edition.
        # 
        # *   True
        # *   False
        self.is_acrenterprise = is_acrenterprise
        # Whether it is an Alibaba Cloud image repository.
        # 
        # *   True
        # *   False
        self.is_acrregistry = is_acrregistry
        self.os_tag = os_tag
        self.platform = platform
        # The authentication of the private image repository.
        self.registry_credential = registry_credential
        # The ID of the Container Registry Enterprise Edition image repository.
        self.registry_cri_id = registry_cri_id
        # The endpoint of the container image.
        self.registry_url = registry_url

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

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

        result = dict()
        if self.architecture is not None:
            result['Architecture'] = self.architecture
        if self.is_acrenterprise is not None:
            result['IsACREnterprise'] = self.is_acrenterprise
        if self.is_acrregistry is not None:
            result['IsACRRegistry'] = self.is_acrregistry
        if self.os_tag is not None:
            result['OsTag'] = self.os_tag
        if self.platform is not None:
            result['Platform'] = self.platform
        if self.registry_credential is not None:
            result['RegistryCredential'] = self.registry_credential.to_map()
        if self.registry_cri_id is not None:
            result['RegistryCriId'] = self.registry_cri_id
        if self.registry_url is not None:
            result['RegistryUrl'] = self.registry_url
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Architecture') is not None:
            self.architecture = m.get('Architecture')
        if m.get('IsACREnterprise') is not None:
            self.is_acrenterprise = m.get('IsACREnterprise')
        if m.get('IsACRRegistry') is not None:
            self.is_acrregistry = m.get('IsACRRegistry')
        if m.get('OsTag') is not None:
            self.os_tag = m.get('OsTag')
        if m.get('Platform') is not None:
            self.platform = m.get('Platform')
        if m.get('RegistryCredential') is not None:
            temp_model = GetImageResponseBodyImageContainerImageSpecRegistryCredential()
            self.registry_credential = temp_model.from_map(m['RegistryCredential'])
        if m.get('RegistryCriId') is not None:
            self.registry_cri_id = m.get('RegistryCriId')
        if m.get('RegistryUrl') is not None:
            self.registry_url = m.get('RegistryUrl')
        return self


class GetImageResponseBodyImageDocumentInfo(TeaModel):
    def __init__(
        self,
        document: str = None,
        document_id: str = None,
        encoding_mode: str = None,
    ):
        self.document = document
        self.document_id = document_id
        self.encoding_mode = encoding_mode

    def validate(self):
        pass

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

        result = dict()
        if self.document is not None:
            result['Document'] = self.document
        if self.document_id is not None:
            result['DocumentId'] = self.document_id
        if self.encoding_mode is not None:
            result['EncodingMode'] = self.encoding_mode
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Document') is not None:
            self.document = m.get('Document')
        if m.get('DocumentId') is not None:
            self.document_id = m.get('DocumentId')
        if m.get('EncodingMode') is not None:
            self.encoding_mode = m.get('EncodingMode')
        return self


class GetImageResponseBodyImageVMImageSpec(TeaModel):
    def __init__(
        self,
        architecture: str = None,
        image_id: str = None,
        os_tag: str = None,
        platform: str = None,
    ):
        # The type of the architecture.
        self.architecture = architecture
        # The image ID.
        self.image_id = image_id
        # The ID of the specific OS version.
        self.os_tag = os_tag
        # The type of the platform.
        self.platform = platform

    def validate(self):
        pass

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

        result = dict()
        if self.architecture is not None:
            result['Architecture'] = self.architecture
        if self.image_id is not None:
            result['ImageId'] = self.image_id
        if self.os_tag is not None:
            result['OsTag'] = self.os_tag
        if self.platform is not None:
            result['Platform'] = self.platform
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Architecture') is not None:
            self.architecture = m.get('Architecture')
        if m.get('ImageId') is not None:
            self.image_id = m.get('ImageId')
        if m.get('OsTag') is not None:
            self.os_tag = m.get('OsTag')
        if m.get('Platform') is not None:
            self.platform = m.get('Platform')
        return self


class GetImageResponseBodyImage(TeaModel):
    def __init__(
        self,
        additional_regions_info: List[GetImageResponseBodyImageAdditionalRegionsInfo] = None,
        app_id: str = None,
        container_image_spec: GetImageResponseBodyImageContainerImageSpec = None,
        create_time: str = None,
        description: str = None,
        document_info: GetImageResponseBodyImageDocumentInfo = None,
        image_type: str = None,
        name: str = None,
        size: str = None,
        status: str = None,
        vmimage_spec: GetImageResponseBodyImageVMImageSpec = None,
        version: str = None,
    ):
        self.additional_regions_info = additional_regions_info
        self.app_id = app_id
        # The configuration details of the container image.
        self.container_image_spec = container_image_spec
        # The time when the image was created.
        self.create_time = create_time
        # The description of the image.
        self.description = description
        self.document_info = document_info
        # The type of the image.
        # 
        # This parameter is required.
        self.image_type = image_type
        # The name of the image.
        self.name = name
        # The size of the image. Unit: GiB.
        self.size = size
        self.status = status
        # The configuration details of the virtual machine image.
        self.vmimage_spec = vmimage_spec
        # The version.
        self.version = version

    def validate(self):
        if self.additional_regions_info:
            for k in self.additional_regions_info:
                if k:
                    k.validate()
        if self.container_image_spec:
            self.container_image_spec.validate()
        if self.document_info:
            self.document_info.validate()
        if self.vmimage_spec:
            self.vmimage_spec.validate()

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

        result = dict()
        result['AdditionalRegionsInfo'] = []
        if self.additional_regions_info is not None:
            for k in self.additional_regions_info:
                result['AdditionalRegionsInfo'].append(k.to_map() if k else None)
        if self.app_id is not None:
            result['AppId'] = self.app_id
        if self.container_image_spec is not None:
            result['ContainerImageSpec'] = self.container_image_spec.to_map()
        if self.create_time is not None:
            result['CreateTime'] = self.create_time
        if self.description is not None:
            result['Description'] = self.description
        if self.document_info is not None:
            result['DocumentInfo'] = self.document_info.to_map()
        if self.image_type is not None:
            result['ImageType'] = self.image_type
        if self.name is not None:
            result['Name'] = self.name
        if self.size is not None:
            result['Size'] = self.size
        if self.status is not None:
            result['Status'] = self.status
        if self.vmimage_spec is not None:
            result['VMImageSpec'] = self.vmimage_spec.to_map()
        if self.version is not None:
            result['Version'] = self.version
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        self.additional_regions_info = []
        if m.get('AdditionalRegionsInfo') is not None:
            for k in m.get('AdditionalRegionsInfo'):
                temp_model = GetImageResponseBodyImageAdditionalRegionsInfo()
                self.additional_regions_info.append(temp_model.from_map(k))
        if m.get('AppId') is not None:
            self.app_id = m.get('AppId')
        if m.get('ContainerImageSpec') is not None:
            temp_model = GetImageResponseBodyImageContainerImageSpec()
            self.container_image_spec = temp_model.from_map(m['ContainerImageSpec'])
        if m.get('CreateTime') is not None:
            self.create_time = m.get('CreateTime')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('DocumentInfo') is not None:
            temp_model = GetImageResponseBodyImageDocumentInfo()
            self.document_info = temp_model.from_map(m['DocumentInfo'])
        if m.get('ImageType') is not None:
            self.image_type = m.get('ImageType')
        if m.get('Name') is not None:
            self.name = m.get('Name')
        if m.get('Size') is not None:
            self.size = m.get('Size')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('VMImageSpec') is not None:
            temp_model = GetImageResponseBodyImageVMImageSpec()
            self.vmimage_spec = temp_model.from_map(m['VMImageSpec'])
        if m.get('Version') is not None:
            self.version = m.get('Version')
        return self


class GetImageResponseBody(TeaModel):
    def __init__(
        self,
        image: GetImageResponseBodyImage = None,
        request_id: str = None,
        success: bool = None,
        total_count: int = None,
    ):
        # The details of the image.
        self.image = image
        # The request ID.
        self.request_id = request_id
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true: The task is successful.
        # *   false: The error occurred.
        self.success = success
        # The total amount of data in this request.
        self.total_count = total_count

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

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

        result = dict()
        if self.image is not None:
            result['Image'] = self.image.to_map()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Image') is not None:
            temp_model = GetImageResponseBodyImage()
            self.image = temp_model.from_map(m['Image'])
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


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

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

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

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

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


class GetJobRequest(TeaModel):
    def __init__(
        self,
        job_id: str = None,
    ):
        # The ID of the job.
        self.job_id = job_id

    def validate(self):
        pass

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

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

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


class GetJobResponseBodyJobInfoDependencyPolicyJobDependency(TeaModel):
    def __init__(
        self,
        job_id: str = None,
        type: str = None,
    ):
        self.job_id = job_id
        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.job_id is not None:
            result['JobId'] = self.job_id
        if self.type is not None:
            result['Type'] = self.type
        return result

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


class GetJobResponseBodyJobInfoDependencyPolicy(TeaModel):
    def __init__(
        self,
        job_dependency: List[GetJobResponseBodyJobInfoDependencyPolicyJobDependency] = None,
    ):
        self.job_dependency = job_dependency

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

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

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

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


class GetJobResponseBodyJobInfoDeploymentPolicyNetwork(TeaModel):
    def __init__(
        self,
        enable_enimapping: bool = None,
        enable_external_ip_address: bool = None,
        vswitch: List[str] = None,
    ):
        # Whether the resource is created in the zone corresponding to the passed-in VSwitch parameter.
        # 
        # *   true: The resource is created in the zone corresponding to the passed-in VSwitch parameter.
        # *   false: The resource is created in any zone that has resources.
        self.enable_enimapping = enable_enimapping
        # Whether to create a public IP address.
        # 
        # Valid values:
        # 
        # *   false: false.
        # *   true: true.
        self.enable_external_ip_address = enable_external_ip_address
        # The VSwitch array.
        self.vswitch = vswitch

    def validate(self):
        pass

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

        result = dict()
        if self.enable_enimapping is not None:
            result['EnableENIMapping'] = self.enable_enimapping
        if self.enable_external_ip_address is not None:
            result['EnableExternalIpAddress'] = self.enable_external_ip_address
        if self.vswitch is not None:
            result['Vswitch'] = self.vswitch
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('EnableENIMapping') is not None:
            self.enable_enimapping = m.get('EnableENIMapping')
        if m.get('EnableExternalIpAddress') is not None:
            self.enable_external_ip_address = m.get('EnableExternalIpAddress')
        if m.get('Vswitch') is not None:
            self.vswitch = m.get('Vswitch')
        return self


class GetJobResponseBodyJobInfoDeploymentPolicyTags(TeaModel):
    def __init__(
        self,
        tag_key: str = None,
        tag_value: str = None,
    ):
        # The key of the job tag.
        self.tag_key = tag_key
        # The value of the job tag.
        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 GetJobResponseBodyJobInfoDeploymentPolicy(TeaModel):
    def __init__(
        self,
        allocation_spec: str = None,
        level: str = None,
        network: GetJobResponseBodyJobInfoDeploymentPolicyNetwork = None,
        tags: List[GetJobResponseBodyJobInfoDeploymentPolicyTags] = None,
    ):
        # The type of the resource. Only Dedicated is supported. You must enable a whitelist.
        self.allocation_spec = allocation_spec
        # The computing power level. The following disk categories are supported:
        # 
        # *   General
        # *   Performance
        # 
        # Default value: General
        self.level = level
        # The network configuration information.
        self.network = network
        # The list of job tags.
        self.tags = tags

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

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

        result = dict()
        if self.allocation_spec is not None:
            result['AllocationSpec'] = self.allocation_spec
        if self.level is not None:
            result['Level'] = self.level
        if self.network is not None:
            result['Network'] = self.network.to_map()
        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('AllocationSpec') is not None:
            self.allocation_spec = m.get('AllocationSpec')
        if m.get('Level') is not None:
            self.level = m.get('Level')
        if m.get('Network') is not None:
            temp_model = GetJobResponseBodyJobInfoDeploymentPolicyNetwork()
            self.network = temp_model.from_map(m['Network'])
        self.tags = []
        if m.get('Tags') is not None:
            for k in m.get('Tags'):
                temp_model = GetJobResponseBodyJobInfoDeploymentPolicyTags()
                self.tags.append(temp_model.from_map(k))
        return self


class GetJobResponseBodyJobInfoTasksExecutorPolicyArraySpec(TeaModel):
    def __init__(
        self,
        index_end: int = None,
        index_start: int = None,
        index_step: int = None,
    ):
        # The end value of the array job index. Valid values: 0 to 4999. The value must be greater than or equal to the value of IndexStart.
        self.index_end = index_end
        # The starting value of the array job index. Valid values: 0 to 4999.
        self.index_start = index_start
        # The interval of the array job index.
        # 
        # > If the array job property is IndexStart=1,IndexEnd=5, and IndexStep=2, the array job contains three subtasks. The values of the subtask indexes are 1,3, and 5.
        self.index_step = index_step

    def validate(self):
        pass

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

        result = dict()
        if self.index_end is not None:
            result['IndexEnd'] = self.index_end
        if self.index_start is not None:
            result['IndexStart'] = self.index_start
        if self.index_step is not None:
            result['IndexStep'] = self.index_step
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('IndexEnd') is not None:
            self.index_end = m.get('IndexEnd')
        if m.get('IndexStart') is not None:
            self.index_start = m.get('IndexStart')
        if m.get('IndexStep') is not None:
            self.index_step = m.get('IndexStep')
        return self


class GetJobResponseBodyJobInfoTasksExecutorPolicy(TeaModel):
    def __init__(
        self,
        array_spec: GetJobResponseBodyJobInfoTasksExecutorPolicyArraySpec = None,
        max_count: int = None,
    ):
        # The details of the array job.
        self.array_spec = array_spec
        # The maximum number of nodes to run the job.
        self.max_count = max_count

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

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

        result = dict()
        if self.array_spec is not None:
            result['ArraySpec'] = self.array_spec.to_map()
        if self.max_count is not None:
            result['MaxCount'] = self.max_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ArraySpec') is not None:
            temp_model = GetJobResponseBodyJobInfoTasksExecutorPolicyArraySpec()
            self.array_spec = temp_model.from_map(m['ArraySpec'])
        if m.get('MaxCount') is not None:
            self.max_count = m.get('MaxCount')
        return self


class GetJobResponseBodyJobInfoTasksExecutorStatus(TeaModel):
    def __init__(
        self,
        array_id: int = None,
        create_time: str = None,
        end_time: str = None,
        start_time: str = None,
        status: str = None,
        status_reason: str = None,
    ):
        # Sub-job ID
        self.array_id = array_id
        # The time when the job was created.
        self.create_time = create_time
        # The end time of the scaling plan job.
        self.end_time = end_time
        # The start time of the scaling plan job.
        self.start_time = start_time
        # The status of the job.
        self.status = status
        # The reason why the stack instance is in the OUTDATED state.
        self.status_reason = status_reason

    def validate(self):
        pass

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

        result = dict()
        if self.array_id is not None:
            result['ArrayId'] = self.array_id
        if self.create_time is not None:
            result['CreateTime'] = self.create_time
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.status is not None:
            result['Status'] = self.status
        if self.status_reason is not None:
            result['StatusReason'] = self.status_reason
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ArrayId') is not None:
            self.array_id = m.get('ArrayId')
        if m.get('CreateTime') is not None:
            self.create_time = m.get('CreateTime')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('StatusReason') is not None:
            self.status_reason = m.get('StatusReason')
        return self


class GetJobResponseBodyJobInfoTasksTaskSpecResourceDisks(TeaModel):
    def __init__(
        self,
        size: int = None,
        type: str = None,
    ):
        # The size of the disk.
        self.size = size
        # The type of the disk. The following disk categories are supported:
        # 
        # *   System: system disk.
        # *   Data: data disk.
        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.size is not None:
            result['Size'] = self.size
        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('Size') is not None:
            self.size = m.get('Size')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        return self


class GetJobResponseBodyJobInfoTasksTaskSpecResource(TeaModel):
    def __init__(
        self,
        cores: float = None,
        disks: List[GetJobResponseBodyJobInfoTasksTaskSpecResourceDisks] = None,
        enable_ht: bool = None,
        host_name_prefix: str = None,
        instance_types: List[str] = None,
        memory: int = None,
    ):
        # The number of CPUs on which the job is run.
        self.cores = cores
        # The array of the disks.
        self.disks = disks
        self.enable_ht = enable_ht
        self.host_name_prefix = host_name_prefix
        self.instance_types = instance_types
        # The memory capacity. Unit: GiB.
        self.memory = memory

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

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

        result = dict()
        if self.cores is not None:
            result['Cores'] = self.cores
        result['Disks'] = []
        if self.disks is not None:
            for k in self.disks:
                result['Disks'].append(k.to_map() if k else None)
        if self.enable_ht is not None:
            result['EnableHT'] = self.enable_ht
        if self.host_name_prefix is not None:
            result['HostNamePrefix'] = self.host_name_prefix
        if self.instance_types is not None:
            result['InstanceTypes'] = self.instance_types
        if self.memory is not None:
            result['Memory'] = self.memory
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Cores') is not None:
            self.cores = m.get('Cores')
        self.disks = []
        if m.get('Disks') is not None:
            for k in m.get('Disks'):
                temp_model = GetJobResponseBodyJobInfoTasksTaskSpecResourceDisks()
                self.disks.append(temp_model.from_map(k))
        if m.get('EnableHT') is not None:
            self.enable_ht = m.get('EnableHT')
        if m.get('HostNamePrefix') is not None:
            self.host_name_prefix = m.get('HostNamePrefix')
        if m.get('InstanceTypes') is not None:
            self.instance_types = m.get('InstanceTypes')
        if m.get('Memory') is not None:
            self.memory = m.get('Memory')
        return self


class GetJobResponseBodyJobInfoTasksTaskSpecRetryPolicyExitCodeActions(TeaModel):
    def __init__(
        self,
        action: str = None,
        exit_code: int = None,
    ):
        self.action = action
        self.exit_code = exit_code

    def validate(self):
        pass

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

        result = dict()
        if self.action is not None:
            result['Action'] = self.action
        if self.exit_code is not None:
            result['ExitCode'] = self.exit_code
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Action') is not None:
            self.action = m.get('Action')
        if m.get('ExitCode') is not None:
            self.exit_code = m.get('ExitCode')
        return self


class GetJobResponseBodyJobInfoTasksTaskSpecRetryPolicy(TeaModel):
    def __init__(
        self,
        exit_code_actions: List[GetJobResponseBodyJobInfoTasksTaskSpecRetryPolicyExitCodeActions] = None,
        retry_count: int = None,
    ):
        self.exit_code_actions = exit_code_actions
        self.retry_count = retry_count

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

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

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

    def from_map(self, m: dict = None):
        m = m or dict()
        self.exit_code_actions = []
        if m.get('ExitCodeActions') is not None:
            for k in m.get('ExitCodeActions'):
                temp_model = GetJobResponseBodyJobInfoTasksTaskSpecRetryPolicyExitCodeActions()
                self.exit_code_actions.append(temp_model.from_map(k))
        if m.get('RetryCount') is not None:
            self.retry_count = m.get('RetryCount')
        return self


class GetJobResponseBodyJobInfoTasksTaskSpecTaskExecutorVM(TeaModel):
    def __init__(
        self,
        image: str = None,
        prolog_script: str = None,
        script: str = None,
    ):
        # The image ID.
        self.image = image
        # The pre-processing script. Base64 encoding is required.
        self.prolog_script = prolog_script
        # The running-job script. Base64 encoding is required.
        self.script = script

    def validate(self):
        pass

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

        result = dict()
        if self.image is not None:
            result['Image'] = self.image
        if self.prolog_script is not None:
            result['PrologScript'] = self.prolog_script
        if self.script is not None:
            result['Script'] = self.script
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Image') is not None:
            self.image = m.get('Image')
        if m.get('PrologScript') is not None:
            self.prolog_script = m.get('PrologScript')
        if m.get('Script') is not None:
            self.script = m.get('Script')
        return self


class GetJobResponseBodyJobInfoTasksTaskSpecTaskExecutor(TeaModel):
    def __init__(
        self,
        vm: GetJobResponseBodyJobInfoTasksTaskSpecTaskExecutorVM = None,
    ):
        # Use ECS instances.
        self.vm = vm

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

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

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

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


class GetJobResponseBodyJobInfoTasksTaskSpec(TeaModel):
    def __init__(
        self,
        resource: GetJobResponseBodyJobInfoTasksTaskSpecResource = None,
        retry_policy: GetJobResponseBodyJobInfoTasksTaskSpecRetryPolicy = None,
        task_executor: List[GetJobResponseBodyJobInfoTasksTaskSpecTaskExecutor] = None,
    ):
        # The resource information.
        self.resource = resource
        self.retry_policy = retry_policy
        # The task execution configurations.
        self.task_executor = task_executor

    def validate(self):
        if self.resource:
            self.resource.validate()
        if self.retry_policy:
            self.retry_policy.validate()
        if self.task_executor:
            for k in self.task_executor:
                if k:
                    k.validate()

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

        result = dict()
        if self.resource is not None:
            result['Resource'] = self.resource.to_map()
        if self.retry_policy is not None:
            result['RetryPolicy'] = self.retry_policy.to_map()
        result['TaskExecutor'] = []
        if self.task_executor is not None:
            for k in self.task_executor:
                result['TaskExecutor'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Resource') is not None:
            temp_model = GetJobResponseBodyJobInfoTasksTaskSpecResource()
            self.resource = temp_model.from_map(m['Resource'])
        if m.get('RetryPolicy') is not None:
            temp_model = GetJobResponseBodyJobInfoTasksTaskSpecRetryPolicy()
            self.retry_policy = temp_model.from_map(m['RetryPolicy'])
        self.task_executor = []
        if m.get('TaskExecutor') is not None:
            for k in m.get('TaskExecutor'):
                temp_model = GetJobResponseBodyJobInfoTasksTaskSpecTaskExecutor()
                self.task_executor.append(temp_model.from_map(k))
        return self


class GetJobResponseBodyJobInfoTasks(TeaModel):
    def __init__(
        self,
        executor_policy: GetJobResponseBodyJobInfoTasksExecutorPolicy = None,
        executor_status: List[GetJobResponseBodyJobInfoTasksExecutorStatus] = None,
        task_name: str = None,
        task_spec: GetJobResponseBodyJobInfoTasksTaskSpec = None,
        task_sustainable: bool = None,
    ):
        # The task execution policy.
        self.executor_policy = executor_policy
        # The execution status of the task.
        self.executor_status = executor_status
        # The name of the task.
        self.task_name = task_name
        # The details of the task specification.
        self.task_spec = task_spec
        # Indicate whether the job is a long-running job.
        self.task_sustainable = task_sustainable

    def validate(self):
        if self.executor_policy:
            self.executor_policy.validate()
        if self.executor_status:
            for k in self.executor_status:
                if k:
                    k.validate()
        if self.task_spec:
            self.task_spec.validate()

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

        result = dict()
        if self.executor_policy is not None:
            result['ExecutorPolicy'] = self.executor_policy.to_map()
        result['ExecutorStatus'] = []
        if self.executor_status is not None:
            for k in self.executor_status:
                result['ExecutorStatus'].append(k.to_map() if k else None)
        if self.task_name is not None:
            result['TaskName'] = self.task_name
        if self.task_spec is not None:
            result['TaskSpec'] = self.task_spec.to_map()
        if self.task_sustainable is not None:
            result['TaskSustainable'] = self.task_sustainable
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ExecutorPolicy') is not None:
            temp_model = GetJobResponseBodyJobInfoTasksExecutorPolicy()
            self.executor_policy = temp_model.from_map(m['ExecutorPolicy'])
        self.executor_status = []
        if m.get('ExecutorStatus') is not None:
            for k in m.get('ExecutorStatus'):
                temp_model = GetJobResponseBodyJobInfoTasksExecutorStatus()
                self.executor_status.append(temp_model.from_map(k))
        if m.get('TaskName') is not None:
            self.task_name = m.get('TaskName')
        if m.get('TaskSpec') is not None:
            temp_model = GetJobResponseBodyJobInfoTasksTaskSpec()
            self.task_spec = temp_model.from_map(m['TaskSpec'])
        if m.get('TaskSustainable') is not None:
            self.task_sustainable = m.get('TaskSustainable')
        return self


class GetJobResponseBodyJobInfo(TeaModel):
    def __init__(
        self,
        app_extra_info: str = None,
        create_time: str = None,
        dependency_policy: GetJobResponseBodyJobInfoDependencyPolicy = None,
        deployment_policy: GetJobResponseBodyJobInfoDeploymentPolicy = None,
        end_time: str = None,
        job_description: str = None,
        job_id: str = None,
        job_name: str = None,
        job_scheduler: str = None,
        start_time: str = None,
        status: str = None,
        tasks: List[GetJobResponseBodyJobInfoTasks] = None,
    ):
        # The additional information about the application.
        self.app_extra_info = app_extra_info
        # The time when the job was submitted.
        self.create_time = create_time
        self.dependency_policy = dependency_policy
        # The resource deployment policy.
        self.deployment_policy = deployment_policy
        # The time when the job is complete.
        self.end_time = end_time
        # The description of the job.
        self.job_description = job_description
        # The ID of the job.
        self.job_id = job_id
        # The job name.
        self.job_name = job_name
        # The type of the job scheduler.
        self.job_scheduler = job_scheduler
        # The time when the job started.
        self.start_time = start_time
        # The job status. Valid values:
        # 
        # *   Pending: The job is being queued.
        # *   Initing: The job is being initialized.
        # *   Succeed: The job is successfully run.
        # *   Failed: The job failed to run.
        # *   Running: The job is running.
        # *   Exception: scheduling exception
        # *   Retrying: The job is being retried.
        # *   Expired: The job timed out.
        # *   Deleted: The job is deleted.
        # *   Suspended: job hibernation
        # *   Restarting: The job is being restarted.
        self.status = status
        # The list of tasks. Only one task is supported.
        self.tasks = tasks

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

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

        result = dict()
        if self.app_extra_info is not None:
            result['AppExtraInfo'] = self.app_extra_info
        if self.create_time is not None:
            result['CreateTime'] = self.create_time
        if self.dependency_policy is not None:
            result['DependencyPolicy'] = self.dependency_policy.to_map()
        if self.deployment_policy is not None:
            result['DeploymentPolicy'] = self.deployment_policy.to_map()
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.job_description is not None:
            result['JobDescription'] = self.job_description
        if self.job_id is not None:
            result['JobId'] = self.job_id
        if self.job_name is not None:
            result['JobName'] = self.job_name
        if self.job_scheduler is not None:
            result['JobScheduler'] = self.job_scheduler
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.status is not None:
            result['Status'] = self.status
        result['Tasks'] = []
        if self.tasks is not None:
            for k in self.tasks:
                result['Tasks'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('AppExtraInfo') is not None:
            self.app_extra_info = m.get('AppExtraInfo')
        if m.get('CreateTime') is not None:
            self.create_time = m.get('CreateTime')
        if m.get('DependencyPolicy') is not None:
            temp_model = GetJobResponseBodyJobInfoDependencyPolicy()
            self.dependency_policy = temp_model.from_map(m['DependencyPolicy'])
        if m.get('DeploymentPolicy') is not None:
            temp_model = GetJobResponseBodyJobInfoDeploymentPolicy()
            self.deployment_policy = temp_model.from_map(m['DeploymentPolicy'])
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('JobDescription') is not None:
            self.job_description = m.get('JobDescription')
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        if m.get('JobName') is not None:
            self.job_name = m.get('JobName')
        if m.get('JobScheduler') is not None:
            self.job_scheduler = m.get('JobScheduler')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        self.tasks = []
        if m.get('Tasks') is not None:
            for k in m.get('Tasks'):
                temp_model = GetJobResponseBodyJobInfoTasks()
                self.tasks.append(temp_model.from_map(k))
        return self


class GetJobResponseBody(TeaModel):
    def __init__(
        self,
        job_info: GetJobResponseBodyJobInfo = None,
        request_id: str = None,
    ):
        # The job details.
        self.job_info = job_info
        # The request ID.
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class GetPoolRequest(TeaModel):
    def __init__(
        self,
        pool_name: str = None,
    ):
        # The name of the resource pool.
        # 
        # *   The value can be up to 15 characters in length.
        # *   It can contain digits, uppercase letters, lowercase letters, underscores (_), and dots (.).
        # 
        # This parameter is required.
        self.pool_name = pool_name

    def validate(self):
        pass

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

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

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


class GetPoolResponseBodyPoolInfo(TeaModel):
    def __init__(
        self,
        create_time: str = None,
        exector_usage: int = None,
        is_default: bool = None,
        max_exector_num: int = None,
        pool_name: str = None,
        priority: int = None,
        reason: str = None,
        status: str = None,
        update_time: str = None,
    ):
        # The time when the resource pool is created.
        self.create_time = create_time
        # The usage of execution nodes that are running in a resource pool.
        self.exector_usage = exector_usage
        # Indices whether the resource pool is the default resource pool. Valid values:
        # 
        # *   **true**\
        # *   **false**\
        self.is_default = is_default
        # The maximum number of execution nodes that can run concurrently in a resource pool.
        self.max_exector_num = max_exector_num
        # The name of the resource group.
        # 
        # *   The value can be up to 15 characters in length.
        # *   It can contain digits, uppercase letters, lowercase letters, underscores (_), and dots (.).
        self.pool_name = pool_name
        # The priority of the resource pool.
        # 
        # *   You can set a priority in the range of 1 to 99. The default value is 1, which is the lowest priority.
        # *   Jobs submitted to a resource pool with a higher priority level value will be scheduled before pending jobs in a resource pool with a lower priority level value, and the priority level of the resource pool takes precedence over the priority of the job.
        self.priority = priority
        # The cause of the error.
        self.reason = reason
        # The status of the resource pool. Valid values:
        # 
        # *   Creating: The resource pool is being created.
        # *   Updating: The resource pool is being updated.
        # *   Deleting: The resource pool is being deleted.
        # *   Working: The resource pool is working.
        # *   Deleted: The resource pool is deleted.
        self.status = status
        # The time when the resource pool was updated.
        self.update_time = update_time

    def validate(self):
        pass

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

        result = dict()
        if self.create_time is not None:
            result['CreateTime'] = self.create_time
        if self.exector_usage is not None:
            result['ExectorUsage'] = self.exector_usage
        if self.is_default is not None:
            result['IsDefault'] = self.is_default
        if self.max_exector_num is not None:
            result['MaxExectorNum'] = self.max_exector_num
        if self.pool_name is not None:
            result['PoolName'] = self.pool_name
        if self.priority is not None:
            result['Priority'] = self.priority
        if self.reason is not None:
            result['Reason'] = self.reason
        if self.status is not None:
            result['Status'] = self.status
        if self.update_time is not None:
            result['UpdateTime'] = self.update_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('CreateTime') is not None:
            self.create_time = m.get('CreateTime')
        if m.get('ExectorUsage') is not None:
            self.exector_usage = m.get('ExectorUsage')
        if m.get('IsDefault') is not None:
            self.is_default = m.get('IsDefault')
        if m.get('MaxExectorNum') is not None:
            self.max_exector_num = m.get('MaxExectorNum')
        if m.get('PoolName') is not None:
            self.pool_name = m.get('PoolName')
        if m.get('Priority') is not None:
            self.priority = m.get('Priority')
        if m.get('Reason') is not None:
            self.reason = m.get('Reason')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('UpdateTime') is not None:
            self.update_time = m.get('UpdateTime')
        return self


class GetPoolResponseBody(TeaModel):
    def __init__(
        self,
        pool_info: GetPoolResponseBodyPoolInfo = None,
        request_id: str = None,
    ):
        # The information about the resource pool.
        self.pool_info = pool_info
        # Id of the request
        self.request_id = request_id

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

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

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

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


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

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

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

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

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


class ListActionPlanActivitiesRequest(TeaModel):
    def __init__(
        self,
        action_plan_id: str = None,
        max_results: int = None,
        next_token: str = None,
    ):
        # The ID of the execution plan.
        self.action_plan_id = action_plan_id
        # The maximum number of entries per page.
        # 
        # Valid values: 1 to 100.
        # 
        # Default value: 20.
        self.max_results = max_results
        # A pagination token.
        self.next_token = next_token

    def validate(self):
        pass

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

        result = dict()
        if self.action_plan_id is not None:
            result['ActionPlanId'] = self.action_plan_id
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ActionPlanId') is not None:
            self.action_plan_id = m.get('ActionPlanId')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        return self


class ListActionPlanActivitiesResponseBodyActionPlanActivitiesJobs(TeaModel):
    def __init__(
        self,
        job_id: str = None,
        job_operation_type: str = None,
        region_id: str = None,
    ):
        # The ID of the job.
        self.job_id = job_id
        # The operation type of the execution plan activity on the job. Possible values are as follows:
        # 
        # *   Create
        # *   Delete
        self.job_operation_type = job_operation_type
        # The region ID.
        self.region_id = region_id

    def validate(self):
        pass

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

        result = dict()
        if self.job_id is not None:
            result['JobId'] = self.job_id
        if self.job_operation_type is not None:
            result['JobOperationType'] = self.job_operation_type
        if self.region_id is not None:
            result['RegionId'] = self.region_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        if m.get('JobOperationType') is not None:
            self.job_operation_type = m.get('JobOperationType')
        if m.get('RegionId') is not None:
            self.region_id = m.get('RegionId')
        return self


class ListActionPlanActivitiesResponseBodyActionPlanActivities(TeaModel):
    def __init__(
        self,
        action_plan_activity_id: str = None,
        created_capacity: float = None,
        destroy_capacity: float = None,
        end_time: str = None,
        jobs: List[ListActionPlanActivitiesResponseBodyActionPlanActivitiesJobs] = None,
        start_time: str = None,
        status: str = None,
    ):
        # The activity ID of the execution plan.
        self.action_plan_activity_id = action_plan_activity_id
        # The increased capacity of this execution plan activity.
        self.created_capacity = created_capacity
        # The capacity released by this execution plan activity.
        self.destroy_capacity = destroy_capacity
        # The end time of the execution plan activity.
        self.end_time = end_time
        # The list of Instant jobs involved in the execution plan.
        self.jobs = jobs
        # The start time of the implementation of the planned activity.
        self.start_time = start_time
        # The implementation status of the execution plan activity. Valid values:
        # 
        # *   InProcess
        # *   Completed
        # *   Failed
        self.status = status

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

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

        result = dict()
        if self.action_plan_activity_id is not None:
            result['ActionPlanActivityId'] = self.action_plan_activity_id
        if self.created_capacity is not None:
            result['CreatedCapacity'] = self.created_capacity
        if self.destroy_capacity is not None:
            result['DestroyCapacity'] = self.destroy_capacity
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        result['Jobs'] = []
        if self.jobs is not None:
            for k in self.jobs:
                result['Jobs'].append(k.to_map() if k else None)
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.status is not None:
            result['Status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ActionPlanActivityId') is not None:
            self.action_plan_activity_id = m.get('ActionPlanActivityId')
        if m.get('CreatedCapacity') is not None:
            self.created_capacity = m.get('CreatedCapacity')
        if m.get('DestroyCapacity') is not None:
            self.destroy_capacity = m.get('DestroyCapacity')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        self.jobs = []
        if m.get('Jobs') is not None:
            for k in m.get('Jobs'):
                temp_model = ListActionPlanActivitiesResponseBodyActionPlanActivitiesJobs()
                self.jobs.append(temp_model.from_map(k))
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class ListActionPlanActivitiesResponseBody(TeaModel):
    def __init__(
        self,
        action_plan_activities: List[ListActionPlanActivitiesResponseBodyActionPlanActivities] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total_count: int = None,
    ):
        # The list of execution details of the execution plan.
        self.action_plan_activities = action_plan_activities
        # The maximum number of records returned in this request.
        self.max_results = max_results
        # Indicates the read position returned by the current call. An empty value means all data has been read.
        # 
        # This parameter is required.
        self.next_token = next_token
        # The request ID.
        self.request_id = request_id
        # Total data count under the current request conditions (optional; not returned by default).
        self.total_count = total_count

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

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

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

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


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

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

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

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

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


class ListActionPlansRequest(TeaModel):
    def __init__(
        self,
        action_plan_ids: List[str] = None,
        max_results: int = None,
        next_token: str = None,
    ):
        # The IDs of the execution plans to be queried.
        self.action_plan_ids = action_plan_ids
        # The maximum number of entries per page.
        # 
        # Valid values: 1 to 100.
        # 
        # Default value: 20.
        self.max_results = max_results
        # A pagination token.
        self.next_token = next_token

    def validate(self):
        pass

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

        result = dict()
        if self.action_plan_ids is not None:
            result['ActionPlanIds'] = self.action_plan_ids
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ActionPlanIds') is not None:
            self.action_plan_ids = m.get('ActionPlanIds')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        return self


class ListActionPlansShrinkRequest(TeaModel):
    def __init__(
        self,
        action_plan_ids_shrink: str = None,
        max_results: int = None,
        next_token: str = None,
    ):
        # The IDs of the execution plans to be queried.
        self.action_plan_ids_shrink = action_plan_ids_shrink
        # The maximum number of entries per page.
        # 
        # Valid values: 1 to 100.
        # 
        # Default value: 20.
        self.max_results = max_results
        # A pagination token.
        self.next_token = next_token

    def validate(self):
        pass

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

        result = dict()
        if self.action_plan_ids_shrink is not None:
            result['ActionPlanIds'] = self.action_plan_ids_shrink
        if self.max_results is not None:
            result['MaxResults'] = self.max_results
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ActionPlanIds') is not None:
            self.action_plan_ids_shrink = m.get('ActionPlanIds')
        if m.get('MaxResults') is not None:
            self.max_results = m.get('MaxResults')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        return self


class ListActionPlansResponseBodyActionPlans(TeaModel):
    def __init__(
        self,
        action_plan_id: str = None,
        action_plan_name: str = None,
        create_time: str = None,
        status: str = None,
        update_time: str = None,
    ):
        # The ID of the execution plan.
        self.action_plan_id = action_plan_id
        # The name of the execution plan.
        self.action_plan_name = action_plan_name
        # The time when the execution plan was created.
        self.create_time = create_time
        # The status of the execution plan. The possible values are as follows:
        # 
        # *   Active Instant tasks are dynamically managed only when the execution plan is in the Active state.
        # *   Inactive Instant tasks are no longer managed by execution plans in the Inactive state.
        # *   Deleting: The execution plan is being deleted. You cannot modify the parameters of an execution plan in this state.
        self.status = status
        # The time when the execution plan was last modified. The time follows the ISO 8601 standard and UTC +0. The format is yyyy-MM-ddTHH:mmZ.
        self.update_time = update_time

    def validate(self):
        pass

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

        result = dict()
        if self.action_plan_id is not None:
            result['ActionPlanId'] = self.action_plan_id
        if self.action_plan_name is not None:
            result['ActionPlanName'] = self.action_plan_name
        if self.create_time is not None:
            result['CreateTime'] = self.create_time
        if self.status is not None:
            result['Status'] = self.status
        if self.update_time is not None:
            result['UpdateTime'] = self.update_time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ActionPlanId') is not None:
            self.action_plan_id = m.get('ActionPlanId')
        if m.get('ActionPlanName') is not None:
            self.action_plan_name = m.get('ActionPlanName')
        if m.get('CreateTime') is not None:
            self.create_time = m.get('CreateTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('UpdateTime') is not None:
            self.update_time = m.get('UpdateTime')
        return self


class ListActionPlansResponseBody(TeaModel):
    def __init__(
        self,
        action_plans: List[ListActionPlansResponseBodyActionPlans] = None,
        max_results: int = None,
        next_token: str = None,
        request_id: str = None,
        total_count: int = None,
    ):
        # The list of execution plan results.
        self.action_plans = action_plans
        # The maximum number of records returned in this request.
        self.max_results = max_results
        # Indicates the read position returned by the current call. An empty value means all data has been read.
        # 
        # This parameter is required.
        self.next_token = next_token
        # The request ID.
        self.request_id = request_id
        # Total data count under the current request conditions (optional; not returned by default).
        self.total_count = total_count

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

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

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

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


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

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

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

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

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


class ListExecutorEventsRequestFilter(TeaModel):
    def __init__(
        self,
        executor_ids: List[str] = None,
        job_id: str = None,
        level: str = None,
        time_after: int = None,
        time_before: int = None,
    ):
        self.executor_ids = executor_ids
        self.job_id = job_id
        self.level = level
        self.time_after = time_after
        self.time_before = time_before

    def validate(self):
        pass

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

        result = dict()
        if self.executor_ids is not None:
            result['ExecutorIds'] = self.executor_ids
        if self.job_id is not None:
            result['JobId'] = self.job_id
        if self.level is not None:
            result['Level'] = self.level
        if self.time_after is not None:
            result['TimeAfter'] = self.time_after
        if self.time_before is not None:
            result['TimeBefore'] = self.time_before
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ExecutorIds') is not None:
            self.executor_ids = m.get('ExecutorIds')
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        if m.get('Level') is not None:
            self.level = m.get('Level')
        if m.get('TimeAfter') is not None:
            self.time_after = m.get('TimeAfter')
        if m.get('TimeBefore') is not None:
            self.time_before = m.get('TimeBefore')
        return self


class ListExecutorEventsRequest(TeaModel):
    def __init__(
        self,
        filter: ListExecutorEventsRequestFilter = None,
        page_number: int = None,
        page_size: int = None,
    ):
        self.filter = filter
        self.page_number = page_number
        self.page_size = page_size

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

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

        result = dict()
        if self.filter is not None:
            result['Filter'] = self.filter.to_map()
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Filter') is not None:
            temp_model = ListExecutorEventsRequestFilter()
            self.filter = temp_model.from_map(m['Filter'])
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        return self


class ListExecutorEventsShrinkRequest(TeaModel):
    def __init__(
        self,
        filter_shrink: str = None,
        page_number: int = None,
        page_size: int = None,
    ):
        self.filter_shrink = filter_shrink
        self.page_number = page_number
        self.page_size = page_size

    def validate(self):
        pass

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

        result = dict()
        if self.filter_shrink is not None:
            result['Filter'] = self.filter_shrink
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Filter') is not None:
            self.filter_shrink = m.get('Filter')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        return self


class ListExecutorEventsResponseBodyExecutorEventList(TeaModel):
    def __init__(
        self,
        content: str = None,
        executor_id: str = None,
        job_id: str = None,
        level: str = None,
        time: str = None,
    ):
        self.content = content
        self.executor_id = executor_id
        self.job_id = job_id
        self.level = level
        self.time = time

    def validate(self):
        pass

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

        result = dict()
        if self.content is not None:
            result['Content'] = self.content
        if self.executor_id is not None:
            result['ExecutorId'] = self.executor_id
        if self.job_id is not None:
            result['JobId'] = self.job_id
        if self.level is not None:
            result['Level'] = self.level
        if self.time is not None:
            result['Time'] = self.time
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Content') is not None:
            self.content = m.get('Content')
        if m.get('ExecutorId') is not None:
            self.executor_id = m.get('ExecutorId')
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        if m.get('Level') is not None:
            self.level = m.get('Level')
        if m.get('Time') is not None:
            self.time = m.get('Time')
        return self


class ListExecutorEventsResponseBody(TeaModel):
    def __init__(
        self,
        executor_event_list: List[ListExecutorEventsResponseBodyExecutorEventList] = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        total_count: int = None,
    ):
        self.executor_event_list = executor_event_list
        self.page_number = page_number
        self.page_size = page_size
        self.request_id = request_id
        self.total_count = total_count

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

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

        result = dict()
        result['ExecutorEventList'] = []
        if self.executor_event_list is not None:
            for k in self.executor_event_list:
                result['ExecutorEventList'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        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.executor_event_list = []
        if m.get('ExecutorEventList') is not None:
            for k in m.get('ExecutorEventList'):
                temp_model = ListExecutorEventsResponseBodyExecutorEventList()
                self.executor_event_list.append(temp_model.from_map(k))
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


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

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

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

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

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


class ListExecutorsRequestFilter(TeaModel):
    def __init__(
        self,
        executor_ids: List[str] = None,
        image: str = None,
        ip_addresses: List[str] = None,
        job_name: str = None,
        status: List[str] = None,
        time_created_after: int = None,
        time_created_before: int = None,
        vpc_id: str = None,
        vswitch_id: str = None,
    ):
        # The list of executor IDs. A maximum of 100 IDs are supported.
        self.executor_ids = executor_ids
        # Executor image.
        self.image = image
        # The list of internal IP addresses. A maximum of 100 IP addresses are supported.
        self.ip_addresses = ip_addresses
        # The job name. Exact filtering. Fuzzy query is not supported.
        self.job_name = job_name
        # Executor status list.
        self.status = status
        # For jobs submitted after this time, the time in the region is converted into a UNIX timestamp (UI8).
        self.time_created_after = time_created_after
        # For jobs submitted before this time, the time in the region is converted into a Unix timestamp (for domestic sites, the UI8 region).
        self.time_created_before = time_created_before
        self.vpc_id = vpc_id
        # The ID of the vSwitch.
        self.vswitch_id = vswitch_id

    def validate(self):
        pass

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

        result = dict()
        if self.executor_ids is not None:
            result['ExecutorIds'] = self.executor_ids
        if self.image is not None:
            result['Image'] = self.image
        if self.ip_addresses is not None:
            result['IpAddresses'] = self.ip_addresses
        if self.job_name is not None:
            result['JobName'] = self.job_name
        if self.status is not None:
            result['Status'] = self.status
        if self.time_created_after is not None:
            result['TimeCreatedAfter'] = self.time_created_after
        if self.time_created_before is not None:
            result['TimeCreatedBefore'] = self.time_created_before
        if self.vpc_id is not None:
            result['VpcId'] = self.vpc_id
        if self.vswitch_id is not None:
            result['VswitchId'] = self.vswitch_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ExecutorIds') is not None:
            self.executor_ids = m.get('ExecutorIds')
        if m.get('Image') is not None:
            self.image = m.get('Image')
        if m.get('IpAddresses') is not None:
            self.ip_addresses = m.get('IpAddresses')
        if m.get('JobName') is not None:
            self.job_name = m.get('JobName')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('TimeCreatedAfter') is not None:
            self.time_created_after = m.get('TimeCreatedAfter')
        if m.get('TimeCreatedBefore') is not None:
            self.time_created_before = m.get('TimeCreatedBefore')
        if m.get('VpcId') is not None:
            self.vpc_id = m.get('VpcId')
        if m.get('VswitchId') is not None:
            self.vswitch_id = m.get('VswitchId')
        return self


class ListExecutorsRequest(TeaModel):
    def __init__(
        self,
        filter: ListExecutorsRequestFilter = None,
        page_number: int = None,
        page_size: int = None,
    ):
        # Queries the Executor filter conditions.
        self.filter = filter
        # The current page number.\\
        # Starting value: 1\\
        # Default value: 1
        self.page_number = page_number
        # The number of entries per page. The number of entries returned per page. Default value: 50. Maximum value: 100.
        self.page_size = page_size

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

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

        result = dict()
        if self.filter is not None:
            result['Filter'] = self.filter.to_map()
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Filter') is not None:
            temp_model = ListExecutorsRequestFilter()
            self.filter = temp_model.from_map(m['Filter'])
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        return self


class ListExecutorsShrinkRequest(TeaModel):
    def __init__(
        self,
        filter_shrink: str = None,
        page_number: int = None,
        page_size: int = None,
    ):
        # Queries the Executor filter conditions.
        self.filter_shrink = filter_shrink
        # The current page number.\\
        # Starting value: 1\\
        # Default value: 1
        self.page_number = page_number
        # The number of entries per page. The number of entries returned per page. Default value: 50. Maximum value: 100.
        self.page_size = page_size

    def validate(self):
        pass

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

        result = dict()
        if self.filter_shrink is not None:
            result['Filter'] = self.filter_shrink
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Filter') is not None:
            self.filter_shrink = m.get('Filter')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        return self


class ListExecutorsResponseBodyExecutorsResourceDisks(TeaModel):
    def __init__(
        self,
        size: int = None,
        type: str = None,
    ):
        # The size of the disk.
        self.size = size
        # The category of the disk. The following disk categories are supported:
        # 
        # *   System: system disk.
        # *   Data: data disk.
        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.size is not None:
            result['Size'] = self.size
        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('Size') is not None:
            self.size = m.get('Size')
        if m.get('Type') is not None:
            self.type = m.get('Type')
        return self


class ListExecutorsResponseBodyExecutorsResource(TeaModel):
    def __init__(
        self,
        cores: float = None,
        disks: List[ListExecutorsResponseBodyExecutorsResourceDisks] = None,
        instance_type: str = None,
        memory: float = None,
    ):
        # The number of running CPUs.
        self.cores = cores
        # The array of the disks.
        self.disks = disks
        self.instance_type = instance_type
        # The total amount of memory resources. Unit: GiB.
        self.memory = memory

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

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

        result = dict()
        if self.cores is not None:
            result['Cores'] = self.cores
        result['Disks'] = []
        if self.disks is not None:
            for k in self.disks:
                result['Disks'].append(k.to_map() if k else None)
        if self.instance_type is not None:
            result['InstanceType'] = self.instance_type
        if self.memory is not None:
            result['Memory'] = self.memory
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Cores') is not None:
            self.cores = m.get('Cores')
        self.disks = []
        if m.get('Disks') is not None:
            for k in m.get('Disks'):
                temp_model = ListExecutorsResponseBodyExecutorsResourceDisks()
                self.disks.append(temp_model.from_map(k))
        if m.get('InstanceType') is not None:
            self.instance_type = m.get('InstanceType')
        if m.get('Memory') is not None:
            self.memory = m.get('Memory')
        return self


class ListExecutorsResponseBodyExecutorsTags(TeaModel):
    def __init__(
        self,
        tag_key: str = None,
        tag_value: str = None,
    ):
        # The key of the executor tag.
        self.tag_key = tag_key
        # The value of the executor tag.
        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 ListExecutorsResponseBodyExecutors(TeaModel):
    def __init__(
        self,
        allocation_spec: str = None,
        app_name: str = None,
        array_index: int = None,
        block_duration: int = None,
        create_time: str = None,
        end_time: str = None,
        executor_id: str = None,
        expiration_time: str = None,
        external_ip_address: List[str] = None,
        host_name: List[str] = None,
        image: str = None,
        ip_address: List[str] = None,
        job_id: str = None,
        job_name: str = None,
        preemptible: bool = None,
        resource: ListExecutorsResponseBodyExecutorsResource = None,
        resource_type: str = None,
        start_time: str = None,
        status: str = None,
        status_reason: str = None,
        tags: List[ListExecutorsResponseBodyExecutorsTags] = None,
        task_name: str = None,
        task_sustainable: bool = None,
        vpc_id: str = None,
        vswitch_id: str = None,
    ):
        self.allocation_spec = allocation_spec
        self.app_name = app_name
        # The executor number.
        self.array_index = array_index
        self.block_duration = block_duration
        # The time when the instance was created.
        self.create_time = create_time
        # The end time.
        self.end_time = end_time
        # The executor ID. The format is JobId-TaskName-ArrayIndex.
        self.executor_id = executor_id
        self.expiration_time = expiration_time
        # The list of public IP addresses of the nodes.
        self.external_ip_address = external_ip_address
        # The list of hostnames.
        self.host_name = host_name
        # Executor image.
        self.image = image
        # The list of internal IP addresses.
        self.ip_address = ip_address
        # The job ID.
        self.job_id = job_id
        # The job name.
        self.job_name = job_name
        self.preemptible = preemptible
        # The resource information.
        self.resource = resource
        # The type of the resource.
        self.resource_type = resource_type
        # The start time.
        self.start_time = start_time
        # The status of the executor. Valid values:
        # 
        # *   Pending
        # *   Initing
        # *   Succeed
        # *   Failed
        # *   Running
        # *   Unknown
        # *   Exception
        # *   Retrying
        # *   Expired
        # *   Deleted
        self.status = status
        # The description of the status reason.
        self.status_reason = status_reason
        # The list of executor tags.
        self.tags = tags
        # The name of the task.
        self.task_name = task_name
        # Indicate whether the job is a long-running job.
        self.task_sustainable = task_sustainable
        self.vpc_id = vpc_id
        # The ID of the vSwitch.
        self.vswitch_id = vswitch_id

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

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

        result = dict()
        if self.allocation_spec is not None:
            result['AllocationSpec'] = self.allocation_spec
        if self.app_name is not None:
            result['AppName'] = self.app_name
        if self.array_index is not None:
            result['ArrayIndex'] = self.array_index
        if self.block_duration is not None:
            result['BlockDuration'] = self.block_duration
        if self.create_time is not None:
            result['CreateTime'] = self.create_time
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.executor_id is not None:
            result['ExecutorId'] = self.executor_id
        if self.expiration_time is not None:
            result['ExpirationTime'] = self.expiration_time
        if self.external_ip_address is not None:
            result['ExternalIpAddress'] = self.external_ip_address
        if self.host_name is not None:
            result['HostName'] = self.host_name
        if self.image is not None:
            result['Image'] = self.image
        if self.ip_address is not None:
            result['IpAddress'] = self.ip_address
        if self.job_id is not None:
            result['JobId'] = self.job_id
        if self.job_name is not None:
            result['JobName'] = self.job_name
        if self.preemptible is not None:
            result['Preemptible'] = self.preemptible
        if self.resource is not None:
            result['Resource'] = self.resource.to_map()
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.status is not None:
            result['Status'] = self.status
        if self.status_reason is not None:
            result['StatusReason'] = self.status_reason
        result['Tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['Tags'].append(k.to_map() if k else None)
        if self.task_name is not None:
            result['TaskName'] = self.task_name
        if self.task_sustainable is not None:
            result['TaskSustainable'] = self.task_sustainable
        if self.vpc_id is not None:
            result['VpcId'] = self.vpc_id
        if self.vswitch_id is not None:
            result['VswitchId'] = self.vswitch_id
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('AllocationSpec') is not None:
            self.allocation_spec = m.get('AllocationSpec')
        if m.get('AppName') is not None:
            self.app_name = m.get('AppName')
        if m.get('ArrayIndex') is not None:
            self.array_index = m.get('ArrayIndex')
        if m.get('BlockDuration') is not None:
            self.block_duration = m.get('BlockDuration')
        if m.get('CreateTime') is not None:
            self.create_time = m.get('CreateTime')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('ExecutorId') is not None:
            self.executor_id = m.get('ExecutorId')
        if m.get('ExpirationTime') is not None:
            self.expiration_time = m.get('ExpirationTime')
        if m.get('ExternalIpAddress') is not None:
            self.external_ip_address = m.get('ExternalIpAddress')
        if m.get('HostName') is not None:
            self.host_name = m.get('HostName')
        if m.get('Image') is not None:
            self.image = m.get('Image')
        if m.get('IpAddress') is not None:
            self.ip_address = m.get('IpAddress')
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        if m.get('JobName') is not None:
            self.job_name = m.get('JobName')
        if m.get('Preemptible') is not None:
            self.preemptible = m.get('Preemptible')
        if m.get('Resource') is not None:
            temp_model = ListExecutorsResponseBodyExecutorsResource()
            self.resource = temp_model.from_map(m['Resource'])
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('StatusReason') is not None:
            self.status_reason = m.get('StatusReason')
        self.tags = []
        if m.get('Tags') is not None:
            for k in m.get('Tags'):
                temp_model = ListExecutorsResponseBodyExecutorsTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('TaskName') is not None:
            self.task_name = m.get('TaskName')
        if m.get('TaskSustainable') is not None:
            self.task_sustainable = m.get('TaskSustainable')
        if m.get('VpcId') is not None:
            self.vpc_id = m.get('VpcId')
        if m.get('VswitchId') is not None:
            self.vswitch_id = m.get('VswitchId')
        return self


class ListExecutorsResponseBody(TeaModel):
    def __init__(
        self,
        executors: List[ListExecutorsResponseBodyExecutors] = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        total_count: str = None,
    ):
        # Executor list.
        self.executors = executors
        # The current page number.
        self.page_number = page_number
        # The number of entries returned per page.
        self.page_size = page_size
        # The request ID.
        self.request_id = request_id
        # The total number of entries returned.
        self.total_count = total_count

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

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

        result = dict()
        result['Executors'] = []
        if self.executors is not None:
            for k in self.executors:
                result['Executors'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        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.executors = []
        if m.get('Executors') is not None:
            for k in m.get('Executors'):
                temp_model = ListExecutorsResponseBodyExecutors()
                self.executors.append(temp_model.from_map(k))
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


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

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

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

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

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


class ListImagesRequest(TeaModel):
    def __init__(
        self,
        image_category: str = None,
        image_ids: List[str] = None,
        image_names: List[str] = None,
        image_type: str = None,
        mode: str = None,
        page_number: int = None,
        page_size: int = None,
    ):
        # The source of the image. Valid values:
        # 
        # *   Public: public images provided by Alibaba Cloud.
        # *   Custom: the custom image that you added.
        self.image_category = image_category
        # The array of image IDs.
        self.image_ids = image_ids
        # The array of image names.
        self.image_names = image_names
        # The type of the images. Valid values:
        # 
        # *   VM: virtual machine image.
        # *   Container: the container image.
        # 
        # Default value: VM
        self.image_type = image_type
        # The query mode. Valid values:
        # 
        # *   List: queries the list of all corresponding image versions.
        # *   Merge: merges images to query the latest version list.
        self.mode = mode
        # The number of the page to return.\\
        # Default value: 1.
        self.page_number = page_number
        # The number of pieces per page.\\
        # Default value: 20.
        self.page_size = page_size

    def validate(self):
        pass

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

        result = dict()
        if self.image_category is not None:
            result['ImageCategory'] = self.image_category
        if self.image_ids is not None:
            result['ImageIds'] = self.image_ids
        if self.image_names is not None:
            result['ImageNames'] = self.image_names
        if self.image_type is not None:
            result['ImageType'] = self.image_type
        if self.mode is not None:
            result['Mode'] = self.mode
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ImageCategory') is not None:
            self.image_category = m.get('ImageCategory')
        if m.get('ImageIds') is not None:
            self.image_ids = m.get('ImageIds')
        if m.get('ImageNames') is not None:
            self.image_names = m.get('ImageNames')
        if m.get('ImageType') is not None:
            self.image_type = m.get('ImageType')
        if m.get('Mode') is not None:
            self.mode = m.get('Mode')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        return self


class ListImagesShrinkRequest(TeaModel):
    def __init__(
        self,
        image_category: str = None,
        image_ids_shrink: str = None,
        image_names_shrink: str = None,
        image_type: str = None,
        mode: str = None,
        page_number: int = None,
        page_size: int = None,
    ):
        # The source of the image. Valid values:
        # 
        # *   Public: public images provided by Alibaba Cloud.
        # *   Custom: the custom image that you added.
        self.image_category = image_category
        # The array of image IDs.
        self.image_ids_shrink = image_ids_shrink
        # The array of image names.
        self.image_names_shrink = image_names_shrink
        # The type of the images. Valid values:
        # 
        # *   VM: virtual machine image.
        # *   Container: the container image.
        # 
        # Default value: VM
        self.image_type = image_type
        # The query mode. Valid values:
        # 
        # *   List: queries the list of all corresponding image versions.
        # *   Merge: merges images to query the latest version list.
        self.mode = mode
        # The number of the page to return.\\
        # Default value: 1.
        self.page_number = page_number
        # The number of pieces per page.\\
        # Default value: 20.
        self.page_size = page_size

    def validate(self):
        pass

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

        result = dict()
        if self.image_category is not None:
            result['ImageCategory'] = self.image_category
        if self.image_ids_shrink is not None:
            result['ImageIds'] = self.image_ids_shrink
        if self.image_names_shrink is not None:
            result['ImageNames'] = self.image_names_shrink
        if self.image_type is not None:
            result['ImageType'] = self.image_type
        if self.mode is not None:
            result['Mode'] = self.mode
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ImageCategory') is not None:
            self.image_category = m.get('ImageCategory')
        if m.get('ImageIds') is not None:
            self.image_ids_shrink = m.get('ImageIds')
        if m.get('ImageNames') is not None:
            self.image_names_shrink = m.get('ImageNames')
        if m.get('ImageType') is not None:
            self.image_type = m.get('ImageType')
        if m.get('Mode') is not None:
            self.mode = m.get('Mode')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        return self


class ListImagesResponseBodyImages(TeaModel):
    def __init__(
        self,
        app_id: str = None,
        create_time: str = None,
        description: str = None,
        document_id: int = None,
        image_id: str = None,
        image_type: str = None,
        name: str = None,
        os_tag: str = None,
        update_time: str = None,
        version: str = None,
        weight: int = None,
    ):
        # The application ID.
        # 
        # This parameter is required.
        self.app_id = app_id
        # The time when the storage resource was created.
        self.create_time = create_time
        # The description of the image.
        self.description = description
        # The document ID.
        self.document_id = document_id
        # The image ID.
        # 
        # This parameter is required.
        self.image_id = image_id
        # The type of the image.
        # 
        # This parameter is required.
        self.image_type = image_type
        # The name of the image.
        self.name = name
        # The ID of the specific OS version.
        self.os_tag = os_tag
        # The time when the image was updated.
        self.update_time = update_time
        # The version of the image.
        self.version = version
        # The weight.
        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.app_id is not None:
            result['AppId'] = self.app_id
        if self.create_time is not None:
            result['CreateTime'] = self.create_time
        if self.description is not None:
            result['Description'] = self.description
        if self.document_id is not None:
            result['DocumentId'] = self.document_id
        if self.image_id is not None:
            result['ImageId'] = self.image_id
        if self.image_type is not None:
            result['ImageType'] = self.image_type
        if self.name is not None:
            result['Name'] = self.name
        if self.os_tag is not None:
            result['OsTag'] = self.os_tag
        if self.update_time is not None:
            result['UpdateTime'] = self.update_time
        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('AppId') is not None:
            self.app_id = m.get('AppId')
        if m.get('CreateTime') is not None:
            self.create_time = m.get('CreateTime')
        if m.get('Description') is not None:
            self.description = m.get('Description')
        if m.get('DocumentId') is not None:
            self.document_id = m.get('DocumentId')
        if m.get('ImageId') is not None:
            self.image_id = m.get('ImageId')
        if m.get('ImageType') is not None:
            self.image_type = m.get('ImageType')
        if m.get('Name') is not None:
            self.name = m.get('Name')
        if m.get('OsTag') is not None:
            self.os_tag = m.get('OsTag')
        if m.get('UpdateTime') is not None:
            self.update_time = m.get('UpdateTime')
        if m.get('Version') is not None:
            self.version = m.get('Version')
        if m.get('Weight') is not None:
            self.weight = m.get('Weight')
        return self


class ListImagesResponseBody(TeaModel):
    def __init__(
        self,
        images: List[ListImagesResponseBodyImages] = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        success: bool = None,
        total_count: int = None,
    ):
        # The list of image information.
        self.images = images
        # The page number.
        self.page_number = page_number
        # The number of entries returned per page.
        self.page_size = page_size
        # The request ID.
        self.request_id = request_id
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true
        # *   false
        self.success = success
        # The total number of entries returned.
        self.total_count = total_count

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

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

        result = dict()
        result['Images'] = []
        if self.images is not None:
            for k in self.images:
                result['Images'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        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.images = []
        if m.get('Images') is not None:
            for k in m.get('Images'):
                temp_model = ListImagesResponseBodyImages()
                self.images.append(temp_model.from_map(k))
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


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

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

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

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

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


class ListJobExecutorsRequest(TeaModel):
    def __init__(
        self,
        job_id: str = None,
        page_number: int = None,
        page_size: int = None,
        task_name: str = None,
    ):
        # The ID of the job.
        self.job_id = job_id
        # The page number of the page to return.
        self.page_number = page_number
        # The number of entries per page.
        self.page_size = page_size
        # The job name.
        self.task_name = task_name

    def validate(self):
        pass

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

        result = dict()
        if self.job_id is not None:
            result['JobId'] = self.job_id
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.task_name is not None:
            result['TaskName'] = self.task_name
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        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('TaskName') is not None:
            self.task_name = m.get('TaskName')
        return self


class ListJobExecutorsResponseBodyExecutorStatus(TeaModel):
    def __init__(
        self,
        deleted: int = None,
        exception: int = None,
        failed: int = None,
        initing: int = None,
        pending: int = None,
        restarting: int = None,
        running: int = None,
        succeeded: int = None,
        suspended: int = None,
    ):
        # The number of executers in the Deleted state.
        self.deleted = deleted
        # The number of executers in the abnormal state.
        self.exception = exception
        # The number of executers in the Failed state.
        self.failed = failed
        # The number of executers in the initialized state.
        self.initing = initing
        # The number of executers in the queued state.
        self.pending = pending
        self.restarting = restarting
        # The number of executers in the running state.
        self.running = running
        # The number of executoresin the Successful state.
        self.succeeded = succeeded
        self.suspended = suspended

    def validate(self):
        pass

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

        result = dict()
        if self.deleted is not None:
            result['Deleted'] = self.deleted
        if self.exception is not None:
            result['Exception'] = self.exception
        if self.failed is not None:
            result['Failed'] = self.failed
        if self.initing is not None:
            result['Initing'] = self.initing
        if self.pending is not None:
            result['Pending'] = self.pending
        if self.restarting is not None:
            result['Restarting'] = self.restarting
        if self.running is not None:
            result['Running'] = self.running
        if self.succeeded is not None:
            result['Succeeded'] = self.succeeded
        if self.suspended is not None:
            result['Suspended'] = self.suspended
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Deleted') is not None:
            self.deleted = m.get('Deleted')
        if m.get('Exception') is not None:
            self.exception = m.get('Exception')
        if m.get('Failed') is not None:
            self.failed = m.get('Failed')
        if m.get('Initing') is not None:
            self.initing = m.get('Initing')
        if m.get('Pending') is not None:
            self.pending = m.get('Pending')
        if m.get('Restarting') is not None:
            self.restarting = m.get('Restarting')
        if m.get('Running') is not None:
            self.running = m.get('Running')
        if m.get('Succeeded') is not None:
            self.succeeded = m.get('Succeeded')
        if m.get('Suspended') is not None:
            self.suspended = m.get('Suspended')
        return self


class ListJobExecutorsResponseBodyExecutorsTags(TeaModel):
    def __init__(
        self,
        tag_key: str = None,
        tag_value: str = None,
    ):
        # The key of the executor tag.
        self.tag_key = tag_key
        # The value of the executor tag.
        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 ListJobExecutorsResponseBodyExecutors(TeaModel):
    def __init__(
        self,
        allocation_spec: str = None,
        array_index: int = None,
        block_duration: int = None,
        create_time: str = None,
        end_time: str = None,
        executor_id: str = None,
        expiration_time: str = None,
        external_ip_address: List[str] = None,
        host_name: List[str] = None,
        ip_address: List[str] = None,
        preemptible: bool = None,
        start_time: str = None,
        status: str = None,
        status_reason: str = None,
        tags: List[ListJobExecutorsResponseBodyExecutorsTags] = None,
    ):
        self.allocation_spec = allocation_spec
        # The executor index number.
        self.array_index = array_index
        self.block_duration = block_duration
        # The time when the storage resource was created.
        self.create_time = create_time
        # The end time.
        self.end_time = end_time
        # The executor ID. The format is JobId-TaskName-ArrayIndex.
        self.executor_id = executor_id
        self.expiration_time = expiration_time
        # The list of public IP addresses of the nodes.
        self.external_ip_address = external_ip_address
        # An array of node hostnames.
        self.host_name = host_name
        # The list of node IP addresses.
        self.ip_address = ip_address
        self.preemptible = preemptible
        # The create time.
        self.start_time = start_time
        # The status of the executor. Valid values:
        # 
        # *   Pending
        # *   Initing
        # *   Succeed
        # *   Failed
        # *   Running
        # *   Unknown
        # *   Exception
        # *   Retrying
        # *   Expired
        # *   Deleted
        self.status = status
        # The description of the status reason.
        self.status_reason = status_reason
        # The list of executor tags.
        self.tags = tags

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

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

        result = dict()
        if self.allocation_spec is not None:
            result['AllocationSpec'] = self.allocation_spec
        if self.array_index is not None:
            result['ArrayIndex'] = self.array_index
        if self.block_duration is not None:
            result['BlockDuration'] = self.block_duration
        if self.create_time is not None:
            result['CreateTime'] = self.create_time
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.executor_id is not None:
            result['ExecutorId'] = self.executor_id
        if self.expiration_time is not None:
            result['ExpirationTime'] = self.expiration_time
        if self.external_ip_address is not None:
            result['ExternalIpAddress'] = self.external_ip_address
        if self.host_name is not None:
            result['HostName'] = self.host_name
        if self.ip_address is not None:
            result['IpAddress'] = self.ip_address
        if self.preemptible is not None:
            result['Preemptible'] = self.preemptible
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.status is not None:
            result['Status'] = self.status
        if self.status_reason is not None:
            result['StatusReason'] = self.status_reason
        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('AllocationSpec') is not None:
            self.allocation_spec = m.get('AllocationSpec')
        if m.get('ArrayIndex') is not None:
            self.array_index = m.get('ArrayIndex')
        if m.get('BlockDuration') is not None:
            self.block_duration = m.get('BlockDuration')
        if m.get('CreateTime') is not None:
            self.create_time = m.get('CreateTime')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('ExecutorId') is not None:
            self.executor_id = m.get('ExecutorId')
        if m.get('ExpirationTime') is not None:
            self.expiration_time = m.get('ExpirationTime')
        if m.get('ExternalIpAddress') is not None:
            self.external_ip_address = m.get('ExternalIpAddress')
        if m.get('HostName') is not None:
            self.host_name = m.get('HostName')
        if m.get('IpAddress') is not None:
            self.ip_address = m.get('IpAddress')
        if m.get('Preemptible') is not None:
            self.preemptible = m.get('Preemptible')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('StatusReason') is not None:
            self.status_reason = m.get('StatusReason')
        self.tags = []
        if m.get('Tags') is not None:
            for k in m.get('Tags'):
                temp_model = ListJobExecutorsResponseBodyExecutorsTags()
                self.tags.append(temp_model.from_map(k))
        return self


class ListJobExecutorsResponseBody(TeaModel):
    def __init__(
        self,
        executor_status: ListJobExecutorsResponseBodyExecutorStatus = None,
        executors: List[ListJobExecutorsResponseBodyExecutors] = None,
        job_id: str = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        task_name: str = None,
        total_count: str = None,
    ):
        # Executor status statistics.
        self.executor_status = executor_status
        # The executor list.
        self.executors = executors
        # The job ID.
        self.job_id = job_id
        # The page number.
        self.page_number = page_number
        # The number of entries per page.
        self.page_size = page_size
        # The request ID.
        self.request_id = request_id
        # The job name.
        self.task_name = task_name
        # The total number of list entries.
        self.total_count = total_count

    def validate(self):
        if self.executor_status:
            self.executor_status.validate()
        if self.executors:
            for k in self.executors:
                if k:
                    k.validate()

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

        result = dict()
        if self.executor_status is not None:
            result['ExecutorStatus'] = self.executor_status.to_map()
        result['Executors'] = []
        if self.executors is not None:
            for k in self.executors:
                result['Executors'].append(k.to_map() if k else None)
        if self.job_id is not None:
            result['JobId'] = self.job_id
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.task_name is not None:
            result['TaskName'] = self.task_name
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ExecutorStatus') is not None:
            temp_model = ListJobExecutorsResponseBodyExecutorStatus()
            self.executor_status = temp_model.from_map(m['ExecutorStatus'])
        self.executors = []
        if m.get('Executors') is not None:
            for k in m.get('Executors'):
                temp_model = ListJobExecutorsResponseBodyExecutors()
                self.executors.append(temp_model.from_map(k))
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('TaskName') is not None:
            self.task_name = m.get('TaskName')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


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

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

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

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

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


class ListJobsRequestFilter(TeaModel):
    def __init__(
        self,
        job_id: str = None,
        job_name: str = None,
        status: str = None,
        time_created_after: int = None,
        time_created_before: int = None,
    ):
        # The ID of the job.
        self.job_id = job_id
        # The job name. Fuzzy search is supported.
        self.job_name = job_name
        # The job status. Valid values:
        # 
        # *   Pending
        # *   initing
        # *   Succeed
        # *   Failed
        # *   Running
        # *   Exception
        # *   Retrying
        # *   Expired
        # *   Suspended
        # *   Restarting
        # *   Deleted
        self.status = status
        # For jobs submitted after this time, the time in the region is converted into a UNIX timestamp (UI8).
        self.time_created_after = time_created_after
        # For jobs submitted before this time, the time in the region is converted into a Unix timestamp (for domestic sites, the UI8 region).
        self.time_created_before = time_created_before

    def validate(self):
        pass

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

        result = dict()
        if self.job_id is not None:
            result['JobId'] = self.job_id
        if self.job_name is not None:
            result['JobName'] = self.job_name
        if self.status is not None:
            result['Status'] = self.status
        if self.time_created_after is not None:
            result['TimeCreatedAfter'] = self.time_created_after
        if self.time_created_before is not None:
            result['TimeCreatedBefore'] = self.time_created_before
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        if m.get('JobName') is not None:
            self.job_name = m.get('JobName')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('TimeCreatedAfter') is not None:
            self.time_created_after = m.get('TimeCreatedAfter')
        if m.get('TimeCreatedBefore') is not None:
            self.time_created_before = m.get('TimeCreatedBefore')
        return self


class ListJobsRequestSortBy(TeaModel):
    def __init__(
        self,
        label: str = None,
        order: str = None,
    ):
        # The sorting label. Valid values:
        # 
        # *   time_start
        # *   job_name
        self.label = label
        # The sorting order. Valid values:
        # 
        # *   ASC (default): ascending order
        # *   DESC: descending order
        self.order = order

    def validate(self):
        pass

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

        result = dict()
        if self.label is not None:
            result['Label'] = self.label
        if self.order is not None:
            result['Order'] = self.order
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Label') is not None:
            self.label = m.get('Label')
        if m.get('Order') is not None:
            self.order = m.get('Order')
        return self


class ListJobsRequest(TeaModel):
    def __init__(
        self,
        filter: ListJobsRequestFilter = None,
        page_number: int = None,
        page_size: int = None,
        sort_by: ListJobsRequestSortBy = None,
    ):
        # Queries job filter conditions.
        self.filter = filter
        # The page number.
        # 
        # Pages start from page 1.
        # 
        # Default value: 1.
        self.page_number = page_number
        # The number of entries on the current page. Default value: 50. Maximum value: 100.
        self.page_size = page_size
        # The sorting method.
        self.sort_by = sort_by

    def validate(self):
        if self.filter:
            self.filter.validate()
        if self.sort_by:
            self.sort_by.validate()

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

        result = dict()
        if self.filter is not None:
            result['Filter'] = self.filter.to_map()
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.sort_by is not None:
            result['SortBy'] = self.sort_by.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Filter') is not None:
            temp_model = ListJobsRequestFilter()
            self.filter = temp_model.from_map(m['Filter'])
        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('SortBy') is not None:
            temp_model = ListJobsRequestSortBy()
            self.sort_by = temp_model.from_map(m['SortBy'])
        return self


class ListJobsShrinkRequest(TeaModel):
    def __init__(
        self,
        filter_shrink: str = None,
        page_number: int = None,
        page_size: int = None,
        sort_by_shrink: str = None,
    ):
        # Queries job filter conditions.
        self.filter_shrink = filter_shrink
        # The page number.
        # 
        # Pages start from page 1.
        # 
        # Default value: 1.
        self.page_number = page_number
        # The number of entries on the current page. Default value: 50. Maximum value: 100.
        self.page_size = page_size
        # The sorting method.
        self.sort_by_shrink = sort_by_shrink

    def validate(self):
        pass

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

        result = dict()
        if self.filter_shrink is not None:
            result['Filter'] = self.filter_shrink
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.sort_by_shrink is not None:
            result['SortBy'] = self.sort_by_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Filter') is not None:
            self.filter_shrink = m.get('Filter')
        if m.get('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('SortBy') is not None:
            self.sort_by_shrink = m.get('SortBy')
        return self


class ListJobsResponseBodyJobListTags(TeaModel):
    def __init__(
        self,
        tag_key: str = None,
        tag_value: str = None,
    ):
        # The key of the job tag.
        self.tag_key = tag_key
        # The value of the job tag.
        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 ListJobsResponseBodyJobList(TeaModel):
    def __init__(
        self,
        app_extra_info: str = None,
        app_name: str = None,
        create_time: str = None,
        end_time: str = None,
        executor_count: int = None,
        job_description: str = None,
        job_id: str = None,
        job_name: str = None,
        owner_uid: str = None,
        start_time: str = None,
        status: str = None,
        tags: List[ListJobsResponseBodyJobListTags] = None,
        task_count: int = None,
        task_sustainable: bool = None,
    ):
        # The additional information about the application.
        self.app_extra_info = app_extra_info
        self.app_name = app_name
        # The time when the job was submitted.
        self.create_time = create_time
        # The end time of the job.
        self.end_time = end_time
        # The number of running nodes.
        self.executor_count = executor_count
        # The description of the job.
        self.job_description = job_description
        # The ID of the job.
        self.job_id = job_id
        # The job name.
        self.job_name = job_name
        # The UID of the creator.
        self.owner_uid = owner_uid
        # The start time of the job.
        self.start_time = start_time
        # The status of the job. Valid values:
        # 
        # *   Pending
        # *   Initing
        # *   Succeed
        # *   Failed
        # *   Running
        # *   Exception
        # *   Retrying
        # *   Expired
        # *   Deleting
        # *   Deleted
        self.status = status
        # The list of job tags.
        self.tags = tags
        # The number of tasks.
        self.task_count = task_count
        # Indicate whether the job is a long-running job.
        self.task_sustainable = task_sustainable

    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.app_extra_info is not None:
            result['AppExtraInfo'] = self.app_extra_info
        if self.app_name is not None:
            result['AppName'] = self.app_name
        if self.create_time is not None:
            result['CreateTime'] = self.create_time
        if self.end_time is not None:
            result['EndTime'] = self.end_time
        if self.executor_count is not None:
            result['ExecutorCount'] = self.executor_count
        if self.job_description is not None:
            result['JobDescription'] = self.job_description
        if self.job_id is not None:
            result['JobId'] = self.job_id
        if self.job_name is not None:
            result['JobName'] = self.job_name
        if self.owner_uid is not None:
            result['OwnerUid'] = self.owner_uid
        if self.start_time is not None:
            result['StartTime'] = self.start_time
        if self.status is not None:
            result['Status'] = self.status
        result['Tags'] = []
        if self.tags is not None:
            for k in self.tags:
                result['Tags'].append(k.to_map() if k else None)
        if self.task_count is not None:
            result['TaskCount'] = self.task_count
        if self.task_sustainable is not None:
            result['TaskSustainable'] = self.task_sustainable
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('AppExtraInfo') is not None:
            self.app_extra_info = m.get('AppExtraInfo')
        if m.get('AppName') is not None:
            self.app_name = m.get('AppName')
        if m.get('CreateTime') is not None:
            self.create_time = m.get('CreateTime')
        if m.get('EndTime') is not None:
            self.end_time = m.get('EndTime')
        if m.get('ExecutorCount') is not None:
            self.executor_count = m.get('ExecutorCount')
        if m.get('JobDescription') is not None:
            self.job_description = m.get('JobDescription')
        if m.get('JobId') is not None:
            self.job_id = m.get('JobId')
        if m.get('JobName') is not None:
            self.job_name = m.get('JobName')
        if m.get('OwnerUid') is not None:
            self.owner_uid = m.get('OwnerUid')
        if m.get('StartTime') is not None:
            self.start_time = m.get('StartTime')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        self.tags = []
        if m.get('Tags') is not None:
            for k in m.get('Tags'):
                temp_model = ListJobsResponseBodyJobListTags()
                self.tags.append(temp_model.from_map(k))
        if m.get('TaskCount') is not None:
            self.task_count = m.get('TaskCount')
        if m.get('TaskSustainable') is not None:
            self.task_sustainable = m.get('TaskSustainable')
        return self


class ListJobsResponseBody(TeaModel):
    def __init__(
        self,
        job_list: List[ListJobsResponseBodyJobList] = None,
        page_number: int = None,
        page_size: int = None,
        request_id: str = None,
        total_count: int = None,
    ):
        # The list of jobs.
        self.job_list = job_list
        # The current page number.
        self.page_number = page_number
        # The number of entries returned per page.
        self.page_size = page_size
        # The request ID.
        self.request_id = request_id
        # The total number of entries returned. This parameter is optional and is not returned by default.
        self.total_count = total_count

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

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

        result = dict()
        result['JobList'] = []
        if self.job_list is not None:
            for k in self.job_list:
                result['JobList'].append(k.to_map() if k else None)
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        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.job_list = []
        if m.get('JobList') is not None:
            for k in m.get('JobList'):
                temp_model = ListJobsResponseBodyJobList()
                self.job_list.append(temp_model.from_map(k))
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


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

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

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

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

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


class ListPoolsRequestFilter(TeaModel):
    def __init__(
        self,
        pool_name: List[str] = None,
        status: List[str] = None,
        time_created_after: int = None,
        time_created_before: int = None,
    ):
        # Queries the list of resource pool names.
        self.pool_name = pool_name
        # Queries resource pool status list.
        self.status = status
        # For node pools created after this time, the time in the region is converted into a UNIX timestamp.
        self.time_created_after = time_created_after
        # For node pools created before this time, the time in the region is converted into a UNIX timestamp.
        self.time_created_before = time_created_before

    def validate(self):
        pass

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

        result = dict()
        if self.pool_name is not None:
            result['PoolName'] = self.pool_name
        if self.status is not None:
            result['Status'] = self.status
        if self.time_created_after is not None:
            result['TimeCreatedAfter'] = self.time_created_after
        if self.time_created_before is not None:
            result['TimeCreatedBefore'] = self.time_created_before
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('PoolName') is not None:
            self.pool_name = m.get('PoolName')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        if m.get('TimeCreatedAfter') is not None:
            self.time_created_after = m.get('TimeCreatedAfter')
        if m.get('TimeCreatedBefore') is not None:
            self.time_created_before = m.get('TimeCreatedBefore')
        return self


class ListPoolsRequest(TeaModel):
    def __init__(
        self,
        filter: ListPoolsRequestFilter = None,
        page_number: int = None,
        page_size: int = None,
    ):
        # Queries the filter conditions of a resource pool.
        self.filter = filter
        # The page number. Default value: 1.
        self.page_number = page_number
        # The number of entries on each page. Maximum value: 50. Default value: 10.
        self.page_size = page_size

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

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

        result = dict()
        if self.filter is not None:
            result['Filter'] = self.filter.to_map()
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Filter') is not None:
            temp_model = ListPoolsRequestFilter()
            self.filter = temp_model.from_map(m['Filter'])
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        return self


class ListPoolsShrinkRequest(TeaModel):
    def __init__(
        self,
        filter_shrink: str = None,
        page_number: int = None,
        page_size: int = None,
    ):
        # Queries the filter conditions of a resource pool.
        self.filter_shrink = filter_shrink
        # The page number. Default value: 1.
        self.page_number = page_number
        # The number of entries on each page. Maximum value: 50. Default value: 10.
        self.page_size = page_size

    def validate(self):
        pass

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

        result = dict()
        if self.filter_shrink is not None:
            result['Filter'] = self.filter_shrink
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('Filter') is not None:
            self.filter_shrink = m.get('Filter')
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        return self


class ListPoolsResponseBodyPoolList(TeaModel):
    def __init__(
        self,
        is_default: bool = None,
        max_exector_num: int = None,
        pool_name: str = None,
        priority: int = None,
        status: str = None,
    ):
        # Indices whether the resource pool is the default resource pool. Valid values:
        # 
        # *   **true**\
        # *   **false**\
        self.is_default = is_default
        # The maximum number of execution nodes that can run concurrently in a resource pool.
        self.max_exector_num = max_exector_num
        # The name of the resource pool.
        # 
        # *   The value can be up to 15 characters in length.
        # *   It can contain digits, uppercase letters, lowercase letters, underscores (_), and dots (.).
        self.pool_name = pool_name
        # The priority of the resource pool.
        # 
        # *   You can set a priority in the range of 1 to 99. The default value is 1, which is the lowest priority.
        # *   Jobs submitted to a resource pool with a higher priority level value will be scheduled before pending jobs in a resource pool with a lower priority level value, and the priority level of the resource pool takes precedence over the priority of the job.
        self.priority = priority
        # The status of the resource pool. Valid values:
        # 
        # *   Creating: The resource pool is being created.
        # *   Updating: The resource pool is being updated.
        # *   Deleting: The resource pool is being deleted.
        # *   Working: The resource pool is working.
        # *   Deleted: The resource pool is deleted.
        self.status = status

    def validate(self):
        pass

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

        result = dict()
        if self.is_default is not None:
            result['IsDefault'] = self.is_default
        if self.max_exector_num is not None:
            result['MaxExectorNum'] = self.max_exector_num
        if self.pool_name is not None:
            result['PoolName'] = self.pool_name
        if self.priority is not None:
            result['Priority'] = self.priority
        if self.status is not None:
            result['Status'] = self.status
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('IsDefault') is not None:
            self.is_default = m.get('IsDefault')
        if m.get('MaxExectorNum') is not None:
            self.max_exector_num = m.get('MaxExectorNum')
        if m.get('PoolName') is not None:
            self.pool_name = m.get('PoolName')
        if m.get('Priority') is not None:
            self.priority = m.get('Priority')
        if m.get('Status') is not None:
            self.status = m.get('Status')
        return self


class ListPoolsResponseBody(TeaModel):
    def __init__(
        self,
        page_number: int = None,
        page_size: int = None,
        pool_list: List[ListPoolsResponseBodyPoolList] = None,
        request_id: str = None,
        total_count: int = None,
    ):
        # The page number. Default value: 1.
        self.page_number = page_number
        # The number of entries on each page. Maximum value: 50. Default value: 10.
        self.page_size = page_size
        # Queries the resource pool list.
        self.pool_list = pool_list
        # Id of the request
        self.request_id = request_id
        # The total number of list entries.
        self.total_count = total_count

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

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

        result = dict()
        if self.page_number is not None:
            result['PageNumber'] = self.page_number
        if self.page_size is not None:
            result['PageSize'] = self.page_size
        result['PoolList'] = []
        if self.pool_list is not None:
            for k in self.pool_list:
                result['PoolList'].append(k.to_map() if k else None)
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.total_count is not None:
            result['TotalCount'] = self.total_count
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('PageNumber') is not None:
            self.page_number = m.get('PageNumber')
        if m.get('PageSize') is not None:
            self.page_size = m.get('PageSize')
        self.pool_list = []
        if m.get('PoolList') is not None:
            for k in m.get('PoolList'):
                temp_model = ListPoolsResponseBodyPoolList()
                self.pool_list.append(temp_model.from_map(k))
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('TotalCount') is not None:
            self.total_count = m.get('TotalCount')
        return self


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

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

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

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

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


class ListTagResourcesRequestTag(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # The key of the tag.
        self.key = key
        # The value of the tag.
        self.value = value

    def validate(self):
        pass

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

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

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


class ListTagResourcesRequest(TeaModel):
    def __init__(
        self,
        max_result: int = None,
        next_token: str = None,
        resource_id: List[str] = None,
        resource_type: str = None,
        tag: List[ListTagResourcesRequestTag] = None,
    ):
        # The number of records per page.
        self.max_result = max_result
        # A pagination token.
        self.next_token = next_token
        # The list of resource IDs. Valid values of N: 1 to 50.
        self.resource_id = resource_id
        # The type of the resource. Valid values:
        # 
        # *   Job
        # *   Executor
        # 
        # This parameter is required.
        self.resource_type = resource_type
        # The tags to add to the replication pair-consistent group. You can specify up to 20 tags.
        self.tag = tag

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

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

        result = dict()
        if self.max_result is not None:
            result['MaxResult'] = self.max_result
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        result['Tag'] = []
        if self.tag is not None:
            for k in self.tag:
                result['Tag'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('MaxResult') is not None:
            self.max_result = m.get('MaxResult')
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        self.tag = []
        if m.get('Tag') is not None:
            for k in m.get('Tag'):
                temp_model = ListTagResourcesRequestTag()
                self.tag.append(temp_model.from_map(k))
        return self


class ListTagResourcesResponseBodyTagResourcesTagResource(TeaModel):
    def __init__(
        self,
        resource_id: str = None,
        resource_type: str = None,
        tag_key: str = None,
        tag_value: str = None,
    ):
        # The ID of the resource.
        self.resource_id = resource_id
        # The type of the resource.
        self.resource_type = resource_type
        # The key of the tag that is added to the resource.
        self.tag_key = tag_key
        # The value of the tag.
        self.tag_value = tag_value

    def validate(self):
        pass

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

        result = dict()
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.tag_key is not None:
            result['TagKey'] = self.tag_key
        if self.tag_value is not None:
            result['TagValue'] = self.tag_value
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('TagKey') is not None:
            self.tag_key = m.get('TagKey')
        if m.get('TagValue') is not None:
            self.tag_value = m.get('TagValue')
        return self


class ListTagResourcesResponseBodyTagResources(TeaModel):
    def __init__(
        self,
        tag_resource: List[ListTagResourcesResponseBodyTagResourcesTagResource] = None,
    ):
        self.tag_resource = tag_resource

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

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

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

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


class ListTagResourcesResponseBody(TeaModel):
    def __init__(
        self,
        next_token: str = None,
        request_id: str = None,
        tag_resources: ListTagResourcesResponseBodyTagResources = None,
    ):
        # A pagination token. It can be used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.
        self.next_token = next_token
        # The request ID.
        self.request_id = request_id
        # The resource list.
        self.tag_resources = tag_resources

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

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

        result = dict()
        if self.next_token is not None:
            result['NextToken'] = self.next_token
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.tag_resources is not None:
            result['TagResources'] = self.tag_resources.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('NextToken') is not None:
            self.next_token = m.get('NextToken')
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('TagResources') is not None:
            temp_model = ListTagResourcesResponseBodyTagResources()
            self.tag_resources = temp_model.from_map(m['TagResources'])
        return self


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

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

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

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

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


class RemoveImageRequest(TeaModel):
    def __init__(
        self,
        image_id: str = None,
        image_type: str = None,
    ):
        # The image ID.
        # 
        # This parameter is required.
        self.image_id = image_id
        # The type of the images. Valid values:
        # 
        # *   VM: Virtual Machine Image
        # *   Container: container image
        self.image_type = image_type

    def validate(self):
        pass

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

        result = dict()
        if self.image_id is not None:
            result['ImageId'] = self.image_id
        if self.image_type is not None:
            result['ImageType'] = self.image_type
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ImageId') is not None:
            self.image_id = m.get('ImageId')
        if m.get('ImageType') is not None:
            self.image_type = m.get('ImageType')
        return self


class RemoveImageResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
        success: bool = None,
    ):
        # The request ID.
        self.request_id = request_id
        # Indicates whether the request was successful. Valid values:
        # 
        # *   true
        # *   false
        self.success = success

    def validate(self):
        pass

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

        result = dict()
        if self.request_id is not None:
            result['RequestId'] = self.request_id
        if self.success is not None:
            result['Success'] = self.success
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')
        if m.get('Success') is not None:
            self.success = m.get('Success')
        return self


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

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

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

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

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


class SynchronizeAppRequest(TeaModel):
    def __init__(
        self,
        app_id: str = None,
        target_region_ids: List[str] = None,
    ):
        # The application ID.
        # 
        # This parameter is required.
        self.app_id = app_id
        # The list of arrays that are synchronized to the specified region. If \\"all\\" is included, it is synchronized to all other unsynchronized regions by default.
        self.target_region_ids = target_region_ids

    def validate(self):
        pass

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

        result = dict()
        if self.app_id is not None:
            result['AppId'] = self.app_id
        if self.target_region_ids is not None:
            result['TargetRegionIds'] = self.target_region_ids
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('AppId') is not None:
            self.app_id = m.get('AppId')
        if m.get('TargetRegionIds') is not None:
            self.target_region_ids = m.get('TargetRegionIds')
        return self


class SynchronizeAppShrinkRequest(TeaModel):
    def __init__(
        self,
        app_id: str = None,
        target_region_ids_shrink: str = None,
    ):
        # The application ID.
        # 
        # This parameter is required.
        self.app_id = app_id
        # The list of arrays that are synchronized to the specified region. If \\"all\\" is included, it is synchronized to all other unsynchronized regions by default.
        self.target_region_ids_shrink = target_region_ids_shrink

    def validate(self):
        pass

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

        result = dict()
        if self.app_id is not None:
            result['AppId'] = self.app_id
        if self.target_region_ids_shrink is not None:
            result['TargetRegionIds'] = self.target_region_ids_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('AppId') is not None:
            self.app_id = m.get('AppId')
        if m.get('TargetRegionIds') is not None:
            self.target_region_ids_shrink = m.get('TargetRegionIds')
        return self


class SynchronizeAppResponseBody(TeaModel):
    def __init__(
        self,
        request_id: str = None,
    ):
        # Request ID.
        self.request_id = request_id

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class TagResourcesRequestTag(TeaModel):
    def __init__(
        self,
        key: str = None,
        value: str = None,
    ):
        # The key of the tag. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot contain http:// or https://. The tag key cannot start with acs: or aliyun.
        # 
        # This parameter is required.
        self.key = key
        # The value of the tag. You can specify empty strings as tag values. The tag value can be up to 128 characters in length and cannot contain http:// or https://.
        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 TagResourcesRequest(TeaModel):
    def __init__(
        self,
        resource_id: List[str] = None,
        resource_type: str = None,
        tag: List[TagResourcesRequestTag] = None,
    ):
        # The list of resource IDs. Valid values of N: 1 to 50.
        # 
        # This parameter is required.
        self.resource_id = resource_id
        # The type of the resource. Valid values:
        # 
        # *   Job
        # *   Executor
        # 
        # This parameter is required.
        self.resource_type = resource_type
        # The tags to add to the replication pair-consistent group. You can specify up to 20 tags.
        # 
        # This parameter is required.
        self.tag = tag

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

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

        result = dict()
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        result['Tag'] = []
        if self.tag is not None:
            for k in self.tag:
                result['Tag'].append(k.to_map() if k else None)
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        self.tag = []
        if m.get('Tag') is not None:
            for k in m.get('Tag'):
                temp_model = TagResourcesRequestTag()
                self.tag.append(temp_model.from_map(k))
        return self


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

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class UnTagResourcesRequest(TeaModel):
    def __init__(
        self,
        all: bool = None,
        resource_id: List[str] = None,
        resource_type: str = None,
        tag_key: List[str] = None,
    ):
        # Whether to delete all tags of the target resource. This field takes effect only when TagKey.N is left empty. Default False
        self.all = all
        # The list of resource IDs. Valid values of N: 1 to 50.
        # 
        # This parameter is required.
        self.resource_id = resource_id
        # The type of the resource. Valid values:
        # 
        # *   Job
        # *   Executor
        # 
        # This parameter is required.
        self.resource_type = resource_type
        # The list of tag keys, which can contain a maximum of 20 child items.
        self.tag_key = tag_key

    def validate(self):
        pass

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

        result = dict()
        if self.all is not None:
            result['All'] = self.all
        if self.resource_id is not None:
            result['ResourceId'] = self.resource_id
        if self.resource_type is not None:
            result['ResourceType'] = self.resource_type
        if self.tag_key is not None:
            result['TagKey'] = self.tag_key
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('All') is not None:
            self.all = m.get('All')
        if m.get('ResourceId') is not None:
            self.resource_id = m.get('ResourceId')
        if m.get('ResourceType') is not None:
            self.resource_type = m.get('ResourceType')
        if m.get('TagKey') is not None:
            self.tag_key = m.get('TagKey')
        return self


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

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class UpdateActionPlanRequest(TeaModel):
    def __init__(
        self,
        action_plan_id: str = None,
        desired_capacity: float = None,
        enabled: str = None,
    ):
        # The ID of the execution plan.
        self.action_plan_id = action_plan_id
        # The expected scale of resources for the execution plan. If the ResourceType parameter is set to VcpuCapacity, the execution plan is expected to have 10000 vCPUs.
        self.desired_capacity = desired_capacity
        # Whether to enable the execution plan. Valid values:
        # 
        # *   true: enables the execution plan.
        # 
        # *   false: The execution plan is disabled.
        # 
        #     **\
        # 
        #     **Note:** After an execution plan is disabled, the created Instant jobs are not automatically managed by the execution plan.
        self.enabled = enabled

    def validate(self):
        pass

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

        result = dict()
        if self.action_plan_id is not None:
            result['ActionPlanId'] = self.action_plan_id
        if self.desired_capacity is not None:
            result['DesiredCapacity'] = self.desired_capacity
        if self.enabled is not None:
            result['Enabled'] = self.enabled
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('ActionPlanId') is not None:
            self.action_plan_id = m.get('ActionPlanId')
        if m.get('DesiredCapacity') is not None:
            self.desired_capacity = m.get('DesiredCapacity')
        if m.get('Enabled') is not None:
            self.enabled = m.get('Enabled')
        return self


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

    def validate(self):
        pass

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

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

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


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

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

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

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

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


class UpdatePoolRequestResourceLimits(TeaModel):
    def __init__(
        self,
        max_exector_num: int = None,
    ):
        # The maximum number of concurrent execution nodes in a resource pool.
        self.max_exector_num = max_exector_num

    def validate(self):
        pass

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

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

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


class UpdatePoolRequest(TeaModel):
    def __init__(
        self,
        pool_name: str = None,
        priority: int = None,
        resource_limits: UpdatePoolRequestResourceLimits = None,
    ):
        # The name of the resource pool.
        # 
        # *   The value can be up to 15 characters in length.
        # *   It can contain digits, uppercase letters, lowercase letters, underscores (_), and dots (.).
        # 
        # This parameter is required.
        self.pool_name = pool_name
        # The priority of the resource pool.
        # 
        # *   You can set a priority in the range of 1 to 99. The default value is 1, which is the lowest priority.
        # *   Jobs submitted to a resource pool with a higher priority level value will be scheduled before pending jobs in a resource pool with a lower priority level value, and the priority level of the resource pool takes precedence over the priority of the job.
        self.priority = priority
        # The quota of resources that users are allowed to concurrently use in a resource pool.
        self.resource_limits = resource_limits

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

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

        result = dict()
        if self.pool_name is not None:
            result['PoolName'] = self.pool_name
        if self.priority is not None:
            result['Priority'] = self.priority
        if self.resource_limits is not None:
            result['ResourceLimits'] = self.resource_limits.to_map()
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('PoolName') is not None:
            self.pool_name = m.get('PoolName')
        if m.get('Priority') is not None:
            self.priority = m.get('Priority')
        if m.get('ResourceLimits') is not None:
            temp_model = UpdatePoolRequestResourceLimits()
            self.resource_limits = temp_model.from_map(m['ResourceLimits'])
        return self


class UpdatePoolShrinkRequest(TeaModel):
    def __init__(
        self,
        pool_name: str = None,
        priority: int = None,
        resource_limits_shrink: str = None,
    ):
        # The name of the resource pool.
        # 
        # *   The value can be up to 15 characters in length.
        # *   It can contain digits, uppercase letters, lowercase letters, underscores (_), and dots (.).
        # 
        # This parameter is required.
        self.pool_name = pool_name
        # The priority of the resource pool.
        # 
        # *   You can set a priority in the range of 1 to 99. The default value is 1, which is the lowest priority.
        # *   Jobs submitted to a resource pool with a higher priority level value will be scheduled before pending jobs in a resource pool with a lower priority level value, and the priority level of the resource pool takes precedence over the priority of the job.
        self.priority = priority
        # The quota of resources that users are allowed to concurrently use in a resource pool.
        self.resource_limits_shrink = resource_limits_shrink

    def validate(self):
        pass

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

        result = dict()
        if self.pool_name is not None:
            result['PoolName'] = self.pool_name
        if self.priority is not None:
            result['Priority'] = self.priority
        if self.resource_limits_shrink is not None:
            result['ResourceLimits'] = self.resource_limits_shrink
        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('PoolName') is not None:
            self.pool_name = m.get('PoolName')
        if m.get('Priority') is not None:
            self.priority = m.get('Priority')
        if m.get('ResourceLimits') is not None:
            self.resource_limits_shrink = m.get('ResourceLimits')
        return self


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

    def validate(self):
        pass

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

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

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


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

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

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

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

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


